mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-24 10:43:33 +00:00
feat(core): publish pending MCP status during connect (#37605)
This commit is contained in:
parent
5f437a09b0
commit
d625bc86fc
1 changed files with 4 additions and 0 deletions
|
|
@ -482,6 +482,10 @@ export const layer = Layer.effect(
|
|||
|
||||
const startServer = (name: ServerName, entry: ServerEntry) =>
|
||||
Effect.gen(function* () {
|
||||
// Announce the handshake so connect() and credential reconnects don't show a stale
|
||||
// disabled/failed status for the duration of the connection attempt.
|
||||
entry.status = { status: "pending" }
|
||||
yield* events.publish(McpEvent.StatusChanged, { server: name }).pipe(Effect.ignore)
|
||||
const scope = yield* Scope.fork(root)
|
||||
entry.scope = scope
|
||||
const authProvider = yield* connectProvider(entry)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue