${renderCollapsibleHeader(state, Code, params.title ? params.title : i18n("Executing JavaScript"), codeContentRef, codeChevronRef, false)}
${output ? html`` : ""}
${
attachments.length
? html`
${attachments.map((att) => html`
`)}
`
: ""
}
`,
isCustom: false,
};
}
// Just params (streaming or waiting for result)
if (params) {
return {
content: html`
${renderCollapsibleHeader(state, Code, params.title ? params.title : i18n("Executing JavaScript"), codeContentRef, codeChevronRef, false)}
${params.code ? html`` : ""}
`,
isCustom: false,
};
}
// No params or result yet
return { content: renderHeader(state, Code, i18n("Preparing JavaScript...")), isCustom: false };
},
};
// Auto-register the renderer
registerToolRenderer(javascriptReplTool.name, javascriptReplRenderer);