feat(webui): switch model presets from the composer (#5077)

This commit is contained in:
chengyongru
2026-07-24 17:34:26 +08:00
committed by GitHub
parent 9aab94c766
commit 5be176a6a0
16 changed files with 991 additions and 138 deletions
@@ -25,7 +25,7 @@ describe("SessionSearchDialog", () => {
render(
<SessionSearchDialog
open
sessions={[session(1)]}
sessions={[{ ...session(1), title: "Model chat", preview: "/model fast" }]}
activeKey={null}
loading={false}
onOpenChange={() => {}}
@@ -38,6 +38,11 @@ describe("SessionSearchDialog", () => {
expect(dialog.className).not.toContain("bg-popover/");
expect(dialog.className).not.toContain("backdrop-blur");
expect(screen.getByTestId("session-search-scroll")).toHaveClass("overflow-y-auto");
expect(screen.queryByText("/model fast")).not.toBeInTheDocument();
fireEvent.change(screen.getByRole("textbox", { name: "Search" }), {
target: { value: "model fast" },
});
expect(screen.queryByText("Model chat")).not.toBeInTheDocument();
});
it("keeps keyboard navigation scrollable through long result lists", () => {