File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5371,13 +5371,12 @@ ipcMain.handle('agent-launch', async () => {
53715371 mainWindow ?. webContents . send ( 'agent-connection-changed' , { connected : false , count : 0 } ) ;
53725372 } ) ;
53735373
5374- // Build display name
5375- const agentName = config . agentName || (
5376- config . type === 'claude-code' ? `Claude${ config . model ? ` (${ config . model } )` : '' } `
5377- : config . type === 'local-llm' ? `${ config . agentName || 'wolvie' } (${ config . llmModel || 'local' } )`
5378- : config . type === 'custom' ? 'Custom Agent'
5379- : 'Built-in Agent'
5380- ) ;
5374+ // Build display name — default is "wolvie" for all types
5375+ const baseName = config . agentName || 'wolvie' ;
5376+ const agentName = config . type === 'claude-code' ? `${ baseName } (Claude${ config . model ? ' ' + config . model : '' } )`
5377+ : config . type === 'local-llm' ? `${ baseName } (${ config . llmModel || 'local' } )`
5378+ : config . type === 'custom' ? baseName
5379+ : baseName ;
53815380
53825381 return { success : true , agentName } ;
53835382 } catch ( err : any ) {
Original file line number Diff line number Diff line change @@ -8462,12 +8462,18 @@ function toggleContextGroupMode(mode: 'separate' | 'combined'): void {
84628462 }
84638463}
84648464
8465+ let jsonFormatInProgress = false ;
8466+
84658467async function formatAndLoadJson ( ) : Promise < void > {
84668468 if ( ! state . filePath ) return ;
8469+ if ( jsonFormatInProgress ) return ; // Prevent double-click
84678470
84688471 if ( ! jsonFormattingEnabled ) {
84698472 // Enable JSON mode - format and open formatted file
8473+ jsonFormatInProgress = true ;
84708474 elements . btnJsonFormat . classList . add ( 'active' ) ;
8475+ elements . btnJsonFormat . disabled = true ;
8476+ elements . btnFormatWarning . disabled = true ;
84718477 const originalPath = state . filePath ;
84728478
84738479 showProgress ( 'Formatting JSON... 0%' ) ;
@@ -8498,6 +8504,10 @@ async function formatAndLoadJson(): Promise<void> {
84988504 if ( unsubFormatProgress ) unsubFormatProgress ( ) ;
84998505 elements . btnJsonFormat . classList . remove ( 'active' ) ;
85008506 hideProgress ( ) ;
8507+ } finally {
8508+ jsonFormatInProgress = false ;
8509+ elements . btnJsonFormat . disabled = false ;
8510+ elements . btnFormatWarning . disabled = false ;
85018511 }
85028512 } else {
85038513 // Disable JSON mode - go back to original file
You can’t perform that action at this time.
0 commit comments