Skip to content

Commit e575da0

Browse files
os-zhuangclaude
andauthored
fix(ai): stop AI composer placeholder doubling to 'Ask Ask…' for the Ask agent (#1988)
The composer placeholder 'Ask {agent}…' doubles to 'Ask Ask…' for the data-query agent whose label is 'Ask'. Route the ask agent (agentRouteName === 'ask') to its purpose-built placeholder console.ai.askAnything ('Ask anything…', already localized) instead. Found dogfooding the AI Ask flow. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 8e7c1da commit e575da0

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
fix(ai): stop the AI composer placeholder doubling to "Ask Ask…" for the Ask agent
6+
7+
The composer placeholder is `Ask {agent}…`, which reads fine for most agents
8+
("Ask Build…") but doubles to "Ask Ask…" for the data-query agent whose label is
9+
literally "Ask". The Ask agent now uses its purpose-built placeholder
10+
(`console.ai.askAnything` → "Ask anything…", already localized) instead. Found
11+
dogfooding the AI Ask flow.

packages/app-shell/src/console/ai/AiChatPage.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,11 @@ function ChatPane({
10831083
messages={messages as ChatMessage[]}
10841084
placeholder={
10851085
activeAgent
1086-
? t('console.ai.askAgent', { agent: activeAgentLabel })
1086+
? agentRouteName(activeAgent) === 'ask'
1087+
// The generic "Ask {agent}…" doubles to "Ask Ask…" for the data-query
1088+
// agent whose label IS "Ask". Use its purpose-built placeholder instead.
1089+
? t('console.ai.askAnything')
1090+
: t('console.ai.askAgent', { agent: activeAgentLabel })
10871091
: agentsLoading
10881092
? t('console.ai.loadingAgents')
10891093
: t('console.ai.askAnything')

0 commit comments

Comments
 (0)