pi-cc-extensions 0.7.11 → 0.8.1

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.
@@ -0,0 +1,17 @@
1
+ const UNSAFE_TERMINAL_ESCAPE = new RegExp(
2
+ "\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\x5C)"
3
+ + "|\\u001B[PX^_][\\s\\S]*?\\u001B\\x5C"
4
+ + "|(?:\\u001B\\[|\\u009B)[0-?]*[ -/]*[@-~]"
5
+ + "|\\u001B[@-_]",
6
+ "g",
7
+ );
8
+
9
+ /** Prevent captured terminal control responses from being replayed by tool renderers. */
10
+ export function sanitizeToolResultText(value: string): string {
11
+ return value
12
+ .replace(UNSAFE_TERMINAL_ESCAPE, "")
13
+ .replace(/\x1B/g, "")
14
+ .replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]/g, "")
15
+ .replace(/\r\n/g, "\n")
16
+ .replace(/\r/g, "\n");
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-cc-extensions",
3
- "version": "0.7.11",
3
+ "version": "0.8.1",
4
4
  "description": "A Pi productivity suite with Claude Code-style UI, context inspection, and agent/session references",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -27,9 +27,10 @@
27
27
  "./extensions/claude-code-style.ts",
28
28
  "./extensions/context.ts",
29
29
  "./extensions/session-reference.ts",
30
- "./extensions/agent-autocomplete.ts"
30
+ "./extensions/agent-autocomplete.ts",
31
+ "./extensions/compact-style.ts"
31
32
  ],
32
- "image": "https://raw.githubusercontent.com/minuque/pi-cc-extensions/main/assets/readme/fixed-editor-navigation.webp"
33
+ "image": "https://raw.githubusercontent.com/minuque/pi-cc-extensions/main/assets/readme/welcome.webp"
33
34
  },
34
35
  "scripts": {
35
36
  "test": "node --test tests/**/*.test.ts",