Rename "Chat" to "Build" in interaction mode toggle (#1769)
Co-authored-by: Julius Marminge <[email protected]>
This commit is contained in:
1 parent
340dbbb36e
commit
c6f57a1064
2 files changed
+9
-9
No files matched your search
@@ -874,7 +874,7 @@ async function expectComposerActionsContained(): Promise<void> {
|
||||
}
|
||||
|
||||
async function waitForInteractionModeButton(
|
||||
expectedLabel: "Chat" | "Plan",
|
||||
expectedLabel: "Build" | "Plan",
|
||||
): Promise<HTMLButtonElement> {
|
||||
return waitForElement(
|
||||
() =>
|
||||
@@ -2111,7 +2111,7 @@ describe("ChatView timeline estimator parity (full app)", () => {
|
||||
});
|
||||
|
||||
try {
|
||||
const initialModeButton = await waitForInteractionModeButton("Chat");
|
||||
const initialModeButton = await waitForInteractionModeButton("Build");
|
||||
expect(initialModeButton.title).toContain("enter plan mode");
|
||||
|
||||
window.dispatchEvent(
|
||||
@@ -2124,7 +2124,7 @@ describe("ChatView timeline estimator parity (full app)", () => {
|
||||
);
|
||||
await waitForLayout();
|
||||
|
||||
expect((await waitForInteractionModeButton("Chat")).title).toContain("enter plan mode");
|
||||
expect((await waitForInteractionModeButton("Build")).title).toContain("enter plan mode");
|
||||
|
||||
const composerEditor = await waitForComposerEditor();
|
||||
composerEditor.focus();
|
||||
@@ -2140,7 +2140,7 @@ describe("ChatView timeline estimator parity (full app)", () => {
|
||||
await vi.waitFor(
|
||||
async () => {
|
||||
expect((await waitForInteractionModeButton("Plan")).title).toContain(
|
||||
"return to normal chat mode",
|
||||
"return to normal build mode",
|
||||
);
|
||||
},
|
||||
{ timeout: 8_000, interval: 16 },
|
||||
@@ -2157,7 +2157,7 @@ describe("ChatView timeline estimator parity (full app)", () => {
|
||||
|
||||
await vi.waitFor(
|
||||
async () => {
|
||||
expect((await waitForInteractionModeButton("Chat")).title).toContain("enter plan mode");
|
||||
expect((await waitForInteractionModeButton("Build")).title).toContain("enter plan mode");
|
||||
},
|
||||
{ timeout: 8_000, interval: 16 },
|
||||
);
|
||||
|
||||
@@ -1476,7 +1476,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
|
||||
type: "slash-command",
|
||||
command: "default",
|
||||
label: "/default",
|
||||
description: "Switch this thread back to normal chat mode",
|
||||
description: "Switch this thread back to normal build mode",
|
||||
},
|
||||
] satisfies ReadonlyArray<Extract<ComposerCommandItem, { type: "slash-command" }>>;
|
||||
const query = composerTrigger.query.trim().toLowerCase();
|
||||
@@ -4029,7 +4029,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
|
||||
<form
|
||||
ref={composerFormRef}
|
||||
onSubmit={onSend}
|
||||
className="mx-auto w-full min-w-0 max-w-[52rem]"
|
||||
className="mx-auto w-full min-w-0 max-w-208"
|
||||
data-chat-composer-form="true"
|
||||
>
|
||||
<div
|
||||
@@ -4284,13 +4284,13 @@ export default function ChatView({ threadId }: ChatViewProps) {
|
||||
onClick={toggleInteractionMode}
|
||||
title={
|
||||
interactionMode === "plan"
|
||||
? "Plan mode — click to return to normal chat mode"
|
||||
? "Plan mode — click to return to normal build mode"
|
||||
: "Default mode — click to enter plan mode"
|
||||
}
|
||||
>
|
||||
<BotIcon />
|
||||
<span className="sr-only sm:not-sr-only">
|
||||
{interactionMode === "plan" ? "Plan" : "Chat"}
|
||||
{interactionMode === "plan" ? "Plan" : "Build"}
|
||||
</span>
|
||||
</Button>
|
||||
|
||||
|
||||
Reference in new issue
Block a user