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

Function set

packages/tui/src/context/thinking.ts:43–46  ·  view source on GitHub ↗
(next: ThinkingMode | ((prev: ThinkingMode) => ThinkingMode))

Source from the content-addressed store, hash-verified

41 // Wrap it in a sane shape so consumers can just call `set(next)` or pass
42 // an updater.
43 const set = (next: ThinkingMode | ((prev: ThinkingMode) => ThinkingMode)) => {
44 if (typeof next === "function") setStored(next as Setter<ThinkingMode>)
45 else setStored(() => next)
46 }
47
48 // Preserve previous experience for users who had explicitly toggled the
49 // legacy `thinking_visibility` boolean. First-time users (no legacy key)

Callers 1

useThinkingModeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected