zai-org / zai-org/feedback

[Bug] ZCode 集成终端不响应 fish 的 DA1 查询,启动时卡顿约 10 秒

Open
#56 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: P2 status: 待评估 type: Bug
Dominant language
No language data
Stars
22
Forks
1
PR merge metrics
No merged PRs in 30d

Description

提交前确认 · Pre-submission checklist
  • 我已搜索过现有 issue,确认这不是重复 / I searched existing issues and confirmed this isn't a duplicate.
  • 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.
问题类别 · Category

UI / 界面体验 · UI / UX

涉及的 Agent 框架 · Agent framework

ZCode Agent(自研)

严重程度 · Severity

轻微 · Minor (小问题不影响主流程 / minor, no impact on main flow)

复现频率 · Reproducibility

必现 · Always

问题描述 · Description

集成终端不响应 fish 的 DA1 查询,启动时卡顿约 10 秒(全版本均存在)

【环境】

  • 系统:Arch Linux,Wayland 会话,合成器 niri
  • Shell:fish 4.7.1
  • ZCode(基于 Electron 41 / Chrome 146)
  • 对比(同环境已验证):同为基于 Electron 的官方 VS Code 1.124.2 终端可正常响应 DA1,无此卡顿,说明问题出在 ZCode 终端侧

【现象】
在 ZCode 集成终端中启动交互式 fish 时,会卡顿约 10 秒,并打印警告:
could not read response to Primary Device Attribute query after waiting for 10 seconds

【测试范围】
已在 ZCode 3.1.1 ~ 3.1.8 的每个版本上逐一测试,所有版本均存在该问题(不是某个版本的回归,而是长期存在的问题)。

【原因分析】
fish 启动时会向终端发送 DA1 查询(Primary Device Attribute,ESC[c)以探测终端能力。
ZCode 的集成终端没有响应该查询,导致 fish 等待超时(10 秒);同为基于 Electron 的官方 VS Code 终端可正常响应。
另外观察到 ZCode 终端未设置 TERM_PROGRAM,可能与该问题相关。

【复现步骤】

  1. 把默认 shell 设置为 fish
  2. 在 ZCode 中打开集成终端
  3. 观察到启动时约 10 秒卡顿及上述警告

【预期】
终端按 xterm 惯例正确响应 DA1 查询,fish 立即正常启动,无卡顿。

【临时方案】
在 fish 中启用 no-query-term 特性可绕过(set -U fish_features no-query-term)。

复现步骤 · Steps to reproduce
  1. 启动 ZCode
  2. 打开内置集成终端
  3. 界面卡顿约10秒(无响应)
  4. 之后恢复正常,可继续使用
期望表现 · Expected behavior

立即打开

实际表现 · Actual behavior

卡住10秒

ZCode 版本 · ZCode version

v3.1.1 - v3.1.8

设备 / 系统 / 浏览器 · Device / OS / Browser

ArchLinux/Wayland/Niri

截图 / 录屏 / 日志 · Screenshots / Recordings / Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with fish in ZCode's integrated terminal and observe whether the DA1 query receives a response; compare the behavior with the referenced Electron-based VS Code terminal. Done means fish starts immediately, the 10-second warning no longer appears, and the terminal responds to DA1 as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, fish
Domain
cli, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.