Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async function mountMenu(props?: { modelSelection?: ModelSelection; prompt?: str
],
["ultrathink"],
),
booleanDescriptor("fastMode", "Fast Mode"),
booleanDescriptor("fastMode", "Speed"),
],
}),
},
Expand Down Expand Up @@ -181,7 +181,7 @@ describe("CompactComposerControlsMenu", () => {
});
});

it("shows fast mode controls for Opus", async () => {
it("shows speed controls for Opus", async () => {
await using _ = await mountMenu({
modelSelection: createModelSelection(
ProviderInstanceId.make("claudeAgent"),
Expand All @@ -193,13 +193,13 @@ describe("CompactComposerControlsMenu", () => {

await vi.waitFor(() => {
const text = document.body.textContent ?? "";
expect(text).toContain("Fast Mode");
expect(text).toContain("On");
expect(text).toContain("Off");
expect(text).toContain("Speed");
expect(text).toContain("Normal");
expect(text).toContain("Fast");
});
});

it("hides fast mode controls for non-Opus Claude models", async () => {
it("hides speed controls for non-Opus Claude models", async () => {
await using _ = await mountMenu({
modelSelection: createModelSelection(
ProviderInstanceId.make("claudeAgent"),
Expand All @@ -210,7 +210,7 @@ describe("CompactComposerControlsMenu", () => {
await page.getByLabelText("More composer controls").click();

await vi.waitFor(() => {
expect(document.body.textContent ?? "").not.toContain("Fast Mode");
expect(document.body.textContent ?? "").not.toContain("Speed");
});
});

Expand Down
18 changes: 18 additions & 0 deletions apps/web/src/components/chat/SelectedModelBadge.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { CheckIcon } from "lucide-react";

import { Badge } from "../ui/badge";

export function SelectedModelBadge() {
return <CheckIcon className="size-3.5 shrink-0 text-blue-400" />;
}

export function DefaultBadge() {
return (
<Badge
variant="outline"
className="inline-flex h-4 w-fit min-w-0 items-center justify-center gap-0 ps-1.5 pe-1.5 py-0 text-[10px] font-semibold leading-none border-border/70 bg-muted/60 text-muted-foreground sm:h-4"
>
Default
</Badge>
);
}
Loading
Loading