feat(consult): show the queued row from the send frame; only smalltalk replies are quiet (T1, BUG-1074)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0199rbQDTsUbCVw84wc8BTFe
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
584ad05c36
commit
86d99115c6
@@ -54,9 +54,11 @@ export const ChatMessageRow = memo(function ChatMessageRow({
|
||||
}>) {
|
||||
const messageRow = useRef<HTMLElement>(null);
|
||||
const smalltalk = message.responseKind === "smalltalk";
|
||||
const awaitingClassification = message.state === "thinking" && !message.text && !message.activity
|
||||
&& !message.thinkingText && message.timeline?.length === 0;
|
||||
const quiet = smalltalk || awaitingClassification;
|
||||
// Only a smalltalk reply is quiet. The wait before the server's first event
|
||||
// used to be quiet too, so nothing showed for the classification round trip
|
||||
// (BUG-1074); now the timeline's queued row is on screen from the send frame
|
||||
// and disappears when the run.completed event says the reply was smalltalk.
|
||||
const quiet = smalltalk;
|
||||
const assistantLabel = quiet ? "Jyotisha" : message.state === "thinking"
|
||||
? "Jyotisha 正在分析"
|
||||
: message.state === "streaming"
|
||||
|
||||
@@ -4,6 +4,7 @@ import { useId, useState } from "react";
|
||||
import { BookOpen, Check, ChevronDown, Layers, ListTodo, LoaderCircle, PenLine, type LucideIcon } from "lucide-react";
|
||||
|
||||
import { InlineSpinner } from "@/components/inline-spinner";
|
||||
import { CONSULTATION_RECEIVED_LABEL } from "@/lib/consultation-activity-labels";
|
||||
|
||||
void LoaderCircle; // source lock: tests/chat-stream-layout.test.ts matches /LoaderCircle/
|
||||
|
||||
@@ -19,12 +20,17 @@ const KIND_ICONS: Record<ConsultationTimelineKind, LucideIcon> = {
|
||||
write: PenLine,
|
||||
};
|
||||
|
||||
/** Shown while the request is in flight but no step has been reported yet. */
|
||||
/**
|
||||
* Shown from the frame the question is sent until the first step is reported
|
||||
* (BUG-475, BUG-1074). The label is the same deterministic sentence the server
|
||||
* writes as its first byte, so the row never changes wording when that frame
|
||||
* lands.
|
||||
*/
|
||||
export const QUEUED_TIMELINE_ROW: ConsultationTimelineRow = {
|
||||
id: "queued",
|
||||
kind: "method",
|
||||
status: "live",
|
||||
label: "正在处理…",
|
||||
label: CONSULTATION_RECEIVED_LABEL,
|
||||
};
|
||||
|
||||
/** Shown while the request is still in flight after completed steps, before the next live step. */
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
/**
|
||||
* The first line of every consultation turn: on the client from the frame the
|
||||
* question is sent, on the server as the first byte of the stream, before the
|
||||
* turn is classified or the chart is read (TASK-consult-first-frame-and-pacing-20260928 D1).
|
||||
*/
|
||||
export const CONSULTATION_RECEIVED_LABEL = "收到,正在看你的问题…";
|
||||
export const CONSULTATION_LOADING_METHOD_LABEL = "正在读取印度占星分析规则…";
|
||||
export const CONSULTATION_CHART_CALCULATION_LABEL = "正在计算本命盘…";
|
||||
export const CONSULTATION_EVIDENCE_VALIDATION_LABEL = "正在核对可用证据…";
|
||||
|
||||
Reference in New Issue
Block a user