Skip to content

Commit a77949a

Browse files
authored
fix: fix for status duplicates for permission checks (#1237)
1 parent 1edb6af commit a77949a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

chat-client/src/client/mynahUi.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ export const createMynahUi = (
617617
: am.type === 'directive'
618618
? ChatItemType.DIRECTIVE
619619
: ChatItemType.ANSWER_STREAM,
620-
...prepareChatItemFromMessage(am, isPairProgrammingMode),
620+
...prepareChatItemFromMessage(am, isPairProgrammingMode, isPartialResult),
621621
}
622622

623623
if (!chatItems.find(ci => ci.messageId === am.messageId)) {
@@ -847,7 +847,11 @@ export const createMynahUi = (
847847
})
848848
}
849849

850-
const prepareChatItemFromMessage = (message: ChatMessage, isPairProgrammingMode: boolean): Partial<ChatItem> => {
850+
const prepareChatItemFromMessage = (
851+
message: ChatMessage,
852+
isPairProgrammingMode: boolean,
853+
isPartialResult?: boolean
854+
): Partial<ChatItem> => {
851855
const contextHeader = contextListToHeader(message.contextList)
852856
const header = contextHeader || toMynahHeader(message.header) // Is this mutually exclusive?
853857
const fileList = toMynahFileList(message.fileList)
@@ -869,6 +873,11 @@ export const createMynahUi = (
869873
details: toDetailsWithoutIcon(header.fileList.details),
870874
}
871875
}
876+
if (!isPartialResult) {
877+
if (processedHeader) {
878+
processedHeader.status = undefined
879+
}
880+
}
872881
}
873882

874883
// Check if header should be included

0 commit comments

Comments
 (0)