qwen-code/packages/web-shell/client/transcriptRenderMode.ts
Changxiao Ruan 9b6da8e604
feat(webshell): replay ChatRecord history in readonly WebShell (#6999)
* feat(web-shell): add readonly transcript renderer

* feat(transcript): project chat records to daemon transcript

* chore: remove unrelated merge changes

* fix(cli): align transcript replay test mock

* fix(transcript): preserve replay metadata and todo context

Keep vision disclosures and assistant usage visible across tool replay boundaries.

Propagate plan tool-call identity through daemon projection and provide Todo contexts in WebShell so snapshots remain independent. Accept session_source records and cover the cross-layer behavior with regression tests.

* docs(transcript): translate designs and remove benchmark table

---------

Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
2026-07-19 00:09:44 +00:00

13 lines
410 B
TypeScript

import { createContext, useContext } from 'react';
export type TranscriptRenderMode = 'interactive' | 'readonly';
const TranscriptRenderModeContext =
createContext<TranscriptRenderMode>('interactive');
export const TranscriptRenderModeProvider =
TranscriptRenderModeContext.Provider;
export function useTranscriptRenderMode(): TranscriptRenderMode {
return useContext(TranscriptRenderModeContext);
}