diff --git a/docs/assets/demo.svg b/docs/assets/demo.svg
index aab3a59..624863b 100644
--- a/docs/assets/demo.svg
+++ b/docs/assets/demo.svg
@@ -1 +1 @@
-
\ No newline at end of file
+Restored session: 2026年8月28日星期五09时48分46秒CST➜zcode-cligit:(main)✗➜zcode-cligit:(main)✗npxzcode-app-cli@latest⠙⠹⠸⠼⠴⠦⠧⠇⠏⠋◆ ZCODEv3.10.2-19╭Workspace╮~/Documents/code/ai/zcode-cli · mainAsk a task about this workspace╰/help commands · /status details╯◈ local/GLM-5.2◉ yolo⚡︎maxctx 100% leftsession 0 tokens›分析一下当前项目◆ ZCODE~/Documents/code/ai/zcode-cli · main◇Thinking· activethinking…[🕖︎7s ]The user wants me to analyze the current project. Let me start by exploring the project structure tothinking…[🕗︎8s ]◇Thought· Ctrl+O to expand我来分析一下当前项目的整体情况。先看项目结构和关键文件。○Bash· preparingpreparing Bash…[🕗︎8s ]●Bashcat package.json 2>/dev/null | head -80· running○Bashgit log --oneline -20 && echo "---BRANCH---" && git branch -a 2>/dev/null | head -20· queued○Bashls -la && echo "---SRC---" && ls -la src 2>/dev/null | head -40· queuedActivity· 3 active tools●Bash· 0s○Bash◈ local/GLM-5.2◉ yolo⚡︎maxctx 99% leftsession 0 tokensrunning Bash…[🕙︎10s ]●Bash· 1s44msd236db9 chore(release): prepare zcode-app-cli 3.10.2-19 (#120)1bb9f39 fix(tui): make fullscreen scrollbar transient and theme-aware (#119)2a63d1d perf(tui): bound live thinking stream rendering to O(1) tail (#118)7f3d73b fix(tui): handle terminal stream failures safely (#116)7c865ee feat(tui): clear non-empty drafts on Ctrl+C (#115)7ef001a chore(release): prepare zcode-app-cli 3.10.2-18 (#114)aaa78d6 fix(runtime): recover wrapped transport failures safely (#112)8097e48 fix(tui): prevent functional keys from poisoning picker filters (#113)372033a fix(tui): dismiss transcript search with Esc before interrupting turn (#110)eb3bf7f fix(tui): prevent fragmented output from interleaved model streams (#107)a89a3e7 fix(tui): harden background task rendering and recovery (#106)3a5f44e feat(tui): add fullscreen copy-on-select setting (#105)eab7fb1 fix(config): clean up glm-5.3-flash capability declarations (#102)e00cc61 fix(tui): request guide delivery for active-turn steers (#101)078f7eb docs(demo): refresh animated TUI demo (#100)… 9 more lines · Ctrl+O to expand✓Bashls -la && echo "---SRC---" && ls -la src 2>/dev/null | head -4015mstotal 264drwxr-xr-x@ 27 kingsword09 staff 864 9 2 18:17 .drwxr-xr-x@ 157 kingsword09 staff 5024 8 28 01:27 ..-rw-r--r--@ 1 kingsword09 staff 6148 8 28 19:11 .DS_Storedrwxr-xr-x@ 18 kingsword09 staff 576 9 2 18:15 .gitdrwxr-xr-x@ 3 kingsword09 staff 96 7 14 21:40 .github-rw-r--r--@ 1 kingsword09 staff 108 8 12 14:33 .gitignore-rw-r--r--@ 1 kingsword09 staff 1118 7 15 08:43 .impeccable.mddrwxr-xr-x@ 4 kingsword09 staff 128 8 28 17:09 .releasedrwxr-xr-x@ 4 kingsword09 staff 128 7 15 19:35 .zcodedrwxr-xr-x 4 kingsword09 staff 128 7 14 21:40 bin-rw-r--r--@ 1 kingsword09 staff 31546 8 29 14:14 bun.lock-rw-r--r--@ 1 kingsword09 staff 2598 8 29 14:14 config.example.json-rw-r--r--@ 1 kingsword09 staff 38287 9 2 18:18 demo.castdrwxr-xr-x@ 6 kingsword09 staff 192 9 2 17:45 docs… 28 more lines · Ctrl+O to expand◈ local/GLM-5.2◉ yolo⚡︎maxctx 99% leftcache 71% hitsession 0 tokensthinking…[🕖︎19s ]preparing Bash…[🕗︎20s ]●Bashwc -l src/*.ts 2>/dev/null && echo "---VENDOR---" && find vendor -name "*.ts" -o -name "*.js" -o-n…· running●Bashcat README.md | head -100· runningrunning Bash…[🕘︎21s ]total 0drwxr-xr-x@ 27 kingsword09 staff 864 9 2 18:17 ..◈ local/GLM-5.2◉ yolo⚡︎maxctx 98% leftcache 71% hitsession 0 tokens✓Bashcat README.md | head -10013ms# zcode-app-cli[](https://www.npmjs.com/package/zcode-app-cli)downloads](https://img.shields.io/npm/dm/zcode-app-cli.svg)](https://www.npmjs.com/package/zcode-app-cli)[](./LICENSE)Unofficial terminal client for the official agent runtime shipped with ZCode Desktop.The project extracts the upstream `resources/glm` runtime, injects a local`@zcode/tui` implementation based on[`@earendil-works/pi-tui`](https://github.com/earendil-works/pi/tree/main/packages/tui),and launches it as a Node.js child process that directly inherits the user'sterminal.This project is not affiliated with or endorsed by Z.ai. ZCode and its bundled… 85 more lines · Ctrl+O to expand◈ local/GLM-5.2◉ yolo⚡︎maxctx 98% leftcache 84% hitsession 0 tokenswaiting for model…[🕒︎27s ]24msdrwxr-xr-x 5 kingsword09 staff 160 8 29 14:14 .drwxr-xr-x 3 kingsword09 staff 96 7 13 15:34 ..drwxr-xr-x@ 3 kingsword09 staff 96 9 2 17:37 dist-rw-r--r--@ 1 kingsword09 staff 247 8 29 14:14 package.jsondrwxr-xr-x 69 kingsword09 staff 2208 9 2 17:45 src---TUI SRC---packages/zcode-tui/src/panels.tspackages/zcode-tui/src/workspace-diff.tspackages/zcode-tui/src/background-task-output.tspackages/zcode-tui/src/tool-view.tspackages/zcode-tui/src/session-status.tspackages/zcode-tui/src/thinking-view.tspackages/zcode-tui/src/system-event-view.tspackages/zcode-tui/src/selection-command.ts… 32 more lines · Ctrl+O to expand●Bashgit status --short && echo "---UNTRACKED---" && git ls-files --others --exclude-standard | head -20· running○Bashcat zcode-runtime.lock.json && echo "---CONFIG EXAMPLE---" && cat config.example.json· queuedrunning Bash…[🕒︎27s ]Activity· 2 active tools✓Bashgit status --short && echo "---UNTRACKED---" && git ls-files --others --exclude-standard | head -2062ms?? demo.cast---UNTRACKED---demo.cast✓Bashcat zcode-runtime.lock.json && echo "---CONFIG EXAMPLE---" && cat config.example.json17ms{"schemaVersion": 1,"appVersion": "3.10.2","platform": "linux","arch": "x64","url": "https://cdn-zcode.z.ai/zcode/electron/releases/3.10.2/linux-x64/ZCode-3.10.2-linux-x64.deb","sha512": "bb9VQ+/T8Lu4YIgiTOHVIlVRzY8XnRvDzXvOrcYFIWCl8FVgb8bRhfA5/5oewXgLGY2rTSGYQZlnHbeZ2jVl3Q=="}---CONFIG EXAMPLE---"provider": {"zai": {"kind": "anthropic","name": "Z.AI Coding Plan","options": {… 126 more lines · Ctrl+O to expand◈ local/GLM-5.2◉ yolo⚡︎maxctx 98% leftcache 0% hitsession 0 tokenswaiting for model…[🕒︎39s ]●Bashls -la .github/workflows 2>/dev/null && echo "---" && ls -la .zcode/ 2>/dev/null && echo"---WAYFIN…· runningrunning Bash…[🕒︎39s ]---},"dependencies": {"@earendil-works/pi-tui": "^0.84.4"… 3 more lines · Ctrl+O to expandActivity· 1 active tool✓Bashls -la .github/workflows 2>/dev/null && echo "---" && ls -la .zcode/ 2>/dev/null && echo"---WAYFIN…total 64drwxr-xr-x@ 5 kingsword09 staff 160 8 26 14:52 .drwxr-xr-x@ 3 kingsword09 staff 96 7 14 21:40 ..-rw-r--r--@ 1 kingsword09 staff 1259 7 19 17:59 ci.yml-rw-r--r--@ 1 kingsword09 staff 10537 8 26 14:52 prepare-release.yml-rw-r--r-- 1 kingsword09 staff 13859 7 19 18:31 publish.ymldrwxr-xr-x@ 4 kingsword09 staff 128 7 15 19:35 .drwxr-xr-x@ 7 kingsword09 staff 224 8 27 12:31 plansdrwxr-xr-x 3 kingsword09 staff 96 7 15 19:35 tasks---WAYFINDER---drwxr-xr-x@ 3 kingsword09 staff 96 8 31 10:35 .… 2 more lines · Ctrl+O to expandthinking…[🕗︎44s ]preparing Bash…[🕘︎45s ]preparing Bash…[🕙︎46s ]copy-on-select.tsdiff-browser.tsevents.ts… 52 more lines · Ctrl+O to expandrunning Bash…[🕚︎47s ]plan-sess_05023e8d-4bcb-4662-b5c8-d44c9a8f5b21.mdplan-sess_84782d1a-4a47-4425-b503-1d7cfa9ed671.mdplan-sess_98c9d01e-cb20-4bf5-b97c-6e2d6570f6f2.mdplan-sess_9cb49566-df48-4e59-a9bd-15cdb6aeee14.mdplan-sess_e83898dc-030f-456f-a31f-631740efcdbc.mdperf---WAYFINDER TICKETS---running✓Bashdu -sh vendor/ packages/ src/ test/ scripts/ 2>/dev/null && echo "---" && cat tsdown.config.ts18ms50M vendor/5.6M packages/116K src/836K test/328K scripts/import { defineConfig } from "tsdown";export default defineConfig([{name: "launcher",entry: { zcode: "bin/zcode.ts" },outDir: "bin",outExtensions: () => ({ js: ".js" }),format: "esm",… 24 more lines · Ctrl+O to expand◈ local/GLM-5.2◉ yolo⚡︎maxctx 98% leftcache 90% hitsession 0 tokenswaiting for model…[🕘︎57s ]●Bashls .zcode/plans/ && echo "---" && head -40 .zcode/plans/$(ls .zcode/plans/ | tail -1) 2>/dev/null·running Bash…[🕘︎57s ]●Bashgit log --oneline --since="2 weeks" | wc -l && echo "---" && git log --oneline --since="2 weeks" |…· running◈ local/GLM-5.2◉ yolo⚡︎maxctx 97% leftcache 90% hitsession 0 tokens- `modelOptions`已包含跨provider的所有模型(每项带`providerLabel`),但TUI的`modelPicker`把它们拍平成一个列表-用户无法在TUI里方便地选择provider和区分main/lite… 31 more lines · Ctrl+O to expand✓Bashgit log --oneline --since="2 weeks" | wc -l && echo "---" && git log --oneline --since="2 weeks" |…58ms28… 12 more lines · Ctrl+O to expand◈ local/GLM-5.2◉ yolo⚡︎maxctx 97% leftcache 0% hitsession 0 tokensthinking…[🕐︎1m 01s ]以下是当前项目的全面分析。zcode-app-cli项目分析###一句话定位这是一个**thinking…[🕑︎1m 02s ]这是一个非官方的ZCode Desktop终端客户端,把官方桌面应用里捆绑的agent运行时(resources/glm)抽取出来,注入一个本地实现的@zcode/tui(基于@earendil-works/pi-tui),然后作为Node.js子进程直接继承用户终端启动thinking…[🕒︎1m 03s ]。当前版本3.10.2-19(App对齐的SemVer prerelease格式),仅依赖Node.js ≥22.19,无原生PTY addon、无postinstall构建。###架构``thinking…[🕓︎1m 04s ]```Node.js npm launcher (config / login / version metadata)inherited stdin/stdout/stderr官方zcode.cjs agent runtime (抽取自桌面应用)本地@zcode/tui adapter@earendil-works/pi-tuithinking…[🕔︎1m 05s ]官方runtime负责所有agent / model / session / tool / plugin / MCP /凭证/ provider配置逻辑;本地包只补上"终端界面"这一块缺失,外加一个窄的macOSthinking…[🕕︎1m 06s ]上"终端界面"这一块缺失,外加一个窄的macOS OAuth回调桥。###代码组成区域体量作用src/(11个.ts, 2723行)116Klauncher:配置/登录/版本元数据、thinking…[🕖︎1m 07s ]区域体量作用src/(11个.ts, 2723行)116Klauncher:配置/登录/版本元数据、OAuth回调、桌面迁移、插件CLI、更新检查、runtime同步文件)packages/zcode-tui/src/(75个5.6MTUI适配层:编辑器、流式渲染、工具视图、pickerthinking…[🕗︎1m 08s ]packages/zcode-tui/src/(75个5.6MTUI适配层:编辑器、流式渲染、工具视图、picker、fullscreen、主文件)题、通知、context状态等vendor/50M抽取的官方runtime +官方插件(android-emulator等)test/(77个.test.ts)836K单元测试,覆盖launcher、TUI各视图、runtime projection、thinking…[🕘︎1m 09s ]release流程scripts/(24个)328K同步runtime、build/check/pack release、smoke测试、性能benchbin/zcode.ts—入口,tsthinking…[🕙︎1m 10s ]bin/zcode.ts—入口,tsdown打包成bin/zcode.js构建用tsdown(两路:launcher + tui),包管理bun@1.3.12,发布到npm带provenance。thinking…[🕚︎1m 11s ]###最近两周开发节奏28个commit,节奏非常密集,主题集中在:1.全屏模式(#98引入,#105 copy-on-select,#119滚动条)2.**TUI健壮性thinking…[🕛︎1m 12s ]2.TUI健壮性修复:功能键污染picker(#113)、Esc关闭搜索而非打断turn(#110)、流式输出交错(#107)、后台任务渲染(#106)、terminal stream失败安全处理(#116)、wrapped transport恢复(thinking…[🕐︎1m 13s ]台任务渲染(#106)、terminal stream失败安全处理(#116)、wrapped transport恢复(#112)3.性能:thinking流式渲染O(n²)→O(1)(#118,对应issue #117)4.配置:glm-5.3-flash能力声明清理(#102)5.Release:3.9.1-thinking…[🕑︎1m 14s ]5.Release:3.9.1-15 → 3.10.2-19,App版本对齐###当前工作状态-git status干净,只有一个未跟踪的demo.cast(演示录像)。- .zcode/plans/有thinking…[🕒︎1m 15s ]- .zcode/plans/有5个历史plan文件,最近的还在讨论/model三层级联picker + setup wizard Esc回退重构thinking…[🕓︎1m 16s ]——这是已设计但尚未落地的改动(持久化到config.json、provider→main→lite三层)。- wayfinder/tickets/空,说明没有用wayfinder工作流进行大型拆分。###关键技术决策与约束(来自项目记忆)-**vendorthinking…[🕔︎1m 17s ]-vendor-edit约束:官方runtime是抽取的,不能直接改,补丁只能打在TUI层或runtimePatchPlan机制里。-config.json schema:model字段严格{main, lite};model.available是runtime内部的,写了会破坏init;`uithinking…[🕕︎1m 18s ]-config.json schema:model字段严格{main, lite};model.available是runtime内部的,写了会破坏init;ui.*块只被TUI读,runtime不读。--OAuth工作流:登录会自动把Coding Plan key写入config(`ithinking…[🕖︎1m 19s ]-OAuth工作流:登录会自动把Coding Plan key写入config(iH/bni、xCtpresets)。-subagent模型解析:子agent可用不同模型,通过profile frontmatter / agents-state.json / workflow phase解析,config.json里没有subagents顶层key(只有subagents.autoBackgroundMs)。-模型配置Web UI:/model-config插件在127.0.0.1thinking…[🕗︎1m 20s ]-模型配置Web UI:/model-config插件在127.0.0.1动态端口编辑config.json,per-session,仅在新session生效。###可能的下一步基于未落地的plan和近期issue活跃度,最自然的延续工作是:thinking…[🕘︎1m 21s ]1.**落地/model三层级联+thinking…[🕙︎1m 22s ]1.落地/model三层级联+ config持久化(已设计,见.zcode/plans/最新文件)。2.settings.json拆分:把ui.*从runtime契约的config.json里分出去,避免TUI偏好污染runtime配置(已提案,config-settings-split-proposal记忆中标记"awaiting go-aheadthinking…[🕚︎1m 23s ]提案,config-settings-split-proposal记忆中标记"awaiting go-ahead")。如果你想推进其中某项,告诉我具体方向,我可以进入plan mode给出实现方案。Worked for 1m 24s◈ local/GLM-5.2◉ yolo⚡︎maxctx 97% leftcache 95% hitsession 29.1K tokens→ compact /compact [instructions] — Compact the current conversation with optional instructions.copyCopy the active fullscreen selection or latest assistant responsecontextInspect context usage and prompt compositionconfigConfigure ZCode TUI settingsmodel-config/model-config [start|stop|status] — Start, stop, or check the local ZCode model config w→ context Inspect context usage and prompt compositionContextContext pressure, cache health, and prompt composition. Exact cache tokens are kept separate fromestimates.1d11794e571% hit · 14.4K input · 10.2K read29a0658a284% hit · 17.1K input · 14.3K read░31e4abb2f0% hit · 22.4K input · 0 read45e0c45b571% hit · 24.1K input · 17.1K read5e559a2ad90% hit · 24.7K input · 22.3K readFilter:type to search→ CloseType to filter · Up/Down choose · Ctrl+O details · ←/→ or PgUp/PgDn scroll · Enter confirm · EscWorked for 1m 24sToken usage: total=29,122 input=26,989 output=2,133To continue this session, runzcode --resume sess_20a93b7e-4dc8-4762-b06c-7458d709607c➜zcode-cligit:(main)✗npx zcode-app-cli@latest➜zcode-cligit:(main)✗npx zcode-app-cli@latest➜zcode-cligit:(main)✗npxzcode-app-cli@latest分析一下当前项目◆ ZCODE╭Workspace╮Ask a task about this workspaceworking…[🕛︎0s ]waiting for model…[🕛︎0s ]waiting for model…[🕐︎1s ]waiting for model…[🕑︎2s ]waiting for model…[🕒︎3s ]waiting for model…[🕓︎4s ]waiting for model…[🕔︎5s ]waiting for model…[🕕︎6s ]waiting for model…[🕖︎7s ]The user wants me to analyze the currentThe user wants me to analyze the current project. Let me start by exploring theunderstandunderstand what this codebase我来分析一下我来分析一下当前项目的整体running Bash…[🕘︎9s ]"name": "zcode-app-cli","version": "3.10.2-19","description": "Unofficial terminal client for the ZCode agent runtime","keywords": ["agent","ai","cli","coding-agent","glm","node","pi-tui","terminal","tui","z-ai",… 65 more lines · Ctrl+O to expand●Bashgit log --oneline -20 && echo "---BRANCH---" && git branch -a 2>/dev/null | head -20· running●Bashls -la && echo "---SRC---" && ls -la src 2>/dev/null | head -40· runningwaiting for model…[🕙︎10s ]waiting for model…[🕚︎11s ]waiting for model…[🕛︎12s ]waiting for model…[🕐︎13s ]waiting for model…[🕑︎14s ]waiting for model…[🕒︎15s ]waiting for model…[🕓︎16s ]waiting for model…[🕔︎17s ]waiting for model…[🕕︎18s ]waiting for model…[🕖︎19s ]Let me explore theLet me explore the src directory and otherLet me explore the src directory and other key areas more thoroughlypreparing Bash…[🕘︎21s ]●Bashls -la vendor/ packages/ scripts/ test/ docs/ 2>/dev/null | head -120· runningdrwxr-xr-x@ 6 kingsword09 staff 192 9 2 17:45 .drwxr-xr-x@ 27 kingsword09 staff 864 9 2 18:17 ..drwxr-xr-x@ 3 kingsword09 staff 96 8 28 19:45 assets-rw-r--r--@ 1 kingsword09 staff 17022 9 2 17:45 CONFIGURATION.md-rw-r--r--@ 1 kingsword09 staff 5388 8 26 14:52 DEVELOPMENT.md-rw-r--r--@ 1 kingsword09 staff 10688 8 26 14:52 RELEASING.mdpackages/:drwxr-xr-x 3 kingsword09 staff 96 7 13 15:34 .drwxr-xr-x 5 kingsword09 staff 160 8 29 14:14 zcode-tui… 105 more lines · Ctrl+O to expand○Bashcat README.md | head -100· queued152 src/app-server-client.ts39 src/command.ts391 src/darwin-oauth-callback.ts340 src/desktop-migration.ts549 src/launcher.ts247 src/model-access.ts588 src/plugin-cli.ts42 src/plugin-protocol.ts39 src/runtime-capabilities.ts171 src/update-check.ts165 src/zai-oauth.ts2723 total---VENDOR---vendor/node_modules/@zcode/tui/dist/index.jsvendor/packages/android-emulator-plugin/dist/providers/sdk.d.tswaiting for model…[🕘︎21s ]waiting for model…[🕙︎22s ]waiting for model…[🕚︎23s ]waiting for model…[🕛︎24s ]waiting for model…[🕐︎25s ]waiting for model…[🕑︎26s ]✓Bashls -la packages/zcode-tui/ 2>/dev/null && echo "---TUI SRC---" && find packages/zcode-tui -type f\…total 8●Bashcat zcode-runtime.lock.json && echo "---CONFIG EXAMPLE---" && cat config.example.json· runningwaiting for model…[🕓︎28s ]waiting for model…[🕔︎29s ]waiting for model…[🕕︎30s ]waiting for model…[🕖︎31s ]waiting for model…[🕗︎32s ]waiting for model…[🕘︎33s ]waiting for model…[🕙︎34s ]waiting for model…[🕚︎35s ]waiting for model…[🕛︎36s ]waiting for model…[🕐︎37s ]waiting for model…[🕑︎38s ]●Bashfind packages/zcode-tui/src -type f | wc -l && echo "---" && find test -name "*.test.ts" | wc -l&&…· running&&…27ms7577"name": "@zcode/tui","version": "0.1.0","type": "module","main": "dist/index.js","exports": {".": "./dist/index.js"waiting for model…[🕓︎40s ]waiting for model…[🕔︎41s ]waiting for model…[🕕︎42s ]waiting for model…[🕖︎43s ]Letthinking…[🕖︎43s ]Let me look at a few more keyLet me look at a few more key things to round out my understanding:Let me look at a few more key things to round out my understanding: the TUI source structure, thelauncher, and the sync-runtime script which seemspreparing Bash…[🕗︎44s ]preparing Bash…[🕚︎47s ]background-task-events.tsbackground-task-output.tsbounded-tool-text.tschoice-dialog.tscode-highlighter.tscolor-scheme.tscontext-breakdown.tscontext-cache.tscontext-status-view.ts●Bashcat .zcode/plans 2>/dev/null; ls .zcode/plans/ 2>/dev/null; echo "---"; ls .zcode/tasks/2>/dev/nul…· running○Bashdu -sh vendor/ packages/ src/ test/ scripts/ 2>/dev/null && echo "---" && cat tsdown.config.ts·queued✓Bashcat .zcode/plans 2>/dev/null; ls .zcode/plans/ 2>/dev/null; echo "---"; ls .zcode/tasks/2>/dev/nul…22ms●Bashdu -sh vendor/ packages/ src/ test/ scripts/ 2>/dev/null && echo "---" && cat tsdown.config.ts·waiting for model…[🕚︎47s ]waiting for model…[🕛︎48s ]waiting for model…[🕐︎49s ]waiting for model…[🕑︎50s ]waiting for model…[🕒︎51s ]waiting for model…[🕓︎52s ]waiting for model…[🕔︎53s ]waiting for model…[🕕︎54s ]waiting for model…[🕖︎55s ]waiting for model…[🕗︎56s ]○Bashgit log --oneline --since="2 weeks" | wc -l && echo "---" && git log --oneline --since="2 weeks" |…· queued#组件化/model和setup wizard交互重构方案##问题分析### 1. `/model`缺少provider→main/lite级联选择- runtime的`/model`命令是会话级切换(`setModel()`不写config.json)-只有desktop-migration和OAuth login才写`config.model.main/lite`waiting for model…[🕙︎58s ]waiting for model…[🕚︎59s ]waiting for model…[🕛︎1m 00s ]waiting for model…[🕐︎1m 01s ]I have aI have a comprehensive picture now. Let me synthesizezcode-app-cli项目这是一个非官方的ZCode Desktop终端客户端,把官方桌面这是一个非官方的ZCode Desktop终端客户端,把官方桌面应用里捆绑的agent这是一个非官方的ZCode Desktop终端客户端,把官方桌面应用里捆绑的agent运行时(`注入一个注入一个本地实现的@zcode/tui(基于`@e注入一个本地实现的@zcode/tui(基于@earendil-works/pi-tui。当前版本3.10.2-19(App对齐的Sem。当前版本3.10.2-19(App对齐的SemVer prerelease格式),。当前版本3.10.2-19(App对齐的SemVer prerelease格式),仅依赖Node.js ≥22.19,无原生PTY addonpostinstall官方zcode.cjs agent runtime官方zcode.cjs agent runtime (本地@zcode官方runtime负责所有官方runtime负责所有agent / model /官方runtime负责所有agent / model / session / tool / plugin / MCP /官方runtime负责所有agent / model / session / tool / plugin / MCP /凭证/ provider配置逻辑;本地上"终端界面"这一块上"终端界面"这一块缺失,外加一个||区域|体量|区域体量作用src/(11区域体量作用src/(11个.ts,区域体量作用src/(11个.ts, 2723行)116Klauncher:配置区域体量作用src/(11个.ts, 2723行)116Klauncher:配置/登录/版本元数据、OAuth回调、桌面迁移区域体量作用src/(11个.ts, 2723行)116Klauncher:配置/登录/版本元数据、OAuth回调、桌面迁移、插件CLI、更新区域体量作用src/(11个.ts,116Klauncher:配置/登录/版本元数据、OAuth回调、桌面迁移、插件CLI、更新检查2723行)、runtime同步`区域体量作用src/(11个.ts, 2723行)116Klauncher:配置/登录/版本元数据、OAuth回调、桌面迁移、插件CLI、更新检查、runtime同步packages/zcode-tui/src/(75packages/zcode-tui/src/(75个5.6Mpackages/zcode-tui/src/(75个5.6MTUI适配层:编辑器、流式文件)题、通知、文件)题、通知、contextvendor/50M抽test/(test/(77个.test.ts)836K单元测试,release`scripts/scripts/(24个scripts/(24个)328K同步runtime、buildscripts/(24个)328K同步runtime、build/check/pack releasescripts/(24个)328K同步runtime、build/check/pack release、smoke`bin/zcode.ts—入口,tsdown打包成`bin/z构建用tsdown构建用tsdown(两构建用tsdown(两路:launcher + tui),包构建用tsdown(两路:launcher + tui),包管理`bun@1.3.构建用tsdown(两路:launcher + tui),包管理bun@1.3.12,发布到npm带provenance######最近两周开发1.全屏模式(#98引入,1.全屏模式(#98引入,#105 copy-on-select,1.全屏模式(#98引入,#105 copy-on-select,#119滚动条2.TUI健壮性修复:功能键污染picker(2.TUI健壮性修复:功能键污染picker(#113)、Esc关闭搜索而非台任务渲染(#106)、terminal台任务渲染(#106)、terminal stream失败安全3.性能:thinking流式渲染O(n²)→O(1)(#118,对应44.**4.配置:glm-5.3-flash能5.5.Release:3.9.1-15 → 3.10.2-**git-git status干净,只有一个未跟踪的demo.cast- .zcode/plans/有5个历史plan文件,最近的还在- .zcode/plans/有5个历史plan文件,最近的还在讨论**/model- .zcode/plans/有5个历史plan文件,最近的还在讨论**/model三层级联picker + setup————这是已设计但尚未落地的改动- wayfinder/tickets/空- wayfinder/tickets/空,说明没有用wayfinder- wayfinder/tickets/空,说明没有用wayfinder工作流进行大型- wayfinder/tickets/空,说明没有用wayfinder工作流进行大型拆分###关键技术###关键技术决策与约束(来自-vendor-edit约束:官方runtime是抽取的,不能直接改,补丁只能打在TUI层或runtimePatch-config.json schema:`model-config.json schema:model字段严格{main, lite};-config.json schema:model字段严格{main, lite};model.availableinit;ui.*块只被T-OAuth工作流:登录会自动把-OAuth工作流:登录会自动把Coding Plan key写入config(iH/bni、`xC-OAuth工作流:登录会自动把Coding Plan key写入config(iH/bni、xCt-subagent模型解析:子agent可用不同模型,-subagent模型解析:子agent可用不同模型,通过profile frontmatter / agents-state.json / workflow解析,config解析,config.json里解析,config.json里没有`subagents-模型配置Web UI:`/model-模型配置Web UI:/model-config插件在127.0.0.1动态端口编辑-模型配置Web UI:/model-config插件在127.0.0.1动态端口编辑config.json,per-session,基于未落地的plan和基于未落地的plan和近期issue活跃基于未落地的plan和近期issue活跃度,最自然的延续1.**落地1.**落地/model三层级联+ config持久2.settings.json拆分:把ui.*从runtime契约的config.json里2.settings.json拆分:把ui.*从runtime契约的config.json里分出去,避免TUI提案,config-settings-split-proposal如果你想推进其中/→ help /help [command] — Show this slash command help.login/login [zai-coding-plan|bigmodel-coding-plan|zai-coding-plan-api-key <api-key>|bigmodel-logout/logout — Remove the shared Z.ai login credentials.compact/compact [instructions] — Compact the current conversation with optional instructions.init/init [notes] — Create or update workspace AGENTS.md instructions.expert/expert [status|resume|stop|<task>] — Run or manage the expert workflow.effort/effort [list|<level>] — Show or switch the current session reasoning effort.(1/35)/cclsClear the visible transcript (the runtime's /clear starts a new session)mcp/mcp [list|status|connect <server>|disconnect <server>] — Show or manage configured MCP(1/12)/co/con→ context Inspect context usage and prompt composition/cont/conte/contex/contextContext overview28.2K / 1M tokens · 3% used · 971.8K remainingCache health · exact runtime tokensActive branch58% hit · 7 requests ·155.3K input · 89.5K read · 0 writeWhole tree58% hit · 7 requests ·155.3K input · 89.5K read · 0 writeLatest 95% · min 0% · max 95% · 7 turns100%75%50%25%0%·······cache hit · ░ uncached request · blank gap = unavailableRecent cache requestsDetails 1–20 of 35 · ↓ 15 · ←/→ or PgUp/PgDn scroll░6291eb4540% hit · 25.6K input · 0 read74625ae5195% hit · 27K input · 25.6K readEstimated prompt composition by characters●Tool input/output35,627 chars · 91.6%●Assistant messages3,250 chars · 8.4%●User messages8 chars · 0.0%Session cache totalsLatest request 95% hit rate · 25.6K read · 0 written · 27K inputSession tokens 89.5K read · 0 written · 155.3K inputSession total 58% hit rate · 7 requests1 overview · 2 cache trend · 3 composition · v cycle · r refreshDetails 16–35 of 35 · ↑ 15 · ←/→ or PgUp/PgDn scrollSaving session...completed.
\ No newline at end of file