Show widget input inplace (#535)

* Show widget input inplace

* nit

* nit
This commit is contained in:
Chenlei Hu
2025-02-16 11:37:47 -05:00
committed by GitHub
parent 52a96a14d6
commit 1e71da9a38
3 changed files with 48 additions and 8 deletions

View File

@@ -45,6 +45,14 @@ export function toNodeSlotClass(slot: INodeSlot): NodeSlot {
throw new Error("Invalid slot type")
}
/**
* Whether this slot is an input slot and attached to a widget.
* @param slot - The slot to check.
*/
export function isWidgetInputSlot(slot: INodeSlot): boolean {
return isINodeInputSlot(slot) && !!slot.widget
}
export abstract class NodeSlot implements INodeSlot {
name: string
localized_name?: string