MCPcopy Create free account
hub / github.com/compozy/agh / memoryEntryBundle

Function memoryEntryBundle

internal/cli/memory.go:1538–1560  ·  view source on GitHub ↗
(response MemoryEntryRecord)

Source from the content-addressed store, hash-verified

1536}
1537
1538func memoryEntryBundle(response MemoryEntryRecord) outputBundle {
1539 return outputBundle{
1540 jsonValue: response,
1541 jsonl: func(cmd *cobra.Command) error {
1542 return writeJSONLine(cmd, response)
1543 },
1544 human: func() (string, error) {
1545 return strings.TrimRight(response.Memory.Content, "\n"), nil
1546 },
1547 toon: func() (string, error) {
1548 summary := response.Memory.Summary
1549 return renderToonObject(
1550 memoryMemoryKey,
1551 []string{memoryFilenameKey, automationScopeKey, memoryContentKey},
1552 []string{
1553 summary.Filename,
1554 memoryScopeLabel(summary.Scope, summary.AgentTier),
1555 response.Memory.Content,
1556 },
1557 ), nil
1558 },
1559 }
1560}
1561
1562func memorySearchBundle(response MemorySearchRecord) outputBundle {
1563 items := make([]memorySearchItem, 0, len(response.Results))

Callers 1

newMemoryShowCommandFunction · 0.85

Calls 3

writeJSONLineFunction · 0.85
renderToonObjectFunction · 0.85
memoryScopeLabelFunction · 0.85

Tested by

no test coverage detected