Skip to content

Commit 394db61

Browse files
fix: prefix if user reject/stop command, whole card should be dimmed (#1212)
* fix: dimmed card after user reject/stop the command * fix: address comment * fix: address comment * fix: address comment
1 parent b425a66 commit 394db61

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

chat-client/src/client/mynahUi.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,6 @@ export const createMynahUi = (
826826
type: oldMessage.type,
827827
...prepareChatItemFromMessage(updatedMessage, getTabPairProgrammingMode(mynahUi, tabId)),
828828
}
829-
830829
mynahUi.updateChatAnswerWithMessageId(tabId, updatedMessage.messageId, chatItem)
831830
})
832831
}
@@ -898,6 +897,9 @@ export const createMynahUi = (
898897
// Adding this conditional check to show the stop message in the center.
899898
const contentHorizontalAlignment: ChatItem['contentHorizontalAlignment'] =
900899
message.type === 'directive' && message.messageId?.startsWith('stopped') ? 'center' : undefined
900+
901+
const shouldMute = message.header?.status?.text === 'Stopped' || message.header?.status?.text === 'Rejected'
902+
901903
return {
902904
body: message.body,
903905
header: includeHeader ? processedHeader : undefined,
@@ -914,6 +916,7 @@ export const createMynahUi = (
914916
: isPairProgrammingMode
915917
? { 'insert-to-cursor': null }
916918
: undefined,
919+
...(shouldMute ? { muted: true } : {}),
917920
}
918921
}
919922

0 commit comments

Comments
 (0)