feat: add plan mode (enter/exit/completion check/verification gate/periodic hints)
This commit is contained in:
@@ -56,9 +56,9 @@ def render_sidebar():
|
||||
agent._pet_req = _pet_req
|
||||
if not hasattr(agent, '_turn_end_hooks'): agent._turn_end_hooks = {}
|
||||
def _pet_hook(ctx):
|
||||
parts = [f"🔄 Turn {ctx.get('turn','?')}"]
|
||||
parts = [f"Turn {ctx.get('turn','?')}"]
|
||||
if ctx.get('summary'): parts.append(ctx['summary'])
|
||||
if ctx.get('exit_reason'): parts.append('✅ 任务已完成')
|
||||
if ctx.get('exit_reason'): parts.append('任务已完成')
|
||||
_pet_req(f'msg={quote(chr(10).join(parts))}')
|
||||
if ctx.get('exit_reason'): _pet_req('state=idle')
|
||||
agent._turn_end_hooks['pet'] = _pet_hook
|
||||
|
||||
Reference in New Issue
Block a user