mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-22 08:38:08 +02:00
Remove deleted CLI command remnants (#105)
* fix(cli): reject unknown commands generically * fix(cli): refresh ready command hints * refactor(cli): drop removed wiki command internals
This commit is contained in:
parent
db23fea609
commit
6bc8d200ea
8 changed files with 75 additions and 207 deletions
|
|
@ -9,6 +9,7 @@ import type {
|
|||
} from '@ktx/context/project';
|
||||
import type { PostgresPgssProbeResult } from '@ktx/context/ingest';
|
||||
import type { DoctorCheck } from './doctor.js';
|
||||
import { KTX_NEXT_STEP_DIRECT_COMMANDS } from './next-steps.js';
|
||||
|
||||
type ProjectStatusLevel = 'ok' | 'warn' | 'fail';
|
||||
type ProjectVerdict = 'ready' | 'partial' | 'blocked';
|
||||
|
|
@ -69,6 +70,8 @@ interface WarningItem {
|
|||
fix?: string;
|
||||
}
|
||||
|
||||
const PROJECT_READY_COMMANDS = KTX_NEXT_STEP_DIRECT_COMMANDS.map((step) => step.command);
|
||||
|
||||
function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
||||
}
|
||||
|
|
@ -132,7 +135,7 @@ function buildLlmStatus(config: KtxProjectLlmConfig, env: NodeJS.ProcessEnv): Ll
|
|||
backend,
|
||||
model,
|
||||
status: 'fail',
|
||||
detail: 'no LLM configured — ktx ask will not work',
|
||||
detail: 'no LLM configured; research agent will not run',
|
||||
fix: 'Run: ktx setup (choose an LLM provider)',
|
||||
};
|
||||
}
|
||||
|
|
@ -571,7 +574,7 @@ function buildVerdict(
|
|||
if (llm.status === 'fail') {
|
||||
return {
|
||||
verdict: 'blocked',
|
||||
reason: 'LLM not configured — `ktx ask` will not work.',
|
||||
reason: 'LLM not configured; research agent will not run.',
|
||||
nextActions: ['ktx setup'],
|
||||
};
|
||||
}
|
||||
|
|
@ -605,7 +608,7 @@ function buildVerdict(
|
|||
return {
|
||||
verdict: 'ready',
|
||||
reason: 'Ready.',
|
||||
nextActions: ['ktx scan', 'ktx wiki', 'ktx sl ask "…"'],
|
||||
nextActions: [...PROJECT_READY_COMMANDS],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue