MCPcopy Create free account
hub / github.com/betta-tech/byo-coding-agent / Save

Method Save

internal/memory/sessionfiles.go:100–108  ·  view source on GitHub ↗

Save appends an entry to the in-progress session draft. Nothing reaches disk until Close — drafts are cheap, and per-Save file writes during a busy session would be needless churn.

(_ context.Context, e Entry)

Source from the content-addressed store, hash-verified

98// disk until Close — drafts are cheap, and per-Save file writes during a
99// busy session would be needless churn.
100func (s *SessionFiles) Save(_ context.Context, e Entry) error {
101 if e.Time.IsZero() {
102 e.Time = time.Now()
103 }
104 s.mu.Lock()
105 s.draft = append(s.draft, e)
106 s.mu.Unlock()
107 return nil
108}
109
110// Recall walks the index and returns up to `limit` session records whose
111// summary or tags match the query. Match is a case-insensitive substring

Calls

no outgoing calls