fix(core): avoid blocking command list on mcp startup
This commit is contained in:
@@ -528,7 +528,6 @@ export const layer = Layer.effect(
|
||||
.toSorted((a, b) => a.server.localeCompare(b.server))
|
||||
}),
|
||||
prompts: Effect.fn("MCP.prompts")(function* () {
|
||||
yield* whenAllReady
|
||||
return Array.from(runtime.values())
|
||||
.flatMap((entry) => entry.prompts ?? [])
|
||||
.toSorted((a, b) => a.server.localeCompare(b.server) || a.name.localeCompare(b.name))
|
||||
|
||||
@@ -618,7 +618,7 @@ export const { use: useData, provider: DataProvider } = createSimpleContext({
|
||||
// so the mcp list refreshes here rather than off integration.updated.
|
||||
case "mcp.status.changed":
|
||||
if (bootstrapping) break
|
||||
void result.location.mcp.refresh(event.location)
|
||||
void Promise.all([result.location.mcp.refresh(event.location), result.location.command.refresh(event.location)])
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user