Fixed bug of fastavro version and form modal memory keys

This commit is contained in:
Lucas Oliveira 2023-08-02 11:37:11 -03:00
commit f5cb771018
3 changed files with 57 additions and 43 deletions

View file

@ -113,6 +113,7 @@ export default function FormModal({
});
};
console.log(tabsState[flow.id])
//add proper type signature for function
function updateLastMessage({
@ -371,10 +372,6 @@ export default function FormModal({
if (lockChat) setLockChat(false);
}
function setModalOpen(x: boolean) {
setOpen(x);
}
function handleOnCheckedChange(checked: boolean, i: string) {
if (checked === true) {
setChatKey(i);
@ -494,52 +491,29 @@ export default function FormModal({
<Badge variant="gray" size="md">
{i}
</Badge>
<div
className="-mb-1"
onClick={(event) => {
event.stopPropagation();
}}
>
<ToggleShadComponent
enabled={chatKey === i}
setEnabled={(value) =>
handleOnCheckedChange(value, i)
}
size="small"
disabled={tabsState[
id.current
].formKeysData.handle_keys.some((t) => t === i)}
/>
</div>
className="-mb-1"
>
<ToggleShadComponent
enabled={chatKey === i}
setEnabled={() => {}
}
size="small"
disabled={true}
/>
</div>
</div>
}
key={k}
keyValue={i}
>
<div className="file-component-tab-column">
{tabsState[id.current].formKeysData.handle_keys.some(
(t) => t === i
) && (
<div className="font-normal text-muted-foreground ">
Source: Component
Source: Memory
</div>
)}
<Textarea
className="custom-scroll"
value={tabsState[id.current].formKeysData.input_keys[i]}
onChange={(e) => {
setTabsState((old) => {
let newTabsState = _.cloneDeep(old);
newTabsState[id.current].formKeysData.input_keys[
i
] = e.target.value;
return newTabsState;
});
}}
disabled={chatKey === i}
placeholder="Enter text..."
></Textarea>
</div>
</AccordionComponent>
</div>