Skip to content

fix: fix for status duplicates for permission checks #1237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions chat-client/src/client/mynahUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ export const createMynahUi = (
: am.type === 'directive'
? ChatItemType.DIRECTIVE
: ChatItemType.ANSWER_STREAM,
...prepareChatItemFromMessage(am, isPairProgrammingMode),
...prepareChatItemFromMessage(am, isPairProgrammingMode, isPartialResult),
}

if (!chatItems.find(ci => ci.messageId === am.messageId)) {
Expand Down Expand Up @@ -847,7 +847,11 @@ export const createMynahUi = (
})
}

const prepareChatItemFromMessage = (message: ChatMessage, isPairProgrammingMode: boolean): Partial<ChatItem> => {
const prepareChatItemFromMessage = (
message: ChatMessage,
isPairProgrammingMode: boolean,
isPartialResult?: boolean
): Partial<ChatItem> => {
const contextHeader = contextListToHeader(message.contextList)
const header = contextHeader || toMynahHeader(message.header) // Is this mutually exclusive?
const fileList = toMynahFileList(message.fileList)
Expand All @@ -869,6 +873,11 @@ export const createMynahUi = (
details: toDetailsWithoutIcon(header.fileList.details),
}
}
if (!isPartialResult) {
if (processedHeader) {
processedHeader.status = undefined
}
}
}

// Check if header should be included
Expand Down
Loading