mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-16 07:20:59 +00:00
还是修不好
This commit is contained in:
@@ -70,6 +70,18 @@ class NodeTypeRegistry:
|
|||||||
if node_class.type_name == node_type:
|
if node_class.type_name == node_type:
|
||||||
return node_class
|
return node_class
|
||||||
|
|
||||||
|
# Lazy-process pending registrations so execution paths that didn't
|
||||||
|
# explicitly warm the registry can still resolve newly imported nodes.
|
||||||
|
if get_pending_registrations():
|
||||||
|
self.process_pending_registrations()
|
||||||
|
|
||||||
|
if node_type in self._nodes:
|
||||||
|
return self._nodes[node_type]
|
||||||
|
|
||||||
|
for registered_type, node_class in self._nodes.items():
|
||||||
|
if node_class.type_name == node_type:
|
||||||
|
return node_class
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def create_instance(self, node_type: str, node_id: str, config: dict[str, Any], ap: Optional['app.Application'] = None) -> Optional[WorkflowNode]:
|
def create_instance(self, node_type: str, node_id: str, config: dict[str, Any], ap: Optional['app.Application'] = None) -> Optional[WorkflowNode]:
|
||||||
|
|||||||
Reference in New Issue
Block a user