pi-zh-cn 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,7 +20,7 @@
20
20
  - 八个内置工具的执行结果:读取、执行(bash)、编辑、写入、搜索内容、查找文件、列出目录、PowerShell——状态行都是中文,比如「完成」「退出码 N」「输出过长已截断」
21
21
  - 编辑与写入的改动展示沿用 pi 内置渲染器(只有标题和展开提示是中文):`edit` 显示行号 + 红绿 diff,`write` 预览文件内容(折叠 10 行,`ctrl+o` 展开全量)
22
22
  - 项目信任弹窗:信任/不信任选择,含「信任父文件夹」变体
23
- - 内置斜杠命令描述:core 全部 23 个命令
23
+ - 内置斜杠命令描述:core 全部 24 个命令
24
24
 
25
25
  ## 安装
26
26
 
@@ -92,22 +92,9 @@ CI 在每次 push/PR 时运行,并每两天定时跑一次「上游金丝雀
92
92
 
93
93
  ### 发布
94
94
 
95
- 改完 `package.json` 的 `version` 并提交后,打 tag 推上去即可:
96
-
97
- ```bash
98
- git tag -a v0.2.6 -m "0.2.6: 一句话说明"
99
- git push origin v0.2.6
100
- ```
101
-
102
- `.github/workflows/publish.yml` 会核对 tag 与版本号、跑一遍测试、发布到 npm
103
- 并生成 provenance。认证走 npm Trusted Publishing(OIDC),仓库里不放
104
- `NPM_TOKEN`——那种长期 token 一过期就卡住发版。前提是 npmjs.com 上已把本
105
- 仓库配成该包的 Trusted Publisher(一次性);没配的话 publish 步骤会失败,
106
- 退回本地 `npm login && npm publish` 即可。
107
-
108
- GitHub Release 的正文单独写,用 `gh release create v0.2.6 --notes-file …` 建。
109
- 补打历史 tag 时要注意:Release 列表按 **tag 时间**排序,不是按创建时间,
110
- 所以得带上原始时间(`GIT_COMMITTER_DATE=<原始时间> git tag -a …`)。
95
+ 推 tag 即发布:流水线会核对版本号、跑测试、发到 npm 并生成 provenance,认证走
96
+ npm Trusted Publishing(OIDC),仓库里没有 `NPM_TOKEN`。完整流程、发完怎么核对、
97
+ 报 `ENEEDAUTH` 怎么查,见 **[RELEASING.md](RELEASING.md)**。
111
98
 
112
99
  ## 反馈
113
100
 
@@ -40,8 +40,8 @@ export const withExpanded = (raw: string, summary: string, theme: any): string =
40
40
  *
41
41
  * 内置 bash 工具不返回结构化退出码,只能从输出文本推断:匹配
42
42
  * 「exit code: N」/「command exited with code N」即失败;以 Error 开头、
43
- * 或含超时/中止提示也视为失败。powershell 在 Windows 上额外追加平台
44
- * 提示,通过 extraRe 补充识别。
43
+ * 或含超时/中止/无退出码提示也视为失败。powershell 在 Windows 上额外
44
+ * 追加平台提示,通过 extraRe 补充识别。
45
45
  *
46
46
  * @param output 工具输出的完整文本
47
47
  * @param extraRe 额外的失败特征正则(默认无)
@@ -57,7 +57,9 @@ function failureState(output: string, extraRe: RegExp[] = []) {
57
57
  failed:
58
58
  exitCode !== null ||
59
59
  /^error\b/i.test(output) ||
60
- /\n\ncommand (?:timed out|was aborted|failed)/i.test(output) ||
60
+ // 状态串由 appendStatus 拼在输出后(输出为空时位于文本开头,0.86.0
61
+ // 起新增的「Command terminated without an exit code」就是这个形态)。
62
+ /(?:^|\n\n)command (?:timed out|was aborted|terminated|failed)/i.test(output) ||
61
63
  extraRe.some((re) => re.test(output)),
62
64
  };
63
65
  }
package/extensions/zh.ts CHANGED
@@ -161,6 +161,7 @@ export const zh = {
161
161
  export: "导出会话(默认 HTML,可指定 .html/.jsonl 路径)",
162
162
  import: "从 JSONL 文件导入并恢复会话",
163
163
  share: "通过 GitHub 私密 gist 分享会话",
164
+ bug: "<description> — 向 Pi 开发者报告问题",
164
165
  copy: "复制最后一条助手消息到剪贴板",
165
166
  name: "设置会话显示名称",
166
167
  session: "显示会话信息与统计",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-zh-cn",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "pi 编码代理的简体中文界面汉化插件",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,7 +33,7 @@
33
33
  "@earendil-works/pi-ai": ">=0.85.1",
34
34
  "@earendil-works/pi-coding-agent": ">=0.85.1",
35
35
  "@earendil-works/pi-tui": ">=0.85.1",
36
- "@types/node": "^26.3.0",
36
+ "@types/node": "^26.6.1",
37
37
  "typescript": "^7.0.2"
38
38
  }
39
39
  }