(item: MemoryItem | string)
| 126 | const searchItems = data.searchResults ?? [] |
| 127 | |
| 128 | const getMemoryString = (item: MemoryItem | string): string | null => { |
| 129 | if (!item) return null |
| 130 | // Handle both string format (from API) and object format |
| 131 | if (typeof item === "string") { |
| 132 | const trimmed = item.trim() |
| 133 | return trimmed.length > 0 ? trimmed : null |
| 134 | } |
| 135 | if (typeof item.memory !== "string") return null |
| 136 | const trimmed = item.memory.trim() |
| 137 | return trimmed.length > 0 ? trimmed : null |
| 138 | } |
| 139 | |
| 140 | const staticMemories: string[] = [] |
| 141 | const seenMemories = new Set<string>() |
no outgoing calls
no test coverage detected
searching dependent graphs…