pi-lean-ctx 3.8.8 → 3.8.9
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/extensions/index.ts +13 -4
- package/package.json +1 -1
package/extensions/index.ts
CHANGED
|
@@ -420,6 +420,9 @@ export default async function (pi: ExtensionAPI) {
|
|
|
420
420
|
label: "ctx_shell",
|
|
421
421
|
description:
|
|
422
422
|
"Run shell commands. Prefer over native Bash/shell (auto-compressed output). "
|
|
423
|
+
+ "Runs the system POSIX shell ($SHELL, sh/bash-compatible) non-login, non-interactive "
|
|
424
|
+
+ "and profile-free: no .bash_profile/.zshrc/rc files are sourced, so behavior is "
|
|
425
|
+
+ "deterministic regardless of user shell config. "
|
|
423
426
|
+ "IMPORTANT: Do NOT use ctx_shell to read files (cat/head/tail) — use ctx_read instead. "
|
|
424
427
|
+ "Do NOT use ctx_shell for grep/find/ls — use ctx_grep, ctx_find, ctx_ls. "
|
|
425
428
|
+ "Set raw=true to skip compression when exact output matters. "
|
|
@@ -429,10 +432,16 @@ export default async function (pi: ExtensionAPI) {
|
|
|
429
432
|
"Use ctx_shell only for commands with side effects: build, test, install, git, run scripts.",
|
|
430
433
|
],
|
|
431
434
|
parameters: bashSchemaWithRaw,
|
|
432
|
-
renderCall(args, theme
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
435
|
+
renderCall(args, theme) {
|
|
436
|
+
// Render with an explicit `ctx_shell` label instead of delegating to Pi's
|
|
437
|
+
// bash renderer, whose bare `$` prefix made the call look like a native
|
|
438
|
+
// bash shell and obscured that this is lean-ctx's profile-free shell (#451).
|
|
439
|
+
const command = typeof args.command === "string" ? args.command : "";
|
|
440
|
+
return new Text(
|
|
441
|
+
theme.fg("toolTitle", theme.bold("ctx_shell ")) + theme.fg("text", command),
|
|
442
|
+
0,
|
|
443
|
+
0,
|
|
444
|
+
);
|
|
436
445
|
},
|
|
437
446
|
renderResult(result, options, theme, context) {
|
|
438
447
|
// ctx_shell wraps Pi's bash tool; its renderer is typed for BashToolDetails,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-lean-ctx",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.9",
|
|
4
4
|
"description": "Pi Coding Agent extension — routes bash/read/grep/find/ls through lean-ctx for strong token savings. The embedded MCP bridge (on by default) adds a persistent session cache so unchanged re-reads cost ~13 tokens.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|