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

Function openDir

packages/app/src/components/session/session-header.tsx:254–268  ·  view source on GitHub ↗
(app: OpenApp)

Source from the content-addressed store, hash-verified

252 }
253
254 const openDir = (app: OpenApp) => {
255 if (opening() || !canOpen() || !platform.openPath) return
256 const directory = projectDirectory()
257 if (!directory) return
258
259 const item = options().find((o) => o.id === app)
260 const openWith = item && "openWith" in item ? item.openWith : undefined
261 setOpenRequest("app", app)
262 platform
263 .openPath(directory, openWith)
264 .catch((err: unknown) => showRequestError(language, err))
265 .finally(() => {
266 setOpenRequest("app", undefined)
267 })
268 }
269
270 const copyPath = () => {
271 const directory = projectDirectory()

Callers 1

SessionHeaderFunction · 0.85

Calls 4

canOpenFunction · 0.85
showRequestErrorFunction · 0.70
findMethod · 0.65
optionsFunction · 0.50

Tested by

no test coverage detected