Skip to content

Commit ceaef42

Browse files
committed
Remove autoRun
1 parent d79afa6 commit ceaef42

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed

apps/twig/src/renderer/features/task-detail/hooks/useTaskCreation.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ function prepareTaskInput(
7979
githubIntegrationId?: number;
8080
workspaceMode: WorkspaceMode;
8181
branch?: string | null;
82-
autoRun: boolean;
8382
executionMode?: "plan" | "acceptEdits";
8483
},
8584
): TaskCreationInput {
@@ -91,7 +90,6 @@ function prepareTaskInput(
9190
githubIntegrationId: options.githubIntegrationId,
9291
workspaceMode: options.workspaceMode,
9392
branch: options.branch,
94-
autoRun: options.autoRun,
9593
executionMode: options.executionMode,
9694
};
9795
}
@@ -150,7 +148,6 @@ export function useTaskCreation({
150148
githubIntegrationId,
151149
workspaceMode,
152150
branch,
153-
autoRun: true,
154151
executionMode,
155152
});
156153

apps/twig/src/renderer/features/tasks/hooks/useTasks.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ export function useCreateTask() {
6464
description: string;
6565
repository?: string;
6666
github_integration?: number;
67-
autoRun?: boolean;
6867
createdFrom?: "cli" | "command-menu";
6968
},
7069
) =>
@@ -76,7 +75,6 @@ export function useCreateTask() {
7675
{
7776
onSuccess: (_task, variables) => {
7877
track(ANALYTICS_EVENTS.TASK_CREATED, {
79-
auto_run: variables.autoRun || false,
8078
created_from: variables.createdFrom || "cli",
8179
repository_provider: variables.repository ? "github" : "none",
8280
});

apps/twig/src/renderer/sagas/task/task-creation.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export interface TaskCreationInput {
3030
workspaceMode?: WorkspaceMode;
3131
branch?: string | null;
3232
githubIntegrationId?: number;
33-
autoRun?: boolean;
3433
// Execution mode: "plan" starts in plan mode (read-only), "acceptEdits" auto-approves edits, undefined starts in default mode
3534
executionMode?: "plan" | "acceptEdits";
3635
}
@@ -172,11 +171,11 @@ export class TaskCreationSaga extends Saga<
172171
const shouldConnect =
173172
!!input.taskId || // Open: always connect to load chat history
174173
workspaceMode === "cloud" || // Cloud create: always connect
175-
(agentCwd && input.autoRun); // Local create: only if autoRun
174+
!!agentCwd; // Local create: always connect if we have a cwd
176175

177176
if (shouldConnect) {
178177
const initialPrompt =
179-
!input.taskId && input.autoRun && input.content
178+
!input.taskId && input.content
180179
? await this.readOnlyStep("build_prompt_blocks", () =>
181180
buildPromptBlocks(
182181
input.content!,

apps/twig/src/renderer/services/task/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export class TaskService {
119119

120120
// No existing workspace - run full saga to set it up
121121
const saga = new TaskCreationSaga({ posthogClient });
122-
const result = await saga.run({ taskId, autoRun: true });
122+
const result = await saga.run({ taskId });
123123

124124
if (result.success) {
125125
this.updateStoresOnSuccess(result.data);

0 commit comments

Comments
 (0)