feat(KB-619): add CLI multi-project commands and --project flag support

- Add project-resolver module for centralized project resolution
- Add project subcommands: list, add, remove, info/show
- Add --project flag to task and settings commands
- Integrate project resolution into CLI entry point
- Update types for defaultProjectId setting
This commit is contained in:
gsxdsm
2026-04-01 07:16:10 -07:00
parent a8dbd95d8c
commit 51303c897a
8 changed files with 873 additions and 444 deletions

View File

@@ -7,17 +7,15 @@ import { watchFile, unwatchFile, statSync, existsSync, readFileSync } from "node
import { join } from "node:path";
import { GitHubClient } from "@fusion/dashboard";
import { isGhAvailable, isGhAuthenticated, getCurrentRepo } from "@fusion/core/gh-cli";
import { resolveProject, getStore as getStoreFromContext } from "../project-context.js";
import { getStore as getStoreFromResolver, resolveProject } from "../project-resolver.js";
const STEP_STATUSES: StepStatus[] = ["pending", "in-progress", "done", "skipped"];
async function getStore(projectName?: string): Promise<TaskStore> {
if (projectName) {
return getStoreFromContext(projectName);
return getStoreFromResolver({ project: projectName });
}
const store = new TaskStore(process.cwd());
await store.init();
return store;
return getStoreFromResolver();
}
export async function runTaskCreate(descriptionArg?: string, attachFiles?: string[], depends?: string[], projectName?: string) {