@trim21/personal-pi-extensions 0.0.233 → 0.0.235
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
package/src/claude-code/files.ts
CHANGED
|
@@ -173,7 +173,7 @@ export function registerFileTools(pi: ExtensionAPI, state: ClaudeCodeState): voi
|
|
|
173
173
|
"This tool reads files, not directories.",
|
|
174
174
|
].join("\n"),
|
|
175
175
|
promptSnippet: "Read files from the local filesystem with line numbers",
|
|
176
|
-
promptGuidelines: [READ_PROMPT],
|
|
176
|
+
promptGuidelines: [`- -\n${READ_PROMPT}`],
|
|
177
177
|
parameters: Type.Object(
|
|
178
178
|
{
|
|
179
179
|
file_path: Type.String({ description: "The absolute path to the file to read" }),
|
|
@@ -243,7 +243,7 @@ export function registerFileTools(pi: ExtensionAPI, state: ClaudeCodeState): voi
|
|
|
243
243
|
"This tool does not use regular expressions or fuzzy matching.",
|
|
244
244
|
].join("\n"),
|
|
245
245
|
promptSnippet: "Make exact string replacements in files",
|
|
246
|
-
promptGuidelines: [EDIT_PROMPT],
|
|
246
|
+
promptGuidelines: [`- -\n${EDIT_PROMPT}`],
|
|
247
247
|
parameters: Type.Object(
|
|
248
248
|
{
|
|
249
249
|
file_path: Type.String({ description: "The absolute path to the file to modify" }),
|
|
@@ -302,7 +302,7 @@ export function registerFileTools(pi: ExtensionAPI, state: ClaudeCodeState): voi
|
|
|
302
302
|
"If the file exists, you must use Read first. Prefer Edit for partial changes.",
|
|
303
303
|
].join("\n"),
|
|
304
304
|
promptSnippet: "Create or overwrite files",
|
|
305
|
-
promptGuidelines: [WRITE_PROMPT],
|
|
305
|
+
promptGuidelines: [`- -\n${WRITE_PROMPT}`],
|
|
306
306
|
parameters: Type.Object(
|
|
307
307
|
{
|
|
308
308
|
file_path: Type.String({
|
package/src/claude-code/glob.ts
CHANGED
|
@@ -53,7 +53,7 @@ export function registerGlobTool(pi: ExtensionAPI): void {
|
|
|
53
53
|
"Returns matching file paths sorted by modification time.",
|
|
54
54
|
].join("\n"),
|
|
55
55
|
promptSnippet: "Find files by name patterns",
|
|
56
|
-
promptGuidelines: [GLOB_PROMPT],
|
|
56
|
+
promptGuidelines: [`- -\n${GLOB_PROMPT}`],
|
|
57
57
|
parameters: Type.Object(
|
|
58
58
|
{
|
|
59
59
|
pattern: Type.String({ description: "The glob pattern to match files against" }),
|
package/src/claude-code/grep.ts
CHANGED
|
@@ -151,7 +151,7 @@ export function registerGrepTool(pi: ExtensionAPI): void {
|
|
|
151
151
|
'output_mode defaults to "files_with_matches"; use "content" for matching lines or "count" for match counts.',
|
|
152
152
|
].join("\n"),
|
|
153
153
|
promptSnippet: "Search file contents with regular expressions",
|
|
154
|
-
promptGuidelines: [GREP_PROMPT],
|
|
154
|
+
promptGuidelines: [`- -\n${GREP_PROMPT}`],
|
|
155
155
|
parameters: Type.Object(
|
|
156
156
|
{
|
|
157
157
|
pattern: Type.String({ description: "The regular expression pattern to search for" }),
|
|
@@ -8,6 +8,13 @@ const TODO_STATUSES = ["pending", "in_progress", "completed"] as const;
|
|
|
8
8
|
const OTHER_OPTION = "Other";
|
|
9
9
|
const DONE_OPTION = "Done";
|
|
10
10
|
|
|
11
|
+
/** AskUserQuestion guidance, kept as plain text like the tool .md files. */
|
|
12
|
+
const ASK_PROMPT = [
|
|
13
|
+
"Use AskUserQuestion when you need to gather preferences, clarify requirements, or choose an implementation direction.",
|
|
14
|
+
"Users can always provide their own answer through the automatically supplied Other option.",
|
|
15
|
+
'If you recommend an option, put it first and append "(Recommended)" to its label.',
|
|
16
|
+
].join("\n");
|
|
17
|
+
|
|
11
18
|
type TodoStatus = (typeof TODO_STATUSES)[number];
|
|
12
19
|
|
|
13
20
|
export interface ClaudeCodeTodo {
|
|
@@ -176,11 +183,7 @@ export function registerSessionTools(pi: ExtensionAPI): void {
|
|
|
176
183
|
'If you recommend an option, put it first and append "(Recommended)" to its label.',
|
|
177
184
|
].join("\n"),
|
|
178
185
|
promptSnippet: "Ask the user questions during execution",
|
|
179
|
-
promptGuidelines: [
|
|
180
|
-
"Use AskUserQuestion when you need to gather preferences, clarify requirements, or choose an implementation direction.",
|
|
181
|
-
"Users can always provide their own answer through the automatically supplied Other option.",
|
|
182
|
-
'If you recommend an option, put it first and append "(Recommended)" to its label.',
|
|
183
|
-
],
|
|
186
|
+
promptGuidelines: [`- -\n${ASK_PROMPT}`],
|
|
184
187
|
parameters: Type.Object(
|
|
185
188
|
{
|
|
186
189
|
questions: Type.Array(questionSchema, {
|
package/src/claude-code/shell.ts
CHANGED
|
@@ -17,7 +17,8 @@ export function registerShellTools(pi: ExtensionAPI): void {
|
|
|
17
17
|
bwrapRuntime.setup(pi);
|
|
18
18
|
pi.registerTool({
|
|
19
19
|
name: "Bash",
|
|
20
|
-
|
|
20
|
+
promptSnippet: "execute command",
|
|
21
|
+
promptGuidelines: [`- -\n${BASH_PROMPT}`],
|
|
21
22
|
label: "Bash",
|
|
22
23
|
description: [
|
|
23
24
|
"Executes a given bash command synchronously and returns its output.",
|