Commit 977b4d38 by sunqi02 Committed by 胡悦

refactor: simplify GateDecision to single intent field

1 parent 9f14b3dc
......@@ -20,10 +20,7 @@ logger = logging.getLogger(__name__)
@dataclass
class GateDecision:
"""MessageGate 评估后输出的决策结果。"""
intent: str # actionable | casual | incomplete | ignore
rewritten_query: Optional[str] = None
reply: Optional[str] = None
cancel: bool = False # 暂未使用,Phase 2 启用
intent: str # chat | pass
class MessageGate:
......
......@@ -29,10 +29,8 @@ def test_message_gate_can_be_constructed():
def test_gate_decision_dataclass_defaults():
"""GateDecision 默认字段正确。"""
d = GateDecision(intent="ignore")
assert d.intent == "ignore"
assert d.rewritten_query is None
assert d.reply is None
d = GateDecision(intent="chat")
assert d.intent == "chat"
import asyncio
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!