mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix(coding-agent): built-in tools work like extension tools
Export readToolDefinition / createReadToolDefinition and the equivalent built-in ToolDefinition APIs from @mariozechner/pi-coding-agent.
This commit is contained in:
parent
80f527ec22
commit
235b247f1f
32 changed files with 2594 additions and 1408 deletions
|
|
@ -135,7 +135,7 @@ export default function (pi: ExtensionAPI) {
|
|||
},
|
||||
|
||||
// Custom rendering of the tool call (shown before/during execution)
|
||||
renderCall(args, theme) {
|
||||
renderCall(args, theme, _context) {
|
||||
let text = theme.fg("toolTitle", theme.bold("rg "));
|
||||
text += theme.fg("accent", `"${args.pattern}"`);
|
||||
if (args.path) {
|
||||
|
|
@ -148,7 +148,7 @@ export default function (pi: ExtensionAPI) {
|
|||
},
|
||||
|
||||
// Custom rendering of the tool result
|
||||
renderResult(result, { expanded, isPartial }, theme) {
|
||||
renderResult(result, { expanded, isPartial }, theme, _context) {
|
||||
const details = result.details as RgDetails | undefined;
|
||||
|
||||
// Handle streaming/partial results
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue