Skip to content

Commit 7cd5a06

Browse files
committed
refactor: rename clipboardMessage to statusMessage
Renamed clipboardMessage to statusMessage throughout the codebase for better semantic clarity. The statusMessage better represents that this can be used for various status updates, not just clipboard operations (e.g., feedback confirmations).
1 parent 237137c commit 7cd5a06

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

cli/src/chat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ export const Chat = ({
843843
>
844844
{shouldShowStatusLine && (
845845
<StatusBar
846-
clipboardMessage={statusMessage}
846+
statusMessage={statusMessage}
847847
streamStatus={streamStatus}
848848
timerStartTime={timerStartTime}
849849
nextCtrlCWillExit={nextCtrlCWillExit}

cli/src/components/status-bar.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type { StreamStatus } from '../hooks/use-message-queue'
1010
const SHIMMER_INTERVAL_MS = 160
1111

1212
interface StatusBarProps {
13-
clipboardMessage: string | null
13+
statusMessage: string | null
1414
streamStatus: StreamStatus
1515
timerStartTime: number | null
1616
nextCtrlCWillExit: boolean
@@ -20,7 +20,7 @@ interface StatusBarProps {
2020
}
2121

2222
export const StatusBar = ({
23-
clipboardMessage,
23+
statusMessage,
2424
streamStatus,
2525
timerStartTime,
2626
nextCtrlCWillExit,
@@ -56,8 +56,8 @@ export const StatusBar = ({
5656
return <span fg={theme.secondary}>Press Ctrl-C again to exit</span>
5757
}
5858

59-
if (clipboardMessage) {
60-
return <span fg={theme.primary}>{clipboardMessage}</span>
59+
if (statusMessage) {
60+
return <span fg={theme.primary}>{statusMessage}</span>
6161
}
6262

6363
if (!isConnected) {

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,28 @@ export type StatusIndicatorState =
99
| { kind: 'streaming' }
1010

1111
export type StatusIndicatorStateArgs = {
12-
clipboardMessage?: string | null
12+
statusMessage?: string | null
1313
streamStatus: StreamStatus
1414
nextCtrlCWillExit: boolean
1515
isConnected: boolean
1616
}
1717

1818
/**
1919
* Determines the status indicator state based on current context.
20-
*
20+
*
2121
* State priority (highest to lowest):
2222
* 1. nextCtrlCWillExit - User pressed Ctrl+C once, warn about exit
23-
* 2. clipboardMessage - Temporary feedback for clipboard operations
23+
* 2. statusMessage - Temporary feedback for clipboard operations
2424
* 3. connecting - Not connected to backend
2525
* 4. waiting - Waiting for AI response to start
2626
* 5. streaming - AI is actively responding
2727
* 6. idle - No activity
28-
*
28+
*
2929
* @param args - Context for determining indicator state
3030
* @returns The appropriate state indicator
3131
*/
3232
export const getStatusIndicatorState = ({
33-
clipboardMessage,
33+
statusMessage,
3434
streamStatus,
3535
nextCtrlCWillExit,
3636
isConnected,
@@ -39,8 +39,8 @@ export const getStatusIndicatorState = ({
3939
return { kind: 'ctrlC' }
4040
}
4141

42-
if (clipboardMessage) {
43-
return { kind: 'clipboard', message: clipboardMessage }
42+
if (statusMessage) {
43+
return { kind: 'clipboard', message: statusMessage }
4444
}
4545

4646
if (!isConnected) {

0 commit comments

Comments
 (0)