feat(electrobun): ProjectWizard — 3-step project creation with 5 source types
Step 1 — Source: local folder (path browser + validation), git clone, GitHub URL, template (4 built-in), remote SSH Step 2 — Configure: name, branch selector, worktree toggle, group, icon, shell Step 3 — Agent: provider, model, permission mode, system prompt, auto-start - ProjectWizard.svelte: 3-step wizard with display toggle (rule 55) - PathBrowser.svelte: inline directory browser with breadcrumbs + shortcuts - git-handlers.ts: git.branches + git.clone RPC handlers - files.statEx RPC: path validation + git detection + writable check - 39 new i18n keys, 172 total TranslationKey entries - App.svelte: wizard overlay replaces simple add-project card
This commit is contained in:
parent
1d2975b07b
commit
45bca3b96f
9 changed files with 1203 additions and 45 deletions
|
|
@ -133,6 +133,19 @@ export type PtyRPCRequests = {
|
|||
params: { path: string };
|
||||
response: { mtimeMs: number; size: number; error?: string };
|
||||
};
|
||||
/** Extended stat — directory check, git detection, writability. Used by ProjectWizard. */
|
||||
"files.statEx": {
|
||||
params: { path: string };
|
||||
response: {
|
||||
exists: boolean;
|
||||
isDirectory: boolean;
|
||||
isGitRepo: boolean;
|
||||
gitBranch?: string;
|
||||
size?: number;
|
||||
writable?: boolean;
|
||||
error?: string;
|
||||
};
|
||||
};
|
||||
/** Write text content to a file (atomic temp+rename). */
|
||||
"files.write": {
|
||||
params: { path: string; content: string };
|
||||
|
|
@ -196,6 +209,34 @@ export type PtyRPCRequests = {
|
|||
response: { ok: boolean; project?: { id: string; config: string }; error?: string };
|
||||
};
|
||||
|
||||
// ── Git RPC ──────────────────────────────────────────────────────────────────
|
||||
|
||||
/** List branches in a git repository. */
|
||||
"git.branches": {
|
||||
params: { path: string };
|
||||
response: { branches: string[]; current: string; error?: string };
|
||||
};
|
||||
/** Clone a git repository. */
|
||||
"git.clone": {
|
||||
params: { url: string; target: string; branch?: string };
|
||||
response: { ok: boolean; error?: string };
|
||||
};
|
||||
|
||||
// ── Project templates RPC ───────────────────────────────────────────────────
|
||||
|
||||
/** Return available project templates. */
|
||||
"project.templates": {
|
||||
params: Record<string, never>;
|
||||
response: {
|
||||
templates: Array<{
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
icon: string;
|
||||
}>;
|
||||
};
|
||||
};
|
||||
|
||||
// ── Window control RPC ─────────────────────────────────────────────────────
|
||||
|
||||
/** Minimize the main window. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue