+
+
CodeEditor Workflows
+
+
+
+ {workflows.length === 0 ? (
+
+ {loading ? 'Loading workflows...' : 'No workflows yet. Start a conversation in the Editor view.'}
+
+ ) : (
+
+
+
+ | Label |
+ Status |
+ Started |
+ Last Activity |
+
+
+
+ {workflows.map(wf => (
+
+ | {wf.label || wf.id.slice(0, 8)} |
+
+
+ {wf.status || 'unknown'}
+
+ |
+ {wf.startedAt ? new Date(wf.startedAt * 1000).toLocaleString() : '-'} |
+ {wf.lastActivity ? new Date(wf.lastActivity * 1000).toLocaleString() : '-'} |
+
+ ))}
+
+
+ )}
+
+ );
+};
diff --git a/src/pages/views/codeeditor/index.ts b/src/pages/views/codeeditor/index.ts
index 56786b7..7a4288b 100644
--- a/src/pages/views/codeeditor/index.ts
+++ b/src/pages/views/codeeditor/index.ts
@@ -1 +1,2 @@
export { CodeEditorPage } from './CodeEditorPage';
+export { CodeEditorWorkflowsPage } from './CodeEditorWorkflowsPage';
diff --git a/src/pages/views/codeeditor/useCodeEditor.ts b/src/pages/views/codeeditor/useCodeEditor.ts
index 98ab8e7..2101563 100644
--- a/src/pages/views/codeeditor/useCodeEditor.ts
+++ b/src/pages/views/codeeditor/useCodeEditor.ts
@@ -1,8 +1,8 @@
/**
* useCodeEditor Hook
*
- * Manages SSE connection, file selection, message state, and edit proposals
- * for the CodeEditor feature.
+ * Manages SSE connection, file selection, message state, edit proposals,
+ * and agent mode progress for the CodeEditor feature.
*/
import { useState, useCallback, useRef, useEffect } from 'react';
@@ -12,6 +12,13 @@ import type { Message } from '../../../components/UiComponents/Messages/Messages
import type { FileInfo } from './FileListPanel';
import type { FileEditProposal } from './DiffPreviewPanel';
+export interface AgentProgress {
+ round: number;
+ totalAiCalls: number;
+ totalToolCalls: number;
+ costCHF: number;
+}
+
interface UseCodeEditorReturn {
messages: Message[];
selectedFileIds: string[];
@@ -20,9 +27,10 @@ interface UseCodeEditorReturn {
acceptEdit: (editId: string) => void;
rejectEdit: (editId: string) => void;
isProcessing: boolean;
- sendMessage: (prompt: string, fileIds: string[]) => void;
+ sendMessage: (prompt: string, fileIds: string[], mode?: 'simple' | 'agent') => void;
stopProcessing: () => void;
files: FileInfo[];
+ agentProgress: AgentProgress | null;
}
export function useCodeEditor(instanceId: string): UseCodeEditorReturn {
@@ -32,6 +40,7 @@ export function useCodeEditor(instanceId: string): UseCodeEditorReturn {
const [isProcessing, setIsProcessing] = useState(false);
const [files, setFiles] = useState