feat: stream real-time progress for agent SDK install/upgrade/uninstall
Replace the spinner-only UX with live log output during agent SDK operations, matching the existing OpenCode plugin install experience. Backend: emit structured events (started/log/completed/failed) via EventEmitter during npm install and binary download. npm commands now run with piped stdio for line-by-line streaming; binary downloads report chunked progress every 1 MB. Frontend: subscribe to `app://agent-install` events through a new `useAgentInstallStream` hook and render a theme-aware log terminal below the preflight checks panel. Also fixes the install log container in both agent settings and the OpenCode plugins modal: auto-scroll no longer shifts the outer page, and colours now follow the active light/dark theme. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -184,9 +184,10 @@ export async function acpClearBinaryCache(agentType: AgentType): Promise<void> {
|
||||
}
|
||||
|
||||
export async function acpDownloadAgentBinary(
|
||||
agentType: AgentType
|
||||
agentType: AgentType,
|
||||
taskId: string
|
||||
): Promise<void> {
|
||||
return getTransport().call("acp_download_agent_binary", { agentType })
|
||||
return getTransport().call("acp_download_agent_binary", { agentType, taskId })
|
||||
}
|
||||
|
||||
export async function acpDetectAgentLocalVersion(
|
||||
@@ -197,16 +198,21 @@ export async function acpDetectAgentLocalVersion(
|
||||
|
||||
export async function acpPrepareNpxAgent(
|
||||
agentType: AgentType,
|
||||
registryVersion?: string | null
|
||||
registryVersion: string | null | undefined,
|
||||
taskId: string
|
||||
): Promise<string> {
|
||||
return getTransport().call("acp_prepare_npx_agent", {
|
||||
agentType,
|
||||
registryVersion: registryVersion ?? null,
|
||||
taskId,
|
||||
})
|
||||
}
|
||||
|
||||
export async function acpUninstallAgent(agentType: AgentType): Promise<void> {
|
||||
return getTransport().call("acp_uninstall_agent", { agentType })
|
||||
export async function acpUninstallAgent(
|
||||
agentType: AgentType,
|
||||
taskId: string
|
||||
): Promise<void> {
|
||||
return getTransport().call("acp_uninstall_agent", { agentType, taskId })
|
||||
}
|
||||
|
||||
export async function acpUpdateAgentPreferences(
|
||||
|
||||
Reference in New Issue
Block a user