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:
@@ -936,6 +936,14 @@ export interface PluginInstallEvent {
|
||||
payload: string
|
||||
}
|
||||
|
||||
export type AgentInstallEventKind = "started" | "log" | "completed" | "failed"
|
||||
|
||||
export interface AgentInstallEvent {
|
||||
task_id: string
|
||||
kind: AgentInstallEventKind
|
||||
payload: string
|
||||
}
|
||||
|
||||
// ─── Chat Channels ───
|
||||
|
||||
export type ChannelType = "lark" | "telegram" | "weixin"
|
||||
|
||||
Reference in New Issue
Block a user