mirror of
https://github.com/obra/superpowers.git
synced 2026-05-07 01:29:05 +08:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user