@trim21/personal-pi-extensions 0.1.546 → 0.1.547

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trim21/personal-pi-extensions",
3
- "version": "0.1.546",
3
+ "version": "0.1.547",
4
4
  "type": "module",
5
5
  "description": "Custom pi coding-agent extensions: bwrap sandbox, workspace guard, opencode edit, and more",
6
6
  "keywords": [
@@ -440,7 +440,7 @@ export class BwrapRuntime {
440
440
  // 兼容 pi local ops 抛的 new Error("aborted")
441
441
  if (error instanceof Error && (error.name === "AbortError" || error.message === "aborted")) {
442
442
  const partial = await this.finalizeOutput(output);
443
- throw new BashInterruptedError("aborted", "Command aborted", partial, error);
443
+ throw new BashInterruptedError("aborted", "Command aborted by user", partial, error);
444
444
  }
445
445
  throw error;
446
446
  } finally {
@@ -148,7 +148,7 @@ export function registerShellTools(
148
148
  );
149
149
  if (error.kind === "aborted") {
150
150
  // 用户取消:直接返回已捕获的输出,不抛错
151
- const full = text ? `${text}\n\nCommand aborted` : "Command aborted";
151
+ const full = text ? `${text}\n\nCommand aborted by user` : "Command aborted by user";
152
152
  return { content: [{ type: "text", text: full }], details: undefined };
153
153
  }
154
154
  const full = text
@@ -109,7 +109,7 @@ export default function opencodeBash(
109
109
  const status =
110
110
  error.kind === "timeout"
111
111
  ? `Command exceeded timeout of ${timeout} ms. Retry with a larger timeout if the command is expected to take longer.`
112
- : "Command aborted";
112
+ : "Command aborted by user";
113
113
  const full = text ? `${text}\n\n${status}` : status;
114
114
  // 对齐上游 opencode:超时与中断都不抛错,输出与状态文本一起返回
115
115
  return {