From 5e027f9111514f8dfdaf68cdac5fa39939a36415 Mon Sep 17 00:00:00 2001 From: Tahier Hussain Date: Wed, 6 Mar 2024 14:50:45 +0530 Subject: [PATCH 1/6] Implemented re-index --- .../manage-docs-modal/ManageDocsModal.jsx | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.jsx b/frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.jsx index 87e97a980b..d08de85b2d 100644 --- a/frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.jsx +++ b/frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.jsx @@ -1,4 +1,8 @@ -import { DeleteOutlined, PlusOutlined } from "@ant-design/icons"; +import { + DeleteOutlined, + PlusOutlined, + ReloadOutlined, +} from "@ant-design/icons"; import { Button, Divider, @@ -49,6 +53,12 @@ function ManageDocsModal({ dataIndex: "document", key: "document", }, + { + title: "", + dataIndex: "reindex", + key: "reindex", + width: 30, + }, { title: "", dataIndex: "delete", @@ -68,6 +78,17 @@ function ManageDocsModal({ return { key: doc, document: doc || "", + reindex: ( + + + + ), delete: ( handleDelete(doc)} From a864dd3c9a7962709c1189f857c17b708f515a52 Mon Sep 17 00:00:00 2001 From: Tahier Hussain Date: Wed, 6 Mar 2024 14:51:44 +0530 Subject: [PATCH 2/6] Fixed data persistence issue in the summarize modal --- .../select-llm-profile-modal/SelectLlmProfileModal.jsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/custom-tools/select-llm-profile-modal/SelectLlmProfileModal.jsx b/frontend/src/components/custom-tools/select-llm-profile-modal/SelectLlmProfileModal.jsx index 845ebd69ca..e2b197d34c 100644 --- a/frontend/src/components/custom-tools/select-llm-profile-modal/SelectLlmProfileModal.jsx +++ b/frontend/src/components/custom-tools/select-llm-profile-modal/SelectLlmProfileModal.jsx @@ -36,7 +36,7 @@ function SelectLlmProfileModal({ const [isContext, setIsContext] = useState(false); const [isSource, setIsSource] = useState(false); const [isModified, setIsModified] = useState(false); - const { details } = useCustomToolStore(); + const { details, updateCustomTool } = useCustomToolStore(); const { setAlertDetails } = useAlertStore(); useEffect(() => { @@ -97,11 +97,19 @@ function SelectLlmProfileModal({ handleUpdateTool(body) .then(() => { handleBtnText(selectedLlm); + const updatedDetails = { ...details }; + updatedDetails["summarize_llm_profile"] = selectedLlm; + updatedDetails["summarize_prompt"] = prompt; + updatedDetails["summarize_context"] = isContext; + updatedDetails["summarize_as_source"] = isSource; + updateCustomTool({ details: updatedDetails }); + setAlertDetails({ type: "success", content: "Successfully updated the LLM profile", }); setIsModified(false); + setOpen(false); }) .catch((err) => { setAlertDetails( From eddc2ffdb6741b2000830a0951c45eb633193f86 Mon Sep 17 00:00:00 2001 From: Tahier Hussain Date: Wed, 6 Mar 2024 15:00:37 +0530 Subject: [PATCH 3/6] Reverted to the default background color of the PDF viewer --- .../custom-tools/document-manager/DocumentManager.css | 8 -------- 1 file changed, 8 deletions(-) diff --git a/frontend/src/components/custom-tools/document-manager/DocumentManager.css b/frontend/src/components/custom-tools/document-manager/DocumentManager.css index 36c87837bb..788878b2a9 100644 --- a/frontend/src/components/custom-tools/document-manager/DocumentManager.css +++ b/frontend/src/components/custom-tools/document-manager/DocumentManager.css @@ -30,14 +30,6 @@ overflow-y: auto; } -.rpv-default-layout__sidebar-headers { - background-color: #F8FBFF; -} - -.rpv-default-layout__toolbar { - background-color: #F8FBFF; -} - .rpv-default-layout__container { border: 0 !important; } \ No newline at end of file From 004dbfeedd8df013bd9ea913b0abe4b4a976be43 Mon Sep 17 00:00:00 2001 From: Tahier Hussain Date: Wed, 6 Mar 2024 15:01:13 +0530 Subject: [PATCH 4/6] UI Improvements in Output Analyzer --- .../OutputAnalyzerCard.jsx | 38 +++++++++---------- .../OutputAnalyzerHeader.jsx | 2 +- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/frontend/src/components/custom-tools/output-analyzer-card/OutputAnalyzerCard.jsx b/frontend/src/components/custom-tools/output-analyzer-card/OutputAnalyzerCard.jsx index 16b6561600..a0b60e9051 100644 --- a/frontend/src/components/custom-tools/output-analyzer-card/OutputAnalyzerCard.jsx +++ b/frontend/src/components/custom-tools/output-analyzer-card/OutputAnalyzerCard.jsx @@ -78,26 +78,24 @@ function OutputAnalyzerCard({ doc, totalFields }) {
- {fileUrl?.length > 0 && ( - - -
- 0} - > - - -
- - -
- -
- -
- )} + + +
+ 0} + > + + +
+ + +
+ +
+ +
); diff --git a/frontend/src/components/custom-tools/output-analyzer-header/OutputAnalyzerHeader.jsx b/frontend/src/components/custom-tools/output-analyzer-header/OutputAnalyzerHeader.jsx index 1d7c2b93ff..26716836c4 100644 --- a/frontend/src/components/custom-tools/output-analyzer-header/OutputAnalyzerHeader.jsx +++ b/frontend/src/components/custom-tools/output-analyzer-header/OutputAnalyzerHeader.jsx @@ -20,7 +20,7 @@ function OutputAnalyzerHeader() { - Output Viewer + Output Analyzer From 690f8438a7760e4d4264768fdb4ad6134eaa3410 Mon Sep 17 00:00:00 2001 From: Tahier Hussain Date: Wed, 6 Mar 2024 15:23:13 +0530 Subject: [PATCH 5/6] Fixed issue with spaces in the prompt/notes card --- .../src/components/custom-tools/editable-text/EditableText.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/custom-tools/editable-text/EditableText.jsx b/frontend/src/components/custom-tools/editable-text/EditableText.jsx index 6a4e568bdf..ab80e3f9dd 100644 --- a/frontend/src/components/custom-tools/editable-text/EditableText.jsx +++ b/frontend/src/components/custom-tools/editable-text/EditableText.jsx @@ -24,7 +24,7 @@ function EditableText({ useEffect(() => { setText(defaultText); - }, [defaultText]); + }, []); useEffect(() => { // Attach the event listener when the component mounts From 6cbbf496d40b540abc77db53ccebe4c5bffa1fd5 Mon Sep 17 00:00:00 2001 From: Tahier Hussain Date: Thu, 7 Mar 2024 13:23:35 +0530 Subject: [PATCH 6/6] Added loader to the submit button --- .../select-llm-profile-modal/SelectLlmProfileModal.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/components/custom-tools/select-llm-profile-modal/SelectLlmProfileModal.jsx b/frontend/src/components/custom-tools/select-llm-profile-modal/SelectLlmProfileModal.jsx index e2b197d34c..0b9b769651 100644 --- a/frontend/src/components/custom-tools/select-llm-profile-modal/SelectLlmProfileModal.jsx +++ b/frontend/src/components/custom-tools/select-llm-profile-modal/SelectLlmProfileModal.jsx @@ -36,6 +36,7 @@ function SelectLlmProfileModal({ const [isContext, setIsContext] = useState(false); const [isSource, setIsSource] = useState(false); const [isModified, setIsModified] = useState(false); + const [isLoading, setIsLoading] = useState(false); const { details, updateCustomTool } = useCustomToolStore(); const { setAlertDetails } = useAlertStore(); @@ -94,6 +95,7 @@ function SelectLlmProfileModal({ [fieldNames.SUMMARIZE_AS_SOURCE]: isSource, }; + setIsLoading(true); handleUpdateTool(body) .then(() => { handleBtnText(selectedLlm); @@ -115,6 +117,9 @@ function SelectLlmProfileModal({ setAlertDetails( handleException(err, "Failed to update the LLM profile") ); + }) + .finally(() => { + setIsLoading(false); }); }; @@ -200,6 +205,7 @@ function SelectLlmProfileModal({ type="primary" onClick={handleSave} disabled={!isModified} + loading={isLoading} > Save