You've already forked zblade.dev
docs(tools): refresh tool reference and prompt guidance
- add symbol-based code navigation guidance to docs prompt examples - clarify tool result truncation limits and simplify tools page copy
This commit is contained in:
+12
-6
@@ -462,6 +462,8 @@ import BaseLayout from '../layouts/BaseLayout.astro';
|
|||||||
- Verify libraries exist before using them (check imports, package.json, etc.)
|
- Verify libraries exist before using them (check imports, package.json, etc.)
|
||||||
- Use absolute file paths
|
- Use absolute file paths
|
||||||
- Read files before editing them
|
- Read files before editing them
|
||||||
|
- Prefer symbol_search -> symbol_resolve -> read_file_range for code understanding
|
||||||
|
- Use grep_search when you need text-pattern search rather than symbol lookup
|
||||||
- Add comments sparingly - focus on "why" not "what"
|
- Add comments sparingly - focus on "why" not "what"
|
||||||
- If unclear, ask for clarification
|
- If unclear, ask for clarification
|
||||||
|
|
||||||
@@ -474,14 +476,18 @@ import BaseLayout from '../layouts/BaseLayout.astro';
|
|||||||
|
|
||||||
# Available Tools
|
# Available Tools
|
||||||
|
|
||||||
**get_workspace_structure** - Get project directory tree
|
**get_editor_state** - Get active file, cursor position, and open files
|
||||||
**list_dir** - List files/directories in a path
|
**symbol_search** - Find functions, classes, methods, and types by name
|
||||||
**read_file** - Read file contents
|
**symbol_resolve** - Resolve a symbol to its exact file and line range
|
||||||
|
**symbol_references** - Find where a symbol is used
|
||||||
|
**read_file_range** - Read targeted line ranges from a file
|
||||||
|
**read_file** - Read full file contents when broader context is needed
|
||||||
|
**get_workspace_structure** - Get the project directory tree
|
||||||
|
**grep_search** - Search for text or regex patterns across files
|
||||||
|
**apply_patch** - Make precise edits to existing files
|
||||||
**write_file** - Create or overwrite a file
|
**write_file** - Create or overwrite a file
|
||||||
**apply_patch** - Replace specific content in a file (for edits)
|
|
||||||
**grep_search** - Search for patterns across files
|
|
||||||
**run_command** - Execute shell commands
|
**run_command** - Execute shell commands
|
||||||
**get_editor_state** - Get currently open file and cursor position</code></pre>
|
**todo_write** - Track multi-step work and show progress</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="instructions-note">
|
<p class="instructions-note">
|
||||||
|
|||||||
+21
-24
@@ -19,8 +19,8 @@ import BaseLayout from '../layouts/BaseLayout.astro';
|
|||||||
<span class="title-accent">REFERENCE_</span>
|
<span class="title-accent">REFERENCE_</span>
|
||||||
</h1>
|
</h1>
|
||||||
<p class="hero-description">
|
<p class="hero-description">
|
||||||
Complete reference for all tool calls available in Zaguán Blade.
|
Reference for the regular tool calls that Zaguán Blade supports.
|
||||||
Add these to your Local AI system prompts to enable file operations, search, editor control, and command execution.
|
Add these to your Local AI system prompts to extend usability with file operations, search, editor control, and command execution.
|
||||||
</p>
|
</p>
|
||||||
<div class="hero-note">
|
<div class="hero-note">
|
||||||
<span class="hero-note-label">NOTE</span>
|
<span class="hero-note-label">NOTE</span>
|
||||||
@@ -356,6 +356,10 @@ import BaseLayout from '../layouts/BaseLayout.astro';
|
|||||||
<code>path</code> <code>size</code> <code>is_directory</code> <code>is_file</code> <code>modified</code> <code>readonly</code>
|
<code>path</code> <code>size</code> <code>is_directory</code> <code>is_file</code> <code>modified</code> <code>readonly</code>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tool-example">
|
||||||
|
<h4>Example</h4>
|
||||||
|
<pre is:raw><code>{ "path": "Cargo.toml" }</code></pre>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -824,28 +828,19 @@ import BaseLayout from '../layouts/BaseLayout.astro';
|
|||||||
<h2 class="section-title">Tool Result Handling</h2>
|
<h2 class="section-title">Tool Result Handling</h2>
|
||||||
|
|
||||||
<div class="info-card">
|
<div class="info-card">
|
||||||
<p class="info-text">The 50KB / 2000 line limits apply <strong>only to tool results</strong> - what zblade sends back to the model after executing a tool (e.g., the output of <code>read_file</code>). These limits only apply in <strong>local mode</strong>, when the Zaguán Coder Daemon isn't handling storage.</p>
|
<p class="info-text">Tool results are automatically truncated if they exceed limits:</p>
|
||||||
<div class="limits-row">
|
<div class="limits-row">
|
||||||
<div class="limit-box">
|
<div class="limit-box">
|
||||||
<span class="limit-value">50KB</span>
|
<span class="limit-value">50KB</span>
|
||||||
<span class="limit-label">Result max size</span>
|
<span class="limit-label">Max size</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="limit-box">
|
<div class="limit-box">
|
||||||
<span class="limit-value">2000</span>
|
<span class="limit-value">2000</span>
|
||||||
<span class="limit-label">Result max lines</span>
|
<span class="limit-label">Max lines</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="info-text-secondary">When truncated, the first 100 lines and last 50 lines are shown with a truncation message.</p>
|
<p class="info-text-secondary">When truncated, the first 100 lines and last 50 lines are shown with a truncation message.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="info-card" style="margin-top: var(--space-lg);">
|
|
||||||
<p class="info-text"><strong>There are no size limits on incoming tool calls from the model.</strong> zblade will accept a <code>write_file</code> with any size content. The <code>write_file</code> handler itself has no caps - it writes whatever content string it receives directly to disk.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tool-note" style="margin-top: var(--space-lg);">
|
|
||||||
<span class="note-icon">ℹ️</span>
|
|
||||||
<p class="note-text">zblade includes <strong>dropped tool call detection</strong>. If a tool call from the model never arrives (e.g., streaming progress events complete but the final tool call with arguments is dropped server-side), zblade will catch this and surface a clear error.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -889,18 +884,20 @@ import BaseLayout from '../layouts/BaseLayout.astro';
|
|||||||
<div class="code-block">
|
<div class="code-block">
|
||||||
<div class="code-header">
|
<div class="code-header">
|
||||||
<span class="code-filename">Example System Prompt Snippet</span>
|
<span class="code-filename">Example System Prompt Snippet</span>
|
||||||
<span class="code-lang">markdown</span>
|
<span class="code-lang">text</span>
|
||||||
</div>
|
</div>
|
||||||
<pre is:raw><code># Available Tools
|
<pre is:raw><code>You have access to the following tools:
|
||||||
|
|
||||||
**get_workspace_structure** - Get project directory tree
|
- read_file: Read file contents. Args: {"path": "string"}
|
||||||
**list_dir** - List files/directories in a path
|
- write_file: Write to file. Args: {"path": "string", "content": "string"}
|
||||||
**read_file** - Read file contents
|
- grep_search: Search with regex. Args: {"pattern": "string", "path": "string"}
|
||||||
**write_file** - Create or overwrite a file
|
- apply_edit: Edit file. Args: {"path": "string", "old_text": "string", "new_text": "string"}
|
||||||
**apply_patch** - Replace specific content in a file (for edits)
|
...
|
||||||
**grep_search** - Search for patterns across files
|
|
||||||
**run_command** - Execute shell commands (use cwd parameter)
|
To use a tool, respond with:
|
||||||
**get_editor_state** - Get currently open file and cursor position</code></pre>
|
<tool_call>
|
||||||
|
{"name": "tool_name", "arguments": {...}}
|
||||||
|
</tool_call></code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="info-text-secondary">
|
<p class="info-text-secondary">
|
||||||
|
|||||||
Reference in New Issue
Block a user