MCPcopy
hub / github.com/codeaashu/claude-code / handleSelectOption

Function handleSelectOption

src/components/ExportDialog.tsx:43–56  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

41 setSelectedOption(null);
42 }, []);
43 const handleSelectOption = async (value: string): Promise<void> => {
44 if (value === 'clipboard') {
45 // Copy to clipboard immediately
46 const raw = await setClipboard(content);
47 if (raw) process.stdout.write(raw);
48 onDone({
49 success: true,
50 message: 'Conversation copied to clipboard'
51 });
52 } else if (value === 'file') {
53 setSelectedOption('file');
54 setShowFilenameInput(true);
55 }
56 };
57 const handleFilenameSubmit = () => {
58 const finalFilename = filename.endsWith('.txt') ? filename : filename.replace(/\.[^.]+$/, '') + '.txt';
59 const filepath = join(getCwd(), finalFilename);

Callers 1

PreviewQuestionViewFunction · 0.85

Calls 3

setClipboardFunction · 0.85
onDoneFunction · 0.50
writeMethod · 0.45

Tested by

no test coverage detected