fix(electrobun): wizard fixes — native dialog, models, PathBrowser, ensureDir
- Native dialog: resolve to nearest existing parent dir, detect user cancel (exit code 1) vs actual error, add createIfMissing option - Claude models: fallback to KNOWN_CLAUDE_MODELS (6 models) when API key unavailable. Adds Opus 4.6, Sonnet 4.6, Opus 4.5, Sonnet 4, Haiku 4.5, Sonnet 3.7. Live API paginated to limit=100. - PathBrowser: Select button moved to sticky header (always visible). Current path shown compact in header with RTL ellipsis. - files.ensureDir RPC: creates directory recursively before project creation - files.ensureDir added to RPC schema
This commit is contained in:
parent
162b5417e4
commit
a4d180d382
6 changed files with 77 additions and 12 deletions
|
|
@ -137,6 +137,10 @@
|
|||
|
||||
async function createProject() {
|
||||
const cwd = sourceType === 'remote' ? `ssh://${sanitize(remoteUser)}@${sanitize(remoteHost)}:${sanitize(remotePath)}` : (sanitizePath(localPath) || localPath.trim());
|
||||
// Ensure directory exists for local paths
|
||||
if (sourceType !== 'remote' && cwd) {
|
||||
try { await appRpc.request['files.ensureDir']({ path: cwd }); } catch { /* best effort */ }
|
||||
}
|
||||
onCreated({ id: `p-${Date.now()}`, name: sanitize(projectName) || 'Untitled', cwd, provider, model: model || undefined, systemPrompt: systemPrompt || undefined, autoStart, groupId: selectedGroupId, useWorktrees: useWorktrees || undefined, shell: shellChoice, icon: projectIcon, color: projectColor, modelConfig: Object.keys(modelConfig).length > 0 ? modelConfig : undefined });
|
||||
resetState();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue