Skip to content

Commit a30fe9e

Browse files
committed
Show thinking animation until recieves a response
1 parent f54ef68 commit a30fe9e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

cli/src/chat.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,7 @@ export const Chat = ({
735735
<StatusIndicator
736736
clipboardMessage={clipboardMessage}
737737
isActive={isStatusActive}
738+
isWaitingForResponse={isWaitingForResponse}
738739
timerStartTime={timerStartTime}
739740
nextCtrlCWillExit={nextCtrlCWillExit}
740741
/>

cli/src/components/status-indicator.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ const useConnectionStatus = () => {
3737
export const StatusIndicator = ({
3838
clipboardMessage,
3939
isActive = false,
40+
isWaitingForResponse = false,
4041
timerStartTime,
4142
nextCtrlCWillExit,
4243
}: {
4344
clipboardMessage?: string | null
4445
isActive?: boolean
46+
isWaitingForResponse?: boolean
4547
timerStartTime: number | null
4648
nextCtrlCWillExit: boolean
4749
}) => {
@@ -67,7 +69,7 @@ export const StatusIndicator = ({
6769
}
6870

6971
if (isActive) {
70-
if (!timerStartTime || Date.now() - timerStartTime < 1000) {
72+
if (isWaitingForResponse) {
7173
return (
7274
<ShimmerText
7375
text="thinking..."

0 commit comments

Comments
 (0)