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

Function createScopedMode

packages/opencode/src/plugin/tui/runtime.ts:193–202  ·  view source on GitHub ↗
(mode: TuiPluginApi["mode"], scope: PluginScope)

Source from the content-addressed store, hash-verified

191}
192
193function createScopedMode(mode: TuiPluginApi["mode"], scope: PluginScope): TuiPluginApi["mode"] {
194 return {
195 current() {
196 return mode.current()
197 },
198 push(value) {
199 return scope.track(mode.push(value))
200 },
201 }
202}
203
204type CleanupResult = { type: "ok" } | { type: "error"; error: unknown } | { type: "timeout" }
205

Callers 1

pluginApiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected