diff --git a/frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx b/frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx index 83093100..e869b109 100644 --- a/frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx +++ b/frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx @@ -44,6 +44,27 @@ import { TaskExecutionStateContext, TaskSelectedAttemptContext, } from '@/components/context/taskDetailsContext.ts'; +import { useConfig } from '@/components/config-provider.tsx'; + +// Helper function to get the display name for different editor types +function getEditorDisplayName(editorType: string): string { + switch (editorType) { + case 'vscode': + return 'Visual Studio Code'; + case 'cursor': + return 'Cursor'; + case 'windsurf': + return 'Windsurf'; + case 'intellij': + return 'IntelliJ IDEA'; + case 'zed': + return 'Zed'; + case 'custom': + return 'Custom Editor'; + default: + return 'Editor'; + } +} type Props = { setError: Dispatch>; @@ -71,6 +92,7 @@ function CurrentAttempt({ }: Props) { const { task, projectId, handleOpenInEditor, projectHasDevScript } = useContext(TaskDetailsContext); + const { config } = useConfig(); const { setSelectedAttempt } = useContext(TaskSelectedAttemptContext); const { isStopping, setIsStopping } = useContext(TaskAttemptStoppingContext); const { attemptData, fetchAttemptData, isAttemptRunning } = useContext( @@ -353,6 +375,12 @@ function CurrentAttempt({ return selectedBranch; }, [selectedBranch]); + // Get display name for the configured editor + const editorDisplayName = useMemo(() => { + if (!config?.editor?.editor_type) return 'Editor'; + return getEditorDisplayName(config.editor.editor_type); + }, [config?.editor?.editor_type]); + return (
@@ -425,23 +453,15 @@ function CurrentAttempt({
Worktree Path
- - - - - - -

Open in editor

-
-
-
+
{selectedAttempt.worktree_path}