@pify/pretty 0.5.0 → 0.5.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.
@@ -14,13 +14,13 @@
14
14
  * (giladbarnea/pi-pretty-bash), per-surface opt-in (pi-zentui).
15
15
  */
16
16
  import {
17
- createBashTool,
18
- createEditTool,
19
- createFindTool,
20
- createGrepTool,
21
- createLsTool,
22
- createReadTool,
23
- createWriteTool,
17
+ createBashToolDefinition,
18
+ createEditToolDefinition,
19
+ createFindToolDefinition,
20
+ createGrepToolDefinition,
21
+ createLsToolDefinition,
22
+ createReadToolDefinition,
23
+ createWriteToolDefinition,
24
24
  getAgentDir,
25
25
  getLanguageFromPath,
26
26
  highlightCode,
@@ -120,14 +120,23 @@ export default function pretty(pi: ExtensionAPI) {
120
120
  }
121
121
 
122
122
  function buildOriginals(cwd: string): Record<PrettyTool, AnyTool> {
123
+ // The *ToolDefinition* factories, not the createReadTool wrappers: the
124
+ // wrapper (wrapToolDefinition) copies only name/label/description/
125
+ // parameters/execute and DROPS promptSnippet, promptGuidelines and the
126
+ // built-in renderers. Re-registering the wrapped form removed six of the
127
+ // seven builtins from the system prompt's "Available tools" list —
128
+ // measured: with pretty loaded the list shrank to bash alone, and the
129
+ // Guidelines steered the model to bash for file operations because read,
130
+ // edit and write were no longer named. A renderer package must never
131
+ // change what the model is told it can do.
123
132
  return {
124
- read: createReadTool(cwd) as unknown as AnyTool,
125
- bash: createBashTool(cwd) as unknown as AnyTool,
126
- edit: createEditTool(cwd) as unknown as AnyTool,
127
- write: createWriteTool(cwd) as unknown as AnyTool,
128
- grep: createGrepTool(cwd) as unknown as AnyTool,
129
- find: createFindTool(cwd) as unknown as AnyTool,
130
- ls: createLsTool(cwd) as unknown as AnyTool,
133
+ read: createReadToolDefinition(cwd) as unknown as AnyTool,
134
+ bash: createBashToolDefinition(cwd) as unknown as AnyTool,
135
+ edit: createEditToolDefinition(cwd) as unknown as AnyTool,
136
+ write: createWriteToolDefinition(cwd) as unknown as AnyTool,
137
+ grep: createGrepToolDefinition(cwd) as unknown as AnyTool,
138
+ find: createFindToolDefinition(cwd) as unknown as AnyTool,
139
+ ls: createLsToolDefinition(cwd) as unknown as AnyTool,
131
140
  };
132
141
  }
133
142
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pify/pretty",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Compact, theme-aware rendering for pi's built-in tools: one-line summaries, syntax-highlighted reads, colorized diffs — behavior untouched",
5
5
  "keywords": [
6
6
  "pi-package",