Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Hailong Cui <[email protected]>
  • Loading branch information
Hailong-am committed Dec 11, 2023
1 parent 9ac427f commit 21e4ead
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions public/chat_header_button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ export const HeaderChatButton: React.FC<HeaderChatButtonProps> = (props) => {
selectedTabId,
preSelectedTabId,
setSelectedTabId: (tabId: TabId) => {
if (selectedTabId !== tabId) {
setPreSelectedTabId(selectedTabId);
}
setPreSelectedTabId(selectedTabId);
setSelectedTabId(tabId);
},
flyoutVisible,
Expand Down
4 changes: 3 additions & 1 deletion public/hooks/use_chat_actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ export const useChatActions = (): AssistantActions => {

case 'view_trace':
if ('traceId' in message) {
chatContext.setSelectedTabId('trace');
if (chatContext.selectedTabId !== TAB_ID.TRACE) {
chatContext.setSelectedTabId(TAB_ID.TRACE);
}
chatContext.setTraceId(message.traceId);
}
break;
Expand Down

0 comments on commit 21e4ead

Please sign in to comment.