diff options
Diffstat (limited to 'src/main/preload.ts')
| -rw-r--r-- | src/main/preload.ts | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/main/preload.ts b/src/main/preload.ts index 1747763..7c1d634 100644 --- a/src/main/preload.ts +++ b/src/main/preload.ts | |||
| @@ -3,7 +3,6 @@ import type { SDKMessage } from "@anthropic-ai/claude-agent-sdk"; | |||
| 3 | import type { Project } from "./db/projects"; | 3 | import type { Project } from "./db/projects"; |
| 4 | import type { Session, Message } from "./db/sessions"; | 4 | import type { Session, Message } from "./db/sessions"; |
| 5 | import type { Phase, UserPermissionMode } from "./claude/phases"; | 5 | import type { Phase, UserPermissionMode } from "./claude/phases"; |
| 6 | import type { GitWorktreeInfo } from "./git/worktree"; | ||
| 7 | 6 | ||
| 8 | export interface ClaudeFlowAPI { | 7 | export interface ClaudeFlowAPI { |
| 9 | // Projects | 8 | // Projects |
| @@ -32,7 +31,7 @@ export interface ClaudeFlowAPI { | |||
| 32 | mode: UserPermissionMode | 31 | mode: UserPermissionMode |
| 33 | ) => Promise<void>; | 32 | ) => Promise<void>; |
| 34 | 33 | ||
| 35 | // Session Artifacts (new session-specific) | 34 | // Session Artifacts (session-specific) |
| 36 | readSessionArtifact: ( | 35 | readSessionArtifact: ( |
| 37 | projectPath: string, | 36 | projectPath: string, |
| 38 | sessionId: string, | 37 | sessionId: string, |
| @@ -60,12 +59,6 @@ export interface ClaudeFlowAPI { | |||
| 60 | content: string | 59 | content: string |
| 61 | ) => Promise<void>; | 60 | ) => Promise<void>; |
| 62 | 61 | ||
| 63 | // Git | ||
| 64 | isGitRepo: (projectPath: string) => Promise<boolean>; | ||
| 65 | getWorktreeInfo: (projectPath: string, sessionId: string) => Promise<GitWorktreeInfo | null>; | ||
| 66 | commitChanges: (worktreePath: string, message: string, files?: string[]) => Promise<void>; | ||
| 67 | hasUncommittedChanges: (worktreePath: string) => Promise<boolean>; | ||
| 68 | |||
| 69 | // Events | 62 | // Events |
| 70 | onClaudeMessage: ( | 63 | onClaudeMessage: ( |
| 71 | callback: (sessionId: string, message: SDKMessage) => void | 64 | callback: (sessionId: string, message: SDKMessage) => void |
| @@ -121,15 +114,6 @@ const api: ClaudeFlowAPI = { | |||
| 121 | writeArtifact: (projectPath, filename, content) => | 114 | writeArtifact: (projectPath, filename, content) => |
| 122 | ipcRenderer.invoke("artifact:write", projectPath, filename, content), | 115 | ipcRenderer.invoke("artifact:write", projectPath, filename, content), |
| 123 | 116 | ||
| 124 | // Git | ||
| 125 | isGitRepo: (projectPath) => ipcRenderer.invoke("git:isRepo", projectPath), | ||
| 126 | getWorktreeInfo: (projectPath, sessionId) => | ||
| 127 | ipcRenderer.invoke("git:worktreeInfo", projectPath, sessionId), | ||
| 128 | commitChanges: (worktreePath, message, files) => | ||
| 129 | ipcRenderer.invoke("git:commit", worktreePath, message, files), | ||
| 130 | hasUncommittedChanges: (worktreePath) => | ||
| 131 | ipcRenderer.invoke("git:hasChanges", worktreePath), | ||
| 132 | |||
| 133 | // Events | 117 | // Events |
| 134 | onClaudeMessage: (callback) => { | 118 | onClaudeMessage: (callback) => { |
| 135 | const handler = ( | 119 | const handler = ( |
