forked from Rockachopa/Timmy-time-dashboard
TIMMY_STATUS_PROMPT was defined in timmy/prompts.py and covered by tests, but never wired into the application. The CLI status command was passing a hardcoded inline string instead. Replace the inline string with the canonical prompt and add two CLI tests that verify the correct prompt is used. https://claude.ai/code/session_01DMjQ5qMZ8iHeyix1j3GS7c
32 lines
781 B
Python
32 lines
781 B
Python
import typer
|
|
|
|
from timmy.agent import create_timmy
|
|
from timmy.prompts import TIMMY_STATUS_PROMPT
|
|
|
|
app = typer.Typer(help="Timmy — sovereign AI agent")
|
|
|
|
|
|
@app.command()
|
|
def think(topic: str = typer.Argument(..., help="Topic to reason about")):
|
|
"""Ask Timmy to think carefully about a topic."""
|
|
timmy = create_timmy()
|
|
timmy.print_response(f"Think carefully about: {topic}", stream=True)
|
|
|
|
|
|
@app.command()
|
|
def chat(message: str = typer.Argument(..., help="Message to send")):
|
|
"""Send a message to Timmy."""
|
|
timmy = create_timmy()
|
|
timmy.print_response(message, stream=True)
|
|
|
|
|
|
@app.command()
|
|
def status():
|
|
"""Print Timmy's operational status."""
|
|
timmy = create_timmy()
|
|
timmy.print_response(TIMMY_STATUS_PROMPT, stream=False)
|
|
|
|
|
|
def main():
|
|
app()
|