feat: rename data directory, add global project settings, multi-project CLI commands, and provider badge in model selector

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-04-02 09:10:42 -07:00
parent 1fa8837c6b
commit 566f531361
80 changed files with 857 additions and 652 deletions

View File

@@ -193,7 +193,7 @@ describe("CentralCore Integration", () => {
it("should verify database path and stats", async () => {
const dbPath = central.getDatabasePath();
expect(dbPath).toContain("kb-central.db");
expect(dbPath).toContain("fusion-central.db");
const globalDir = central.getGlobalDir();
expect(globalDir).toBe(tempDir);

View File

@@ -13,8 +13,8 @@ function createTempDir(): string {
// Helper to create a fake kb project structure
function createFakeKbProject(dir: string): void {
mkdirSync(join(dir, ".kb"), { recursive: true });
writeFileSync(join(dir, ".kb", "kb.db"), "");
mkdirSync(join(dir, ".fusion"), { recursive: true });
writeFileSync(join(dir, ".fusion", "fusion.db"), "");
}
describe("FirstRunExperience", () => {

View File

@@ -12,9 +12,9 @@ function createTempDir(): string {
// Helper to create a fake kb project structure
function createFakeKbProject(dir: string): void {
mkdirSync(join(dir, ".kb"), { recursive: true });
mkdirSync(join(dir, ".fusion"), { recursive: true });
// Create an empty file as the database (enough for detection)
writeFileSync(join(dir, ".kb", "kb.db"), "");
writeFileSync(join(dir, ".fusion", "fusion.db"), "");
}
describe("MigrationOrchestrator", () => {
@@ -164,7 +164,7 @@ describe("MigrationOrchestrator", () => {
const projectDir = join(tempDir, "incomplete-project");
mkdirSync(projectDir, { recursive: true });
mkdirSync(join(projectDir, ".fusion"), { recursive: true });
// Create directory but no kb.db file
// Create directory but no fusion.db file
const detected = await orchestrator.detectExistingProjects(projectDir);

View File

@@ -15,7 +15,7 @@ function createTempDir(): string {
function createFakeFusionProject(dir: string): void {
const fusionDir = join(dir, ".fusion");
mkdirSync(fusionDir, { recursive: true });
const db = new DatabaseSync(join(fusionDir, "kb.db"));
const db = new DatabaseSync(join(fusionDir, "fusion.db"));
db.exec("CREATE TABLE IF NOT EXISTS sanity (id INTEGER PRIMARY KEY)");
db.close();
}
@@ -125,7 +125,7 @@ describe("TaskStore Backward Compatibility", () => {
createFakeFusionProject(projectDir);
process.chdir(projectDir);
const centralDb = join(tempDir, "kb-central.db");
const centralDb = join(tempDir, "fusion-central.db");
await centralCore.close();
rmSync(centralDb, { force: true });
centralCore = new CentralCore(tempDir);
@@ -135,7 +135,7 @@ describe("TaskStore Backward Compatibility", () => {
expect(store).toBeInstanceOf(TaskStore);
const task = await store.createTask({ description: "legacy task" });
expect(task.id).toBe("FN-001");
expect(existsSync(join(projectDir, ".fusion", "kb.db"))).toBe(true);
expect(existsSync(join(projectDir, ".fusion", "fusion.db"))).toBe(true);
expect(existsSync(join(projectDir, ".fusion", "tasks", task.id, "task.json"))).toBe(true);
});