From 73d2680b83ccbdbd8dfec2d319533e98b379b830 Mon Sep 17 00:00:00 2001 From: bndw Date: Wed, 4 Mar 2026 21:36:32 -0800 Subject: feat: Thread optional `phase` param into `db/sessions.ts::cre… (+7 more) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ✅ 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` --- src/main/db/sessions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/db/sessions.ts') diff --git a/src/main/db/sessions.ts b/src/main/db/sessions.ts index 3e6352c..bc22d15 100644 --- a/src/main/db/sessions.ts +++ b/src/main/db/sessions.ts @@ -36,21 +36,21 @@ export function getSession(id: string): Session | undefined { .get(id) as Session | undefined; } -export function createSession(projectId: string, name: string): Session { +export function createSession(projectId: string, name: string, phase: Phase = "research"): Session { const db = getDb(); const id = uuid(); const now = Math.floor(Date.now() / 1000); db.prepare( `INSERT INTO sessions (id, project_id, name, phase, permission_mode, created_at, updated_at) - VALUES (?, ?, ?, 'research', 'acceptEdits', ?, ?)` - ).run(id, projectId, name, now, now); + VALUES (?, ?, ?, ?, 'acceptEdits', ?, ?)` + ).run(id, projectId, name, phase, now, now); return { id, project_id: projectId, name, - phase: "research", + phase, claude_session_id: null, permission_mode: "acceptEdits", git_branch: null, -- cgit v1.2.3