From 3ac34530578b9a6f59bcea6b5aeefd97eb03d588 Mon Sep 17 00:00:00 2001 From: Clawd Date: Sat, 28 Feb 2026 18:46:11 -0800 Subject: Move artifacts to ~/.claude-flow/ (outside repo) - Store session artifacts in ~/.claude-flow/projects/{projectId}/sessions/{sessionId}/ - Artifacts no longer live in project directory - can't be accidentally committed - Remove .claude-flow/ from .gitignore (not needed anymore) - Update all IPC handlers and renderer to use projectId instead of projectPath - Update prompts to remove worktree references - Update README with new storage location --- src/main/preload.ts | 37 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 27 deletions(-) (limited to 'src/main/preload.ts') diff --git a/src/main/preload.ts b/src/main/preload.ts index 7c1d634..2c228dd 100644 --- a/src/main/preload.ts +++ b/src/main/preload.ts @@ -31,34 +31,23 @@ export interface ClaudeFlowAPI { mode: UserPermissionMode ) => Promise; - // Session Artifacts (session-specific) + // Session Artifacts (stored in ~/.claude-flow/) readSessionArtifact: ( - projectPath: string, + projectId: string, sessionId: string, filename: string ) => Promise; writeSessionArtifact: ( - projectPath: string, + projectId: string, sessionId: string, filename: string, content: string ) => Promise; - // CLAUDE.md + // CLAUDE.md (stored in project) readClaudeMd: (projectPath: string) => Promise; writeClaudeMd: (projectPath: string, content: string) => Promise; - // Legacy Artifacts (backward compat) - readArtifact: ( - projectPath: string, - filename: string - ) => Promise; - writeArtifact: ( - projectPath: string, - filename: string, - content: string - ) => Promise; - // Events onClaudeMessage: ( callback: (sessionId: string, message: SDKMessage) => void @@ -97,23 +86,17 @@ const api: ClaudeFlowAPI = { setPermissionMode: (sessionId, mode) => ipcRenderer.invoke("workflow:setPermissionMode", sessionId, mode), - // Session Artifacts - readSessionArtifact: (projectPath, sessionId, filename) => - ipcRenderer.invoke("artifact:readSession", projectPath, sessionId, filename), - writeSessionArtifact: (projectPath, sessionId, filename, content) => - ipcRenderer.invoke("artifact:writeSession", projectPath, sessionId, filename, content), + // Session Artifacts (stored in ~/.claude-flow/) + readSessionArtifact: (projectId, sessionId, filename) => + ipcRenderer.invoke("artifact:readSession", projectId, sessionId, filename), + writeSessionArtifact: (projectId, sessionId, filename, content) => + ipcRenderer.invoke("artifact:writeSession", projectId, sessionId, filename, content), - // CLAUDE.md + // CLAUDE.md (stored in project) readClaudeMd: (projectPath) => ipcRenderer.invoke("claudemd:read", projectPath), writeClaudeMd: (projectPath, content) => ipcRenderer.invoke("claudemd:write", projectPath, content), - // Legacy Artifacts - readArtifact: (projectPath, filename) => - ipcRenderer.invoke("artifact:read", projectPath, filename), - writeArtifact: (projectPath, filename, content) => - ipcRenderer.invoke("artifact:write", projectPath, filename, content), - // Events onClaudeMessage: (callback) => { const handler = ( -- cgit v1.2.3