refactor: Replace worktreePath param with useWorktrees flag

This commit is contained in:
Shirone
2026-01-14 09:29:38 +01:00
parent 3689eb969d
commit c7fac3d9e6
3 changed files with 7 additions and 6 deletions

View File

@@ -628,8 +628,8 @@ export function useBoardActions({
currentProject.path, currentProject.path,
followUpFeature.id, followUpFeature.id,
followUpPrompt, followUpPrompt,
imagePaths imagePaths,
// No worktreePath - server derives from feature.branchName useWorktrees
); );
if (!result.success) { if (!result.success) {
@@ -667,6 +667,7 @@ export function useBoardActions({
setFollowUpPrompt, setFollowUpPrompt,
setFollowUpImagePaths, setFollowUpImagePaths,
setFollowUpPreviewMap, setFollowUpPreviewMap,
useWorktrees,
]); ]);
const handleCommitFeature = useCallback( const handleCommitFeature = useCallback(

View File

@@ -524,7 +524,7 @@ export interface AutoModeAPI {
featureId: string, featureId: string,
prompt: string, prompt: string,
imagePaths?: string[], imagePaths?: string[],
worktreePath?: string useWorktrees?: boolean
) => Promise<{ success: boolean; passes?: boolean; error?: string }>; ) => Promise<{ success: boolean; passes?: boolean; error?: string }>;
commitFeature: ( commitFeature: (
projectPath: string, projectPath: string,
@@ -2113,7 +2113,7 @@ function createMockAutoModeAPI(): AutoModeAPI {
featureId: string, featureId: string,
prompt: string, prompt: string,
imagePaths?: string[], imagePaths?: string[],
worktreePath?: string useWorktrees?: boolean
) => { ) => {
if (mockRunningFeatures.has(featureId)) { if (mockRunningFeatures.has(featureId)) {
return { return {

View File

@@ -1652,14 +1652,14 @@ export class HttpApiClient implements ElectronAPI {
featureId: string, featureId: string,
prompt: string, prompt: string,
imagePaths?: string[], imagePaths?: string[],
worktreePath?: string useWorktrees?: boolean
) => ) =>
this.post('/api/auto-mode/follow-up-feature', { this.post('/api/auto-mode/follow-up-feature', {
projectPath, projectPath,
featureId, featureId,
prompt, prompt,
imagePaths, imagePaths,
worktreePath, useWorktrees,
}), }),
commitFeature: (projectPath: string, featureId: string, worktreePath?: string) => commitFeature: (projectPath: string, featureId: string, worktreePath?: string) =>
this.post('/api/auto-mode/commit-feature', { this.post('/api/auto-mode/commit-feature', {