refactor(coding-agent): restructured tool rendering to merge call and result displays

- Changed tool result rendering to merge call and result displays with tool arguments in headers across 13 tools.
- Added args parameter to render methods enabling display of contextual metadata like patterns, paths, and commands.
- Changed Read tool title to display line range when offset or limit arguments provided.
- Changed worker instantiation to use direct URL import instead of pre-bundled worker files.
- Removed streaming preview rendering logic from write tool.
This commit is contained in:
can1357
2026-01-23 13:46:06 +01:00
parent 763faa1615
commit e3eeb1bafd
15 changed files with 105 additions and 83 deletions
+8 -1
View File
@@ -251,10 +251,16 @@ export const sshToolRenderer = {
},
options: RenderResultOptions & { renderContext?: SshRenderContext },
uiTheme: Theme,
args?: SshRenderArgs,
): Component {
const { expanded, renderContext } = options;
const details = result.details;
const header = renderStatusLine({ icon: "success", title: "SSH" }, uiTheme);
const host = args?.host || uiTheme.format.ellipsis;
const command = args?.command || uiTheme.format.ellipsis;
const header = renderStatusLine(
{ icon: "success", title: "SSH", description: `[${host}] $ ${command}` },
uiTheme,
);
const outputLines: string[] = [];
const textContent = result.content?.find((c) => c.type === "text")?.text ?? "";
@@ -318,4 +324,5 @@ export const sshToolRenderer = {
invalidate: () => {},
};
},
mergeCallAndResult: true,
};