(response MemoryEntryRecord)
| 1536 | } |
| 1537 | |
| 1538 | func 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 | |
| 1562 | func memorySearchBundle(response MemorySearchRecord) outputBundle { |
| 1563 | items := make([]memorySearchItem, 0, len(response.Results)) |
no test coverage detected