Skip to content

Self-improving AI Employees for everyone

fix(chat): no suggestion cards in the editor's chat

trohitg984fe0e5f82e
diff --git a/client/src/features/chat/ChatPane.tsx b/client/src/features/chat/ChatPane.tsx
index fba93f90..da58d2ea 100644
--- a/client/src/features/chat/ChatPane.tsx
+++ b/client/src/features/chat/ChatPane.tsx
@@ -320,7 +320,12 @@ export function ChatPane({ host, ref }: { host: ChatHost; ref?: Ref<ChatPaneHand
},
[sessionId],
);
- const suggestions = useMemo(() => (chatContext?.commands ?? []).filter((command) => command.suggest), [chatContext]);
+ // Home only: the editor's chat is a console for trying chat triggers, where
+ // a card about the employee in an empty chat read as something a Reset left.
+ const suggestions = useMemo(
+ () => (host.kind === 'home' ? (chatContext?.commands ?? []).filter((command) => command.suggest) : []),
+ [chatContext, host.kind],
+ );
// A drop anywhere on the chat adds the files, as Attach does.
const [dragging, setDragging] = useState(false);
diff --git a/client/src/features/chat/__tests__/composer.test.tsx b/client/src/features/chat/__tests__/composer.test.tsx
index cd636911..bd294e51 100644
--- a/client/src/features/chat/__tests__/composer.test.tsx
+++ b/client/src/features/chat/__tests__/composer.test.tsx
@@ -220,6 +220,13 @@ describe('commands, Web and suggestions', () => {
expect(box()).toHaveValue('What does tomorrow look like?');
});
+ it('suggests nothing in the editor’s chat, a console for trying chat triggers', async () => {
+ renderPane(host({ kind: 'dev', compact: true }));
+ // Attach shows once the chat's context has arrived, commands included.
+ await screen.findByRole('button', { name: 'Attach files' });
+ expect(screen.queryByRole('button', { name: /Check a day in the calendar/ })).not.toBeInTheDocument();
+ });
+
it('offers nothing of this where the chat allows none', async () => {
server.context = { success: true, commands: [], capabilities: { attachments: false, web: false }, limits: { max_attachments: 6 } };
renderPane();
diff --git a/docs-internal/chat_protocol.md b/docs-internal/chat_protocol.md
index b7465323..58fe6357 100644
--- a/docs-internal/chat_protocol.md
+++ b/docs-internal/chat_protocol.md
@@ -420,8 +420,8 @@ editor's console pane (`ConsoleChat`, compact, scope `live`) are the two hosts.
ones' paths. The microphone (`VoiceRecorder`, MediaRecorder with live levels) shows when `dictation_status` says a
provider can transcribe. A draft that is one word starting with `/` opens `SlashMenu` (Popover over cmdk; focus
stays in the box, which carries `aria-controls` and `aria-activedescendant`). The Web chip keeps the employee off
- web search for the next messages (`composerStore.web`). In an empty chat, commands marked `suggest` show as cards
- that fill the box. Cmd/Ctrl+K focuses the box on Home; the editor's palette has Focus Chat.
+ web search for the next messages (`composerStore.web`). In an empty chat on Home, commands marked `suggest` show
+ as cards that fill the box; the editor's chat, a console for trying chat triggers, shows none. Cmd/Ctrl+K focuses the box on Home; the editor's palette has Focus Chat.
- **Changing the conversation** (`data/branches.ts`, `thread/turnActions.ts`): under the owner's message a hover bar
(`turns/UserTurn.tsx`: time, ‹ 1 / 2 › between versions, Edit, Copy; Edit opens `turns/UserEditBox.tsx` in place,
Enter sends, Esc cancels, ArrowUp in an empty box edits the last message); under a finished answer