mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-15 18:30:39 +09:00
Fix OpenCode default model and model-unavailable diagnostics
This commit is contained in:
parent
e835c5cee9
commit
875924a7f3
4 changed files with 76 additions and 40 deletions
|
|
@ -61,7 +61,7 @@ describe("opencode_local environment diagnostics", () => {
|
|||
}
|
||||
});
|
||||
|
||||
it("classifies ProviderModelNotFoundError probe output as auth-required warning", async () => {
|
||||
it("classifies ProviderModelNotFoundError probe output as model-unavailable warning", async () => {
|
||||
const cwd = await fs.mkdtemp(path.join(os.tmpdir(), "paperclip-opencode-env-probe-cwd-"));
|
||||
const binDir = await fs.mkdtemp(path.join(os.tmpdir(), "paperclip-opencode-env-probe-bin-"));
|
||||
const fakeOpencode = path.join(binDir, "opencode");
|
||||
|
|
@ -86,9 +86,9 @@ describe("opencode_local environment diagnostics", () => {
|
|||
},
|
||||
});
|
||||
|
||||
const authCheck = result.checks.find((check) => check.code === "opencode_hello_probe_auth_required");
|
||||
expect(authCheck).toBeTruthy();
|
||||
expect(authCheck?.level).toBe("warn");
|
||||
const modelCheck = result.checks.find((check) => check.code === "opencode_hello_probe_model_unavailable");
|
||||
expect(modelCheck).toBeTruthy();
|
||||
expect(modelCheck?.level).toBe("warn");
|
||||
expect(result.status).toBe("warn");
|
||||
} finally {
|
||||
await fs.rm(cwd, { recursive: true, force: true });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue