feat(chat): add Claude Code chat backend

This commit is contained in:
2026-10-22 18:20:10 +01:00
parent dc6cb9aee1
commit 0acd7346bb
23 changed files with 3576 additions and 65 deletions
+4 -3
View File
@@ -3,9 +3,9 @@ import assert from "node:assert/strict";
import { chatModelLabel, chatModelSelectionNote, supportsChatModels } from "../src/chatModels.js";
import { PipelinesRepository } from "../src/repository.js";
test("Codex and OpenCode expose model selection, unverified backends do not", () => {
for (const backend of [undefined, "", "opencode", "codex"]) assert.equal(supportsChatModels(backend), true);
for (const backend of ["claude", "unknown"]) assert.equal(supportsChatModels(backend), false);
test("OpenCode, Codex and Claude expose model selection, unknown backends do not", () => {
for (const backend of [undefined, "", "opencode", "codex", "claude"]) assert.equal(supportsChatModels(backend), true);
for (const backend of ["unknown"]) assert.equal(supportsChatModels(backend), false);
});
test("model control distinguishes saved next-turn choice from remote current model", () => {
@@ -14,6 +14,7 @@ test("model control distinguishes saved next-turn choice from remote current mod
assert.equal(chatModelLabel({ model: null }), "Model");
assert.match(chatModelSelectionNote("codex"), /Saved by Pipelines for the next turn/);
assert.match(chatModelSelectionNote("codex"), /Does not resume/);
assert.match(chatModelSelectionNote("claude"), /Does not edit your global Claude Code configuration/);
});
test("model switch reply preserves local next-turn acknowledgement", async () => {