Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function EditableText({

useEffect(() => {
setText(defaultText);
}, [defaultText]);
}, []);

useEffect(() => {
// Attach the event listener when the component mounts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { DeleteOutlined, PlusOutlined } from "@ant-design/icons";
import {
DeleteOutlined,
PlusOutlined,
ReloadOutlined,
} from "@ant-design/icons";
import {
Button,
Divider,
Expand Down Expand Up @@ -49,6 +53,12 @@ function ManageDocsModal({
dataIndex: "document",
key: "document",
},
{
title: "",
dataIndex: "reindex",
key: "reindex",
width: 30,
},
{
title: "",
dataIndex: "delete",
Expand All @@ -68,6 +78,17 @@ function ManageDocsModal({
return {
key: doc,
document: doc || "",
reindex: (
<Tooltip title="Re-Index">
<Button
size="small"
className="display-flex-align-center"
onClick={() => generateIndex(doc)}
>
<ReloadOutlined className="manage-llm-pro-icon" />
</Button>
</Tooltip>
),
delete: (
<ConfirmModal
handleConfirm={() => handleDelete(doc)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,24 @@ function OutputAnalyzerCard({ doc, totalFields }) {
</Flex>
</div>
<div className="output-analyzer-main">
{fileUrl?.length > 0 && (
<Row className="height-100">
<Col span={12} className="height-100">
<div className="output-analyzer-left-box">
<DocumentViewer
doc={doc}
isLoading={isDocLoading}
isContentAvailable={fileUrl?.length > 0}
>
<PdfViewer fileUrl={fileUrl} />
</DocumentViewer>
</div>
</Col>
<Col span={12} className="height-100">
<div className="output-analyzer-right-box">
<CombinedOutput doc={doc} setFilledFields={setFilledFields} />
</div>
</Col>
</Row>
)}
<Row className="height-100">
<Col span={12} className="height-100">
<div className="output-analyzer-left-box">
<DocumentViewer
doc={doc}
isLoading={isDocLoading}
isContentAvailable={fileUrl?.length > 0}
>
<PdfViewer fileUrl={fileUrl} />
</DocumentViewer>
</div>
</Col>
<Col span={12} className="height-100">
<div className="output-analyzer-right-box">
<CombinedOutput doc={doc} setFilledFields={setFilledFields} />
</div>
</Col>
</Row>
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function OutputAnalyzerHeader() {
<ArrowLeftOutlined />
</Button>
<Typography.Text className="font-size-16" strong>
Output Viewer
Output Analyzer
</Typography.Text>
</Space>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ function SelectLlmProfileModal({
const [isContext, setIsContext] = useState(false);
const [isSource, setIsSource] = useState(false);
const [isModified, setIsModified] = useState(false);
const { details } = useCustomToolStore();
const [isLoading, setIsLoading] = useState(false);
const { details, updateCustomTool } = useCustomToolStore();
const { setAlertDetails } = useAlertStore();

useEffect(() => {
Expand Down Expand Up @@ -94,19 +95,31 @@ function SelectLlmProfileModal({
[fieldNames.SUMMARIZE_AS_SOURCE]: isSource,
};

setIsLoading(true);
handleUpdateTool(body)
Comment thread
jaags-dev marked this conversation as resolved.
.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(
handleException(err, "Failed to update the LLM profile")
);
})
.finally(() => {
setIsLoading(false);
});
};

Expand Down Expand Up @@ -192,6 +205,7 @@ function SelectLlmProfileModal({
type="primary"
onClick={handleSave}
disabled={!isModified}
loading={isLoading}
>
Save
</CustomButton>
Expand Down