MCPcopy Index your code
hub / github.com/anomalyco/opencode / remove

Function remove

packages/app/src/context/server.tsx:271–278  ·  view source on GitHub ↗
(key: ServerConnection.Key)

Source from the content-addressed store, hash-verified

269 }
270
271 function remove(key: ServerConnection.Key) {
272 const next = nextServerAfterRemoval(allServers(), key, props.defaultServer)
273 const list = store.list.filter((x) => url(x) !== key)
274 batch(() => {
275 setStore("list", list)
276 if (state.active === key) setState("active", next)
277 })
278 }
279
280 const isReady = createMemo(() => ready() && !!state.active)
281

Callers

nothing calls this directly

Calls 5

nextServerAfterRemovalFunction · 0.85
batchFunction · 0.85
setStoreFunction · 0.85
setStateFunction · 0.85
urlFunction · 0.70

Tested by

no test coverage detected