Skip to content

v1.0.8

Choose a tag to compare

@liangyou09 liangyou09 released this 12 Sep 12:05
· 75 commits to main since this release

LyShell v1.0.8

中文说明 · English


中文说明

本版主线是全屏命令面板(Ctrl+Shift+P 一处直达所有入口,含清点文档与内置使用手册)与终端运行时编码切换(UTF-8 / GBK / GB2312 状态栏直切);同时为 Harness 工作区引入权限档位与危险态界面,页签改为 Edge 式收缩,并修复终端字体加载竞态、搜狗输入法 Shift 丢字等问题。

✨ 新功能

全屏命令面板(本版主线)

  • Ctrl+Shift+P 唤起全局命令面板:全屏浮层聚合所有入口——保存 / 运行中的会话、Agent、dsh / codex / claude 工作区、变量组、插件、网页与设置页签,模糊搜索直达;与空状态命令屏共用命令集,/new 新建会话、/local 直连本地终端、/help 打开使用手册、/ls 打开清点文档;ESC 或关闭命令退出。页签条尾也新增打开面板的入口。
  • 清点文档:/ls 在文档页签中生成会话 / Agent / 变量组 / 三个 harness 工作区 / 插件的全量清单,/ls <对象>(如 /ls env、/ls claude)为单节子清单;内容为时点快照,重跑或点页签刷新按钮重新清点;清单内的 lyshell-action:// 动作链接可直接跳转打开对应对象。
  • 内置使用手册:/help(可带 chinese / english 参数)在文档页签打开中英文使用手册,渲染管线复用 DocPanel(大纲轨 / 缩放 / 主题)。

终端运行时编码切换

  • 状态栏直切 UTF-8 / GBK / GB2312:connector 热替换 iconv 解码流,跨切换边界的切分多字节不烂;重连保持当前编码,关闭重开回落保存值;本地会话恒 UTF-8(ConPTY 无编码层,拒绝切换)。
  • 编码值统一净化(@shared/encoding):仓库加载 / 保存与 IPC / MCP 入口同一口径,local 归一 utf-8、非法值回落 utf-8。
  • MCP lyshell_create_session 新增 encoding 参数(复用未连接会话时连接前落位、失败不回滚)。
  • 终端读数(编码 / 字号 / 尺寸等)迁移到会话侧栏底部;窄宽度两级降级(行数 <300 / 尺寸段 <260,迟滞 6px 防反复横跳)。

Harness 权限档位

  • 工作区新增权限档位,启动即生效:
    • Codex::read-only / :workspace / :danger-full-access 三档,启动拼 -c default_permissions=<档位>;
    • Claude:default / acceptEdits / plan / bypassPermissions 四档,启动拼 --permission-mode <mode>,bypass 档拼 --dangerously-skip-permissions 直连 flag。
  • 危险态界面:选到全开放档位时表单给出显著视觉提示。
  • 历史布尔开关 skipPermissions 自动迁移为 bypassPermissions 档。

页签与界面

  • 页签 Edge 式收缩:页签多时只缩不滚(无地板宽度),页签条尾部保留新页签位;悬停详情卡展示完整标题。
  • 变量组启用收敛为全局单选:同一时刻全应用至多一组通电(dsh / codex / claude 与 dsh Web 共用一根指针),点亮新组即熄灭旧组,再点一次回落系统环境变量。
  • 面板头条图标钮与卡片操作样式全站统一(IconBtn),六个面板视觉语言一致。

🐛 修复

  • 终端字体加载竞态:woff2 未就绪时留下脏度量,导致「字号往返后字体变样」;改为字体就绪(loadingdone)后重测 + 门闩拦截竞态窗口。
  • 字号步进手感:设置面板此前失焦才派发、按住会连跳(「−2 假象」);改为步进实时派发,并放开 1px 步进。
  • PTY resize 防抖优化,减少 resize 风暴下的抖动。
  • 搜狗输入法 Shift 丢字:搜狗中文态敲字母后按 Shift 切英文,字母不再被静默吞掉(根因是 xterm 对纯修饰键 keydown 的标志位误伤 insertText,与上游 xtermjs#6054 同根因,已打补丁)。
  • 焦点接管:命令面板等浮层开着时,后台异步挂载的会话不再越权抢走键盘焦点;面板关闭后焦点悬空时,可见的活动终端自动接回。
  • 浮层 ESC 统一回退栈:全应用 ESC 改为模块级 LIFO 栈,仅栈顶消费,杜绝裸 \x1b 透传到远端 PTY;浮层层叠时按栈序逐层回退;两步确认(如删除二次确认)一次 ESC 只退一层;带 IME 守卫(isComposing),中文输入态不再误关浮层。
  • dsh Web 默认工作区吃不到变量组凭据:此前无绑定工作区的 dsh Web 启动只注入附加变量,结构化核心(DEEPSEEK_BASE_URL / DEEPSEEK_API_KEY)从未物化注入;现与 TUI 启动走同一份解析链。

🔄 升级说明

  • 变量组启用指针从三根(dsh / codex / claude)收敛为一根:升级时按 dsh → codex → claude 顺序保留首个既有指针,无需手动操作。
  • Harness 工作区的历史 skipPermissions 布尔开关自动迁移为 bypassPermissions 档。
  • 终端编码为运行时值不落盘:重连保持当前编码,关闭重开回落到会话保存值(默认 UTF-8)。

English

The headline of this release is a full-screen command palette (Ctrl+Shift+P — one place to reach everything, including inventory docs and a built-in user manual) and runtime terminal encoding switching (UTF-8 / GBK / GB2312, switchable straight from the status bar). It also introduces permission tiers with a danger-state UI for Harness workspaces, moves tabs to Edge-style shrinking, and fixes the terminal font-loading race and the Sogou IME Shift character loss.

✨ New Features

Full-screen command palette (headline change)

  • Ctrl+Shift+P opens the global command palette: a full-screen overlay aggregating every entry point — saved and running sessions, agents, dsh / codex / claude workspaces, variable groups, plugins, web and settings tabs — with fuzzy search to jump straight to any of them. It shares the command set with the empty-state command screen: /new for a new session, /local for an instant local terminal, /help to open the user manual, /ls for the inventory doc; ESC or a close command dismisses it. The tab strip also gains an entry to open the palette.
  • Inventory docs: /ls renders a full inventory of sessions / agents / variable groups / the three harness workspaces / plugins in a document tab; /ls <object> (e.g. /ls env, /ls claude) yields a single-section sub-inventory. Content is a point-in-time snapshot — rerun or hit the tab's refresh button to re-inventory; lyshell-action:// action links inside the doc jump straight to the corresponding object.
  • Built-in user manual: /help (optionally with a chinese / english argument) opens the user manual in a document tab, reusing the DocPanel pipeline (outline rail / zoom / theme).

Runtime terminal encoding switching

  • Switch UTF-8 / GBK / GB2312 straight from the status bar: the connector hot-swaps the iconv decoder stream, so multi-byte characters split across a switch boundary don't corrupt; reconnects keep the current encoding, close-and-reopen falls back to the saved value; local sessions are always UTF-8 (ConPTY has no encoding layer — switching is refused).
  • Encoding values are sanitized through a single gate (@shared/encoding): repository load/save and IPC / MCP entry points share one policy — local normalizes to utf-8, invalid values fall back to utf-8.
  • The MCP lyshell_create_session tool gains an encoding parameter (applied before connecting when an unconnected session is reused, and left in place if the connection fails).
  • Terminal readouts (encoding / font size / dimensions) move to the bottom of the session sidebar, with two-level degradation at narrow widths (row count <300 / size segment <260, 6px hysteresis to prevent flapping).

Harness permission tiers

  • Workspaces gain permission tiers, applied at launch:
    • Codex: three tiers — :read-only / :workspace / :danger-full-access — passed as -c default_permissions=<tier>;
    • Claude: four tiers — default / acceptEdits / plan / bypassPermissions — passed as --permission-mode <mode>, with the bypass tier passing the --dangerously-skip-permissions flag directly.
  • Danger-state UI: selecting a fully-open tier shows a prominent visual warning in the form.
  • The legacy skipPermissions boolean migrates automatically to the bypassPermissions tier.

Tabs & UI

  • Edge-style tab shrinking: tabs shrink as they multiply (no scrolling, no floor width), with the new-tab slot reserved at the end of the strip; a hover detail card shows the full title.
  • Variable group activation collapses to a single global switch: at most one group is live app-wide (dsh / codex / claude and dsh Web share one pointer) — lighting a new group dims the old one; clicking the lit one again falls back to the system environment.
  • Panel header icon buttons and card action styles are unified across the app (IconBtn) — six panels now speak one visual language.

🐛 Fixes

  • Terminal font-loading race: a not-yet-ready woff2 left stale metrics behind, making the font look different after a size round-trip; metrics are now re-measured once the font is ready (loadingdone), with a latch guarding the race window.
  • Font-size stepping feel: the settings panel used to dispatch only on blur and skip values while a key was held (the "−2 illusion"); stepping now dispatches in real time, and 1px steps are unlocked.
  • PTY resize debouncing improved, reducing jitter during resize storms.
  • Sogou IME Shift character loss: typing letters in Sogou's Chinese state and pressing Shift (to switch to English and commit the letters) no longer silently swallows them (root cause: xterm's flag for plain modifier-key keydowns eating insertText events — same root as upstream xtermjs#6054; patched locally).
  • Focus takeover: with an overlay like the command palette open, sessions mounting asynchronously in the background no longer steal keyboard focus; when the palette closes with focus left dangling, the visible active terminal takes it back.
  • Unified ESC back-stack for overlays: ESC is now handled by an app-wide module-level LIFO stack — only the top of the stack consumes it, so a bare \x1b never leaks to the remote PTY; stacked overlays retreat layer by layer in stack order; two-step confirmations (e.g. delete double-confirm) retreat one layer per ESC; an IME guard (isComposing) keeps Chinese composition from dismissing overlays.
  • dsh Web default workspace missing variable-group credentials: a dsh Web launch without a bound workspace only injected the enabled group's extra variables — the structured core (DEEPSEEK_BASE_URL / DEEPSEEK_API_KEY) was never materialized; it now shares the same resolution chain as TUI launches.

🔄 Upgrade notes

  • The variable group activation pointers collapse from three (dsh / codex / claude) to one: on upgrade the first existing pointer is kept in dsh → codex → claude order — nothing to do manually.
  • The Harness workspace legacy skipPermissions boolean migrates automatically to the bypassPermissions tier.
  • Terminal encoding is a runtime value and is not persisted: reconnects keep the current encoding; close-and-reopen falls back to the session's saved value (default UTF-8).