mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 20:01:24 +00:00
feat(coding-agent): Custom tool export rendering in export (#702)
* coding-agent: add ANSI-to-HTML converter for export * coding-agent: add getToolDefinition method to ExtensionRunner * coding-agent: add tool HTML renderer factory for custom tools * coding-agent: add custom tool pre-rendering to HTML export * coding-agent: render pre-rendered custom tools in HTML export * coding-agent: integrate tool renderer in exportToHtml
This commit is contained in:
parent
ce7e73b503
commit
0c6ac46646
6 changed files with 502 additions and 9 deletions
|
|
@ -189,6 +189,17 @@ export class ExtensionRunner {
|
|||
return tools;
|
||||
}
|
||||
|
||||
/** Get a tool definition by name. Returns undefined if not found. */
|
||||
getToolDefinition(toolName: string): RegisteredTool["definition"] | undefined {
|
||||
for (const ext of this.extensions) {
|
||||
const tool = ext.tools.get(toolName);
|
||||
if (tool) {
|
||||
return tool.definition;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
getFlags(): Map<string, ExtensionFlag> {
|
||||
const allFlags = new Map<string, ExtensionFlag>();
|
||||
for (const ext of this.extensions) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue