Files
DeepTutor/web/features/chat/trace/index.ts
Bingxi Zhao (Frank) 541b7f4f16 feat(chat): let a turn read as a running account instead of an answer with hidden working
Every round already streamed its text to the reader. The loop then took it
back: a round that called tools was marked narration, and the client moved
that prose out of the answer and into a collapsed block pinned to the top of
the message. The reader watched a sentence appear and vanish, and what was
left was an answer with no account of how it was reached.

That behaviour came from one field doing two jobs. ``call_role`` said both
where the turn was and whether the text counted, so "more work follows" and
"hide this" could not be told apart — and three separate exceptions had grown
to say "actually, show this one" for DSML, truncation and mastery.

Split the two facts. ``call_role`` keeps the phase. A new ``answer_visible``
carries visibility, true for every ordinary round, false only where a
capability's finish guard retracts a round it rejected. The three exceptions
disappear with the default they were fighting.

The client then lays the message out in the order it was written: the sentence
that introduced a step, the step's own row beneath it, what the next round
said below that. A settled turn is restored from an event preview that carries
no text, so tool calls now record how much of the answer had been written when
they ran, and the stored body is laid back out around them.

The prompt asks for the commentary this depends on, and says the closing
answer should not replay it.
2026-09-11 16:49:40 +08:00

31 lines
568 B
TypeScript

export type {
ResearchStageCard,
ResearchStageId,
StreamingMode,
TraceDisplayItem,
TraceItem,
TraceMetadata,
} from "./model";
export {
detectStreamingMode,
getLatestToolProgress,
getToolProvider,
getTraceCallKind,
getTraceGroup,
getTraceMeta,
getTraceRole,
groupTraceEvents,
hasRenderableCallTrace,
isRetractedRound,
isTracePending,
selectTraceDisplayItems,
} from "./selectors";
export {
AssistantActivity,
CallTracePanel,
NestedTraceFlow,
ResearchStagePanel,
StreamingStatus,
TraceFlow,
} from "./TracePresentation";