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

Function copyPath

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

Source from the content-addressed store, hash-verified

268 }
269
270 const copyPath = () => {
271 const directory = projectDirectory()
272 if (!directory) return
273 navigator.clipboard
274 .writeText(directory)
275 .then(() => {
276 showToast({
277 variant: "success",
278 icon: "circle-check",
279 title: language.t("session.share.copy.copied"),
280 description: directory,
281 })
282 })
283 .catch((err: unknown) => showRequestError(language, err))
284 }
285
286 const [centerMount, setCenterMount] = createSignal<HTMLElement | null>(null)
287 const [rightMount, setRightMount] = createSignal<HTMLElement | null>(null)

Callers 1

SessionHeaderFunction · 0.85

Calls 2

showToastFunction · 0.90
showRequestErrorFunction · 0.70

Tested by

no test coverage detected