Commit Graph

1659 Commits

Author SHA1 Message Date
jimmyzhuu e227efbd80 docs: document baidu search backend 2026-05-30 10:52:27 +08:00
jimmyzhuu d7e6c85db5 feat: add baidu web search backend 2026-05-30 10:42:18 +08:00
Hunter Bown 54151a4bc9 feat(/new): add new session command (#2235)
feat(/new): add new session command
2026-05-26 21:48:06 -05:00
Hunter Bown 1c59cbf770 fix(provider): keep picker selection visible (#2241)
fix(provider): keep picker selection visible
2026-05-26 21:41:06 -05:00
reidliu41 198acc72ba Make the selected row easier to see with a continuous subtle highlight, and
wrap Up/Down navigation between the first and last providers.
2026-05-27 10:34:38 +08:00
reidliu41 5ed741dc8c fix(provider): keep picker selection visible
Make the /provider modal size itself to the provider list when space allows,
  and scroll the rendered list when the selected provider moves past the visible
  rows.

  Also make the selected row use a continuous, subtle highlight so the current
  selection remains visible without looking disconnected.

  Adds regression coverage for bottom providers, initial bottom selection, full
  height rendering, and selected-row highlighting.
2026-05-27 10:24:23 +08:00
reidliu41 ed23a48e04 feat: add new session command
Add /new to start a fresh saved session from the TUI without overloading /clear.
  The command creates a distinct session id, resets conversation state, and keeps
  previous sessions available through /resume.

  Block unsafe switches when pending input or active work exists, with /new --force
  available for explicit discard.
2026-05-27 07:33:27 +08:00
Hunter Bown cdec3e8192 Merge branch 'build/v0.8.47' into integration/v0.8.47-unified 2026-05-26 16:41:10 -05:00
Hunter Bown 663550be35 Merge branch 'feat/2199-goal-tools-runtime' into integration/v0.8.47-unified 2026-05-26 16:41:05 -05:00
Hunter Bown 183606b08b Merge branch 'feat/2022-session-failure-classifier' into integration/v0.8.47-unified 2026-05-26 16:41:00 -05:00
Hunter Bown 84f023931d Merge branch 'fix/2021-tool-output-receipts' into integration/v0.8.47-unified 2026-05-26 16:41:00 -05:00
Hunter Bown 09f12da47d Merge branch 'codex/1842-show-thinking-reasoning-20260526203106' into integration/v0.8.47-unified 2026-05-26 16:40:56 -05:00
Hunter Bown 7cbeb3d809 Merge branch 'work/issue-2132-ddg-default' into integration/v0.8.47-unified 2026-05-26 16:40:53 -05:00
Hunter Bown 2b0761fbbd Merge branch 'triage/1797-auto-model-resume-20260526-153051' into integration/v0.8.47-unified 2026-05-26 16:40:47 -05:00
Hunter Bown 64e5b3f306 Merge branch 'triage/cache-hit-1120-1818-743' into integration/v0.8.47-unified 2026-05-26 16:40:47 -05:00
Hunter Bown a4024d3dff Merge branch 'fix/1656-local-http-provider' into integration/v0.8.47-unified 2026-05-26 16:40:47 -05:00
Hunter Bown 007c578bb3 Merge branch 'codex/issue-2138-edit-file-fuzz-20260526' into integration/v0.8.47-unified 2026-05-26 16:40:47 -05:00
Hunter Bown 86652f3a4b Merge branch 'docs/2217-container-toolbox-contract' into integration/v0.8.47-unified 2026-05-26 16:40:36 -05:00
Hunter Bown b96fa37ea4 chore: add DeepSWE task verification script 2026-05-26 16:40:16 -05:00
Hunter Bown ac6693581f fix(tools): restore checklist and planning tools to default active catalog
PR #2076 deferred planning/checklist tools (checklist_write, update_plan,
task_create, task_list, task_read) to reduce catalog tokens, but the system
prompt actively instructs the model to use these tools. Without them in the
active catalog, the model cannot call them until it first discovers them via
tool_search, which it is not prompted to do for planning tools.

Keep these tools in DEFAULT_ACTIVE_NATIVE_TOOLS so the model can follow
the Constitution's Regulations (Tier 3) and the Mode: YOLO instructions.
2026-05-26 16:40:16 -05:00
Hunter Bown 11e1ec1fe3 docs: add v0.8.47 CHANGELOG entries for composer, CNB mirror, fixes 2026-05-26 16:39:39 -05:00
Hunter Bown 92c8dbc7ce fix(composer): use wrap_input_lines_for_mouse, clamp selection to input length
- Replace visible_line_char_ranges with wrap_input_lines_for_mouse for accurate mouse selection
- Clamp selection_anchor and cursor_position to char_count
- Clear selection on history navigation to prevent stale highlights
- Add test for history-navigation-clears-stale-selection
2026-05-26 16:39:39 -05:00
Hunter Bown 74878dcd30 refactor(tools): replace Semaphore with RwLock for parallel-safe tool execution
- Use OwnedRwLockReadGuard for parallel-safe tools, OwnedRwLockWriteGuard for serial
- Add TOOL_EXECUTION_LOCK_HELD task-local for reentrancy detection
- Add BlockingHandler test harness and parallel-vs-serial concurrency tests
2026-05-26 16:39:39 -05:00
Hunter Bown 60c1b6619c style: rustfmt cleanups and minor formatting fixes
- Line-wrap long function signatures and format arguments
- Fix bracket placement for early returns (consistent style)
- Use [!] instead of [✓] for network-denied skill sync
- Fix copy-selection ordering: clear after success, not always
2026-05-26 16:39:28 -05:00
Hunter Bown 17f21a84e1 feat(goals): add runtime goal tools and bounded continuation gate (#2199)
- Add SharedGoalState and goal tools (goal.rs) to the engine
- Sync goal state from host on engine init and goal-objective change
- Wire goal_objective through prompt context and system-prompt refresh
- Add continuation.md prompt for bounded task continuation
- Register goal tools in the tool registry
- Add continuation gate tests in engine/tests.rs
2026-05-26 16:38:26 -05:00
Hunter Bown 5e9accd149 feat(diag): add redacted synthetic session failure classifier (#2022)
- Add FailureCategory enum for command-exit, network, sandbox, timeout, etc.
- Module is deliberately pure: no file reads, caller-provided records only
- Added as dead_code module, wired for future diagnostics integration
2026-05-26 16:38:26 -05:00
Hunter Bown cf8880e464 fix(session): compact large tool outputs to artifact receipts on persist (#2021)
- Replace giant tool-result strings in session JSON with TOOL_OUTPUT_RECEIPT markers
- Reference artifact records by id for retrieval after session load
- Compact on save, checkpoint, load, and load_by_id paths
- Wire tool_output_receipts module into session_manager
- Add tests for compaction-on-save and legacy-load-then-compact paths
2026-05-26 16:38:26 -05:00
Hunter Bown 6fce7dca38 fix(lang): keep hidden reasoning_content in English regardless of locale (#1842/#1843)
- Add show_thinking flag to PromptSessionContext
- When show_thinking=false, emit hidden-thinking English instruction
- Omit locale-reinforcement bookends when user can't see thinking blocks
- Keep final-visible-reply language rule unchanged
- Add test for hidden-thinking language directive
2026-05-26 16:38:26 -05:00
Hunter Bown aeaf91d589 feat(web_search): switch default backend from Bing to DuckDuckGo (#2132)
- Make DuckDuckGo the default search provider with Bing fallback
- Update tool description, config docs, TOOL_SURFACE, doctor output
- Update all search default tests and references
- Bing remains selectable via [search] provider = "bing"
2026-05-26 16:37:53 -05:00
Hunter Bown 99941d9d01 fix: include tool catalog in cache-inspect prefix hashing (#1818)
- Track tool catalog as a static layer in prompt inspection
- Include tools in cache-warmup request with tool_choice=none
- Ensure tool schema changes are visible to base-static-prefix diagnostics
- Factor test_tool helper for cache-inspect test coverage
2026-05-26 16:37:53 -05:00
Hunter Bown 91ab9089ab fix: add DEEPSEEK_ALLOW_INSECURE_HTTP env guard for LAN vLLM (#1656)
- Add env guard with process-global mutex for ALLOW_INSECURE_HTTP tests
- Document LAN vLLM HTTP example in README
- Add config test for reported LAN HTTP endpoint + model resolution
- Guard validate_base_url_security tests against env leak
2026-05-26 16:37:53 -05:00
Hunter Bown 8d48b19b5d test: add regression coverage for edit_file fuzz omission (#2138)
- Test that edit_file accepts calls with fuzz omitted, fuzz=false, and fuzz=true
- Verify fuzz is excluded from schema required fields but present as optional boolean
- Add agent-mode catalog test confirming edit_file is loaded and fuzz-less calls execute
- Update existing required-fields assertions to check for exactly path/search/replace
2026-05-26 16:37:33 -05:00
Hunter Bown 2b8f3bf3dd docs: add provider registry reference and refresh provider lists (#2201)
- Add docs/PROVIDERS.md placeholder reference in README and CONFIGURATION.md
- Update provider lists to include moonshot, openrouter, novita
- Add MOONSHOT_API_KEY/KIMI_API_KEY env var docs
- Update default_text_model entries for all providers
- Change legacy deepseek-cn alias to deepseek
- Add CODEWHALE_PROVIDER as preferred env var name
2026-05-26 16:37:33 -05:00
Hunter Bown 671aa4810e docs: add Docker toolbox/custom-image contract and examples (#2217)
- Document default image contract (non-root, no sudo, conservative)
- Add opt-in toolbox image pattern with passwordless sudo
- Include Dockerfile.toolbox example
- Document multi-project volume pattern
- Add bootstrap script, custom CA certificate, and proxy workflows
- Clarify that bootstrap/CA workflows require the opt-in toolbox image
2026-05-26 16:37:33 -05:00
LING71671 02d4605868 fix(tui): restore auto model state on session load
Harvested from PR #1885 by @LING71671.

Fixes #1797.
2026-05-26 15:53:53 -05:00
Hunter Bown 8822e9873a refactor: finish state-root migration — all runtime paths now .codewhale
- .gitignore: add deep-swe/ and all_preds.jsonl to prevent accidental commits
- config.rs: home_config_path(), managed_config, requirements, mcp, notes,
  memory all prefer ~/.codewhale/config.toml with .deepseek fallback
- commands/config.rs: config_toml_path() prefers .codewhale
- commands/anchor.rs: anchors_path prefers .codewhale/anchors.md
- commands/note.rs: notes_path prefers .codewhale/notes.md
- skills/install.rs: cache defaults to .codewhale/cache/skills
- skills/mod.rs: global skills discovery includes .codewhale/skills
- file_frecency, clipboard, onboarding, audit, task_manager: all .codewhale
- project-local paths (onboarding trust) still .deepseek for compat

Closes #2231.
2026-05-26 15:06:04 -05:00
Hunter Bown 799d9f8176 docs: consolidate CHANGELOG for v0.8.47, add 5 new contributors 2026-05-26 14:35:57 -05:00
Hunter Bown 236ad4137d feat: harvest 6 community PRs for v0.8.47
Harvested and vetted — no malware, no external deps, no injection:
- #1859 (@harvey2011888): loop guard now reports Failed on halt
- #1870 (@victorcheng2333): honour DEEPSEEK_YOLO env on startup
- #1935 (@IIzzaya): replace [x] with [✓] completion markers
- #1837 (@PurplePulse): fix macOS title centering (pin to top)
- #1967 (@cyq1017): show base_url in /config view
- #1906 (@knqiufan): copy transcript without visual-wrap newlines

Also fix cycle_manager archive_dir_for to use resolve_state_dir
so recall_archive tests pass with the migrated sessions path.

Co-authored-by: victorcheng2333 <victorcheng2333@users.noreply.github.com>
Co-authored-by: IIzzaya <IIzzaya@users.noreply.github.com>
Co-authored-by: PurplePulse <PurplePulse@users.noreply.github.com>
Co-authored-by: cyq1017 <cyq1017@users.noreply.github.com>
Co-authored-by: knqiufan <knqiufan@users.noreply.github.com>
2026-05-26 14:34:21 -05:00
Hunter Bown 8ed4301d35 docs: update CHANGELOG for CNB mirror and state-root migration 2026-05-26 14:19:53 -05:00
Hunter Bown 0706285bfe feat(update): add CNB mirror support for China-friendly binary downloads
- Add CODEWHALE_RELEASE_BASE_URL as canonical env override for release
  asset base URL (DEEPSEEK_TUI_RELEASE_BASE_URL and DEEPSEEK_RELEASE_BASE_URL
  remain as legacy fallbacks).
- Add CODEWHALE_USE_CNB_MIRROR env var to auto-select the CNB (cnb.cool)
  mirror for binary downloads, avoiding GitHub Releases timeouts in China.
- Update npm install scripts (artifacts.js) with the same env checks.
- Update Rust self-updater (update.rs) with new constants and env cascade.

Fixes #2222.
2026-05-26 14:19:26 -05:00
Hunter Bown 4925be4dda refactor: migrate handoff, notes, mcp, subagent, recall, anchors to .codewhale
- HANDOFF_RELATIVE_PATH → .codewhale/handoff.md with .deepseek fallback
- load_handoff_block reads both paths, prefers .codewhale
- ToolContext notes_path and mcp_config_path use resolve_project_state_dir
- Sub-agent state path prefers .codewhale/state/
- Cycle archive (recall_archive) uses resolve_state_dir for sessions
- Compaction anchors path prefers .codewhale/anchors.md
- Updated marker constants and comments

Part of #2231.
2026-05-26 14:16:02 -05:00
Hunter Bown a1a7b5709a refactor: migrate more state paths to ~/.codewhale with legacy fallback
- Spillover directory (truncate.rs): prefer ~/.codewhale/tool_outputs
- Memory storage (capacity_memory.rs): prefer ~/.codewhale/memory
- Runtime logs (runtime_log.rs): prefer ~/.codewhale/logs
- Crash dumps (utils.rs): prefer ~/.codewhale/crashes
- Automations (automation_manager.rs): prefer ~/.codewhale/automations
- TUI settings (settings.rs): prefer ~/.codewhale/tui.toml

All paths fall back to the legacy ~/.deepseek location when the
canonical path doesn't exist, preserving compatibility for existing
installs.

Part of #2231.
2026-05-26 13:50:31 -05:00
Hunter Bown f23f424492 docs: update CHANGELOG for v0.8.47 session 2 work
Add entries for steer message ordering fix, state-root migration
progress, README path updates, and session save test fix.
2026-05-26 13:47:54 -05:00
Hunter Bown 187014d7d5 docs: update README paths from ~/.deepseek to ~/.codewhale
Update all three READMEs (en, zh-CN, ja-JP) to use the canonical
~/.codewhale paths for config, skills, and Docker volume mounts, with
legacy ~/.deepseek noted as a compatibility fallback. The state-root
migration has been underway since v0.8.44 — the docs now reflect it.
2026-05-26 13:47:36 -05:00
Hunter Bown 9540af268f fix(tests): update save-default-path test for managed sessions dir
The /save command now writes to ~/.codewhale/sessions (or legacy
~/.deepseek/sessions) instead of the workspace root. Update the test
to set CODEWHALE_HOME to a temp directory and pre-create the sessions
subdirectory so resolve_state_dir picks the primary path.

Fixes the first failing test in #2223.
2026-05-26 13:45:18 -05:00
Hunter Bown b9596a9640 fix(tui): flush active cell before inserting steer message in transcript
Steered/queued user messages were being inserted into app.history
before the active cell (holding streaming thinking/tool content) was
flushed, causing the user's message to render above (before) the
thinking block that chronologically preceded it.

Now call app.flush_active_cell() before app.add_message() in
steer_user_message(), matching the pattern used in MessageStarted
and MessageDelta handlers.

Fixes #2225.
2026-05-26 13:39:57 -05:00
Hunter Bown 0251b4e8e8 refactor: migrate snapshot and skill_state paths to ~/.codewhale
- Add resolve_project_state_dir and ensure_project_state_dir to
  codewhale-config, providing project-local .codewhale/.deepseek
  resolution matching the home-directory pattern.
- Migrate snapshot paths to prefer ~/.codewhale/snapshots with
  ~/.deepseek/snapshots fallback (snapshot_base_with_home).
- Migrate skill_state.rs to use codewhale_config::ensure_state_dir
  instead of hardcoded home.join(".deepseek").
- Update doc comments to reference canonical .codewhale paths.

Part of #2231 (state-root migration).
2026-05-26 13:39:01 -05:00
Hunter Bown 1893f797fb docs: update CHANGELOG for v0.8.47 work
Add entries for deadlock fix (#1856), composer text selection (#2228),
and project context loading tracing (#2227). Add community credits for
@Fire-dtx and @imkingjh999.
2026-05-26 13:25:55 -05:00
Hunter Bown a554aa9603 feat(project-context): add tracing log when context file is loaded
Emit a tracing::info! line with the file path and byte size when a
project context file (AGENTS.md, CLAUDE.md, etc.) is successfully loaded.
This helps users and maintainers verify which file was used during
prompt assembly, addressing the confusion reported in #2227.
2026-05-26 13:20:25 -05:00
Hunter Bown 84463711b4 feat(composer): mouse + keyboard text selection with copy/cut
Add mouse drag selection and Shift+Arrow text selection in the composer
input box. Ctrl+C copies selected text; Ctrl+X cuts (or toggles mode if
no selection). Selection highlighting uses the theme's selection_bg color.
Mouse coordinate mapping accounts for wrapping, scroll offset, and padding.

Also fix Home, End, Ctrl+A, and Ctrl+E to clear the selection anchor
before jumping, matching the existing Left/Right behavior. Without these
calls a stale anchor silently reforms a selection and can cause unintended
deletions on the next keystroke.

Harvested from #2228.

Co-authored-by: imkingjh999 <imkingjh999@users.noreply.github.com>
2026-05-26 13:14:55 -05:00