Skip to content

Commit

Permalink
[FEAT] Table extractor Enhancements FE (#743)
Browse files Browse the repository at this point in the history
* Select choices for cloud repo

* Remove choices static file

* Support for Input type

* Reverting support for TSV

* Addition of records

* Choices field addition

* Variable renames

* Adding helper text for record enforce type

* added new enforce type

---------

Signed-off-by: harini-venkataraman <[email protected]>
Co-authored-by: harini-venkataraman <[email protected]>
Co-authored-by: harini-venkataraman <[email protected]>
  • Loading branch information
3 people authored Sep 26, 2024
1 parent 9754247 commit 5582a63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { useCustomToolStore } from "../../../store/custom-tool-store";
import { Header } from "./Header";
import { OutputForIndex } from "./OutputForIndex";
import { PromptOutput } from "./PromptOutput";
import { TABLE_ENFORCE_TYPE } from "./constants";
import { TABLE_ENFORCE_TYPE, RECORD_ENFORCE_TYPE } from "./constants";

let TableExtractionSettingsBtn;
try {
Expand Down Expand Up @@ -234,10 +234,12 @@ function PromptCardItems({
</Button>
</Space>
<Space>
{enforceType === TABLE_ENFORCE_TYPE &&
{(enforceType === TABLE_ENFORCE_TYPE ||
enforceType === RECORD_ENFORCE_TYPE) &&
TableExtractionSettingsBtn && (
<TableExtractionSettingsBtn
promptId={promptDetails?.prompt_id}
enforceType={enforceType}
/>
)}
<Select
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const TABLE_ENFORCE_TYPE = "table";
const RECORD_ENFORCE_TYPE = "record";

const handleUpdateStatus = (isUpdate, promptId, value, setUpdateStatus) => {
if (!isUpdate) {
Expand All @@ -10,4 +11,4 @@ const handleUpdateStatus = (isUpdate, promptId, value, setUpdateStatus) => {
});
};

export { TABLE_ENFORCE_TYPE, handleUpdateStatus };
export { TABLE_ENFORCE_TYPE, handleUpdateStatus, RECORD_ENFORCE_TYPE };

0 comments on commit 5582a63

Please sign in to comment.