@@ -25,7 +25,6 @@ import { createBashTool } from "@/services/tools/bash";
2525import type { BashToolResult } from "@/types/tools" ;
2626import { secretsToRecord } from "@/types/secrets" ;
2727import { DisposableTempDir } from "@/services/tempDir" ;
28- import type { WorkspaceMetadata , FrontendWorkspaceMetadata } from "@/types/workspace" ;
2928
3029/**
3130 * IpcMain - Manages all IPC handlers and service coordination
@@ -122,8 +121,6 @@ export class IpcMain {
122121 this . sessions . delete ( workspaceId ) ;
123122 }
124123
125-
126-
127124 /**
128125 * Register all IPC handlers and setup event forwarding
129126 * @param ipcMain - Electron's ipcMain module
@@ -267,7 +264,7 @@ export class IpcMain {
267264
268265 ipcMain . handle (
269266 IPC_CHANNELS . WORKSPACE_RENAME ,
270- async ( _event , workspaceId : string , newName : string ) => {
267+ ( _event , workspaceId : string , newName : string ) => {
271268 try {
272269 // Validate workspace name
273270 const validation = validateWorkspaceName ( newName ) ;
@@ -276,7 +273,7 @@ export class IpcMain {
276273 }
277274
278275 // Get current metadata
279- const metadataResult = await this . aiService . getWorkspaceMetadata ( workspaceId ) ;
276+ const metadataResult = this . aiService . getWorkspaceMetadata ( workspaceId ) ;
280277 if ( ! metadataResult . success ) {
281278 return Err ( `Failed to get workspace metadata: ${ metadataResult . error } ` ) ;
282279 }
@@ -305,8 +302,6 @@ export class IpcMain {
305302 const { projectPath, workspacePath } = workspace ;
306303
307304 // Compute new path (based on name)
308- const projectName =
309- projectPath . split ( "/" ) . pop ( ) ?? projectPath . split ( "\\" ) . pop ( ) ?? "unknown" ;
310305 const oldPath = workspacePath ;
311306 const newPath = this . config . getWorkspacePath ( projectPath , newName ) ;
312307
@@ -374,7 +369,7 @@ export class IpcMain {
374369 }
375370 } ) ;
376371
377- ipcMain . handle ( IPC_CHANNELS . WORKSPACE_GET_INFO , async ( _event , workspaceId : string ) => {
372+ ipcMain . handle ( IPC_CHANNELS . WORKSPACE_GET_INFO , ( _event , workspaceId : string ) => {
378373 // Get complete metadata from config (includes paths)
379374 const allMetadata = this . config . getAllWorkspaceMetadata ( ) ;
380375 return allMetadata . find ( ( m ) => m . id === workspaceId ) ?? null ;
@@ -573,7 +568,7 @@ export class IpcMain {
573568 ) => {
574569 try {
575570 // Get workspace metadata
576- const metadataResult = await this . aiService . getWorkspaceMetadata ( workspaceId ) ;
571+ const metadataResult = this . aiService . getWorkspaceMetadata ( workspaceId ) ;
577572 if ( ! metadataResult . success ) {
578573 return Err ( `Failed to get workspace metadata: ${ metadataResult . error } ` ) ;
579574 }
@@ -587,7 +582,7 @@ export class IpcMain {
587582 if ( ! workspace ) {
588583 return Err ( `Workspace ${ workspaceId } not found in config` ) ;
589584 }
590-
585+
591586 // Get workspace path (directory name uses workspace name)
592587 const namedPath = this . config . getWorkspacePath ( metadata . projectPath , metadata . name ) ;
593588
@@ -714,15 +709,13 @@ export class IpcMain {
714709 ) : Promise < { success : boolean ; error ?: string } > {
715710 try {
716711 // Get workspace metadata
717- const metadataResult = await this . aiService . getWorkspaceMetadata ( workspaceId ) ;
712+ const metadataResult = this . aiService . getWorkspaceMetadata ( workspaceId ) ;
718713 if ( ! metadataResult . success ) {
719714 // If metadata doesn't exist, workspace is already gone - consider it success
720715 log . info ( `Workspace ${ workspaceId } metadata not found, considering removal successful` ) ;
721716 return { success : true } ;
722717 }
723718
724- const metadata = metadataResult . data ;
725-
726719 // Get actual workspace path from config (handles both legacy and new format)
727720 const workspace = this . config . findWorkspace ( workspaceId ) ;
728721 if ( ! workspace ) {
@@ -807,7 +800,7 @@ export class IpcMain {
807800 // because the worktree might be deleted (so getMainWorktreeFromWorktree fails)
808801 const projectsConfig = this . config . loadConfigOrDefault ( ) ;
809802 let configUpdated = false ;
810- for ( const [ projectPath , projectConfig ] of projectsConfig . projects . entries ( ) ) {
803+ for ( const [ _projectPath , projectConfig ] of projectsConfig . projects . entries ( ) ) {
811804 const initialCount = projectConfig . workspaces . length ;
812805 projectConfig . workspaces = projectConfig . workspaces . filter ( ( w ) => w . path !== workspacePath ) ;
813806 if ( projectConfig . workspaces . length < initialCount ) {
0 commit comments