docs(terminal-panel): state that environment replaces its default and that full access shares history

A configured environment replaces the PAGER and GIT_PAGER default, so the
configuration table says to keep both. Known Limitations records that a
danger-full-access terminal keeps the inherited HISTFILE, usually the
person's own history file.
This commit is contained in:
Yichen Jiang committed 2026-11-04 17:24:47 +08:00
1 parent 4a40bcc9ff
commit 5c8589487b
3 files changed
+8 -6

No files matched your search

@@ -24,8 +24,8 @@
en: c99bcbaaa06867aa
zh: 98c83a457a3adebb
/deepseek-ai-dsh-terminal-panel/use-this-package/configuration:
en: 7b1fd9bc46e6e080
zh: c95222f0737a879f
en: 6ec6a875e73a523f
zh: 87ffa78b950595ef
/deepseek-ai-dsh-terminal-panel/understand-the-implementation:
en: 42b15ac6321706aa
zh: 4ed0861911abaf5d
@@ -84,8 +84,8 @@
en: ac583ab16185a93c
zh: b7648468f156c025
/deepseek-ai-dsh-terminal-panel/known-limitations-and-deferred-work:
en: 6532d96a4477d918
zh: 199ed2549f85d0b5
en: f2428588abc2dc13
zh: 3feec47fb8b54c80
/deepseek-ai-dsh-terminal-panel/known-limitations-and-deferred-work/dev-note:
en: e67f633dc6fe7773
zh: 3bb0c20c93f16f98
@@ -57,7 +57,7 @@ Once the person types or pastes into an Agent terminal, `terminal_send` and `ter
| `backendType` | `shell` | Terminal registry type served by sidebar terminals |
| `cols`, `rows` | `160`, `40` | Initial size; an open sidebar view resizes the terminal to its panel |
| `preferredShells` | `[]` | Executable names tried among the discovered shells before the default shell |
| `environment` | `PAGER`, `GIT_PAGER` = `cat` | Variables added to Agent terminal environments |
| `environment` | `PAGER`, `GIT_PAGER` = `cat` | Variables added to Agent terminal environments; a configured value replaces the default, so keep `PAGER` and `GIT_PAGER` in it, or programs such as `git log` stop in a pager |
| `startupSilenceMs`, `startupTimeoutMs` | `300`, `15000` | Startup silence and bound |
| `promptSilenceMs` | `300` | Silence before a send checks the foreground |
| `probeIntervalMs` | `1000` | Minimum interval between foreground inspections |
@@ -167,6 +167,7 @@ Append-only; new results follow the reusable request prefix.
- **Inferred readiness** — a silent shell builtin, such as `wait`, reads as `stdin_read`; on macOS a program waiting for input returns only after `idleSilenceMs`; a nested shell at its prompt returns `inferred_idle`.
- **Point-in-time user reads** — `user_terminal_read` returns the current screen and does not wait for new output.
- **Sandboxed startup files** — confined shells cannot write files outside the writable roots, so startup files that do may print errors into the terminal.
- **Shared history under full access** — a `danger-full-access` terminal keeps the inherited `HISTFILE`, usually the person's own history file, so the Agent's commands join that history and the Agent's shell loads it.
<a id="dev-note"></a>
### Dev Note
@@ -57,7 +57,7 @@ kind: "package-reference"
| `backendType` | `shell` | 由侧栏终端提供的终端注册表类型 |
| `cols`、`rows` | `160`、`40` | 初始尺寸;打开的侧栏视图会把终端调整为面板大小 |
| `preferredShells` | `[]` | 在默认 shell 之前、从已探测 shell 中优先尝试的可执行文件名 |
| `environment` | `PAGER`、`GIT_PAGER` = `cat` | 添加到 Agent 终端环境的变量 |
| `environment` | `PAGER`、`GIT_PAGER` = `cat` | 添加到 Agent 终端环境的变量;配置的值会替换默认值,因此请在其中保留 `PAGER` 和 `GIT_PAGER`,否则 `git log` 等程序会停在分页器中 |
| `startupSilenceMs`、`startupTimeoutMs` | `300`、`15000` | 启动静默时长与启动时限 |
| `promptSilenceMs` | `300` | 发送后检查前台之前的静默时长 |
| `probeIntervalMs` | `1000` | 两次前台检查之间的最短间隔 |
@@ -167,6 +167,7 @@ Terminals you open with terminal_open appear in the user's side panel. The user
- **就绪是推断的**——静默的 shell 内建命令(如 `wait`)会被当作 `stdin_read`;在 macOS 上,等待输入的程序要到 `idleSilenceMs` 后才返回;停在提示符的嵌套 shell 返回 `inferred_idle`。
- **用户终端只读当前屏幕**——`user_terminal_read` 返回当前屏幕,不等待新输出。
- **沙箱中的启动文件**——受限 shell 无法写入可写目录之外的文件,因此会写这类文件的启动文件可能在终端中打印错误。
- **完全访问下共用历史**——`danger-full-access` 终端沿用继承的 `HISTFILE`,通常就是人自己的历史文件,因此 Agent 的命令会追加到这份历史中,Agent 的 shell 也会载入它。
<a id="dev-note"></a>
### 开发备注