Fixed formModal
This commit is contained in:
parent
3733743da3
commit
214aef76bf
1 changed files with 6 additions and 40 deletions
|
|
@ -112,7 +112,6 @@ export default function FormModal({
|
||||||
return newChat;
|
return newChat;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//add proper type signature for function
|
//add proper type signature for function
|
||||||
|
|
||||||
function updateLastMessage({
|
function updateLastMessage({
|
||||||
|
|
@ -371,10 +370,6 @@ export default function FormModal({
|
||||||
if (lockChat) setLockChat(false);
|
if (lockChat) setLockChat(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setModalOpen(x: boolean) {
|
|
||||||
setOpen(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleOnCheckedChange(checked: boolean, i: string) {
|
function handleOnCheckedChange(checked: boolean, i: string) {
|
||||||
if (checked === true) {
|
if (checked === true) {
|
||||||
setChatKey(i);
|
setChatKey(i);
|
||||||
|
|
@ -494,22 +489,12 @@ export default function FormModal({
|
||||||
<Badge variant="gray" size="md">
|
<Badge variant="gray" size="md">
|
||||||
{i}
|
{i}
|
||||||
</Badge>
|
</Badge>
|
||||||
|
<div className="-mb-1">
|
||||||
<div
|
|
||||||
className="-mb-1"
|
|
||||||
onClick={(event) => {
|
|
||||||
event.stopPropagation();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<ToggleShadComponent
|
<ToggleShadComponent
|
||||||
enabled={chatKey === i}
|
enabled={chatKey === i}
|
||||||
setEnabled={(value) =>
|
setEnabled={() => {}}
|
||||||
handleOnCheckedChange(value, i)
|
|
||||||
}
|
|
||||||
size="small"
|
size="small"
|
||||||
disabled={tabsState[
|
disabled={true}
|
||||||
id.current
|
|
||||||
].formKeysData.handle_keys.some((t) => t === i)}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -518,28 +503,9 @@ export default function FormModal({
|
||||||
keyValue={i}
|
keyValue={i}
|
||||||
>
|
>
|
||||||
<div className="file-component-tab-column">
|
<div className="file-component-tab-column">
|
||||||
{tabsState[id.current].formKeysData.handle_keys.some(
|
|
||||||
(t) => t === i
|
|
||||||
) && (
|
|
||||||
<div className="font-normal text-muted-foreground ">
|
<div className="font-normal text-muted-foreground ">
|
||||||
Source: Component
|
Source: Memory
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</AccordionComponent>
|
</AccordionComponent>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue