Skip to content

Commit 5582a63

Browse files
[FEAT] Table extractor Enhancements FE (Zipstack#743)
* 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]>
1 parent 9754247 commit 5582a63

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

frontend/src/components/custom-tools/prompt-card/PromptCardItems.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { useCustomToolStore } from "../../../store/custom-tool-store";
1818
import { Header } from "./Header";
1919
import { OutputForIndex } from "./OutputForIndex";
2020
import { PromptOutput } from "./PromptOutput";
21-
import { TABLE_ENFORCE_TYPE } from "./constants";
21+
import { TABLE_ENFORCE_TYPE, RECORD_ENFORCE_TYPE } from "./constants";
2222

2323
let TableExtractionSettingsBtn;
2424
try {
@@ -234,10 +234,12 @@ function PromptCardItems({
234234
</Button>
235235
</Space>
236236
<Space>
237-
{enforceType === TABLE_ENFORCE_TYPE &&
237+
{(enforceType === TABLE_ENFORCE_TYPE ||
238+
enforceType === RECORD_ENFORCE_TYPE) &&
238239
TableExtractionSettingsBtn && (
239240
<TableExtractionSettingsBtn
240241
promptId={promptDetails?.prompt_id}
242+
enforceType={enforceType}
241243
/>
242244
)}
243245
<Select

frontend/src/components/custom-tools/prompt-card/constants.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const TABLE_ENFORCE_TYPE = "table";
2+
const RECORD_ENFORCE_TYPE = "record";
23

34
const handleUpdateStatus = (isUpdate, promptId, value, setUpdateStatus) => {
45
if (!isUpdate) {
@@ -10,4 +11,4 @@ const handleUpdateStatus = (isUpdate, promptId, value, setUpdateStatus) => {
1011
});
1112
};
1213

13-
export { TABLE_ENFORCE_TYPE, handleUpdateStatus };
14+
export { TABLE_ENFORCE_TYPE, handleUpdateStatus, RECORD_ENFORCE_TYPE };

0 commit comments

Comments
 (0)