refactor IPC (#341)

This commit is contained in:
Lingxuan Zuo
2026-03-08 11:54:49 +08:00
committed by GitHub
parent c03d92e9a2
commit 3d804a9f5e
52 changed files with 3121 additions and 336 deletions

View File

@@ -10,6 +10,7 @@ import remarkGfm from 'remark-gfm';
import { createPortal } from 'react-dom';
import { Button } from '@/components/ui/button';
import { cn } from '@/lib/utils';
import { invokeIpc } from '@/lib/api-client';
import type { RawMessage, AttachedFileMeta } from '@/stores/chat';
import { extractText, extractThinking, extractImages, extractToolUse, formatTimestamp } from './message-utils';
@@ -539,7 +540,7 @@ function ImageLightbox({
const handleShowInFolder = useCallback(() => {
if (filePath) {
window.electron.ipcRenderer.invoke('shell:showItemInFolder', filePath);
invokeIpc('shell:showItemInFolder', filePath);
}
}, [filePath]);