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:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user