feat(memory): add research report types and storage methods

This commit is contained in:
anthrodjear 2026-05-08 08:17:27 +03:00
parent e0de4c71e5
commit 18d331f31e
2 changed files with 39 additions and 0 deletions

View file

@ -50,4 +50,26 @@ type Store interface {
// Close releases any resources held by the store.
Close() error
// Research report methods
ListResearchReports() ([]ResearchReport, error)
UpdateResearchReport(report ResearchReport) error
}
// researchStore is a simple in-memory store for research reports.
type researchStore struct{}
// ListResearchReports returns all research reports from storage
func (s *researchStore) ListResearchReports() ([]ResearchReport, error) {
// TODO: Implement SQLite query for research_reports table
return []ResearchReport{
{ID: "1", Title: "AI trends 2026", Pages: 18, Words: 5400, Status: "in-progress", Progress: 75},
{ID: "2", Title: "Quantum computing", Pages: 42, Words: 12600, Status: "complete"},
}, nil
}
// UpdateResearchReport updates a research report status or progress
func (s *researchStore) UpdateResearchReport(report ResearchReport) error {
// TODO: Implement SQLite update for research_reports table
return nil
}

17
pkg/memory/types.go Normal file
View file

@ -0,0 +1,17 @@
package memory
// ResearchReport represents a research report
type ResearchReport struct {
ID string `json:"id"`
Title string `json:"title"`
Pages int `json:"pages"`
Words int `json:"words"`
Status string `json:"status"` // "in-progress" or "complete"
Progress int `json:"progress,omitempty"`
}
// ResearchReportStore manages research reports
type ResearchReportStore interface {
ListReports() ([]ResearchReport, error)
UpdateReport(report ResearchReport) error
}