Commit Graph

1202 Commits

Author SHA1 Message Date
Hunter Bown a415359577 style: format v0.8.34 PR integrations 2026-05-12 23:14:49 -05:00
Hunter Bown 88b7882d48 Merge remote-tracking branch 'origin/pr/1432' into work/v0.8.34 2026-05-12 23:14:24 -05:00
Hunter Bown ad297f4de1 Merge remote-tracking branch 'origin/pr/1500' into work/v0.8.34 2026-05-12 23:14:22 -05:00
Hunter Bown a7df269832 Merge remote-tracking branch 'origin/pr/1505' into work/v0.8.34 2026-05-12 23:14:19 -05:00
Hunter Bown b6308620b4 Merge remote-tracking branch 'origin/pr/1508' into work/v0.8.34
# Conflicts:
#	crates/tui/src/tui/ui.rs
2026-05-12 23:14:17 -05:00
Hunter Bown 354dd92889 Merge remote-tracking branch 'origin/pr/1513' into work/v0.8.34 2026-05-12 23:13:57 -05:00
Hunter Bown e7fba0af3e Merge remote-tracking branch 'origin/pr/1504' into work/v0.8.34 2026-05-12 23:13:31 -05:00
Hunter Bown 0076e59a82 Merge remote-tracking branch 'origin/pr/1514' into work/v0.8.34 2026-05-12 23:13:29 -05:00
Hunter Bown 156703ae59 Merge remote-tracking branch 'origin/pr/1518' into work/v0.8.34 2026-05-12 23:13:27 -05:00
Hunter Bown f4f1916221 Merge remote-tracking branch 'origin/pr/1548' into work/v0.8.34 2026-05-12 23:13:25 -05:00
Hunter Bown 81e4b93cc9 Merge pull request #1553 from Hmbown/work/v0.8.33
chore(release): prepare v0.8.33
2026-05-12 22:30:53 -05:00
Hunter Bown a507885fb8 test(rlm): tolerate windows python line endings 2026-05-12 22:18:59 -05:00
Hunter Bown 3c3c4bf824 fix(ci): satisfy release lint and isolate config tests 2026-05-12 22:10:03 -05:00
Hunter Bown 485ba7bbd4 chore(release): finish v0.8.33 polish 2026-05-12 22:03:47 -05:00
Hunter Bown c7e5cb4160 test: fix three tests that read host settings.toml default_mode
The user's ~/Library/Application Support/deepseek/settings.toml had
default_mode = "yolo", which caused test_mode_yolo_sets_all_flags,
test_trust_on_enables_flag, and
footer_status_line_spans_show_mode_and_model_idle_and_active to fail
because they implicitly depended on the host's global mode setting.

Pin each test to Agent mode explicitly so they pass regardless of the
developer's personal settings.
2026-05-12 21:59:11 -05:00
Hunter Bown 99c6b22e83 chore(release): v0.8.33 — sub-agent and RLM renovation with persistent sessions
- Persistent RLM sessions (rlm_open/rlm_eval/rlm_close) with bounded REPL helpers
- Fork-aware sub-agent sessions (agent_open/agent_eval/agent_close) with handle_read
- Shared handle_read storage with slice/range/count/JSONPath projections
- Slash-command routing: /rlm, /agent, /relay (/接力) for handoff prompts
- Sidebar renamed to "Work" tab, consistent across Plan/Agent/YOLO modes
- Tool papercuts: file_search excludes, grep_files strings, fetch_url JSON,
  edit_file fuzz, exec_shell merged stdout/stderr, revert_turn no-op reject
- CLI reasoning-effort honoured on non-auto exec routes (#1511 @h3c-hexin)
- Edit-file replacement boundaries clarified (#1516)
- Pandoc output validated before probing (#1523)
- Running turns steerable/repaintable (#1533, #1537)
- Tasks/Activity Detail calmer under load
- npm retry timeout hint (#1538 @reidliu41)
- Issue templates improved (#1525 @reidliu41)
- Shell: kill process group to prevent UI freeze (#828 @CrepuscularIRIS)
- TUI: ignore leaked SGR mouse reports in composer (#1421 @reidliu41)
- Footer: keep chips within available width (#1417 @Wenjunyun123)
- Session picker: scope Ctrl+R to current workspace (#1395 @LinQ)
- Removed stale competitive-analysis doc
- Prompts/docs teach only new tool names
2026-05-12 19:54:08 -05:00
zhuang biaowei 2346252a63 Fix changelog command version hints 2026-05-13 08:17:19 +08:00
Reid 503551ddec docs: improve issue templates (#1525)
Add clearer prompts to bug reports and feature requests so users provide
  reproduction details, impact, environment context, use cases, and supporting
  materials up front.
2026-05-12 15:37:11 -05:00
hexin ec527b6a2b fix(cli): honor config.toml reasoning_effort on non-auto exec routes (#1511)
`resolve_cli_auto_route` was hard-coding `reasoning_effort: None` when
`--model` is not `auto`, which silently dropped the value the user had
set in `~/.deepseek/config.toml` on every non-auto-route exec/one-shot
call.

For vllm + Qwen3 users with `reasoning_effort = "off"`, thinking was
therefore never disabled. The model emitted a long reasoning trace for
every prompt and SSE idle timeouts (`did not receive response headers
after 45s`) fired on any non-trivial prompt. After this fix, the same
prompts return in ~1.5s.

Route the configured value through `ReasoningEffort::from_setting`, the
same parser the TUI uses elsewhere for this field. Auto-route behaviour
(`--model auto`) is unchanged.

Verified by capturing the outgoing request body with `nc` before and
after; chat_template_kwargs.enable_thinking=false now appears in the
body on vllm exec runs.

Co-authored-by: hexin <he.xin@h3c.com>
2026-05-12 15:37:04 -05:00
Hunter Bown 9fb3d5d636 fix(web): keep contributor stats current 2026-05-12 15:32:01 -05:00
Hunter Bown ad70655bbb docs(release): note v0.8.32 selection issue 2026-05-12 15:08:21 -05:00
Hunter Bown 3a1b107af9 chore(release): pin security contact and cnb tag sync 2026-05-12 14:48:10 -05:00
Hunter Bown b7f14b2116 fix(release): package changelog with tui crate 2026-05-12 14:34:17 -05:00
Hunter Bown 2326220b7e fix(vision): reject rooted image paths on windows 2026-05-12 14:13:19 -05:00
Hunter Bown 190eb6b162 docs(web): refresh v0.8.32 site state 2026-05-12 14:04:17 -05:00
Hunter Bown b25450728e fix(docker): include changelog in image build context 2026-05-12 13:01:16 -05:00
Hunter Bown 8a76916140 docs(changelog): finalize v0.8.32 notes 2026-05-12 12:10:44 -05:00
Hunter Bown 2662f36001 docs: fix working set rustdoc links 2026-05-12 12:10:39 -05:00
Hunter Bown 9ca759bd11 fix(npm): show timeout hint on first retry (#1538)
Co-Authored-By: jieshu666 <jieshu666@users.noreply.github.com>
2026-05-12 12:10:29 -05:00
Hunter Bown c535f85a4d fix(tools): clarify edit_file replacement boundaries (#1516) 2026-05-12 12:10:22 -05:00
Hunter Bown 136be0d255 test(tui): pin model state in footer and picker tests 2026-05-12 12:10:17 -05:00
Hunter Bown 92fd81db4e fix(pandoc): validate binary output before probing pandoc (#1523)
Co-Authored-By: muyuliyan <muyuliyan@users.noreply.github.com>
2026-05-12 12:10:11 -05:00
Hunter Bown ceac2aa776 fix(tui): steer and repaint running turns (#1533, #1537)
Co-Authored-By: Oliver-ZPLiu <Oliver-ZPLiu@users.noreply.github.com>

Co-Authored-By: czf0718 <czf0718@users.noreply.github.com>
2026-05-12 12:10:04 -05:00
Hunter Bown f3c7155865 fix(engine): surface cancellation reasons in waits 2026-05-12 12:09:46 -05:00
Hunter Bown 1372d72627 fix(tools): unify tool-result retrieval references 2026-05-12 12:09:40 -05:00
reidliu41 a8554fdee3 fix(CI): validate pandoc output path before probing binary
Validate binary pandoc target formats before checking whether pandoc is
  installed. This keeps invalid input errors stable on systems without pandoc
  and fixes the CI test that expects missing output_path to be reported first.
2026-05-12 18:37:40 +08:00
masonxhuang 41a92b93f4 fix(tui): preserve prefix cache while pruning tool results 2026-05-12 17:49:41 +08:00
Duducoco 01044d652e feat(init): update AGENTS.md in place instead of refusing
- overwrite existing AGENTS.md on /init rather than blocking with an "already exists" message
- report "Updated" vs "Created" depending on prior file state
- replace noop test with one verifying stale content is regenerated
2026-05-12 17:16:15 +08:00
kitty fbab2beaeb refactor(composer): extract magic values in derive_session_title to constants 2026-05-12 16:06:41 +08:00
kitty e8b4f9911d feat(composer): display session title in top-right of composer border
Show the current session's persisted metadata.title in the composer
border's top-right corner alongside the existing vim mode indicator.

- app.rs: add `session_title: Option<String>` field to App
- ui.rs: populate it from metadata.title in apply_loaded_session and
  SessionUpdated handler; add derive_session_title() fallback helper
- widgets/mod.rs: render title (muted) + vim label in a single
  right-aligned title_top span to avoid overlap
2026-05-12 15:58:06 +08:00
Hunter Bown 33822424d8 fix(npm): bump deepseekBinaryVersion to 0.8.32 2026-05-12 02:57:41 -05:00
Hunter Bown 8d5a823724 docs(changelog): promote [Unreleased] block to dated [0.8.32] section
The version-consistency test `prompts::tests::changelog_entry_
exists_for_current_package_version` requires a `## [0.8.32]`
section once the workspace `Cargo.toml` has advanced to that
version — release hygiene from the v0.8.x sequence. Promote
the existing `[Unreleased]` content to `## [0.8.32] - 2026-05-12`
and leave a fresh empty `[Unreleased]` placeholder above it so
future post-tag commits have somewhere to land.

Also tighten the opening paragraph: the v0.8.31 throat-clear
("release in progress") becomes a release-shape summary that
calls out the five new tools, six PR harvests, and the snapshot
2 GB cap that closes the multi-hundred-GB-workspace "scroll
demon".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 02:47:11 -05:00
Hunter Bown 9d05e6c293 fix(tui): remove Shift-bypass-mouse-capture escape hatch (#376)
Users reported a "scroll demon" — visible thrash where the
display would flicker / scroll / redraw spuriously while moving
the mouse. Root cause: the #376 native-selection escape hatch
watched every mouse event for `KeyModifiers::SHIFT`, and on each
transition (Shift pressed → released, or vice versa) it:

  1. Toggled the alt-screen mouse-capture mode via crossterm
     execute!(DisableMouseCapture / EnableMouseCapture).
  2. Pushed a status toast ("Native selection — release Shift to
     return" / "Mouse capture restored").

On terminals that report mouse-event modifier state aggressively
(notably the modern xterm-modifyOtherKeys / Kitty keyboard
protocol family the v0.8.32 Windows fix in PR #1483 just turned
on more broadly), the bypass would flip on stray Shift state
changes during ordinary scrolling — producing a tight cycle of
mouse-capture toggles and toast renders that the user perceived
as the display going haywire.

The feature was never load-bearing for native text selection on
modern terminals: macOS Terminal and iTerm honor Option-drag
(macOS convention), most Linux terminals honor Shift-drag at the
terminal layer regardless of what the TUI does with mouse
events, and Windows Terminal exposes its own copy mode. The
in-TUI bypass was a workaround for a narrower set of terminals
that bowed out of relevance once we got mouse capture cleaner
elsewhere.

Removed:

- `let mut shift_bypass_active = false;` state on `ui::run_app`
- The mouse-event Shift-modifier branch that flipped capture
  modes and emitted toasts
- The 5-second redraw nudge that the toast cycle implied

Net delta: 23 lines deleted, 0 added. Mouse capture stays
on for the whole session (or off when `--no-mouse-capture` is
set at launch), and stray Shift events on mouse move are now
ordinary mouse events.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 02:38:37 -05:00
Hunter Bown c0b9bada27 chore(release): bump to 0.8.32
Workspace, all 9 path-pinned crate deps, and the npm wrapper's
package.json all advance from 0.8.31 → 0.8.32. `scripts/release/
check-versions.sh` passes (workspace ↔ npm ↔ Cargo.lock all in
sync).

Auto-tag only fires on push-to-main, so this bump on `work/v0.8.32`
doesn't accidentally cut a release; it just makes the
in-development binary identify itself correctly. When this branch
merges to main, the existing release pipeline takes over from
here.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 02:21:19 -05:00
Hunter Bown f964e2fd37 fix(snapshot): cap workspace size at 2 GB before first side-repo init
Users reported running `deepseek-tui` inside project directories
with hundreds of GB of content — ML datasets, model weights
(`.safetensors`, `.gguf`, `.pt`, `.onnx`), Docker image dumps,
parquet / arrow caches, anything that falls outside the snapshot
built-in excludes. The pre/post-turn snapshot path called
`SnapshotRepo::open_or_init` which initialized the side git repo
and then ran `git add -A` — which walked the entire workspace
indexing every file. On a 100-300 GB directory this hung the TUI
for minutes-to-hours while git churned through the index.

The pre-existing v0.8.27 fixes (#1112: retention cap, mid-session
prune, expanded built-in excludes) addressed the orthogonal
"snapshots grow unbounded over many turns" angle but did nothing
to prevent the first snapshot from being impossible to take.

This change adds `estimate_workspace_size_bounded()` — a bounded
`ignore::WalkBuilder` walk that respects `.gitignore` and the
snapshot module's existing skip list (`node_modules/`, `target/`,
`.next/`, `.venv/`, `__pycache__/`, etc.). The walk early-exits
at either the byte cap or 200,000 file entries, returning `None`
to signal "too big to snapshot."

`SnapshotRepo::open_or_init_with_cap(workspace, cap_bytes)` calls
the estimator *before* the side `git init`, and returns
`Err(InvalidInput)` with a "workspace too large" reason — which
`turn::snapshot_with_label` already logs at WARN and continues
past, so a too-large workspace silently disables snapshots
without blocking any turn. The check is paid only on first init;
subsequent snapshots through the existing side repo skip it.

Plumbing:
- `SnapshotsConfig.max_workspace_gb` (default 2, `0` disables)
- `EngineConfig.snapshots_max_workspace_bytes` resolved at engine
  construction from `config.snapshots_config().max_workspace_gb`
- `pre_turn_snapshot` / `post_turn_snapshot` / `pre_tool_snapshot`
  take a `cap_bytes: u64` argument threaded from the engine
- `SnapshotRepo::open_or_init` retains its v0.8.31 signature as a
  thin wrapper over `open_or_init_with_cap` using the default cap
- `config.example.toml` documents the new `max_workspace_gb` knob
  with the "set to 0 to disable" escape hatch for users with
  legitimate large monorepos

Six new tests pin both the estimator (under-cap returns Some,
over-cap returns None, builtin-excluded dirs skipped, cap=0
disables the bound) and the `open_or_init_with_cap` integration
(oversized workspace fails with the right error and references
the config knob; cap=0 succeeds even on oversized content).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 02:11:10 -05:00
AmosLeeeeeeee 946c12b4d3 fix: include reasoning tokens in cost calc; auto-detect CNY on zh-Hans locale 2026-05-12 15:00:47 +08:00
Hunter Bown f8a3c6619e fix(npm): map openharmony platform to linux binaries (#1072)
Node's `os.platform()` returns `openharmony` on HarmonyPC and on
OpenHarmony's Linux ABI-compatible userspace. The npm wrapper's
platform-asset matrix only covered `linux` / `darwin` / `win32`,
so `npm i -g deepseek-tui` aborted on those hosts with

    Unsupported platform: openharmony. Supported platforms: …

even though the existing Linux x64 / arm64 binaries run unchanged
on that environment (OpenHarmony is Linux-ABI-compatible at the
ELF level).

Added a `PLATFORM_ALIASES = { openharmony: "linux" }` indirection
that resolves the raw platform name through the alias map before
the `ASSET_MATRIX` lookup. Genuinely unsupported platforms still
report the raw `os.platform()` value in the error so OS-mismatch
bug reports stay diagnostic.

Four pure-JS regression tests pin the behaviour:

- openharmony x64 → linux x64 binaries
- openharmony arm64 → linux arm64 binaries
- known platforms unchanged by the alias map
- freebsd still reports `Unsupported platform: freebsd`

Harvested from PR #1499 by @CrepuscularIRIS

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 01:39:44 -05:00
Hunter Bown ae42bdb2c0 refactor(tui): clarify startup empty state with version / model / cwd context
The center of the startup welcome view used to repeat
information already shown in the header and footer
(active model and mode names). It now shows three pieces of
context that first-time users don't otherwise see at a glance:

  - the build version (so users on stale installs notice it
    before reaching `deepseek doctor`)
  - the active model with a `/model` hint so the picker is
    discoverable from the empty state
  - the current working directory so users can confirm the
    workspace deepseek-tui anchored at

The header and footer continue to show the running model and
mode for the active session; this change is only about the
center "empty transcript" panel that sits in the gap before the
first user message lands.

Harvested from PR #1444 by @reidliu41

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 01:37:32 -05:00
Hunter Bown ebedd23807 feat(skills): add opt-in v4-best-practices bundled skill
A single 50-line `SKILL.md` encoding three V4-specific workflow
rules for multi-step thinking-mode tasks. Each rule maps to a
concrete observable failure class the maintainer or contributors
have hit when running V4-flash / V4-pro on long agent loops; the
text is opinionated but discovered through the existing skill
mechanism rather than baked into the always-on system prompt.

Follows the existing bundled-skill convention
(`crates/tui/assets/skills/skill-creator/`) so the discovery
walker picks it up alongside the workspace's own skills. Not
enabled by default — users see it in `/skills` and opt in
explicitly, keeping the always-on prompt-prefix footprint
unchanged for everyone who doesn't want the directive.

Single new file; zero Rust changes, zero new dependencies, zero
config schema changes. Fully reversible by deleting the directory.

Harvested from PR #1448 by @SamhandsomeLee

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 01:36:57 -05:00
Hunter Bown a9412d7df8 perf(prompts): move volatile layers below KV-prefix-cache boundary
`instructions = [...]` (the per-workspace config-driven block),
the user memory file (`/memory`), and the current session goal
(`/goal`) were being rendered at position 2.5 in the system
prompt — inside the static prefix layer that DeepSeek's KV
prefix cache hits.

Any edit to those files invalidated every cached byte from that
position onward. A `# foo` memory quick-add (or a `/goal` update)
on turn 5 meant the engine had to re-tokenize and re-charge the
full static suffix — skills block, context management, compact
template, environment, ~thousands of tokens — on turn 6.

Relocate the three blocks to position 6, immediately above the
previous-session handoff block, where the volatile-content
boundary already lives. The static prefix above the boundary
(mode, project context, env, skills, context management, compact
template) now stays cached across turns regardless of how often
the user edits their memory file or shifts session goals.

Resolved a 3-way merge against the v0.8.32 `translation_enabled`
addition (PR #1462). The new translation-output instruction stays
at position 2.3a (inside the static prefix layer) because it's a
per-session flag — `/translate` is a session toggle, not a
turn-by-turn knob, so the prompt-prefix bytes don't drift
mid-session.

Harvested from PR #1345 by @Duducoco

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 01:35:20 -05:00