aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/index.ts4
-rw-r--r--src/main/ipc/handlers.ts6
-rw-r--r--src/main/preload.ts2
3 files changed, 10 insertions, 2 deletions
diff --git a/src/main/index.ts b/src/main/index.ts
index f0b23f7..a7bed00 100644
--- a/src/main/index.ts
+++ b/src/main/index.ts
@@ -1,4 +1,4 @@
1import { app, BrowserWindow } from "electron"; 1import { app, BrowserWindow, Menu } from "electron";
2import path from "node:path"; 2import path from "node:path";
3import { getDb, closeDb } from "./db"; 3import { getDb, closeDb } from "./db";
4import { registerIpcHandlers } from "./ipc/handlers"; 4import { registerIpcHandlers } from "./ipc/handlers";
@@ -41,6 +41,8 @@ function createWindow() {
41} 41}
42 42
43app.whenReady().then(() => { 43app.whenReady().then(() => {
44 Menu.setApplicationMenu(null);
45
44 // Initialize database 46 // Initialize database
45 getDb(); 47 getDb();
46 48
diff --git a/src/main/ipc/handlers.ts b/src/main/ipc/handlers.ts
index d9beaf0..145c6e2 100644
--- a/src/main/ipc/handlers.ts
+++ b/src/main/ipc/handlers.ts
@@ -31,7 +31,11 @@ export function registerIpcHandlers(mainWindow: BrowserWindow): void {
31 } 31 }
32 sessions.deleteSession(id); 32 sessions.deleteSession(id);
33 }); 33 });
34 34
35 ipcMain.handle("sessions:rename", (_, id: string, name: string) => {
36 sessions.updateSession(id, { name });
37 });
38
35 ipcMain.handle("sessions:get", (_, id: string) => sessions.getSession(id)); 39 ipcMain.handle("sessions:get", (_, id: string) => sessions.getSession(id));
36 40
37 // Messages 41 // Messages
diff --git a/src/main/preload.ts b/src/main/preload.ts
index 2c228dd..f377639 100644
--- a/src/main/preload.ts
+++ b/src/main/preload.ts
@@ -15,6 +15,7 @@ export interface ClaudeFlowAPI {
15 createSession: (projectId: string, name: string) => Promise<Session>; 15 createSession: (projectId: string, name: string) => Promise<Session>;
16 deleteSession: (id: string) => Promise<void>; 16 deleteSession: (id: string) => Promise<void>;
17 getSession: (id: string) => Promise<Session | undefined>; 17 getSession: (id: string) => Promise<Session | undefined>;
18 renameSession: (id: string, name: string) => Promise<void>;
18 19
19 // Messages 20 // Messages
20 listMessages: (sessionId: string) => Promise<Message[]>; 21 listMessages: (sessionId: string) => Promise<Message[]>;
@@ -70,6 +71,7 @@ const api: ClaudeFlowAPI = {
70 ipcRenderer.invoke("sessions:create", projectId, name), 71 ipcRenderer.invoke("sessions:create", projectId, name),
71 deleteSession: (id) => ipcRenderer.invoke("sessions:delete", id), 72 deleteSession: (id) => ipcRenderer.invoke("sessions:delete", id),
72 getSession: (id) => ipcRenderer.invoke("sessions:get", id), 73 getSession: (id) => ipcRenderer.invoke("sessions:get", id),
74 renameSession: (id, name) => ipcRenderer.invoke("sessions:rename", id, name),
73 75
74 // Messages 76 // Messages
75 listMessages: (sessionId) => ipcRenderer.invoke("messages:list", sessionId), 77 listMessages: (sessionId) => ipcRenderer.invoke("messages:list", sessionId),