mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 16:59:43 +02:00
fix(deepseek): reject the dsh footer's non-model words instead of requiring a digit
The digit rule from 21ae48a5 hid the official DeepSeek ids (`deepseek-chat`,
`deepseek-reasoner` carry no digit), so a session on the official route with
the model field on showed the logo alone (its bundle row pins a provider
alone, so the config had nothing either). It also still misread a folder name
with a digit when every field before it was off.
Now the captured field is rejected when it is what the field can be when it is
NOT the model, and read otherwise:
- capabilities.modelDetect.rejectWords (registry data, single tokens, compared
ignoring case; the schema bounds them and requires a screenLine). dsh lists
every effort id its adapters offer (pi-ai THINKING_LEVELS plus the DeepSeek
adapter's off/low/high/max) and the shipped mode ids, from dsh 0.1.1-rc.2 /
dsh-TUI 0.10.0-beta.1. A mode's drawn label (`plan mode`, `full access`,
CJK) can never be one captured field.
- In the shared screen reader, for every CLI: a field equal to the session's
own working-directory basename is the folder, never the model.
Fixtures: `deepseek-chat` and `deepseek-reasoner` with the model field on are
read; every effort id, `default`, `plan mode`, and the folder name first (with
and without a digit) are not; the live qwen footer still reads `qwen3.8-27b`.
Known gaps, all off by default, are named in stock.ts: a custom mode id drawn
raw, a git branch or a one-word session title first, and the non-compact
footer layout (nothing read there; the route config applies).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1241,14 +1241,22 @@ const DEEPSEEK: CliEntry = {
|
||||
// The border anchors it: nothing the agent writes can sit below the composer, and a
|
||||
// suggestion popup there starts with `/` or `+`, never a model id.
|
||||
// ⚠ The first field is the model only while the status bar's model field is on (the
|
||||
// default). Switched off, the first field is the next one: the reasoning effort
|
||||
// (` medium · th-scratch`), else the mode, else the cwd's basename. So the field must
|
||||
// carry a digit, which a model id does (a version) and an effort word, a mode name or
|
||||
// most folder names do not. A model id without one (`deepseek-chat`) is not read,
|
||||
// and the session falls back to its route config: silent, never wrong.
|
||||
// default). Switched off, the first field is the next one (StatusLine.js): tokens per
|
||||
// second (`12 t/s`) and the token count (`1.2k→3.4k`), which the pattern cannot match,
|
||||
// then the reasoning effort (` medium · th-config`, measured live), then the session
|
||||
// mode, then the cwd's basename. So `rejectWords` lists what those can be, from the
|
||||
// dsh 0.1.1-rc.2 / dsh-TUI 0.10.0-beta.1 sources: every effort id (pi-ai's
|
||||
// THINKING_LEVELS and the DeepSeek adapter's off/low/high/max), and the shipped mode
|
||||
// ids. A mode's drawn label (`plan mode`, `full access`, CJK) never matches one token,
|
||||
// and a field equal to the session's folder name is refused by the shared reader.
|
||||
// Known gaps, all off by default: a custom mode id drawn raw, a git branch or a
|
||||
// one-word session title as the first field; and the non-compact layout, whose
|
||||
// left/right justification never ends a field with ` · `, so nothing is read there
|
||||
// and the session shows its route config.
|
||||
modelDetect: {
|
||||
screenLine: String.raw`╰─+╯\n ?((?=[\w.:/@+-]*\d)[A-Za-z0-9][\w.:/@+-]{0,79})(?= · |\n|$)`,
|
||||
screenLine: String.raw`╰─+╯\n ?([A-Za-z0-9][\w.:/@+-]{0,79})(?= · |\n|$)`,
|
||||
screenLines: 3,
|
||||
rejectWords: ['off', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max', 'default', 'plan', 'full'],
|
||||
// With the status bar's model field off (or before it paints), the route the
|
||||
// session's profile pins, read the way dsh-TUI resolves it: src/deepseek-route-config.ts.
|
||||
configResolver: 'deepseek-route',
|
||||
|
||||
Reference in New Issue
Block a user