MCPcopy Create free account
hub / github.com/anomalyco/opencode / finishShell

Function finishShell

packages/opencode/src/effect/runner.ts:93–106  ·  view source on GitHub ↗
(id: number)

Source from the content-addressed store, hash-verified

91 })
92
93 const finishShell = (id: number) =>
94 SynchronizedRef.modifyEffect(
95 ref,
96 Effect.fnUntraced(function* (st) {
97 if (st._tag === "Shell" && st.shell.id === id) {
98 return [idle, { _tag: "Idle" }] as const
99 }
100 if (st._tag === "ShellThenRun" && st.shell.id === id) {
101 const run = yield* startRun(st.run.work, st.run.done)
102 return [Effect.void, { _tag: "Running", run }] as const
103 }
104 return [Effect.void, st] as const
105 }),
106 ).pipe(Effect.flatten)
107
108 const stopShell = (shell: ShellHandle<A, E>) =>
109 Effect.gen(function* () {

Callers 1

startShellFunction · 0.85

Calls 1

startRunFunction · 0.85

Tested by

no test coverage detected