Skip to content

Commit f3abc44

Browse files
ozgesolidkeyclaude
andcommitted
Fix agent name default to 'wolvie' and prevent JSON format double-click
- Default agent name is now 'wolvie' for all agent types when not set - JSON format button disabled during formatting to prevent double-click - Guard flag prevents concurrent format operations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9c74aa8 commit f3abc44

2 files changed

Lines changed: 16 additions & 7 deletions

File tree

src/main/index.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff 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) {

src/renderer/renderer.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8462,12 +8462,18 @@ function toggleContextGroupMode(mode: 'separate' | 'combined'): void {
84628462
}
84638463
}
84648464

8465+
let jsonFormatInProgress = false;
8466+
84658467
async 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

0 commit comments

Comments
 (0)