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:
Mario Zechner
2026-03-22 04:20:28 +01:00
parent 80f527ec22
commit 235b247f1f
32 changed files with 2594 additions and 1408 deletions

View File

@@ -668,7 +668,7 @@ export default function (pi: ExtensionAPI) {
};
},
renderCall(args, theme) {
renderCall(args, theme, _context) {
const scope: AgentScope = args.agentScope ?? "user";
if (args.chain && args.chain.length > 0) {
let text =
@@ -712,7 +712,7 @@ export default function (pi: ExtensionAPI) {
return new Text(text, 0, 0);
},
renderResult(result, { expanded }, theme) {
renderResult(result, { expanded }, theme, _context) {
const details = result.details as SubagentDetails | undefined;
if (!details || details.results.length === 0) {
const text = result.content[0];