MCPcopy Index your code
hub / github.com/codeaashu/claude-code / handleFilenameSubmit

Function handleFilenameSubmit

src/components/ExportDialog.tsx:57–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55 }
56 };
57 const handleFilenameSubmit = () => {
58 const finalFilename = filename.endsWith('.txt') ? filename : filename.replace(/\.[^.]+$/, '') + '.txt';
59 const filepath = join(getCwd(), finalFilename);
60 try {
61 writeFileSync_DEPRECATED(filepath, content, {
62 encoding: 'utf-8',
63 flush: true
64 });
65 onDone({
66 success: true,
67 message: `Conversation exported to: ${filepath}`
68 });
69 } catch (error) {
70 onDone({
71 success: false,
72 message: `Failed to export conversation: ${error instanceof Error ? error.message : 'Unknown error'}`
73 });
74 }
75 };
76
77 // Dialog calls onCancel when Escape is pressed. If we are in the filename
78 // input sub-screen, go back to the option list instead of closing entirely.

Callers

nothing calls this directly

Calls 3

getCwdFunction · 0.85
writeFileSync_DEPRECATEDFunction · 0.85
onDoneFunction · 0.50

Tested by

no test coverage detected