@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.
- package/extensions/pretty.ts +23 -14
- package/package.json +1 -1
package/extensions/pretty.ts
CHANGED
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
* (giladbarnea/pi-pretty-bash), per-surface opt-in (pi-zentui).
|
|
15
15
|
*/
|
|
16
16
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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:
|
|
125
|
-
bash:
|
|
126
|
-
edit:
|
|
127
|
-
write:
|
|
128
|
-
grep:
|
|
129
|
-
find:
|
|
130
|
-
ls:
|
|
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