Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

fixed notes disappearing issue in prompt studio (#66)

jagadeeswaran-zipstackb9f1bcc631ee
diff --git a/frontend/src/components/custom-tools/add-llm-profile-modal/AddLlmProfileModal.jsx b/frontend/src/components/custom-tools/add-llm-profile-modal/AddLlmProfileModal.jsx
index 76d8d6d04..a3afdec67 100644
--- a/frontend/src/components/custom-tools/add-llm-profile-modal/AddLlmProfileModal.jsx
+++ b/frontend/src/components/custom-tools/add-llm-profile-modal/AddLlmProfileModal.jsx
@@ -45,6 +45,7 @@ function AddLlmProfileModal({
const [embeddingItems, setEmbeddingItems] = useState([]);
const [x2TextItems, setX2TextItems] = useState([]);
const [activeKey, setActiveKey] = useState(false);
+ const [loading, setLoading] = useState(false);
const { sessionDetails } = useSessionStore();
const { getDropdownItems, llmProfiles, updateCustomTool } =
useCustomToolStore();
@@ -291,6 +292,7 @@ function AddLlmProfileModal({
];
const handleSubmit = () => {
+ setLoading(true);
let method = "POST";
let url = `/api/v1/unstract/${sessionDetails?.orgId}/prompt-studio/profile-manager/`;
@@ -332,6 +334,9 @@ function AddLlmProfileModal({
})
.catch((err) => {
setAlertDetails(handleException(err));
+ })
+ .finally(() => {
+ setLoading(false);
});
};
@@ -521,7 +526,7 @@ function AddLlmProfileModal({
<Form.Item className="pre-post-amble-footer display-flex-right">
<Space>
<CustomButton onClick={() => setOpen(false)}>Cancel</CustomButton>
- <CustomButton type="primary" htmlType="submit">
+ <CustomButton type="primary" htmlType="submit" loading={loading}>
{editLlmProfileId ? "Update" : "Add"}
</CustomButton>
</Space>
diff --git a/frontend/src/components/custom-tools/editable-text/EditableText.jsx b/frontend/src/components/custom-tools/editable-text/EditableText.jsx
index 56c777e6b..fe6a1253c 100644
--- a/frontend/src/components/custom-tools/editable-text/EditableText.jsx
+++ b/frontend/src/components/custom-tools/editable-text/EditableText.jsx
@@ -58,7 +58,7 @@ function EditableText({
if (!triggerHandleChange) {
return;
}
- handleChange(text, promptId, name, true, true);
+ handleChange(text, promptId, name, true, false);
setTriggerHandleChange(false);
}, [triggerHandleChange]);