Skip to content

Commit 0e3f798

Browse files
committed
Don't show "working..." while using the ask user tool
1 parent bc90b1a commit 0e3f798

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

cli/src/chat.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,6 +1180,7 @@ export const Chat = ({
11801180
authStatus,
11811181
showReconnectionMessage,
11821182
isRetrying,
1183+
isAskUserActive: askUserState !== null,
11831184
})
11841185
const hasStatusIndicatorContent = statusIndicatorState.kind !== 'idle'
11851186
const inputBoxTitle = useMemo(() => {

cli/src/utils/status-indicator-state.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ export type StatusIndicatorStateArgs = {
2424
* This should only be true for a short period after a reconnection event.
2525
*/
2626
showReconnectionMessage?: boolean
27+
/**
28+
* Whether the ask_user tool is currently active (waiting for user input).
29+
* When true, hides the "working..." and "thinking..." indicators.
30+
*/
31+
isAskUserActive?: boolean
2732
}
2833

2934
/**
@@ -48,6 +53,7 @@ export const getStatusIndicatorState = ({
4853
authStatus = 'ok',
4954
isRetrying = false,
5055
showReconnectionMessage = false,
56+
isAskUserActive = false,
5157
}: StatusIndicatorStateArgs): StatusIndicatorState => {
5258
if (nextCtrlCWillExit) {
5359
return { kind: 'ctrlC' }
@@ -76,6 +82,11 @@ export const getStatusIndicatorState = ({
7682
return { kind: 'connecting' }
7783
}
7884

85+
// Hide working/thinking indicators when ask_user is active
86+
if (isAskUserActive) {
87+
return { kind: 'idle' }
88+
}
89+
7990
if (streamStatus === 'waiting') {
8091
return { kind: 'waiting' }
8192
}

0 commit comments

Comments
 (0)