mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 19:06:11 +00:00
Wave the agent's progress away, and say how hard it should think
Two things a real command turned up. A job can run for ten minutes. "Report on the front page" is not a question with an answer a second later, and having the corner narrate every tool it touches for those ten minutes is worse than saying nothing. So that indicator can be clicked away. It is the only one that can: a dictation is over in seconds, and an indicator that swallows a click meant for the window underneath has to earn it. The work carries on; what is muted is the progress, not the outcome, which shows up whether or not the box was sent away. A faint cross on the right says the box can be clicked, because a feature nobody can see is not one. The next run starts visible again. Muting leaves the state alone rather than setting it to something hidden, so no later repaint puts the box back on the screen behind its own back. Thinking effort is a setting now, offered once rather than three times: how hard to think is one thing to want, and only the rungs differ. Claude takes it as --effort, Codex as a model_reasoning_effort override, OpenRouter in the reasoning field it already understood for cleanup. A level a provider does not have lands on the nearest one it does, so "maximum" is xhigh on Claude and high on Codex rather than an error or a silent drop. Left alone, nothing is sent and each model does what it would have done.
This commit is contained in:
@@ -209,8 +209,8 @@ def cleanup(text, api_key, model, system_prompt, reasoning="",
|
||||
return content
|
||||
|
||||
|
||||
def chat(messages, api_key, model, system_prompt, base_url=OPENROUTER_URL,
|
||||
timeout=180):
|
||||
def chat(messages, api_key, model, system_prompt, reasoning="",
|
||||
base_url=OPENROUTER_URL, timeout=180):
|
||||
"""A conversation, rather than one transcript rewritten.
|
||||
|
||||
The messages are the whole history and come back unchanged; the caller keeps
|
||||
@@ -223,6 +223,8 @@ def chat(messages, api_key, model, system_prompt, base_url=OPENROUTER_URL,
|
||||
"model": model,
|
||||
"messages": [{"role": "system", "content": system_prompt}] + list(messages),
|
||||
}
|
||||
if reasoning:
|
||||
payload["reasoning"] = {"effort": reasoning, "exclude": True}
|
||||
try:
|
||||
data = _request(
|
||||
f"{base_url.rstrip('/')}/chat/completions",
|
||||
|
||||
Reference in New Issue
Block a user