mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-17 05:26:47 +03:00
fix(app): retry browser pane when server plugins finish loading (#63500)
This commit is contained in:
@@ -379,8 +379,9 @@ export function createModel(ctx: SetupContext<typeof definition>) {
|
||||
setState("pages", sessionKey, undefined)
|
||||
}
|
||||
|
||||
// A server whose plugin lacked the browser RPC may have it once its event stream reconnects or a restarted server
|
||||
// replaces its controller. Leaving the list ends the watch too: its next session asks again.
|
||||
// A server whose plugin lacked the browser RPC may have it once its plugins finish loading, its event stream
|
||||
// reconnects, or a restarted server replaces its controller. Leaving the list ends the watch too: its next session
|
||||
// asks again.
|
||||
const watchServer = (serverID: string) => {
|
||||
servers.get(serverID)?.()
|
||||
const changed = () => queueMicrotask(() => dispatch({ type: "server.changed", serverID }))
|
||||
@@ -397,6 +398,7 @@ export function createModel(ctx: SetupContext<typeof definition>) {
|
||||
(data) => {
|
||||
if (data !== marked) return changed()
|
||||
onCleanup(data.on("server.connected", changed))
|
||||
onCleanup(data.on("plugin.updated", changed))
|
||||
},
|
||||
{ otherwise: changed },
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user