Add --no-summaries flag for cost-free indexing

Allows indexing conversations without AI summary generation.
Still generates embeddings locally for semantic search.

Usage: index-conversations --cleanup --no-summaries

Changes:
- Added --no-summaries flag parsing in index-cli.ts
- Updated indexConversations, indexSession, indexUnprocessed to accept noSummaries param
- Changed indexUnprocessed to check database instead of summary file existence
- Updated help text with new flag and examples

This enables indexing large conversation archives without API costs.
This commit is contained in:
Jesse Vincent
2025-10-10 17:32:48 -07:00
parent a48a7e5b1b
commit c023e803ac
3 changed files with 71 additions and 40 deletions

View File

@@ -18,7 +18,13 @@ function getConcurrency(): number {
return 1; // default
}
// Parse --no-summaries flag
function getNoSummaries(): boolean {
return process.argv.includes('--no-summaries');
}
const concurrency = getConcurrency();
const noSummaries = getNoSummaries();
async function main() {
try {
@@ -29,11 +35,11 @@ async function main() {
console.error('Usage: index-cli index-session <session-id>');
process.exit(1);
}
await indexSession(sessionId, concurrency);
await indexSession(sessionId, concurrency, noSummaries);
break;
case 'index-cleanup':
await indexUnprocessed(concurrency);
await indexUnprocessed(concurrency, noSummaries);
break;
case 'verify':
@@ -98,12 +104,12 @@ async function main() {
// Re-index everything
console.log('Re-indexing all conversations...');
await indexConversations(undefined, undefined, concurrency);
await indexConversations(undefined, undefined, concurrency, noSummaries);
break;
case 'index-all':
default:
await indexConversations(undefined, undefined, concurrency);
await indexConversations(undefined, undefined, concurrency, noSummaries);
break;
}
} catch (error) {