fix: made tool_mode components minimizable (#6237)
Fixed count handles function to allow tool_mode to minimize Co-authored-by: anovazzi1 <otavio2204@gmail.com>
This commit is contained in:
parent
fda2f17a9f
commit
a64f3764be
1 changed files with 5 additions and 1 deletions
|
|
@ -9,8 +9,10 @@ export function countHandlesFn(data: NodeDataType): number {
|
||||||
)
|
)
|
||||||
.map((templateCamp) => {
|
.map((templateCamp) => {
|
||||||
const { template } = data.node!;
|
const { template } = data.node!;
|
||||||
if (template[templateCamp]?.input_types) return true;
|
if (template[templateCamp]?.tool_mode && data.node?.tool_mode)
|
||||||
|
return false;
|
||||||
if (!template[templateCamp]?.show) return false;
|
if (!template[templateCamp]?.show) return false;
|
||||||
|
if (template[templateCamp]?.input_types) return true;
|
||||||
switch (template[templateCamp]?.type) {
|
switch (template[templateCamp]?.type) {
|
||||||
case "str":
|
case "str":
|
||||||
case "bool":
|
case "bool":
|
||||||
|
|
@ -18,8 +20,10 @@ export function countHandlesFn(data: NodeDataType): number {
|
||||||
case "code":
|
case "code":
|
||||||
case "prompt":
|
case "prompt":
|
||||||
case "file":
|
case "file":
|
||||||
|
case "table":
|
||||||
case "int":
|
case "int":
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue