feat: add strict workflow taxonomy and claim badges
This commit is contained in:
@@ -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>;
|
||||
}
|
||||
Reference in New Issue
Block a user