From 9ac427fe38767e864c4c269ccbcc9c925a609276 Mon Sep 17 00:00:00 2001 From: Hailong Cui Date: Mon, 11 Dec 2023 16:15:31 +0800 Subject: [PATCH] fix back button disappear on trace page Signed-off-by: Hailong Cui --- public/chat_header_button.tsx | 4 +++- public/components/agent_framework_traces.tsx | 2 +- server/plugin.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/public/chat_header_button.tsx b/public/chat_header_button.tsx index 9b3d1503..b45d98b4 100644 --- a/public/chat_header_button.tsx +++ b/public/chat_header_button.tsx @@ -65,7 +65,9 @@ export const HeaderChatButton: React.FC = (props) => { selectedTabId, preSelectedTabId, setSelectedTabId: (tabId: TabId) => { - setPreSelectedTabId(selectedTabId); + if (selectedTabId !== tabId) { + setPreSelectedTabId(selectedTabId); + } setSelectedTabId(tabId); }, flyoutVisible, diff --git a/public/components/agent_framework_traces.tsx b/public/components/agent_framework_traces.tsx index 903b494a..65b39227 100644 --- a/public/components/agent_framework_traces.tsx +++ b/public/components/agent_framework_traces.tsx @@ -67,7 +67,7 @@ ${result} // if origin exists, it indicates that the trace was generated by a tool, we only show the non-empty traces of tools .filter((trace) => trace.origin && (trace.input || trace.output)) .map((trace, i) => { - const stepContent = `Step ${i + 1}`; + const stepContent = `Step ${i + 1} - ${trace.origin}`; return (
diff --git a/server/plugin.ts b/server/plugin.ts index e53abc54..e4ebc3f5 100644 --- a/server/plugin.ts +++ b/server/plugin.ts @@ -77,7 +77,7 @@ export class AssistantPlugin implements Plugin