feat: report Claude CLI installation and gate unsupported versions

This commit is contained in:
amosblomqvist
2026-10-28 19:10:47 +02:00
parent c0de3f968d
commit c5a756d707
17 changed files with 334 additions and 21 deletions
+4 -3
View File
@@ -354,7 +354,7 @@ function withClaudeInstalled(installed: boolean, fn: () => void): void {
}
}
describe("the claude-code provider (subscription CLI, no key)", () => {
describe("the claude-code provider (native CLI authentication, no LearnHarness key)", () => {
it("modelCatalog() lists claude-code opus/sonnet/haiku when the CLI is installed", () => {
withClaudeInstalled(true, () => {
const ids = modelCatalog()
@@ -394,7 +394,8 @@ describe("the claude-code provider (subscription CLI, no key)", () => {
assert.equal(engine.model.id, "sonnet");
});
it('providerKeyPresent("claude-code") is true', () => {
assert.equal(providerKeyPresent("claude-code"), true);
it('providerKeyPresent("claude-code") follows executable presence, not a generic keyless default', () => {
withClaudeInstalled(true, () => assert.equal(providerKeyPresent("claude-code"), true));
withClaudeInstalled(false, () => assert.equal(providerKeyPresent("claude-code"), false));
});
});