(options: ListContextOptions)
| 72 | } |
| 73 | |
| 74 | export function listContextCommand(options: ListContextOptions): void { |
| 75 | const dbPath = ensureInitialized(); |
| 76 | const db = openDatabase(dbPath); |
| 77 | const facts = options.scope ? getFactsByScope(db, options.scope) : getAllFacts(db); |
| 78 | db.close(); |
| 79 | |
| 80 | if (facts.length === 0) { |
| 81 | console.log("No context facts found."); |
| 82 | return; |
| 83 | } |
| 84 | |
| 85 | console.log("Context facts:\n"); |
| 86 | for (const fact of facts) { |
| 87 | console.log(`- ${fact.key}`); |
| 88 | console.log(` Scope: ${fact.scope}`); |
| 89 | console.log(` Updated: ${fact.last_confirmed}`); |
| 90 | console.log(` Tags: ${fact.tags.join(", ")}`); |
| 91 | console.log(); |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | export async function discoverConversations(options?: { |
| 96 | localOnly?: boolean; |
no test coverage detected