1
0

fix: pause thought counter during idle periods (#319)

Co-authored-by: Kimi Agent <kimi@timmy.local>
Co-committed-by: Kimi Agent <kimi@timmy.local>
This commit is contained in:
2026-03-18 19:12:14 -04:00
committed by hermes
parent 9a21a4b0ff
commit 8ef0ad1778
4 changed files with 37 additions and 0 deletions

View File

@@ -79,6 +79,14 @@ async def api_chat(request: Request):
if not last_user_msg:
return JSONResponse(status_code=400, content={"error": "No user message found"})
# Record user activity so the thinking engine knows we're not idle
try:
from timmy.thinking import thinking_engine
thinking_engine.record_user_input()
except Exception:
pass
timestamp = datetime.now().strftime("%H:%M:%S")
try: