feat(ai): add Cursor CLI provider

This commit is contained in:
Guoyu Su authored and GitHub committed 2026-08-08 11:08:18 +08:00
1 parent 25fd5677c7
commit 36e5fa4f4c
36 files changed
+1173 -36

No files matched your search

+16
View File
@@ -432,6 +432,22 @@ describe("settingsStore AI API key normalization", () => {
opencodeCliEnv: { HTTPS_PROXY: "http://127.0.0.1:7890", EMPTY: "" },
});
});
it("normalizes Cursor CLI path and environment settings", () => {
expect(
normalizeAiConfig({
provider: "cursor-cli",
cursorCliPath: " ~/.local/bin/agent ",
cursorCliEnv: { HTTPS_PROXY: "http://127.0.0.1:7890", EMPTY: null as unknown as string },
}),
).toMatchObject({
provider: "cursor-cli",
endpoint: "",
model: "default",
cursorCliPath: "~/.local/bin/agent",
cursorCliEnv: { HTTPS_PROXY: "http://127.0.0.1:7890", EMPTY: "" },
});
});
});
describe("settingsStore MCP policy persistence", () => {