Skip to content

Commit d79afa6

Browse files
committed
Remove unused task execution settings
1 parent 6642e88 commit d79afa6

File tree

4 files changed

+1
-84
lines changed

4 files changed

+1
-84
lines changed

apps/twig/src/main/services/agent/schemas.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export const startSessionInput = z.object({
4343
model: z.string().optional(),
4444
executionMode: z.enum(["plan", "acceptEdits", "default"]).optional(),
4545
runMode: z.enum(["local", "cloud"]).optional(),
46-
createPR: z.boolean().optional(),
4746
/** Additional directories Claude can access beyond cwd (for worktree support) */
4847
additionalDirectories: z.array(z.string()).optional(),
4948
});

apps/twig/src/renderer/features/settings/components/SettingsView.tsx

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,10 @@ export function SettingsView() {
5555
const isDarkMode = useThemeStore((state) => state.isDarkMode);
5656
const toggleDarkMode = useThemeStore((state) => state.toggleDarkMode);
5757
const {
58-
autoRunTasks,
59-
createPR,
6058
cursorGlow,
6159
desktopNotifications,
6260
autoConvertLongText,
6361
sendMessagesWith,
64-
setAutoRunTasks,
65-
setCreatePR,
6662
setCursorGlow,
6763
setDesktopNotifications,
6864
setAutoConvertLongText,
@@ -106,30 +102,6 @@ export function SettingsView() {
106102
}, [worktreeLocation]);
107103

108104
// Tracked settings handlers
109-
const handleAutoRunChange = useCallback(
110-
(checked: boolean) => {
111-
track(ANALYTICS_EVENTS.SETTING_CHANGED, {
112-
setting_name: "auto_run_tasks",
113-
new_value: checked,
114-
old_value: autoRunTasks,
115-
});
116-
setAutoRunTasks(checked);
117-
},
118-
[autoRunTasks, setAutoRunTasks],
119-
);
120-
121-
const handleCreatePRChange = useCallback(
122-
(checked: boolean) => {
123-
track(ANALYTICS_EVENTS.SETTING_CHANGED, {
124-
setting_name: "create_pr",
125-
new_value: checked,
126-
old_value: createPR,
127-
});
128-
setCreatePR(checked);
129-
},
130-
[createPR, setCreatePR],
131-
);
132-
133105
const handleDarkModeChange = useCallback(() => {
134106
track(ANALYTICS_EVENTS.SETTING_CHANGED, {
135107
setting_name: "dark_mode",
@@ -437,49 +409,6 @@ export function SettingsView() {
437409

438410
<Box className="border-gray-6 border-t" />
439411

440-
{/* Task Execution Section */}
441-
<Flex direction="column" gap="3">
442-
<Heading size="3">Task execution</Heading>
443-
<Card>
444-
<Flex direction="column" gap="4">
445-
<Flex align="center" justify="between">
446-
<Flex direction="column" gap="1">
447-
<Text size="1" weight="medium">
448-
Auto-run new tasks
449-
</Text>
450-
<Text size="1" color="gray">
451-
Automatically start tasks after creation
452-
</Text>
453-
</Flex>
454-
<Switch
455-
checked={autoRunTasks}
456-
onCheckedChange={handleAutoRunChange}
457-
size="1"
458-
/>
459-
</Flex>
460-
461-
<Flex align="center" justify="between">
462-
<Flex direction="column" gap="1">
463-
<Text size="1" weight="medium">
464-
Create PR for local runs
465-
</Text>
466-
<Text size="1" color="gray">
467-
Automatically create a pull request when local tasks
468-
complete
469-
</Text>
470-
</Flex>
471-
<Switch
472-
checked={createPR}
473-
onCheckedChange={handleCreatePRChange}
474-
size="1"
475-
/>
476-
</Flex>
477-
</Flex>
478-
</Card>
479-
</Flex>
480-
481-
<Box className="border-gray-6 border-t" />
482-
483412
{/* Workspace Storage Section */}
484413
<Flex direction="column" gap="3">
485414
<Heading size="3">Workspace storage</Heading>

apps/twig/src/renderer/features/settings/stores/settingsStore.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,20 @@ export type LocalWorkspaceMode = "worktree" | "local";
88
export type SendMessagesWith = "enter" | "cmd+enter";
99

1010
interface SettingsStore {
11-
autoRunTasks: boolean;
1211
defaultRunMode: DefaultRunMode;
1312
lastUsedRunMode: "local" | "cloud";
1413
lastUsedLocalWorkspaceMode: LocalWorkspaceMode;
1514
lastUsedWorkspaceMode: WorkspaceMode;
16-
createPR: boolean;
1715
defaultModel: string;
1816
desktopNotifications: boolean;
1917
cursorGlow: boolean;
2018
autoConvertLongText: boolean;
2119
sendMessagesWith: SendMessagesWith;
2220

23-
setAutoRunTasks: (autoRun: boolean) => void;
2421
setDefaultRunMode: (mode: DefaultRunMode) => void;
2522
setLastUsedRunMode: (mode: "local" | "cloud") => void;
2623
setLastUsedLocalWorkspaceMode: (mode: LocalWorkspaceMode) => void;
2724
setLastUsedWorkspaceMode: (mode: WorkspaceMode) => void;
28-
setCreatePR: (createPR: boolean) => void;
2925
setDefaultModel: (model: string) => void;
3026
setDesktopNotifications: (enabled: boolean) => void;
3127
setCursorGlow: (enabled: boolean) => void;
@@ -36,25 +32,21 @@ interface SettingsStore {
3632
export const useSettingsStore = create<SettingsStore>()(
3733
persist(
3834
(set) => ({
39-
autoRunTasks: true,
4035
defaultRunMode: "last_used",
4136
lastUsedRunMode: "local",
4237
lastUsedLocalWorkspaceMode: "worktree",
4338
lastUsedWorkspaceMode: "worktree",
44-
createPR: true,
4539
defaultModel: DEFAULT_MODEL,
4640
desktopNotifications: true,
4741
cursorGlow: false,
4842
autoConvertLongText: true,
4943
sendMessagesWith: "enter",
5044

51-
setAutoRunTasks: (autoRun) => set({ autoRunTasks: autoRun }),
5245
setDefaultRunMode: (mode) => set({ defaultRunMode: mode }),
5346
setLastUsedRunMode: (mode) => set({ lastUsedRunMode: mode }),
5447
setLastUsedLocalWorkspaceMode: (mode) =>
5548
set({ lastUsedLocalWorkspaceMode: mode }),
5649
setLastUsedWorkspaceMode: (mode) => set({ lastUsedWorkspaceMode: mode }),
57-
setCreatePR: (createPR) => set({ createPR }),
5850
setDefaultModel: (model) => set({ defaultModel: model }),
5951
setDesktopNotifications: (enabled) =>
6052
set({ desktopNotifications: enabled }),

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { useAuthStore } from "@features/auth/stores/authStore";
22
import type { MessageEditorHandle } from "@features/message-editor/components/MessageEditor";
33
import type { EditorContent } from "@features/message-editor/utils/content";
4-
import { useSettingsStore } from "@features/settings/stores/settingsStore";
54
import { useCreateTask } from "@features/tasks/hooks/useTasks";
65
import { useConnectivity } from "@hooks/useConnectivity";
76
import { get } from "@renderer/di/container";
@@ -122,7 +121,6 @@ export function useTaskCreation({
122121
const [isCreatingTask, setIsCreatingTask] = useState(false);
123122
const { navigateToTask } = useNavigationStore();
124123
const { isAuthenticated } = useAuthStore();
125-
const { autoRunTasks } = useSettingsStore();
126124
const { invalidateTasks } = useCreateTask();
127125
const { isOnline } = useConnectivity();
128126

@@ -152,7 +150,7 @@ export function useTaskCreation({
152150
githubIntegrationId,
153151
workspaceMode,
154152
branch,
155-
autoRun: autoRunTasks,
153+
autoRun: true,
156154
executionMode,
157155
});
158156

@@ -195,7 +193,6 @@ export function useTaskCreation({
195193
githubIntegrationId,
196194
workspaceMode,
197195
branch,
198-
autoRunTasks,
199196
executionMode,
200197
invalidateTasks,
201198
navigateToTask,

0 commit comments

Comments
 (0)