fix(coding-agent): add tool promptGuidelines support fixes #1720
This commit is contained in:
@@ -33,7 +33,7 @@ cp permission-gate.ts ~/.pi/agent/extensions/
|
||||
| `question.ts` | Demonstrates `ctx.ui.select()` for asking the user questions with custom UI |
|
||||
| `questionnaire.ts` | Multi-question input with tab bar navigation between questions |
|
||||
| `tool-override.ts` | Override built-in tools (e.g., add logging/access control to `read`) |
|
||||
| `dynamic-tools.ts` | Register tools after startup (`session_start`) and at runtime via command |
|
||||
| `dynamic-tools.ts` | Register tools after startup (`session_start`) and at runtime via command, with prompt snippets and tool-specific prompt guidelines |
|
||||
| `built-in-tool-renderer.ts` | Custom compact rendering for built-in tools (read, bash, edit, write) while keeping original behavior |
|
||||
| `minimal-mode.ts` | Override built-in tool rendering for minimal display (only tool calls, no output in collapsed mode) |
|
||||
| `truncated-tool.ts` | Wraps ripgrep with proper output truncation (50KB/2000 lines) |
|
||||
|
||||
@@ -35,6 +35,7 @@ export default function dynamicToolsExtension(pi: ExtensionAPI) {
|
||||
label,
|
||||
description: `Echo a message with prefix: ${prefix}`,
|
||||
promptSnippet: `Echo back user-provided text with ${prefix.trim()} prefix`,
|
||||
promptGuidelines: ["Use this tool when the user asks for exact echo output."],
|
||||
parameters: ECHO_PARAMS,
|
||||
async execute(_toolCallId, params) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user