MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / handleCopyToAgent

Function handleCopyToAgent

packages/studio/src/components/LintModal.tsx:26–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24 const [copied, setCopied] = useState(false);
25
26 const handleCopyToAgent = async () => {
27 const lines = findings.map((f) => {
28 let line = `[${f.severity}] ${f.message}`;
29 if (f.file) line += `\n File: ${f.file}`;
30 if (f.fixHint) line += `\n Fix: ${f.fixHint}`;
31 return line;
32 });
33 const text = `Fix these HyperFrames lint issues for project "${projectId}":\n\nProject path: ${window.location.href}\n\n${lines.join("\n\n")}`;
34 const copiedText = await copyTextToClipboard(text);
35 if (copiedText) {
36 setCopied(true);
37 setTimeout(() => setCopied(false), 2000);
38 }
39 };
40
41 return (
42 <div

Callers

nothing calls this directly

Calls 1

copyTextToClipboardFunction · 0.90

Tested by

no test coverage detected