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

Function handleScreenshot

src/components/Stats.tsx:1059–1067  ·  view source on GitHub ↗
(stats: ClaudeCodeStats, activeTab: 'Overview' | 'Models', setStatus: (status: string | null) => void)

Source from the content-addressed store, hash-verified

1057
1058// Screenshot functionality
1059async function handleScreenshot(stats: ClaudeCodeStats, activeTab: 'Overview' | 'Models', setStatus: (status: string | null) => void): Promise<void> {
1060 setStatus('copying…');
1061 const ansiText = renderStatsToAnsi(stats, activeTab);
1062 const result = await copyAnsiToClipboard(ansiText);
1063 setStatus(result.success ? 'copied!' : 'copy failed');
1064
1065 // Clear status after 2 seconds
1066 setTimeout(setStatus, 2000, null);
1067}
1068function renderStatsToAnsi(stats: ClaudeCodeStats, activeTab: 'Overview' | 'Models'): string {
1069 const lines: string[] = [];
1070 if (activeTab === 'Overview') {

Callers 1

StatsContentFunction · 0.85

Calls 3

renderStatsToAnsiFunction · 0.85
copyAnsiToClipboardFunction · 0.85
setStatusFunction · 0.50

Tested by

no test coverage detected