diff options
| author | Jeff Carr <[email protected]> | 2025-08-30 20:11:30 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-08-30 20:11:30 -0500 |
| commit | 5d62516c40934e21157219413934795f52238598 (patch) | |
| tree | e0e0024802b4526a7d1bcdb0da05c63c233641d3 /helpers.go | |
| parent | 395597646ac456b4de626450d899a6139b4c780e (diff) | |
schema changes to Marshal() JSON from gemini-cliv0.0.4
Diffstat (limited to 'helpers.go')
| -rw-r--r-- | helpers.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -93,3 +93,11 @@ func (x *Chats) AppendNew(y *Chat) { x.Chats = append(x.Chats, chat) } + +// a Append() shortcut (that does Clone() with a mutex) notsure if it really works +func (x *Chat) AppendEntry(y *ChatEntry) { + x.Lock() + defer x.Unlock() + + x.Entries = append(x.Entries, proto.Clone(y).(*ChatEntry)) +} |
