-
Notifications
You must be signed in to change notification settings - Fork 4
feat(tui): resume 恢复历史时同时恢复当时的 UI 状态,而不仅是消息内容 #224
Copy link
Copy link
Closed
Labels
area:coreCore runtime and session stateCore runtime and session statearea:securityApproval, sandbox, and security policyApproval, sandbox, and security policyarea:toolsBuilt-in tools and tool runtimeBuilt-in tools and tool runtimearea:tuiTerminal UI and interaction layerTerminal UI and interaction layerenhancementNew feature or requestNew feature or requestneeds-triageIssue needs initial triageIssue needs initial triage
Description
Metadata
Metadata
Assignees
Labels
area:coreCore runtime and session stateCore runtime and session statearea:securityApproval, sandbox, and security policyApproval, sandbox, and security policyarea:toolsBuilt-in tools and tool runtimeBuilt-in tools and tool runtimearea:tuiTerminal UI and interaction layerTerminal UI and interaction layerenhancementNew feature or requestNew feature or requestneeds-triageIssue needs initial triageIssue needs initial triage
现状
handleHistorySelect(App.tsx)从history.logresume 一个历史会话时,只恢复了:pendingHistoryMessages)appendSystemMessage('History', ...))其余 UI 状态全部回到默认值(新建会话时的初始值),看起来"简陋"。
期望
resume 历史会话时,同时恢复该会话当时的 UI 状态:
现有基础
session_start事件已经携带meta:mode、cwd、contextWindow、toolPermissionMode、warnPromptTokens、autoCompactThresholdPercent(core/agent/loop.ts:499)history_parser.ts:291已解析session_start.meta.cwd,可继续扩展解析其余字段验收标准