feat: add strict workflow taxonomy and claim badges

This commit is contained in:
732642856
2026-07-21 15:04:07 +08:00
parent 878ff96dc5
commit 3427b30fd4
7 changed files with 106 additions and 16 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import { ChatMessageContent } from "@/components/chat-message-content";
import { ClaimBoundaryBadge } from "@/components/claim-boundary-badge";
import type { ChatMessageView } from "@/lib/chat-message-view";
export function AgentAvatar() {
@@ -23,7 +24,7 @@ export function ChatMessageRow({ message }: { readonly message: ChatMessageView
{message.role === "assistant" ? (
message.state === "thinking"
? <div className="thinking"><i /><i /><i /></div>
: <ChatMessageContent text={message.text} />
: <><ClaimBoundaryBadge status={message.techniqueTruth} /><ChatMessageContent text={message.text} /></>
) : <p>{message.text}</p>}
</div>
</div>
@@ -0,0 +1,13 @@
const boundaryCopy: Record<string, string> = {
unknown: "证据边界未知",
partial: "部分证据闭环",
observation_only: "仅观察",
blocked: "证据阻塞",
reference_only: "仅参考",
};
export function ClaimBoundaryBadge({ status }: { readonly status?: string }) {
const normalized = status?.trim() || "unknown";
const label = boundaryCopy[normalized] ?? `证据状态:${normalized}`;
return <p className="claim-boundary-badge">{label} · </p>;
}