mirror of
https://github.com/obra/superpowers.git
synced 2026-06-09 17:02:07 +00:00
Migrate conversation search to use PERSONAL_SUPERPOWERS_DIR
Updates conversation indexing and search to use the new personal superpowers directory structure with environment variable support. Changes: - Added src/paths.ts for centralized directory resolution - Updated db.ts, indexer.ts, verify.ts to use paths.ts - Created migrate-to-config.sh for data migration from ~/.clank - Updated all documentation references from ~/.clank to ~/.config/superpowers - Database paths automatically updated during migration Migration tested with 5,017 conversations and 6,385 exchanges.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import os from 'os';
|
||||
import { parseConversation } from './parser.js';
|
||||
import { initDatabase, getAllExchanges, getFileLastIndexed } from './db.js';
|
||||
import { getArchiveDir } from './paths.js';
|
||||
|
||||
export interface VerificationResult {
|
||||
missing: Array<{ path: string; reason: string }>;
|
||||
@@ -11,11 +11,6 @@ export interface VerificationResult {
|
||||
corrupted: Array<{ path: string; error: string }>;
|
||||
}
|
||||
|
||||
// Allow overriding paths for testing
|
||||
function getArchiveDir(): string {
|
||||
return process.env.TEST_ARCHIVE_DIR || path.join(os.homedir(), '.clank', 'conversation-archive');
|
||||
}
|
||||
|
||||
export async function verifyIndex(): Promise<VerificationResult> {
|
||||
const result: VerificationResult = {
|
||||
missing: [],
|
||||
|
||||
Reference in New Issue
Block a user