feat: implement worktree session creation and management
- Added `createWorktreeSession` utility to handle the creation of new sessions with auto-generated worktrees. - Introduced branch name generation utilities for creating unique and friendly branch names. - Updated `CommandPalette` to trigger worktree session creation via a command. - Refactored keyboard shortcuts to support new worktree session creation with Shift + Cmd/Ctrl + N. - Enhanced project settings to include worktree defaults (branch prefix, base branch, auto-create option). - Updated persistence logic to preserve worktree defaults when saving project settings. - Modified menu actions to initiate new worktree sessions. - Ensured proper handling of existing branches to avoid conflicts during worktree creation.
This commit is contained in:
@@ -334,12 +334,19 @@ export interface FilesAPI {
|
||||
execCommands?(commands: string[], cwd: string): Promise<{ success: boolean; results: CommandExecResult[] }>;
|
||||
}
|
||||
|
||||
export interface WorktreeDefaults {
|
||||
branchPrefix?: string; // e.g. "feature", "bugfix" (no trailing slash)
|
||||
baseBranch?: string; // e.g. "main", "develop", or "HEAD"
|
||||
autoCreateWorktree?: boolean; // future: skip dialog, create worktree automatically
|
||||
}
|
||||
|
||||
export interface ProjectEntry {
|
||||
id: string;
|
||||
path: string;
|
||||
label?: string;
|
||||
addedAt?: number;
|
||||
lastOpenedAt?: number;
|
||||
worktreeDefaults?: WorktreeDefaults;
|
||||
}
|
||||
|
||||
export interface SettingsPayload {
|
||||
|
||||
Reference in New Issue
Block a user