You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e694e23
Browse filesBrowse the repository at this point in the historyBrowse files
feat: cut a streaming answer short when new guidance arrives
Guidance injected before the next LLM call still had to wait for the answer that
was already streaming, so a long text answer could not be redirected until it
finished on its own.
The session now tracks the streaming request separately from the turn. When the
user sends guidance while an answer is streaming, that request is aborted,
whatever the model already wrote is kept as an assistant message marked
meta.interrupted, and the loop immediately issues a new request that carries the
guidance. Tools are never interrupted: steering only targets the model stream, so
a running command finishes first and the guidance is injected at the next request
boundary.
- session: steerActiveSession(), a per-request steer signal released once the
request settles, and LlmSteeredError carrying the partial answer
- session: a steered answer is not an interruption - the turn continues, the
status stays completed, and the request is not retried
- settings: steerMode ("interrupt" by default, "queue" keeps the old behaviour)
- cli: submitting while busy calls steerActiveSession() when steerMode is
"interrupt"; the cut-short answer is labelled in the transcript
- tests: core covers the aborted stream, the follow-up request payload, the kept
partial answer, and the no-op case; settings cover steerMode resolution
- docs: configuration table and section, plus the README notes
Refs #113, #117
|`steerMode`| string | How a prompt sent while the model is writing is handled: `"interrupt"` (cut the answer short so the prompt is read immediately, default) or `"queue"` (wait for the next request boundary) |
36
37
|`filesApiEnabled`| boolean | Send images through the DeepSeek Files API (default `false`) |
37
38
|`filesApiTimeoutMs`| number | Per-image Files API timeout; defaults to `60000`, maximum `600000` ms |
38
39
|`fileExpiresAfterSeconds`| number | Remote file lifetime, default `604800` seconds |
@@ -106,6 +107,20 @@ Controls whether the current model is treated as a multimodal model that accepts
106
107
107
108
Use this to override the default detection when your model is not in the known-model list, or when its actual capability differs from the default.
108
109
110
+
#### `steerMode` — Steering While the Model Is Writing
111
+
112
+
Controls what happens when you send a prompt while the model is still producing an answer:
|`interrupt`| The answer that is streaming is cut short; its text is kept in the conversation and the prompt is read immediately (default) |
117
+
|`queue`| The prompt waits and is injected before the next LLM call of the running turn |
118
+
119
+
Either way the prompt becomes a user message of the running turn, so the model can revise or
120
+
supersede the instructions it was already following. Running commands are never interrupted:
121
+
steering only affects the model stream, so a tool that is executing finishes first and the
122
+
prompt is injected at the next request boundary. Pressing `Esc` still interrupts the whole turn.
123
+
109
124
#### DeepSeek Files API
110
125
111
126
When `BASE_URL` is `https://api.deepseek.com`, enabling `filesApiEnabled` uploads images to the fixed `https://api.deepseek.com/files` endpoint and sends `file_id` references in chat requests. Other API endpoints do not enable this feature. An upload or cache-refresh failure fails the request; disabling the setting preserves the existing image path.
0 commit comments