Add production condition retrieval smoke test

This commit is contained in:
2026-08-11 14:58:28 +07:00
parent 59e6ad2d0d
commit 7ebbe1f309
38 changed files with 3752 additions and 121 deletions
+23 -16
View File
@@ -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>
);
})
)}