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