feat(ai): add Jalapeno Cloud partner preset
This commit is contained in:
16 files changed
+253
-47
No files matched your search
+17
-1
@@ -6,7 +6,7 @@ import { DEFAULT_SQL_FORMATTER_SETTINGS } from "../../apps/desktop/src/lib/sql/s
|
||||
import { DEFAULT_TABLE_COLUMN_TEMPLATE_FIELDS } from "../../apps/desktop/src/lib/table/tableColumnTemplates.ts";
|
||||
import { DEFAULT_DATA_GRID_FONT_FAMILY, DEFAULT_UI_FONT_FAMILY, SYSTEM_UI_FONT_FAMILY } from "../../apps/desktop/src/lib/app/appFonts.ts";
|
||||
import { tableOpenPageLimit } from "../../apps/desktop/src/lib/table/tableOpenPageLimit.ts";
|
||||
import { AI_PROVIDER_PRESETS, DEFAULT_EDITOR_SETTINGS, EXECUTE_MODE_CURRENT_DEFAULT_VERSION, normalizeAiConfig, normalizeEditorSettings, useSettingsStore } from "../../apps/desktop/src/stores/settingsStore.ts";
|
||||
import { AI_PROVIDER_PARTNER_PRESETS, AI_PROVIDER_PRESETS, DEFAULT_EDITOR_SETTINGS, EXECUTE_MODE_CURRENT_DEFAULT_VERSION, getAiProviderPreset, getAiProviderPresetId, normalizeAiConfig, normalizeEditorSettings, useSettingsStore } from "../../apps/desktop/src/stores/settingsStore.ts";
|
||||
import { DEFAULT_SHORTCUT_SETTINGS, tabNavigationHistoryDefaultShortcut, type ShortcutSettings } from "../../apps/desktop/src/lib/editor/shortcutRegistry.ts";
|
||||
|
||||
const saveEditorSettingsMock = vi.hoisted(() => vi.fn());
|
||||
@@ -874,6 +874,22 @@ test("AI provider presets include common hosted and local providers", () => {
|
||||
assert.ok(Object.keys(AI_PROVIDER_PRESETS).indexOf("codex-cli") < Object.keys(AI_PROVIDER_PRESETS).indexOf("pi-agent-cli"));
|
||||
});
|
||||
|
||||
test("AI partner presets reuse a supported runtime adapter", () => {
|
||||
const jalapeno = AI_PROVIDER_PARTNER_PRESETS.find((preset) => preset.id === "jalapeno-cloud");
|
||||
|
||||
assert.ok(jalapeno);
|
||||
assert.equal(jalapeno.provider, "openai-compatible");
|
||||
assert.equal(jalapeno.endpoint, "https://api.jalapeno-cloud.ai/v1");
|
||||
assert.equal(jalapeno.model, "GLM-5.2");
|
||||
assert.deepEqual(jalapeno.models, [{ name: "GLM-5.2" }, { name: "DeepSeek-V4-Pro" }, { name: "MiniMax-M3" }]);
|
||||
assert.equal(jalapeno.requiresApiKey, true);
|
||||
assert.equal(jalapeno.websiteUrl, "https://www.jalapeno-cloud.ai/dbx");
|
||||
assert.equal(jalapeno.apiKeyUrl, "https://www.jalapeno-cloud.ai/dbx");
|
||||
assert.equal(getAiProviderPreset("openai-compatible", "https://api.jalapeno-cloud.ai/v1/").label, "Jalapeno Cloud");
|
||||
assert.equal(getAiProviderPresetId("openai-compatible", "https://api.jalapeno-cloud.ai/v1/"), "jalapeno-cloud");
|
||||
assert.equal(getAiProviderPreset("openai-compatible", "https://api.example.com/v1").label, "OpenAI Compatible");
|
||||
});
|
||||
|
||||
test("API AI provider settings expose and persist a default model ID", () => {
|
||||
const source = readFileSync("apps/desktop/src/components/editor/EditorSettingsDialog.vue", "utf8");
|
||||
const modelControl = source.indexOf('<Input v-model="aiEditModel"');
|
||||
|
||||
Reference in new issue
Block a user