@oh-my-pi/pi-coding-agent 10.2.2 → 10.3.0
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/CHANGELOG.md +51 -0
- package/package.json +7 -7
- package/src/commit/agentic/prompts/analyze-file.md +7 -7
- package/src/commit/agentic/prompts/session-user.md +4 -4
- package/src/commit/agentic/prompts/system.md +14 -16
- package/src/commit/prompts/analysis-system.md +7 -9
- package/src/commit/prompts/analysis-user.md +0 -3
- package/src/commit/prompts/changelog-system.md +14 -19
- package/src/commit/prompts/file-observer-system.md +2 -2
- package/src/commit/prompts/reduce-system.md +13 -23
- package/src/commit/prompts/summary-system.md +7 -21
- package/src/config/settings-schema.ts +135 -56
- package/src/config/settings.ts +0 -6
- package/src/cursor.ts +2 -1
- package/src/extensibility/extensions/index.ts +0 -11
- package/src/extensibility/extensions/types.ts +1 -30
- package/src/extensibility/hooks/types.ts +1 -31
- package/src/index.ts +0 -11
- package/src/ipy/prelude.py +1 -113
- package/src/lsp/index.ts +66 -515
- package/src/lsp/render.ts +0 -11
- package/src/lsp/types.ts +3 -87
- package/src/modes/components/settings-defs.ts +3 -2
- package/src/modes/components/settings-selector.ts +14 -14
- package/src/modes/theme/theme.ts +45 -1
- package/src/prompts/agents/designer.md +23 -27
- package/src/prompts/agents/explore.md +28 -38
- package/src/prompts/agents/init.md +17 -17
- package/src/prompts/agents/plan.md +21 -27
- package/src/prompts/agents/reviewer.md +37 -37
- package/src/prompts/compaction/branch-summary.md +9 -9
- package/src/prompts/compaction/compaction-summary.md +8 -12
- package/src/prompts/compaction/compaction-update-summary.md +17 -19
- package/src/prompts/review-request.md +12 -13
- package/src/prompts/system/custom-system-prompt.md +6 -26
- package/src/prompts/system/plan-mode-active.md +23 -35
- package/src/prompts/system/plan-mode-subagent.md +7 -7
- package/src/prompts/system/subagent-system-prompt.md +7 -7
- package/src/prompts/system/system-prompt.md +134 -149
- package/src/prompts/system/web-search.md +10 -10
- package/src/prompts/tools/ask.md +12 -15
- package/src/prompts/tools/bash.md +7 -7
- package/src/prompts/tools/exit-plan-mode.md +6 -6
- package/src/prompts/tools/gemini-image.md +4 -4
- package/src/prompts/tools/grep.md +4 -4
- package/src/prompts/tools/lsp.md +12 -19
- package/src/prompts/tools/patch.md +26 -30
- package/src/prompts/tools/python.md +14 -57
- package/src/prompts/tools/read.md +4 -4
- package/src/prompts/tools/replace.md +8 -8
- package/src/prompts/tools/ssh.md +14 -27
- package/src/prompts/tools/task.md +23 -35
- package/src/prompts/tools/todo-write.md +29 -38
- package/src/prompts/tools/write.md +3 -3
- package/src/sdk.ts +0 -2
- package/src/session/agent-session.ts +27 -6
- package/src/system-prompt.ts +1 -219
- package/src/task/agents.ts +2 -1
- package/src/tools/bash-interceptor.ts +0 -24
- package/src/tools/bash.ts +1 -7
- package/src/tools/index.ts +8 -3
- package/src/tools/read.ts +74 -17
- package/src/tools/renderers.ts +0 -2
- package/src/lsp/rust-analyzer.ts +0 -184
- package/src/tools/ls.ts +0 -307
|
@@ -14,7 +14,47 @@
|
|
|
14
14
|
// Schema Definition Types
|
|
15
15
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
16
16
|
|
|
17
|
-
export type SettingTab =
|
|
17
|
+
export type SettingTab =
|
|
18
|
+
| "display"
|
|
19
|
+
| "agent"
|
|
20
|
+
| "input"
|
|
21
|
+
| "tools"
|
|
22
|
+
| "config"
|
|
23
|
+
| "services"
|
|
24
|
+
| "bash"
|
|
25
|
+
| "lsp"
|
|
26
|
+
| "ttsr"
|
|
27
|
+
| "status";
|
|
28
|
+
|
|
29
|
+
/** Tab display metadata - icon is resolved via theme.symbol() */
|
|
30
|
+
export type TabMetadata = { label: string; icon: `tab.${string}` };
|
|
31
|
+
|
|
32
|
+
/** Ordered list of tabs for UI rendering (status excluded - custom menu) */
|
|
33
|
+
export const SETTING_TABS: SettingTab[] = [
|
|
34
|
+
"display",
|
|
35
|
+
"agent",
|
|
36
|
+
"input",
|
|
37
|
+
"tools",
|
|
38
|
+
"config",
|
|
39
|
+
"services",
|
|
40
|
+
"bash",
|
|
41
|
+
"lsp",
|
|
42
|
+
"ttsr",
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
/** Tab display metadata - icon is a symbol key from theme.ts (tab.*) */
|
|
46
|
+
export const TAB_METADATA: Record<SettingTab, { label: string; icon: `tab.${string}` }> = {
|
|
47
|
+
display: { label: "Display", icon: "tab.display" },
|
|
48
|
+
agent: { label: "Agent", icon: "tab.agent" },
|
|
49
|
+
input: { label: "Input", icon: "tab.input" },
|
|
50
|
+
tools: { label: "Tools", icon: "tab.tools" },
|
|
51
|
+
config: { label: "Config", icon: "tab.config" },
|
|
52
|
+
services: { label: "Services", icon: "tab.services" },
|
|
53
|
+
bash: { label: "Bash", icon: "tab.bash" },
|
|
54
|
+
lsp: { label: "LSP", icon: "tab.lsp" },
|
|
55
|
+
ttsr: { label: "TTSR", icon: "tab.ttsr" },
|
|
56
|
+
status: { label: "Status", icon: "tab.status" },
|
|
57
|
+
};
|
|
18
58
|
|
|
19
59
|
/** Status line segment identifiers */
|
|
20
60
|
export type StatusLineSegmentId =
|
|
@@ -126,7 +166,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
126
166
|
values: ["off", "minimal", "low", "medium", "high", "xhigh"] as const,
|
|
127
167
|
default: "off",
|
|
128
168
|
ui: {
|
|
129
|
-
tab: "
|
|
169
|
+
tab: "agent",
|
|
130
170
|
label: "Thinking level",
|
|
131
171
|
description: "Reasoning depth for thinking-capable models",
|
|
132
172
|
submenu: true,
|
|
@@ -135,14 +175,14 @@ export const SETTINGS_SCHEMA = {
|
|
|
135
175
|
hideThinkingBlock: {
|
|
136
176
|
type: "boolean",
|
|
137
177
|
default: false,
|
|
138
|
-
ui: { tab: "
|
|
178
|
+
ui: { tab: "agent", label: "Hide thinking", description: "Hide thinking blocks in assistant responses" },
|
|
139
179
|
},
|
|
140
180
|
steeringMode: {
|
|
141
181
|
type: "enum",
|
|
142
182
|
values: ["all", "one-at-a-time"] as const,
|
|
143
183
|
default: "one-at-a-time",
|
|
144
184
|
ui: {
|
|
145
|
-
tab: "
|
|
185
|
+
tab: "agent",
|
|
146
186
|
label: "Steering mode",
|
|
147
187
|
description: "How to process queued messages while agent is working",
|
|
148
188
|
},
|
|
@@ -152,7 +192,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
152
192
|
values: ["all", "one-at-a-time"] as const,
|
|
153
193
|
default: "one-at-a-time",
|
|
154
194
|
ui: {
|
|
155
|
-
tab: "
|
|
195
|
+
tab: "agent",
|
|
156
196
|
label: "Follow-up mode",
|
|
157
197
|
description: "How to drain follow-up messages after a turn completes",
|
|
158
198
|
},
|
|
@@ -161,38 +201,29 @@ export const SETTINGS_SCHEMA = {
|
|
|
161
201
|
type: "enum",
|
|
162
202
|
values: ["immediate", "wait"] as const,
|
|
163
203
|
default: "immediate",
|
|
164
|
-
ui: { tab: "
|
|
204
|
+
ui: { tab: "agent", label: "Interrupt mode", description: "When steering messages interrupt tool execution" },
|
|
165
205
|
},
|
|
166
206
|
doubleEscapeAction: {
|
|
167
207
|
type: "enum",
|
|
168
208
|
values: ["branch", "tree", "none"] as const,
|
|
169
209
|
default: "tree",
|
|
170
210
|
ui: {
|
|
171
|
-
tab: "
|
|
211
|
+
tab: "input",
|
|
172
212
|
label: "Double-escape action",
|
|
173
213
|
description: "Action when pressing Escape twice with empty editor",
|
|
174
214
|
},
|
|
175
215
|
},
|
|
176
216
|
shellPath: { type: "string", default: undefined },
|
|
177
|
-
shellForceBasic: {
|
|
178
|
-
type: "boolean",
|
|
179
|
-
default: true,
|
|
180
|
-
ui: {
|
|
181
|
-
tab: "bash",
|
|
182
|
-
label: "Force basic shell",
|
|
183
|
-
description: "Use bash/sh even if your default shell is different",
|
|
184
|
-
},
|
|
185
|
-
},
|
|
186
217
|
collapseChangelog: {
|
|
187
218
|
type: "boolean",
|
|
188
219
|
default: false,
|
|
189
|
-
ui: { tab: "
|
|
220
|
+
ui: { tab: "input", label: "Collapse changelog", description: "Show condensed changelog after updates" },
|
|
190
221
|
},
|
|
191
222
|
normativeRewrite: {
|
|
192
223
|
type: "boolean",
|
|
193
224
|
default: false,
|
|
194
225
|
ui: {
|
|
195
|
-
tab: "
|
|
226
|
+
tab: "agent",
|
|
196
227
|
label: "Normative rewrite",
|
|
197
228
|
description: "Rewrite tool call arguments to normalized format in session history",
|
|
198
229
|
},
|
|
@@ -201,7 +232,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
201
232
|
type: "boolean",
|
|
202
233
|
default: false,
|
|
203
234
|
ui: {
|
|
204
|
-
tab: "
|
|
235
|
+
tab: "config",
|
|
205
236
|
label: "Read line numbers",
|
|
206
237
|
description: "Prepend line numbers to read tool output by default",
|
|
207
238
|
},
|
|
@@ -225,7 +256,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
225
256
|
type: "boolean",
|
|
226
257
|
default: true,
|
|
227
258
|
ui: {
|
|
228
|
-
tab: "
|
|
259
|
+
tab: "agent",
|
|
229
260
|
label: "Auto-compact",
|
|
230
261
|
description: "Automatically compact context when it gets too large",
|
|
231
262
|
},
|
|
@@ -241,7 +272,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
241
272
|
"branchSummary.enabled": {
|
|
242
273
|
type: "boolean",
|
|
243
274
|
default: false,
|
|
244
|
-
ui: { tab: "
|
|
275
|
+
ui: { tab: "agent", label: "Branch summaries", description: "Prompt to summarize when leaving a branch" },
|
|
245
276
|
},
|
|
246
277
|
"branchSummary.reserveTokens": { type: "number", default: 16384 },
|
|
247
278
|
|
|
@@ -253,7 +284,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
253
284
|
type: "number",
|
|
254
285
|
default: 3,
|
|
255
286
|
ui: {
|
|
256
|
-
tab: "
|
|
287
|
+
tab: "agent",
|
|
257
288
|
label: "Retry max attempts",
|
|
258
289
|
description: "Maximum retry attempts on API errors",
|
|
259
290
|
submenu: true,
|
|
@@ -264,29 +295,77 @@ export const SETTINGS_SCHEMA = {
|
|
|
264
295
|
// ─────────────────────────────────────────────────────────────────────────
|
|
265
296
|
// Todo completion settings
|
|
266
297
|
// ─────────────────────────────────────────────────────────────────────────
|
|
267
|
-
"
|
|
298
|
+
"todo.reminders": {
|
|
268
299
|
type: "boolean",
|
|
269
300
|
default: false,
|
|
270
|
-
ui: { tab: "
|
|
301
|
+
ui: { tab: "agent", label: "Todo reminders", description: "Remind agent to complete todos before stopping" },
|
|
271
302
|
},
|
|
272
|
-
"
|
|
303
|
+
"todo.reminders.max": {
|
|
273
304
|
type: "number",
|
|
274
305
|
default: 3,
|
|
275
306
|
ui: {
|
|
276
|
-
tab: "
|
|
307
|
+
tab: "agent",
|
|
277
308
|
label: "Todo max reminders",
|
|
278
309
|
description: "Maximum reminders to complete todos before giving up",
|
|
279
310
|
submenu: true,
|
|
280
311
|
},
|
|
281
312
|
},
|
|
282
313
|
|
|
314
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
315
|
+
// Optional tools
|
|
316
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
317
|
+
"todo.enabled": {
|
|
318
|
+
type: "boolean",
|
|
319
|
+
default: true,
|
|
320
|
+
ui: { tab: "tools", label: "Enable Todos", description: "Enable the todo_write tool for task tracking" },
|
|
321
|
+
},
|
|
322
|
+
"find.enabled": {
|
|
323
|
+
type: "boolean",
|
|
324
|
+
default: true,
|
|
325
|
+
ui: { tab: "tools", label: "Enable Find", description: "Enable the find tool for file searching" },
|
|
326
|
+
},
|
|
327
|
+
"grep.enabled": {
|
|
328
|
+
type: "boolean",
|
|
329
|
+
default: true,
|
|
330
|
+
ui: { tab: "tools", label: "Enable Grep", description: "Enable the grep tool for content searching" },
|
|
331
|
+
},
|
|
332
|
+
"notebook.enabled": {
|
|
333
|
+
type: "boolean",
|
|
334
|
+
default: true,
|
|
335
|
+
ui: { tab: "tools", label: "Enable Notebook", description: "Enable the notebook tool for notebook editing" },
|
|
336
|
+
},
|
|
337
|
+
"fetch.enabled": {
|
|
338
|
+
type: "boolean",
|
|
339
|
+
default: true,
|
|
340
|
+
ui: { tab: "tools", label: "Enable Fetch", description: "Enable the fetch tool for URL fetching" },
|
|
341
|
+
},
|
|
342
|
+
"web_search.enabled": {
|
|
343
|
+
type: "boolean",
|
|
344
|
+
default: true,
|
|
345
|
+
ui: { tab: "tools", label: "Enable Web Search", description: "Enable the web_search tool for web searching" },
|
|
346
|
+
},
|
|
347
|
+
"lsp.enabled": {
|
|
348
|
+
type: "boolean",
|
|
349
|
+
default: true,
|
|
350
|
+
ui: { tab: "tools", label: "Enable LSP", description: "Enable the lsp tool for language server protocol" },
|
|
351
|
+
},
|
|
352
|
+
"calc.enabled": {
|
|
353
|
+
type: "boolean",
|
|
354
|
+
default: false,
|
|
355
|
+
ui: {
|
|
356
|
+
tab: "tools",
|
|
357
|
+
label: "Enable Calculator",
|
|
358
|
+
description: "Enable the calculator tool for basic calculations",
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
|
|
283
362
|
// ─────────────────────────────────────────────────────────────────────────
|
|
284
363
|
// Startup settings
|
|
285
364
|
// ─────────────────────────────────────────────────────────────────────────
|
|
286
365
|
"startup.quiet": {
|
|
287
366
|
type: "boolean",
|
|
288
367
|
default: false,
|
|
289
|
-
ui: { tab: "
|
|
368
|
+
ui: { tab: "input", label: "Startup quiet", description: "Skip welcome screen and startup status messages" },
|
|
290
369
|
},
|
|
291
370
|
|
|
292
371
|
// ─────────────────────────────────────────────────────────────────────────
|
|
@@ -296,7 +375,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
296
375
|
type: "enum",
|
|
297
376
|
values: ["auto", "bell", "osc99", "osc9", "off"] as const,
|
|
298
377
|
default: "auto",
|
|
299
|
-
ui: { tab: "
|
|
378
|
+
ui: { tab: "input", label: "Completion notification", description: "Notify when the agent completes" },
|
|
300
379
|
},
|
|
301
380
|
|
|
302
381
|
// ─────────────────────────────────────────────────────────────────────────
|
|
@@ -306,7 +385,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
306
385
|
type: "number",
|
|
307
386
|
default: 30,
|
|
308
387
|
ui: {
|
|
309
|
-
tab: "
|
|
388
|
+
tab: "input",
|
|
310
389
|
label: "Ask tool timeout",
|
|
311
390
|
description: "Auto-select recommended option after timeout (0 to disable)",
|
|
312
391
|
submenu: true,
|
|
@@ -316,7 +395,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
316
395
|
type: "enum",
|
|
317
396
|
values: ["auto", "bell", "osc99", "osc9", "off"] as const,
|
|
318
397
|
default: "auto",
|
|
319
|
-
ui: { tab: "
|
|
398
|
+
ui: { tab: "input", label: "Ask notification", description: "Notify when ask tool is waiting for input" },
|
|
320
399
|
},
|
|
321
400
|
|
|
322
401
|
// ─────────────────────────────────────────────────────────────────────────
|
|
@@ -390,19 +469,29 @@ export const SETTINGS_SCHEMA = {
|
|
|
390
469
|
type: "enum",
|
|
391
470
|
values: ["auto", "exa", "perplexity", "anthropic"] as const,
|
|
392
471
|
default: "auto",
|
|
393
|
-
ui: { tab: "
|
|
472
|
+
ui: { tab: "services", label: "Web search provider", description: "Provider for web search tool", submenu: true },
|
|
394
473
|
},
|
|
395
474
|
"providers.image": {
|
|
396
475
|
type: "enum",
|
|
397
476
|
values: ["auto", "gemini", "openrouter"] as const,
|
|
398
477
|
default: "auto",
|
|
399
|
-
ui: {
|
|
478
|
+
ui: {
|
|
479
|
+
tab: "services",
|
|
480
|
+
label: "Image provider",
|
|
481
|
+
description: "Provider for image generation tool",
|
|
482
|
+
submenu: true,
|
|
483
|
+
},
|
|
400
484
|
},
|
|
401
485
|
"providers.kimiApiFormat": {
|
|
402
486
|
type: "enum",
|
|
403
487
|
values: ["openai", "anthropic"] as const,
|
|
404
488
|
default: "anthropic",
|
|
405
|
-
ui: {
|
|
489
|
+
ui: {
|
|
490
|
+
tab: "services",
|
|
491
|
+
label: "Kimi API format",
|
|
492
|
+
description: "API format for Kimi Code provider",
|
|
493
|
+
submenu: true,
|
|
494
|
+
},
|
|
406
495
|
},
|
|
407
496
|
|
|
408
497
|
// ─────────────────────────────────────────────────────────────────────────
|
|
@@ -411,32 +500,32 @@ export const SETTINGS_SCHEMA = {
|
|
|
411
500
|
"exa.enabled": {
|
|
412
501
|
type: "boolean",
|
|
413
502
|
default: true,
|
|
414
|
-
ui: { tab: "
|
|
503
|
+
ui: { tab: "services", label: "Exa enabled", description: "Master toggle for all Exa search tools" },
|
|
415
504
|
},
|
|
416
505
|
"exa.enableSearch": {
|
|
417
506
|
type: "boolean",
|
|
418
507
|
default: true,
|
|
419
|
-
ui: { tab: "
|
|
508
|
+
ui: { tab: "services", label: "Exa search", description: "Basic search, deep search, code search, crawl" },
|
|
420
509
|
},
|
|
421
510
|
"exa.enableLinkedin": {
|
|
422
511
|
type: "boolean",
|
|
423
512
|
default: false,
|
|
424
|
-
ui: { tab: "
|
|
513
|
+
ui: { tab: "services", label: "Exa LinkedIn", description: "Search LinkedIn for people and companies" },
|
|
425
514
|
},
|
|
426
515
|
"exa.enableCompany": {
|
|
427
516
|
type: "boolean",
|
|
428
517
|
default: false,
|
|
429
|
-
ui: { tab: "
|
|
518
|
+
ui: { tab: "services", label: "Exa company", description: "Comprehensive company research tool" },
|
|
430
519
|
},
|
|
431
520
|
"exa.enableResearcher": {
|
|
432
521
|
type: "boolean",
|
|
433
522
|
default: false,
|
|
434
|
-
ui: { tab: "
|
|
523
|
+
ui: { tab: "services", label: "Exa researcher", description: "AI-powered deep research tasks" },
|
|
435
524
|
},
|
|
436
525
|
"exa.enableWebsets": {
|
|
437
526
|
type: "boolean",
|
|
438
527
|
default: false,
|
|
439
|
-
ui: { tab: "
|
|
528
|
+
ui: { tab: "services", label: "Exa websets", description: "Webset management and enrichment tools" },
|
|
440
529
|
},
|
|
441
530
|
|
|
442
531
|
// ─────────────────────────────────────────────────────────────────────────
|
|
@@ -458,15 +547,6 @@ export const SETTINGS_SCHEMA = {
|
|
|
458
547
|
},
|
|
459
548
|
// bashInterceptor.patterns is complex - handle separately
|
|
460
549
|
|
|
461
|
-
// ─────────────────────────────────────────────────────────────────────────
|
|
462
|
-
// Bash settings
|
|
463
|
-
// ─────────────────────────────────────────────────────────────────────────
|
|
464
|
-
"bash.persistentShell": {
|
|
465
|
-
type: "boolean",
|
|
466
|
-
default: false,
|
|
467
|
-
ui: { tab: "bash", label: "Persistent shell", description: "Reuse shell session across commands (experimental)" },
|
|
468
|
-
},
|
|
469
|
-
|
|
470
550
|
// ─────────────────────────────────────────────────────────────────────────
|
|
471
551
|
// MCP settings
|
|
472
552
|
// ─────────────────────────────────────────────────────────────────────────
|
|
@@ -506,14 +586,14 @@ export const SETTINGS_SCHEMA = {
|
|
|
506
586
|
type: "enum",
|
|
507
587
|
values: ["ipy-only", "bash-only", "both"] as const,
|
|
508
588
|
default: "both",
|
|
509
|
-
ui: { tab: "
|
|
589
|
+
ui: { tab: "config", label: "Python tool mode", description: "How Python code is executed" },
|
|
510
590
|
},
|
|
511
591
|
"python.kernelMode": {
|
|
512
592
|
type: "enum",
|
|
513
593
|
values: ["session", "per-call"] as const,
|
|
514
594
|
default: "session",
|
|
515
595
|
ui: {
|
|
516
|
-
tab: "
|
|
596
|
+
tab: "config",
|
|
517
597
|
label: "Python kernel mode",
|
|
518
598
|
description: "Whether to keep IPython kernel alive across calls",
|
|
519
599
|
},
|
|
@@ -522,7 +602,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
522
602
|
type: "boolean",
|
|
523
603
|
default: true,
|
|
524
604
|
ui: {
|
|
525
|
-
tab: "
|
|
605
|
+
tab: "config",
|
|
526
606
|
label: "Python shared gateway",
|
|
527
607
|
description: "Share IPython kernel gateway across pi instances",
|
|
528
608
|
},
|
|
@@ -535,7 +615,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
535
615
|
type: "boolean",
|
|
536
616
|
default: true,
|
|
537
617
|
ui: {
|
|
538
|
-
tab: "
|
|
618
|
+
tab: "config",
|
|
539
619
|
label: "Edit fuzzy match",
|
|
540
620
|
description: "Accept high-confidence fuzzy matches for whitespace differences",
|
|
541
621
|
},
|
|
@@ -544,7 +624,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
544
624
|
type: "number",
|
|
545
625
|
default: 0.95,
|
|
546
626
|
ui: {
|
|
547
|
-
tab: "
|
|
627
|
+
tab: "config",
|
|
548
628
|
label: "Edit fuzzy threshold",
|
|
549
629
|
description: "Similarity threshold for fuzzy matches",
|
|
550
630
|
submenu: true,
|
|
@@ -553,13 +633,13 @@ export const SETTINGS_SCHEMA = {
|
|
|
553
633
|
"edit.patchMode": {
|
|
554
634
|
type: "boolean",
|
|
555
635
|
default: true,
|
|
556
|
-
ui: { tab: "
|
|
636
|
+
ui: { tab: "config", label: "Edit patch mode", description: "Use codex-style apply-patch format for edits" },
|
|
557
637
|
},
|
|
558
638
|
"edit.streamingAbort": {
|
|
559
639
|
type: "boolean",
|
|
560
640
|
default: false,
|
|
561
641
|
ui: {
|
|
562
|
-
tab: "
|
|
642
|
+
tab: "config",
|
|
563
643
|
label: "Edit streaming abort",
|
|
564
644
|
description: "Abort streaming edit tool calls when patch preview fails",
|
|
565
645
|
},
|
|
@@ -822,7 +902,6 @@ export interface BashInterceptorRule {
|
|
|
822
902
|
export interface GroupTypeMap {
|
|
823
903
|
compaction: CompactionSettings;
|
|
824
904
|
retry: RetrySettings;
|
|
825
|
-
todoCompletion: TodoCompletionSettings;
|
|
826
905
|
branchSummary: BranchSummarySettings;
|
|
827
906
|
skills: SkillsSettings;
|
|
828
907
|
commit: CommitSettings;
|
package/src/config/settings.ts
CHANGED
|
@@ -307,12 +307,6 @@ export class Settings {
|
|
|
307
307
|
* Get shell configuration based on settings.
|
|
308
308
|
*/
|
|
309
309
|
getShellConfig() {
|
|
310
|
-
if (this.get("shellForceBasic")) {
|
|
311
|
-
const basicShell = procmgr.resolveBasicShell();
|
|
312
|
-
if (basicShell) {
|
|
313
|
-
return procmgr.getShellConfig(basicShell);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
310
|
const shell = this.get("shellPath");
|
|
317
311
|
return procmgr.getShellConfig(shell);
|
|
318
312
|
}
|
package/src/cursor.ts
CHANGED
|
@@ -156,7 +156,8 @@ export class CursorExecHandlers implements ICursorExecHandlers {
|
|
|
156
156
|
|
|
157
157
|
async ls(args: Parameters<NonNullable<ICursorExecHandlers["ls"]>>[0]) {
|
|
158
158
|
const toolCallId = decodeToolCallId(args.toolCallId);
|
|
159
|
-
|
|
159
|
+
// Redirect ls to read tool, which handles directories
|
|
160
|
+
const toolResultMessage = await executeTool(this.options, "read", toolCallId, { path: args.path });
|
|
160
161
|
return toolResultMessage;
|
|
161
162
|
}
|
|
162
163
|
|
|
@@ -56,7 +56,6 @@ export type {
|
|
|
56
56
|
InputEventResult,
|
|
57
57
|
KeybindingsManager,
|
|
58
58
|
LoadExtensionsResult,
|
|
59
|
-
LsToolResultEvent,
|
|
60
59
|
// Message Rendering
|
|
61
60
|
MessageRenderer,
|
|
62
61
|
MessageRenderOptions,
|
|
@@ -104,14 +103,4 @@ export type {
|
|
|
104
103
|
UserPythonEventResult,
|
|
105
104
|
WriteToolResultEvent,
|
|
106
105
|
} from "./types";
|
|
107
|
-
// Type guards
|
|
108
|
-
export {
|
|
109
|
-
isBashToolResult,
|
|
110
|
-
isEditToolResult,
|
|
111
|
-
isFindToolResult,
|
|
112
|
-
isGrepToolResult,
|
|
113
|
-
isLsToolResult,
|
|
114
|
-
isReadToolResult,
|
|
115
|
-
isWriteToolResult,
|
|
116
|
-
} from "./types";
|
|
117
106
|
export { ExtensionToolWrapper, RegisteredToolAdapter, wrapRegisteredTool, wrapRegisteredTools } from "./wrapper";
|
|
@@ -28,7 +28,7 @@ import type {
|
|
|
28
28
|
SessionEntry,
|
|
29
29
|
SessionManager,
|
|
30
30
|
} from "../../session/session-manager";
|
|
31
|
-
import type { BashToolDetails, FindToolDetails, GrepToolDetails,
|
|
31
|
+
import type { BashToolDetails, FindToolDetails, GrepToolDetails, ReadToolDetails } from "../../tools";
|
|
32
32
|
import type { EventBus } from "../../utils/event-bus";
|
|
33
33
|
|
|
34
34
|
export type { AppAction, KeybindingsManager } from "../../config/keybindings";
|
|
@@ -495,11 +495,6 @@ export interface FindToolResultEvent extends ToolResultEventBase {
|
|
|
495
495
|
details: FindToolDetails | undefined;
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
-
export interface LsToolResultEvent extends ToolResultEventBase {
|
|
499
|
-
toolName: "ls";
|
|
500
|
-
details: LsToolDetails | undefined;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
498
|
export interface CustomToolResultEvent extends ToolResultEventBase {
|
|
504
499
|
toolName: string;
|
|
505
500
|
details: unknown;
|
|
@@ -513,32 +508,8 @@ export type ToolResultEvent =
|
|
|
513
508
|
| WriteToolResultEvent
|
|
514
509
|
| GrepToolResultEvent
|
|
515
510
|
| FindToolResultEvent
|
|
516
|
-
| LsToolResultEvent
|
|
517
511
|
| CustomToolResultEvent;
|
|
518
512
|
|
|
519
|
-
// Type guards
|
|
520
|
-
export function isBashToolResult(e: ToolResultEvent): e is BashToolResultEvent {
|
|
521
|
-
return e.toolName === "bash";
|
|
522
|
-
}
|
|
523
|
-
export function isReadToolResult(e: ToolResultEvent): e is ReadToolResultEvent {
|
|
524
|
-
return e.toolName === "read";
|
|
525
|
-
}
|
|
526
|
-
export function isEditToolResult(e: ToolResultEvent): e is EditToolResultEvent {
|
|
527
|
-
return e.toolName === "edit";
|
|
528
|
-
}
|
|
529
|
-
export function isWriteToolResult(e: ToolResultEvent): e is WriteToolResultEvent {
|
|
530
|
-
return e.toolName === "write";
|
|
531
|
-
}
|
|
532
|
-
export function isGrepToolResult(e: ToolResultEvent): e is GrepToolResultEvent {
|
|
533
|
-
return e.toolName === "grep";
|
|
534
|
-
}
|
|
535
|
-
export function isFindToolResult(e: ToolResultEvent): e is FindToolResultEvent {
|
|
536
|
-
return e.toolName === "find";
|
|
537
|
-
}
|
|
538
|
-
export function isLsToolResult(e: ToolResultEvent): e is LsToolResultEvent {
|
|
539
|
-
return e.toolName === "ls";
|
|
540
|
-
}
|
|
541
|
-
|
|
542
513
|
/** Union of all event types */
|
|
543
514
|
export type ExtensionEvent =
|
|
544
515
|
| SessionEvent
|
|
@@ -20,7 +20,7 @@ import type {
|
|
|
20
20
|
SessionEntry,
|
|
21
21
|
SessionManager,
|
|
22
22
|
} from "../../session/session-manager";
|
|
23
|
-
import type { BashToolDetails, FindToolDetails, GrepToolDetails,
|
|
23
|
+
import type { BashToolDetails, FindToolDetails, GrepToolDetails, ReadToolDetails } from "../../tools";
|
|
24
24
|
|
|
25
25
|
// Re-export for backward compatibility
|
|
26
26
|
export type { ExecOptions, ExecResult } from "../../exec/exec";
|
|
@@ -454,12 +454,6 @@ export interface FindToolResultEvent extends ToolResultEventBase {
|
|
|
454
454
|
details: FindToolDetails | undefined;
|
|
455
455
|
}
|
|
456
456
|
|
|
457
|
-
/** Tool result event for ls tool */
|
|
458
|
-
export interface LsToolResultEvent extends ToolResultEventBase {
|
|
459
|
-
toolName: "ls";
|
|
460
|
-
details: LsToolDetails | undefined;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
457
|
/** Tool result event for custom/unknown tools */
|
|
464
458
|
export interface CustomToolResultEvent extends ToolResultEventBase {
|
|
465
459
|
toolName: string;
|
|
@@ -478,32 +472,8 @@ export type ToolResultEvent =
|
|
|
478
472
|
| WriteToolResultEvent
|
|
479
473
|
| GrepToolResultEvent
|
|
480
474
|
| FindToolResultEvent
|
|
481
|
-
| LsToolResultEvent
|
|
482
475
|
| CustomToolResultEvent;
|
|
483
476
|
|
|
484
|
-
// Type guards for narrowing ToolResultEvent to specific tool types
|
|
485
|
-
export function isBashToolResult(e: ToolResultEvent): e is BashToolResultEvent {
|
|
486
|
-
return e.toolName === "bash";
|
|
487
|
-
}
|
|
488
|
-
export function isReadToolResult(e: ToolResultEvent): e is ReadToolResultEvent {
|
|
489
|
-
return e.toolName === "read";
|
|
490
|
-
}
|
|
491
|
-
export function isEditToolResult(e: ToolResultEvent): e is EditToolResultEvent {
|
|
492
|
-
return e.toolName === "edit";
|
|
493
|
-
}
|
|
494
|
-
export function isWriteToolResult(e: ToolResultEvent): e is WriteToolResultEvent {
|
|
495
|
-
return e.toolName === "write";
|
|
496
|
-
}
|
|
497
|
-
export function isGrepToolResult(e: ToolResultEvent): e is GrepToolResultEvent {
|
|
498
|
-
return e.toolName === "grep";
|
|
499
|
-
}
|
|
500
|
-
export function isFindToolResult(e: ToolResultEvent): e is FindToolResultEvent {
|
|
501
|
-
return e.toolName === "find";
|
|
502
|
-
}
|
|
503
|
-
export function isLsToolResult(e: ToolResultEvent): e is LsToolResultEvent {
|
|
504
|
-
return e.toolName === "ls";
|
|
505
|
-
}
|
|
506
|
-
|
|
507
477
|
/**
|
|
508
478
|
* Union of all hook event types.
|
|
509
479
|
*/
|
package/src/index.ts
CHANGED
|
@@ -75,13 +75,6 @@ export {
|
|
|
75
75
|
discoverAndLoadExtensions,
|
|
76
76
|
ExtensionRunner,
|
|
77
77
|
ExtensionRuntime,
|
|
78
|
-
isBashToolResult,
|
|
79
|
-
isEditToolResult,
|
|
80
|
-
isFindToolResult,
|
|
81
|
-
isGrepToolResult,
|
|
82
|
-
isLsToolResult,
|
|
83
|
-
isReadToolResult,
|
|
84
|
-
isWriteToolResult,
|
|
85
78
|
} from "./extensibility/extensions";
|
|
86
79
|
// Hook system types (legacy re-export)
|
|
87
80
|
export type * from "./extensibility/hooks";
|
|
@@ -180,7 +173,6 @@ export {
|
|
|
180
173
|
EditTool,
|
|
181
174
|
FindTool,
|
|
182
175
|
GrepTool,
|
|
183
|
-
LsTool,
|
|
184
176
|
loadSshTool,
|
|
185
177
|
PythonTool,
|
|
186
178
|
ReadTool,
|
|
@@ -256,9 +248,6 @@ export {
|
|
|
256
248
|
type GrepOperations,
|
|
257
249
|
type GrepToolDetails,
|
|
258
250
|
type GrepToolOptions,
|
|
259
|
-
type LsOperations,
|
|
260
|
-
type LsToolDetails,
|
|
261
|
-
type LsToolOptions,
|
|
262
251
|
type PythonToolDetails,
|
|
263
252
|
type ReadToolDetails,
|
|
264
253
|
type TruncationOptions,
|