Add production condition retrieval smoke test
This commit is contained in:
@@ -4,6 +4,7 @@ import React, { useState, useEffect, useRef } from "react";
|
||||
import type { ChatMessage, Citation, SendMessageResponse } from "@duoc-thu/shared-types";
|
||||
import { ChatBubble, CitationBeamOverlay, useTheme } from "@duoc-thu/ui";
|
||||
import { Composer } from "./Composer";
|
||||
import { AnswerFeedback } from "./AnswerFeedback";
|
||||
import {
|
||||
Sparkles,
|
||||
Pill,
|
||||
@@ -370,22 +371,28 @@ export function ChatPanel({
|
||||
? [...messages.slice(0, msgIdx)].reverse().find((m) => m.role === "user")?.content
|
||||
: undefined;
|
||||
return (
|
||||
<ChatBubble
|
||||
key={msg.id}
|
||||
message={msg}
|
||||
onCitationClick={(citation, idx, allCitations) =>
|
||||
onCitationClick?.(citation, idx, allCitations)
|
||||
}
|
||||
activeCitationIndex={activeCitationIndex}
|
||||
onRetry={retryQuery ? () => handleSendMessage(retryQuery) : undefined}
|
||||
onQuickReply={
|
||||
msgIdx === messages.length - 1 &&
|
||||
msg.decision === "clarify" &&
|
||||
!isLoading
|
||||
? (text) => handleSendMessage(text)
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
<React.Fragment key={msg.id}>
|
||||
<ChatBubble
|
||||
message={msg}
|
||||
onCitationClick={(citation, idx, allCitations) =>
|
||||
onCitationClick?.(citation, idx, allCitations)
|
||||
}
|
||||
activeCitationIndex={activeCitationIndex}
|
||||
onRetry={retryQuery ? () => handleSendMessage(retryQuery) : undefined}
|
||||
onQuickReply={
|
||||
msgIdx === messages.length - 1 &&
|
||||
msg.decision === "clarify" &&
|
||||
!isLoading
|
||||
? (text) => handleSendMessage(text)
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
{msg.role === "assistant" &&
|
||||
msg.traceId &&
|
||||
!msg.traceId.startsWith("fallback-") && (
|
||||
<AnswerFeedback traceId={msg.traceId} conversationId={sessionId} />
|
||||
)}
|
||||
</React.Fragment>
|
||||
);
|
||||
})
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user