refactor: remove retired agent provider integration
This commit is contained in:
@@ -28,8 +28,8 @@ async function fixture(viewport, mode = "token", options = {}) {
|
||||
localStorage.setItem("sybil:ui-mode", "full");
|
||||
if (options.seedModels && !localStorage.getItem("model-fixture-seeded")) {
|
||||
localStorage.setItem("model-fixture-seeded", "true");
|
||||
localStorage.setItem("sybil:modelPreferencesByProvider", JSON.stringify({ openai: "remembered-initial", anthropic: "legacy-custom" }));
|
||||
localStorage.setItem("sybil:quickQuestionModelSelection", JSON.stringify({ provider: "xai", modelPreferences: { xai: "legacy-quick", openai: "quick-original" } }));
|
||||
localStorage.setItem("sybil:modelPreferencesByProvider", JSON.stringify({ openai: "remembered-initial", anthropic: "legacy-custom", "retired-provider": "old-model" }));
|
||||
localStorage.setItem("sybil:quickQuestionModelSelection", JSON.stringify({ provider: "xai", modelPreferences: { xai: "legacy-quick", openai: "quick-original", "retired-provider": "old-model" } }));
|
||||
}
|
||||
window.__denyPreferenceWrites = !!options.denyWrites;
|
||||
const setItem = Storage.prototype.setItem;
|
||||
@@ -51,7 +51,7 @@ async function fixture(viewport, mode = "token", options = {}) {
|
||||
else if (path.endsWith("/workspace-items")) value = { items: [{ ...chat, type: "chat" }, { ...search, type: "search" }] };
|
||||
else if (path.endsWith(`/chats/${chat.id}`)) value = { chat };
|
||||
else if (path.endsWith(`/searches/${search.id}`)) value = { search };
|
||||
else if (path.endsWith("/models")) value = { providers: { openai: { models: ["fixture-model", "listed-next-model"], loadedAt: date, error: null } } };
|
||||
else if (path.endsWith("/models")) value = { providers: { openai: { models: ["fixture-model", "listed-next-model"], loadedAt: date, error: null }, "retired-provider": { models: ["old-model"], loadedAt: date, error: null } } };
|
||||
else if (path.endsWith("/chat-tools") || path.endsWith("/agent/tools")) value = { tools: [] };
|
||||
else if (path.endsWith("/active-runs")) value = { chats: [], searches: [] };
|
||||
else if (path.endsWith("/agent/messages")) value = { conversationId: "1", messages: [], cursor: "0", beforeCursor: null, hasMore: false };
|
||||
@@ -212,6 +212,8 @@ try {
|
||||
assert.equal(await settings.getByRole("combobox", { name: "Anthropic chat model", exact: true }).inputValue(), "legacy-custom");
|
||||
const quickProvider = settings.getByRole("combobox", { name: "Quick Questions provider", exact: true });
|
||||
const quickModel = settings.getByRole("combobox", { name: "Quick Questions model", exact: true });
|
||||
assert.deepEqual(await quickProvider.locator("option").evaluateAll(options => options.map(option => option.value)), ["openai", "anthropic", "xai", "gemini"]);
|
||||
assert.equal(await settings.getByRole("combobox").count(), 6, "only four chat models and the two Quick Questions controls");
|
||||
assert.equal(await quickProvider.inputValue(), "xai");
|
||||
assert.equal(await quickModel.inputValue(), "legacy-quick");
|
||||
// Reuse the catalog, accept custom values, commit with Tab, and cancel only the picker with Escape.
|
||||
@@ -248,8 +250,10 @@ try {
|
||||
const stored = await page.evaluate(() => ({ chats: JSON.parse(localStorage.getItem("sybil:modelPreferencesByProvider")), quick: JSON.parse(localStorage.getItem("sybil:quickQuestionModelSelection")) }));
|
||||
assert.equal(stored.chats.openai, "custom-chat-model");
|
||||
assert.equal(stored.chats.anthropic, "legacy-custom");
|
||||
assert.deepEqual(Object.keys(stored.chats), ["openai", "anthropic", "xai", "gemini"]);
|
||||
assert.equal(stored.quick.provider, "openai");
|
||||
assert.equal(stored.quick.modelPreferences.xai, "legacy-quick");
|
||||
assert.deepEqual(Object.keys(stored.quick.modelPreferences), ["openai", "anthropic", "xai", "gemini"]);
|
||||
assert.equal(await settings.locator(".app-settings-content").evaluate(el => el.scrollWidth > el.clientWidth), false);
|
||||
await settings.getByRole("heading", { name: "Models", exact: true }).scrollIntoViewIfNeeded();
|
||||
if (artifactDir) await page.screenshot({ path: `${artifactDir}/models-${viewport.width}.png` });
|
||||
|
||||
Reference in New Issue
Block a user