Before

…lines 1–404 unchanged (404 lines)
405 </Button>
406 </PopoverTrigger>
407 </div>
408 );
409
410 const footerButtonClass =
411 "w-full flex cursor-pointer items-center justify-start gap-2 truncate py-3 text-xs text-muted-foreground px-3 hover:bg-accent group";
412
413 const renderFooterButton = (
414 label: string,
415 icon: string,
416 onClick: () => void,
417 testId?: string,
…lines 418–489 unchanged (72 lines)
490 externalOptions.fields.data.node.icon || "Box",
491 () =>
492 handleExternalOptions(externalOptions.fields.data.node.name || ""),
493 "external-option-button",
494 )}
495
496 {renderFooterButton(
497 "Manage Model Providers",
498 "Settings",
499 () => setOpenManageProvidersDialog(true),
500 "manage-model-providers",
501 )}
502 </div>
503 );
504
505 const renderNoProviders = () => (
506 <CommandList className="max-h-[300px] overflow-y-auto">
507 <CommandItem
…lines 508–555 unchanged (48 lines)

After

…lines 1–404 unchanged (404 lines)
405 </Button>
406 </PopoverTrigger>
407 </div>
408 );
409
410 const footerButtonClass =
411 "w-full flex cursor-pointer items-center justify-start gap-2 truncate py-2 text-xs text-muted-foreground px-3 hover:bg-accent group";
412
413 const renderFooterButton = (
414 label: string,
415 icon: string,
416 onClick: () => void,
417 testId?: string,
…lines 418–480 unchanged (63 lines)
481 "Refresh List",
482 "RefreshCw",
483 handleRefreshButtonPress,
484 "external-option-button",
485 )}
486
487 {renderFooterButton(
488 "Manage Model Providers",
489 "Settings",
490 () => setOpenManageProvidersDialog(true),
491 "manage-model-providers",
492 )}
493
494 {externalOptions?.fields?.data?.node &&
495 renderFooterButton(
496 externalOptions.fields.data.node.display_name,
497 externalOptions.fields.data.node.icon || "Box",
498 () =>
…lines 499–555 unchanged (57 lines)

Before

program
import_statement (+26 nodes collapsed)
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "mutateTemplate"
} "}"
from "from"
string
" "\""
string_fragment "@/CustomNodes/helpers/mutate-template"
" "\""
; ";"
import_statement
import "import"
import_clause
identifier "LoadingTextComponent"
from "from"
string
" "\""
string_fragment "@/components/common/loadingTextComponent"
" "\""
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "RECEIVING_INPUT_VALUE"
} "}"
from "from"
string
" "\""
string_fragment "@/constants/constants"
" "\""
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "useGetModelProviders"
} "}"
from "from"
string
" "\""
string_fragment "@/controllers/API/queries/models/use-get-model-providers"
" "\""
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "usePostTemplateValue"
} "}"
from "from"
string
" "\""
string_fragment "@/controllers/API/queries/nodes/use-post-template-value"
" "\""
; ";"
import_statement
import "import"
import_clause
identifier "ModelProviderModal"
from "from"
string
" "\""
string_fragment "@/modals/modelProviderModal"
" "\""
; ";"
import_statement
import "import"
import_clause
identifier "useAlertStore"
from "from"
string
" "\""
string_fragment "@/stores/alertStore"
" "\""
; ";"
import_statement
import "import"
import_clause
identifier "useFlowStore"
from "from"
string
" "\""
string_fragment "@/stores/flowStore"
" "\""
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "useTypesStore"
} "}"
from "from"
string
" "\""
string_fragment "@/stores/typesStore"
" "\""
; ";"
import_statement
import "import"
type "type"
import_clause
named_imports
{ "{"
import_specifier
identifier "APIClassType"
} "}"
from "from"
string
" "\""
string_fragment "@/types/api"
" "\""
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "scapedJSONStringfy"
} "}"
from "from"
string
" "\""
string_fragment "@/utils/reactflowUtils"
" "\""
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "cn"
, ","
import_specifier
identifier "groupByFamily"
} "}"
from "from"
string
" "\""
string_fragment "@/utils/utils"
" "\""
; ";"
import_statement
import "import"
import_clause
identifier "ForwardedIconComponent"
from "from"
string
" "\""
string_fragment "../../../../common/genericIconComponent"
" "\""
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "Button"
} "}"
from "from"
string
" "\""
string_fragment "../../../../ui/button"
" "\""
; ";"
import_statement (+24 nodes collapsed)
import_statement (+21 nodes collapsed)
import_statement
import "import"
type "type"
import_clause
named_imports
{ "{"
import_specifier
identifier "BaseInputProps"
} "}"
from "from"
string
" "\""
string_fragment "../../types"
" "\""
; ";"
comment "/** Represents a single model option in the dropdown */"
export_statement (+53 nodes collapsed)
export_statement (+34 nodes collapsed)
export_statement
export "export"
type_alias_declaration
type "type"
type_identifier "SelectedModel"
= "="
type_identifier "ModelOption"
; ";"
export_statement
export "export"
default "default"
function_declaration
function "function"
identifier "ModelInputComponent"
formal_parameters (+50 nodes collapsed)
type_annotation
: ":"
nested_type_identifier
identifier "JSX"
. "."
type_identifier "Element"
statement_block
{ "{"
lexical_declaration
const "const"
variable_declarator
object_pattern
{ "{"
shorthand_property_identifier_pattern "setErrorData"
} "}"
= "="
call_expression
identifier "useAlertStore"
arguments
( "("
) ")"
; ";"
lexical_declaration
const "const"
variable_declarator
identifier "refButton"
= "="
call_expression
identifier "useRef"
type_arguments
< "<"
type_identifier "HTMLButtonElement"
> ">"
arguments
( "("
null "null"
) ")"
; ";"
lexical_declaration
const "const"
variable_declarator
array_pattern
[ "["
identifier "open"
, ","
identifier "setOpen"
] "]"
= "="
call_expression
identifier "useState"
arguments
( "("
false "false"
) ")"
; ";"
lexical_declaration
const "const"
variable_declarator
array_pattern
[ "["
identifier "refreshOptions"
, ","
identifier "setRefreshOptions"
] "]"
= "="
call_expression
identifier "useState"
arguments
( "("
false "false"
) ")"
; ";"
lexical_declaration (+26 nodes collapsed)
lexical_declaration
const "const"
variable_declarator
array_pattern
[ "["
identifier "openManageProvidersDialog"
, ","
identifier "setOpenManageProvidersDialog"
] "]"
= "="
call_expression
identifier "useState"
arguments
( "("
false "false"
) ")"
; ";"
comment "// Ref to track if we've already processed the empty options"...
comment "// Prevents infinite loop when no models are available"
lexical_declaration
const "const"
variable_declarator
identifier "hasProcessedEmptyRef"
= "="
call_expression
identifier "useRef"
arguments
( "("
false "false"
) ")"
; ";"
lexical_declaration (+46 nodes collapsed)
lexical_declaration (+36 nodes collapsed)
lexical_declaration (+25 nodes collapsed)
comment "// Determines if we should show the model selector or the \"S"...
lexical_declaration (+47 nodes collapsed)
comment "// Groups models by their provider name for sectioned displa"...
comment "// Filters out models from disabled providers."
lexical_declaration (+117 nodes collapsed)
comment "// Flattened array of all enabled options for efficient look"...
lexical_declaration (+38 nodes collapsed)
comment "// Sync local selectedModel state with the external value pr"...
comment "// Handles three cases: no available models (clear selection"...
comment "// or current value is invalid/missing (select first availab"...
expression_statement (+356 nodes collapsed)
comment "/**\n * Handles model selection from the dropdown.\n * Con"...
lexical_declaration (+180 nodes collapsed)
comment "/**\n * Triggers a refresh of available model options from "...
lexical_declaration (+101 nodes collapsed)
lexical_declaration (+39 nodes collapsed)
lexical_declaration (+582 nodes collapsed)
lexical_declaration (+57 nodes collapsed)
lexical_declaration (+78 nodes collapsed)
comment "// Renders either a \"Setup Provider\" button (no providers) o"...
lexical_declaration (+401 nodes collapsed)
lexical_declaration
const "const"
variable_declarator
identifier "footerButtonClass"
= "="
string
" "\""
string_fragment "w-full flex cursor-pointer items-center justify-start gap-2 "...
" "\""
; ";"
lexical_declaration (+118 nodes collapsed)
lexical_declaration (+362 nodes collapsed)
lexical_declaration
const "const"
variable_declarator
identifier "renderManageProvidersButton"
= "="
arrow_function
formal_parameters
( "("
) ")"
=> "=>"
parenthesized_expression
( "("
jsx_element
jsx_opening_element
< "<"
identifier "div"
jsx_attribute
property_identifier "className"
= "="
string
" "\""
string_fragment "sticky bottom-0 bg-background"
" "\""
> ">"
jsx_expression (+25 nodes collapsed)
jsx_expression (+91 nodes collapsed)
jsx_expression (+35 nodes collapsed)
jsx_closing_element
</ "</"
identifier "div"
> ">"
) ")"
; ";"
lexical_declaration (+49 nodes collapsed)
lexical_declaration (+126 nodes collapsed)
comment "// Loading state"
if_statement (+50 nodes collapsed)
comment "// Main render"
return_statement (+108 nodes collapsed)
} "}"

After

program
import_statement (+26 nodes collapsed)
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "mutateTemplate"
} "}"
from "from"
string
" "\""
string_fragment "@/CustomNodes/helpers/mutate-template"
" "\""
; ";"
import_statement
import "import"
import_clause
identifier "LoadingTextComponent"
from "from"
string
" "\""
string_fragment "@/components/common/loadingTextComponent"
" "\""
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "RECEIVING_INPUT_VALUE"
} "}"
from "from"
string
" "\""
string_fragment "@/constants/constants"
" "\""
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "useGetModelProviders"
} "}"
from "from"
string
" "\""
string_fragment "@/controllers/API/queries/models/use-get-model-providers"
" "\""
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "usePostTemplateValue"
} "}"
from "from"
string
" "\""
string_fragment "@/controllers/API/queries/nodes/use-post-template-value"
" "\""
; ";"
import_statement
import "import"
import_clause
identifier "ModelProviderModal"
from "from"
string
" "\""
string_fragment "@/modals/modelProviderModal"
" "\""
; ";"
import_statement
import "import"
import_clause
identifier "useAlertStore"
from "from"
string
" "\""
string_fragment "@/stores/alertStore"
" "\""
; ";"
import_statement
import "import"
import_clause
identifier "useFlowStore"
from "from"
string
" "\""
string_fragment "@/stores/flowStore"
" "\""
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "useTypesStore"
} "}"
from "from"
string
" "\""
string_fragment "@/stores/typesStore"
" "\""
; ";"
import_statement
import "import"
type "type"
import_clause
named_imports
{ "{"
import_specifier
identifier "APIClassType"
} "}"
from "from"
string
" "\""
string_fragment "@/types/api"
" "\""
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "scapedJSONStringfy"
} "}"
from "from"
string
" "\""
string_fragment "@/utils/reactflowUtils"
" "\""
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "cn"
, ","
import_specifier
identifier "groupByFamily"
} "}"
from "from"
string
" "\""
string_fragment "@/utils/utils"
" "\""
; ";"
import_statement
import "import"
import_clause
identifier "ForwardedIconComponent"
from "from"
string
" "\""
string_fragment "../../../../common/genericIconComponent"
" "\""
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "Button"
} "}"
from "from"
string
" "\""
string_fragment "../../../../ui/button"
" "\""
; ";"
import_statement (+24 nodes collapsed)
import_statement (+21 nodes collapsed)
import_statement
import "import"
type "type"
import_clause
named_imports
{ "{"
import_specifier
identifier "BaseInputProps"
} "}"
from "from"
string
" "\""
string_fragment "../../types"
" "\""
; ";"
comment "/** Represents a single model option in the dropdown */"
export_statement (+53 nodes collapsed)
export_statement (+34 nodes collapsed)
export_statement
export "export"
type_alias_declaration
type "type"
type_identifier "SelectedModel"
= "="
type_identifier "ModelOption"
; ";"
export_statement
export "export"
default "default"
function_declaration
function "function"
identifier "ModelInputComponent"
formal_parameters (+50 nodes collapsed)
type_annotation
: ":"
nested_type_identifier
identifier "JSX"
. "."
type_identifier "Element"
statement_block
{ "{"
lexical_declaration
const "const"
variable_declarator
object_pattern
{ "{"
shorthand_property_identifier_pattern "setErrorData"
} "}"
= "="
call_expression
identifier "useAlertStore"
arguments
( "("
) ")"
; ";"
lexical_declaration
const "const"
variable_declarator
identifier "refButton"
= "="
call_expression
identifier "useRef"
type_arguments
< "<"
type_identifier "HTMLButtonElement"
> ">"
arguments
( "("
null "null"
) ")"
; ";"
lexical_declaration
const "const"
variable_declarator
array_pattern
[ "["
identifier "open"
, ","
identifier "setOpen"
] "]"
= "="
call_expression
identifier "useState"
arguments
( "("
false "false"
) ")"
; ";"
lexical_declaration
const "const"
variable_declarator
array_pattern
[ "["
identifier "refreshOptions"
, ","
identifier "setRefreshOptions"
] "]"
= "="
call_expression
identifier "useState"
arguments
( "("
false "false"
) ")"
; ";"
lexical_declaration (+26 nodes collapsed)
lexical_declaration
const "const"
variable_declarator
array_pattern
[ "["
identifier "openManageProvidersDialog"
, ","
identifier "setOpenManageProvidersDialog"
] "]"
= "="
call_expression
identifier "useState"
arguments
( "("
false "false"
) ")"
; ";"
comment "// Ref to track if we've already processed the empty options"...
comment "// Prevents infinite loop when no models are available"
lexical_declaration
const "const"
variable_declarator
identifier "hasProcessedEmptyRef"
= "="
call_expression
identifier "useRef"
arguments
( "("
false "false"
) ")"
; ";"
lexical_declaration (+46 nodes collapsed)
lexical_declaration (+36 nodes collapsed)
lexical_declaration (+25 nodes collapsed)
comment "// Determines if we should show the model selector or the \"S"...
lexical_declaration (+47 nodes collapsed)
comment "// Groups models by their provider name for sectioned displa"...
comment "// Filters out models from disabled providers."
lexical_declaration (+117 nodes collapsed)
comment "// Flattened array of all enabled options for efficient look"...
lexical_declaration (+38 nodes collapsed)
comment "// Sync local selectedModel state with the external value pr"...
comment "// Handles three cases: no available models (clear selection"...
comment "// or current value is invalid/missing (select first availab"...
expression_statement (+356 nodes collapsed)
comment "/**\n * Handles model selection from the dropdown.\n * Con"...
lexical_declaration (+180 nodes collapsed)
comment "/**\n * Triggers a refresh of available model options from "...
lexical_declaration (+101 nodes collapsed)
lexical_declaration (+39 nodes collapsed)
lexical_declaration (+582 nodes collapsed)
lexical_declaration (+57 nodes collapsed)
lexical_declaration (+78 nodes collapsed)
comment "// Renders either a \"Setup Provider\" button (no providers) o"...
lexical_declaration (+401 nodes collapsed)
lexical_declaration
const "const"
variable_declarator
identifier "footerButtonClass"
= "="
string
" "\""
string_fragment "w-full flex cursor-pointer items-center justify-start gap-2 "...
" "\""
; ";"
lexical_declaration (+118 nodes collapsed)
lexical_declaration (+362 nodes collapsed)
lexical_declaration
const "const"
variable_declarator
identifier "renderManageProvidersButton"
= "="
arrow_function
formal_parameters
( "("
) ")"
=> "=>"
parenthesized_expression
( "("
jsx_element
jsx_opening_element
< "<"
identifier "div"
jsx_attribute
property_identifier "className"
= "="
string
" "\""
string_fragment "sticky bottom-0 bg-background"
" "\""
> ">"
jsx_expression (+25 nodes collapsed)
jsx_expression (+35 nodes collapsed)
jsx_expression (+91 nodes collapsed)
jsx_closing_element
</ "</"
identifier "div"
> ">"
) ")"
; ";"
lexical_declaration (+49 nodes collapsed)
lexical_declaration (+126 nodes collapsed)
comment "// Loading state"
if_statement (+50 nodes collapsed)
comment "// Main render"
return_statement (+108 nodes collapsed)
} "}"