forked from Rockachopa/Timmy-time-dashboard
Merge pull request 'fix: word-boundary routing + debug route command (#31)' (#102) from fix/routing-patterns into main
This commit is contained in:
@@ -326,5 +326,19 @@ def voice(
|
||||
loop.run()
|
||||
|
||||
|
||||
@app.command()
|
||||
def route(
|
||||
message: str = typer.Argument(..., help="Message to route"),
|
||||
):
|
||||
"""Show which agent would handle a message (debug routing)."""
|
||||
from timmy.agents.loader import route_request_with_match
|
||||
|
||||
agent_id, matched_pattern = route_request_with_match(message)
|
||||
if agent_id:
|
||||
typer.echo(f"→ {agent_id} (matched: {matched_pattern})")
|
||||
else:
|
||||
typer.echo("→ orchestrator (no pattern match)")
|
||||
|
||||
|
||||
def main():
|
||||
app()
|
||||
|
||||
Reference in New Issue
Block a user