MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / copyLogs

Function copyLogs

graph-ui/src/system/SystemWorkspace.tsx:73–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71 useEffect(() => { setCopyStatus(''); }, [level, logs.data]);
72
73 const copyLogs = async () => {
74 try {
75 if (!navigator.clipboard?.writeText) throw new Error('Clipboard access is unavailable. Select and copy the visible text.');
76 await navigator.clipboard.writeText(logRows ? logRows.map(({ record, count }) => `${record.ts} ${record.level.toUpperCase()} ${record.source} #${record.id}${count > 1 ? ` ×${count}` : ''}\n${record.message}`).join('\n') : visibleLines.join('\n'));
77 setCopyStatus('Visible lines copied');
78 } catch (error) {
79 setCopyStatus(error instanceof Error ? error.message : 'Could not copy the log.');
80 }
81 };
82 const moveTab = (event: KeyboardEvent<HTMLButtonElement>, current: SystemTab) => {
83 const index = TABS.indexOf(current);
84 const target = event.key === 'ArrowDown' ? TABS[(index + 1) % TABS.length]

Callers 1

SystemWorkspaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected