File size: 496 Bytes
a6e3889
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""
Thinking mode — full tool access before responding.
Sends an ack immediately, then edits/follows up with the final answer.
"""
from agent.savvy import Savvy


async def run_thinking(savvy: Savvy, user_input: str, ctx: dict) -> str:
    """
    Give tools full access. quick_reply can surface partial info mid-loop.
    Returns the final response text.
    """
    messages = savvy.build_messages(user_input)
    reply, _ = await savvy.reason(messages, ctx, use_tools=True)
    return reply