mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-25 07:30:03 +00:00
fix: re-format exec-approval view
This commit is contained in:
@@ -30,28 +30,24 @@ function renderExecBody(request: ExecApprovalRequestPayload) {
|
||||
return html`
|
||||
<div class="exec-approval-command mono">${request.command}</div>
|
||||
<div class="exec-approval-meta">
|
||||
${renderMetaRow("Host", request.host)}
|
||||
${renderMetaRow("Agent", request.agentId)}
|
||||
${renderMetaRow("Session", request.sessionKey)}
|
||||
${renderMetaRow("CWD", request.cwd)}
|
||||
${renderMetaRow("Host", request.host)} ${renderMetaRow("Agent", request.agentId)}
|
||||
${renderMetaRow("Session", request.sessionKey)} ${renderMetaRow("CWD", request.cwd)}
|
||||
${renderMetaRow("Resolved", request.resolvedPath)}
|
||||
${renderMetaRow("Security", request.security)}
|
||||
${renderMetaRow("Ask", request.ask)}
|
||||
${renderMetaRow("Security", request.security)} ${renderMetaRow("Ask", request.ask)}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
function renderPluginBody(active: ExecApprovalRequest) {
|
||||
return html`
|
||||
${
|
||||
active.pluginDescription
|
||||
? html`<pre class="exec-approval-command mono" style="white-space:pre-wrap">${active.pluginDescription}</pre>`
|
||||
: nothing
|
||||
}
|
||||
${active.pluginDescription
|
||||
? html`<pre class="exec-approval-command mono" style="white-space:pre-wrap">
|
||||
${active.pluginDescription}</pre
|
||||
>`
|
||||
: nothing}
|
||||
<div class="exec-approval-meta">
|
||||
${renderMetaRow("Severity", active.pluginSeverity)}
|
||||
${renderMetaRow("Plugin", active.pluginId)}
|
||||
${renderMetaRow("Agent", active.request.agentId)}
|
||||
${renderMetaRow("Plugin", active.pluginId)} ${renderMetaRow("Agent", active.request.agentId)}
|
||||
${renderMetaRow("Session", active.request.sessionKey)}
|
||||
</div>
|
||||
`;
|
||||
@@ -83,11 +79,9 @@ export function renderExecApprovalPrompt(state: AppViewState) {
|
||||
: nothing}
|
||||
</div>
|
||||
${isPlugin ? renderPluginBody(active) : renderExecBody(request)}
|
||||
${
|
||||
state.execApprovalError
|
||||
? html`<div class="exec-approval-error">${state.execApprovalError}</div>`
|
||||
: nothing
|
||||
}
|
||||
${state.execApprovalError
|
||||
? html`<div class="exec-approval-error">${state.execApprovalError}</div>`
|
||||
: nothing}
|
||||
<div class="exec-approval-actions">
|
||||
<button
|
||||
class="btn primary"
|
||||
|
||||
Reference in New Issue
Block a user