feat:意图识别优化
This commit is contained in:
@@ -13,6 +13,7 @@ from app.processor.state import QueryState
|
||||
from app.prompt.action import build_action_prompt
|
||||
from app.schemas.action_validation import ActionValidationError, schema_errors
|
||||
from app.schemas.actions import ActionBatch, AddAction
|
||||
from app.schemas.operations import is_direct_operation
|
||||
|
||||
|
||||
def can_generate_actions(state: QueryState) -> bool:
|
||||
@@ -47,12 +48,7 @@ def action_block_reason(state: QueryState) -> str | None:
|
||||
unsupported = [
|
||||
f"{change.target_scope}/{change.operation}"
|
||||
for change in requirement.changes
|
||||
if not (
|
||||
change.target_scope == "nodes"
|
||||
and change.operation in ("move", "resize", "update", "delete")
|
||||
or change.target_scope == "canvas"
|
||||
and change.operation in ("update", "resize", "update_canvas")
|
||||
)
|
||||
if not is_direct_operation(change.target_scope, change.operation)
|
||||
]
|
||||
|
||||
# 如果存在不支持的操作,按出现顺序去重后返回原因,便于展示失败信息
|
||||
|
||||
Reference in New Issue
Block a user