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

Method flushIndex

internal/memory/sessionfiles.go:86–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84}
85
86func (s *SessionFiles) flushIndex() error {
87 out := struct {
88 Sessions []SessionRecord `json:"sessions"`
89 }{Sessions: s.index}
90 data, err := json.MarshalIndent(out, "", " ")
91 if err != nil {
92 return err
93 }
94 return os.WriteFile(filepath.Join(s.root, "index.json"), data, 0o644)
95}
96
97// Save appends an entry to the in-progress session draft. Nothing reaches
98// disk until Close — drafts are cheap, and per-Save file writes during a

Callers 1

CloseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected