diff --git a/ui/src/pages/AgentDetail.tsx b/ui/src/pages/AgentDetail.tsx index 49c7e2bd..22823e99 100644 --- a/ui/src/pages/AgentDetail.tsx +++ b/ui/src/pages/AgentDetail.tsx @@ -1509,6 +1509,8 @@ function PromptsTab({ } | null>(null); const [newFilePath, setNewFilePath] = useState(""); const [expandedDirs, setExpandedDirs] = useState>(new Set()); + const [filePanelWidth, setFilePanelWidth] = useState(260); + const containerRef = useRef(null); const [awaitingRefresh, setAwaitingRefresh] = useState(false); const lastFileVersionRef = useRef(null); @@ -1716,6 +1718,27 @@ function PromptsTab({ } : null); }, [bundle, isDirty, onCancelActionChange]); + const handleSeparatorDrag = useCallback((event: React.MouseEvent) => { + event.preventDefault(); + const startX = event.clientX; + const startWidth = filePanelWidth; + const onMouseMove = (moveEvent: MouseEvent) => { + const delta = moveEvent.clientX - startX; + const next = Math.max(180, Math.min(500, startWidth + delta)); + setFilePanelWidth(next); + }; + const onMouseUp = () => { + document.removeEventListener("mousemove", onMouseMove); + document.removeEventListener("mouseup", onMouseUp); + document.body.style.cursor = ""; + document.body.style.userSelect = ""; + }; + document.addEventListener("mousemove", onMouseMove); + document.addEventListener("mouseup", onMouseUp); + document.body.style.cursor = "col-resize"; + document.body.style.userSelect = "none"; + }, [filePanelWidth]); + if (!isLocal) { return (
@@ -1732,29 +1755,18 @@ function PromptsTab({ return (
-
-
-
-

Instructions Bundle

-

- Configure your agent's behavior with instructions -

-
-
- {bundle?.files.length ?? 0} files -
+ {(bundle?.warnings ?? []).length > 0 && ( +
+ {(bundle?.warnings ?? []).map((warning) => ( +
+ {warning} +
+ ))}
+ )} - {(bundle?.warnings ?? []).map((warning) => ( -
- {warning} -
- ))} - -
- -
-
+
+

Files

- -
- -
- - -
- - -
-
+ {/* Draggable separator */} +
+ +

{selectedOrEntryFile}

@@ -2004,6 +1901,127 @@ function PromptsTab({ )}
+ + + + + Advanced + + + + +
+ + +
+
+
+
); }