import React, { useMemo, useRef, useState } from 'react'; import { createRoot } from 'react-dom/client'; import type { ChatSnapshot } from '@deepseek-ai/dsh-client-ui-chat/client'; import { ChoreographedFlow } from '../src/client/ChoreographedFlow.js'; import { ClosedProcessSummary } from '../src/client/ClosedProcessSummary.js'; import { ProcessFragment } from '../src/client/motion.js'; import { presentLiveTurn } from '../src/client/live-turn.js'; import type { LiveStep } from '../src/client/live-turn.js'; function Fixture() { const [open,setOpen]=useState(false);const button=useRef(null); const steps=useMemo(()=>Array.from({length:500},(_,i):LiveStep=>({kind:'reasoning',key:`r${i}`,nodeKey:`r${i}`,step:i,start:0,blocks:[]})),[]); const frame=useMemo(()=>({items:presentLiveTurn(steps,{status:'closed',reason:'completed',closingStep:501,latestStep:501}),snapshot:{} as ChatSnapshot}),[steps]); return

完成后 500 条过程记录:实际组件回归

{}} renderStep={step=>{}} returnFocusTo={button} nodeKey={step.key}>

过程内容 {step.key}

}/>
最终回答必须紧随统计,不能隔着 8000px 空白;展开、收起以后仍应如此。
; } createRoot(document.getElementById('app')!).render();