diff --git a/apps/web/src/components/chat/useChatShortcuts.browser.test.tsx b/apps/web/src/components/chat/useChatShortcuts.browser.test.tsx index e0163288e44f..b601de299dac 100644 --- a/apps/web/src/components/chat/useChatShortcuts.browser.test.tsx +++ b/apps/web/src/components/chat/useChatShortcuts.browser.test.tsx @@ -3,6 +3,7 @@ import { expect, it } from "vite-plus/test"; import { userEvent } from "vite-plus/test/browser"; import { render } from "../../../test/render"; +import type { ChatComposerHandle } from "./ChatComposer"; import { useChatShortcuts } from "./useChatShortcuts"; const shortcutContext = { @@ -50,10 +51,16 @@ function Chat(props: { composerKeys: string[]; launcher?: { keys: string; receiv scriptKeybindings: [], getShortcutContext: () => shortcutContext, threadFindActive: false, - typeIntoComposer: (key) => { - props.composerKeys.push(key); - return true; + // Type-to-focus only calls insertTextAtEnd, so the stand-in composer implements just that. + composerRef: { + current: { + insertTextAtEnd: (key: string) => { + props.composerKeys.push(key); + return true; + }, + } as Partial as ChatComposerHandle, }, + branchToolbarRef: { current: null }, closeThreadFind: () => {}, commands: {}, fallback: () => undefined,