diff options
| author | bndw <ben@bdw.to> | 2026-03-04 21:36:32 -0800 |
|---|---|---|
| committer | bndw <ben@bdw.to> | 2026-03-04 21:36:32 -0800 |
| commit | 73d2680b83ccbdbd8dfec2d319533e98b379b830 (patch) | |
| tree | 193eaf5157edcf12d06dde85fb44efaf3aae2004 /src/main/ipc | |
| parent | b6405dd6a4ba65fc5dc6746db7be7be7d0bb29f3 (diff) | |
feat: Thread optional `phase` param into `db/sessions.ts::cre… (+7 more)
- ✅ Thread optional `phase` param into `db/sessions.ts::createSession()`
- ✅ Thread optional `phase` param into `ipc/handlers.ts` sessions:create handler
- ✅ Thread optional `phase` param into `preload.ts` createSession API
- ✅ Update Plan phase system prompt to gracefully handle missing research.md
- ✅ Update Implement phase system prompt to gracefully handle missing plan.md
- ✅ Create `renderer/src/components/NewSessionModal.tsx`
- ✅ Update `App.tsx`: add modal state, split handler, add modal JSX
- ✅ Add modal CSS to `globals.css`
Diffstat (limited to 'src/main/ipc')
| -rw-r--r-- | src/main/ipc/handlers.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/ipc/handlers.ts b/src/main/ipc/handlers.ts index 4894e1d..975ad01 100644 --- a/src/main/ipc/handlers.ts +++ b/src/main/ipc/handlers.ts | |||
| @@ -5,7 +5,7 @@ import * as claude from "../claude"; | |||
| 5 | import * as settingsDb from "../db/settings"; | 5 | import * as settingsDb from "../db/settings"; |
| 6 | import { createSessionBranch, ensureGitIgnore, ensureGitRepo, getCurrentBranch } from "../git"; | 6 | import { createSessionBranch, ensureGitIgnore, ensureGitRepo, getCurrentBranch } from "../git"; |
| 7 | import { discoverMcpTools } from "../mcp"; | 7 | import { discoverMcpTools } from "../mcp"; |
| 8 | import type { UserPermissionMode } from "../claude/phases"; | 8 | import type { UserPermissionMode, Phase } from "../claude/phases"; |
| 9 | import { getDefaultSystemPromptTemplate } from "../claude/phases"; | 9 | import { getDefaultSystemPromptTemplate } from "../claude/phases"; |
| 10 | 10 | ||
| 11 | export function registerIpcHandlers(mainWindow: BrowserWindow): void { | 11 | export function registerIpcHandlers(mainWindow: BrowserWindow): void { |
| @@ -23,11 +23,11 @@ export function registerIpcHandlers(mainWindow: BrowserWindow): void { | |||
| 23 | sessions.listSessions(projectId) | 23 | sessions.listSessions(projectId) |
| 24 | ); | 24 | ); |
| 25 | 25 | ||
| 26 | ipcMain.handle("sessions:create", (_, projectId: string, name: string) => { | 26 | ipcMain.handle("sessions:create", (_, projectId: string, name: string, phase?: Phase) => { |
| 27 | const project = projects.getProject(projectId); | 27 | const project = projects.getProject(projectId); |
| 28 | if (!project) throw new Error("Project not found"); | 28 | if (!project) throw new Error("Project not found"); |
| 29 | 29 | ||
| 30 | const session = sessions.createSession(projectId, name); | 30 | const session = sessions.createSession(projectId, name, phase); |
| 31 | 31 | ||
| 32 | // Ensure .claude-flow/ is gitignored from day one. | 32 | // Ensure .claude-flow/ is gitignored from day one. |
| 33 | // Branch creation is deferred until the session advances to implement. | 33 | // Branch creation is deferred until the session advances to implement. |
