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

Function handleCopy

packages/session-ui/src/components/message-part.tsx:1168–1175  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1166 }
1167
1168 const handleCopy = async () => {
1169 const content = text()
1170 if (!content) return
1171 if (await writeClipboard(content)) {
1172 setState("copied", true)
1173 setTimeout(() => setState("copied", false), 2000)
1174 }
1175 }
1176
1177 const revert = () => {
1178 const act = props.actions?.revert

Callers 1

UserMessageDisplayFunction · 0.70

Calls 3

writeClipboardFunction · 0.85
setStateFunction · 0.85
textFunction · 0.70

Tested by

no test coverage detected