fix: title generation + ai sdk upgrade (#1392)

This commit is contained in:
josh 2026-01-15 16:06:42 +00:00 committed by GitHub
parent f19d3d4071
commit 9d5d8a3ea7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 1422 additions and 2360 deletions

View file

@ -9,12 +9,18 @@ test.describe("Model Selector", () => {
test("displays a model button", async ({ page }) => {
// Look for any button with model-related content
const modelButton = page.locator("button").filter({ hasText: MODEL_BUTTON_REGEX }).first();
const modelButton = page
.locator("button")
.filter({ hasText: MODEL_BUTTON_REGEX })
.first();
await expect(modelButton).toBeVisible();
});
test("opens model selector popover on click", async ({ page }) => {
const modelButton = page.locator("button").filter({ hasText: MODEL_BUTTON_REGEX }).first();
const modelButton = page
.locator("button")
.filter({ hasText: MODEL_BUTTON_REGEX })
.first();
await modelButton.click();
// Search input should be visible in the popover
@ -22,7 +28,10 @@ test.describe("Model Selector", () => {
});
test("can search for models", async ({ page }) => {
const modelButton = page.locator("button").filter({ hasText: MODEL_BUTTON_REGEX }).first();
const modelButton = page
.locator("button")
.filter({ hasText: MODEL_BUTTON_REGEX })
.first();
await modelButton.click();
const searchInput = page.getByPlaceholder("Search models...");
@ -33,7 +42,10 @@ test.describe("Model Selector", () => {
});
test("can close model selector by clicking outside", async ({ page }) => {
const modelButton = page.locator("button").filter({ hasText: MODEL_BUTTON_REGEX }).first();
const modelButton = page
.locator("button")
.filter({ hasText: MODEL_BUTTON_REGEX })
.first();
await modelButton.click();
await expect(page.getByPlaceholder("Search models...")).toBeVisible();
@ -45,7 +57,10 @@ test.describe("Model Selector", () => {
});
test("shows model provider groups", async ({ page }) => {
const modelButton = page.locator("button").filter({ hasText: MODEL_BUTTON_REGEX }).first();
const modelButton = page
.locator("button")
.filter({ hasText: MODEL_BUTTON_REGEX })
.first();
await modelButton.click();
// Should show provider group headers
@ -54,7 +69,10 @@ test.describe("Model Selector", () => {
});
test("can select a different model", async ({ page }) => {
const modelButton = page.locator("button").filter({ hasText: MODEL_BUTTON_REGEX }).first();
const modelButton = page
.locator("button")
.filter({ hasText: MODEL_BUTTON_REGEX })
.first();
await modelButton.click();
// Select a specific model
@ -64,6 +82,8 @@ test.describe("Model Selector", () => {
await expect(page.getByPlaceholder("Search models...")).not.toBeVisible();
// Model button should now show the selected model
await expect(page.locator("button").filter({ hasText: "Claude Haiku" }).first()).toBeVisible();
await expect(
page.locator("button").filter({ hasText: "Claude Haiku" }).first()
).toBeVisible();
});
});

View file

@ -23,7 +23,11 @@ export function getResponseChunksByPrompt(
{ type: "text-start", id: "t1" },
{ type: "text-delta", id: "t1", delta: "Hello, world!" },
{ type: "text-end", id: "t1" },
{ type: "finish", finishReason: "stop", usage: mockUsage }
{
type: "finish",
finishReason: { unified: "stop", raw: "stop" },
usage: mockUsage,
}
);
return chunks;