{showUserInstruction ? code_instruct_header : <>>}
-
+
{
- // Make Ace Editor div resizeable.
- editorInstance.container.style.resize = "both";
- document.addEventListener("mouseup", () => editorInstance.resize());
+ aceEditorRef.current = editorInstance;
}}
/>
+ aceEditorRef.current?.resize()}
+ />
);
diff --git a/chainforge/react-server/src/InspectorNode.tsx b/chainforge/react-server/src/InspectorNode.tsx
index 86f8bd6cc..340348ef3 100644
--- a/chainforge/react-server/src/InspectorNode.tsx
+++ b/chainforge/react-server/src/InspectorNode.tsx
@@ -1,4 +1,4 @@
-import React, { useState, useEffect, useContext } from "react";
+import React, { useState, useEffect, useContext, useRef } from "react";
import { Handle, Position } from "reactflow";
import useStore from "./store";
import BaseNode from "./BaseNode";
@@ -7,6 +7,7 @@ import LLMResponseInspector, { exportToExcel } from "./LLMResponseInspector";
import { grabResponses } from "./backend/backend";
import { LLMResponse } from "./backend/typing";
import { AlertModalContext } from "./AlertModal";
+import ResizeHandle from "./ResizeHandle";
export interface InspectorNodeProps {
data: {
@@ -28,6 +29,7 @@ const InspectorNode: React.FC
= ({ data, id }) => {
const inputEdgesForNode = useStore((state) => state.inputEdgesForNode);
const setDataPropsForNode = useStore((state) => state.setDataPropsForNode);
const showAlert = useContext(AlertModalContext);
+ const containerRef = useRef(null);
const handleOnConnect = () => {
// For some reason, 'on connect' is called twice upon connection.
@@ -89,6 +91,7 @@ const InspectorNode: React.FC = ({ data, id }) => {
]}
/>
@@ -97,6 +100,7 @@ const InspectorNode: React.FC = ({ data, id }) => {
isOpen={true}
wideFormat={false}
/>
+
-
-
- {hideTrashIcon ? (
- <>>
- ) : (
-
- )}
+
+
+ {hideTrashIcon ? (
+ <>>
+ ) : (
-
-
+ )}
+