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

Function toggleHome

packages/app/src/context/tabs.tsx:274–286  ·  view source on GitHub ↗
(input: { home: boolean; current?: Tab })

Source from the content-addressed store, hash-verified

272 if (recentKey() !== key) setRecentKey(key)
273 },
274 toggleHome(input: { home: boolean; current?: Tab }) {
275 if (input.home) {
276 const tab = store.find((tab) => tabKey(tab) === recentKey())
277 if (tab) navigateTab(tab)
278 return
279 }
280 if (input.current) {
281 setRecentKey(tabKey(input.current))
282 navigate("/")
283 return
284 }
285 navigate("/")
286 },
287 state<T>(tab: Tab, name: string, init: () => T) {
288 return memory.ensure(tabKey(tab), name, init)
289 },

Callers

nothing calls this directly

Calls 6

tabKeyFunction · 0.85
recentKeyFunction · 0.85
navigateTabFunction · 0.85
setRecentKeyFunction · 0.85
findMethod · 0.65
navigateFunction · 0.50

Tested by

no test coverage detected