Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

feat(chat): enhance request info button integration and toolbar logic

wizardchend2212221ebc4
diff --git a/frontend/src/views/chat/components/AgentStreamDisplay.vue b/frontend/src/views/chat/components/AgentStreamDisplay.vue
index 9a4d948ca..52e50ee58 100644
--- a/frontend/src/views/chat/components/AgentStreamDisplay.vue
+++ b/frontend/src/views/chat/components/AgentStreamDisplay.vue
@@ -253,6 +253,11 @@
<t-icon name="info-circle" />
</t-button>
</t-tooltip>
+ <ChatRequestInfoButton
+ v-if="showRequestInfo && isConversationDone"
+ :session="session"
+ :session-id="sessionId"
+ />
</div>
</div>
@@ -330,7 +335,7 @@
</div>
</div>
</template>
- <div v-if="showRequestInfo && isConversationDone" class="answer-toolbar">
+ <div v-if="showRequestInfo && isConversationDone && !hasDoneAnswerContent" class="answer-toolbar">
<ChatRequestInfoButton :session="session" :session-id="sessionId" />
</div>
<!-- Loading Indicator (inside container so it scrolls into view) -->
@@ -931,6 +936,16 @@ const isConversationDone = computed(() => {
return !!doneAnswer;
});
+// Whether a completed answer with content is rendered (its toolbar hosts the
+// request-info button inline, so the standalone toolbar should not duplicate it)
+const hasDoneAnswerContent = computed(() => {
+ const stream = eventStream.value;
+ if (!stream || stream.length === 0) return false;
+ return stream.some(
+ (e: any) => e.type === 'answer' && e.done && e.content && e.content.trim()
+ );
+});
+
// Find the final content to display (last thinking or answer)
const finalContent = computed(() => {
const stream = eventStream.value;