Commit Graph

1138 Commits

Author SHA1 Message Date
Hunter Bown 923911ae1d fix: use semver comparison for version-update hint
Replaced naive  with parse_semver tuple comparison
so dev builds (e.g. "0.8.46-pre") don't trigger false update hints.
Falls back to string compare when either side is non-semver.

Caught by Gemini Code Assist review on PR #2181.
2026-05-26 07:58:40 -05:00
Hunter Bown e0c8e8d89a fix: grep_files skips large dirs; add version-update footer notification
grep_files default excludes now include bare directory names
(e.g. "node_modules") alongside the "dir/*" variants. The glob
matcher requires a '/' to match "dir/*", so the bare form skips
the directory traversal entirely instead of descending and filtering
each file — fixes 7MB result payloads from node_modules (#2200).

Added a background version check that fetches the latest GitHub
release tag once per TUI session. When a newer version is available,
the footer renders a persistent toast:
  "vX.Y.Z available — run `codewhale update` and restart"
Silent on network errors (5s timeout).
2026-05-26 07:31:53 -05:00
Hunter Bown c47ed896dc fix: DeepSeek-first v0.8.45 — CODEWHALE_* env aliases, remove public Kimi/Moonshot promotion
Closes #2164 (superseded).
2026-05-26 06:03:10 -05:00
Hunter Bown ab38635f78 fix(kimi): support API-key setup for Kimi Code 2026-05-25 23:39:34 -05:00
Hunter Bown c4e91446af test(cli): format provider env regression cases 2026-05-25 23:07:12 -05:00
Devin AI 0628adab38 test: add table-driven env-forwarding regression test for all providers
Covers Openrouter, Novita, NvidiaNim, Fireworks, Sglang, Vllm, Ollama,
Atlascloud, and WanjieArk — the providers that were silently expanded
by the generic provider_env_vars loop but had no test coverage beyond
the existing Moonshot and OpenAI cases.

Co-Authored-By: bot_apk <apk@cognition.ai>
2026-05-26 03:47:42 +00:00
Hunter Bown 05e4b08335 fix(cli): allow Moonshot Kimi TUI delegation 2026-05-25 22:06:44 -05:00
Hunter Bown af1f99e85d docs(changelog): add missing v0.8.45 entries 2026-05-25 22:06:39 -05:00
Hunter Bown 70a655cddb test: use open model sentinels 2026-05-25 18:51:05 -05:00
Hunter Bown 228372935e chore(release): prepare v0.8.45
Harvested from PR #2118 by @Hmbown.

Includes Kimi/Moonshot OAuth, v0.8.45 release prep, the Codex/ChatGPT OAuth removal, open-source-first model defaults, and the safe green PR batch merged into main before the release branch refresh.
2026-05-25 18:45:36 -05:00
kitty c7bd7f161e feat: session title in composer
Harvested from PR #2108 by @wdw8276.

Co-authored-by: kitty <dw_wang126@126.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 18:29:22 -05:00
Hanmiao Li 1a78e3cc7e feat(tui): add sidebar hover tooltip for truncated Work/Tasks lines
Harvested from PR #2110 by @idling11.

Co-authored-by: Hanmiao Li <894876246@qq.com>
2026-05-25 18:28:48 -05:00
Hanmiao Li b45287133b feat: embed user prompt in snapshot labels for readable /restore listings
Harvested from PR #2111 by @idling11.

Co-authored-by: Hanmiao Li <894876246@qq.com>
2026-05-25 18:28:04 -05:00
cyq 43f317d524 fix(tui): start actionable goal prompts
Harvested from PR #2097 by @cyq1017.

Co-authored-by: cyq <15000851237@163.com>
2026-05-25 18:27:24 -05:00
cyq 7976374e91 fix(tui): emit subagent completion before terminal update
Harvested from PR #2120 by @cyq1017.

Co-authored-by: cyq <15000851237@163.com>
2026-05-25 18:26:39 -05:00
hexin 9c8e482607 fix(engine): keep auto-compaction working on sub-500K self-hosted windows
Harvested from PR #2060 by @h3c-hexin.

Co-authored-by: hexin <he.xin@h3c.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 18:25:58 -05:00
hexin aa468c3078 fix(engine): use user role for sub-agent completion runtime message
Harvested from PR #2057 by @h3c-hexin.

Co-authored-by: hexin <he.xin@h3c.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 18:25:07 -05:00
Reid c238aec638 fix(tui): keep model picker selection on Esc
Harvested from PR #2056 by @reidliu41.

Co-authored-by: reidliu41 <reid201711@gmail.com>
2026-05-25 18:18:03 -05:00
Reid c483cd525d fix(tui): simplify approval confirmation flow
Harvested from PR #2143 by @reidliu41.

Co-authored-by: reidliu41 <reid201711@gmail.com>
2026-05-25 18:17:31 -05:00
Hunter Bown 37dd821f33 Add Kimi OAuth provider support
Adds Moonshot/Kimi provider support with Kimi CLI OAuth reuse and review fixes for secure refresh writes, model completion, CLI auth, and secret-store behavior.
2026-05-25 17:48:05 -05:00
Hunter Bown a6bd5ac08b v0.8.45: add voice input, RLM session objects, and slash recovery fix (#2047)
* feat(tui): add command palette voice input

* feat(rlm): expose active session objects

* fix(tui): do not restore slash commands as retry drafts

* fix(config): expose voice input settings rows

* fix: sync ActiveTurnState.auto_approve when remember is set

When a user checks 'Remember for this tool' and approves a tool call,
remember_thread_auto_approve() only persisted thread.auto_approve to disk
but did not update the in-memory ActiveTurnState for the current turn.
This meant subsequent tool calls within the same turn would still require
manual approval, making the remember checkbox appear non-functional.

Now remember_thread_auto_approve() also sets
ActiveTurnState.auto_approve = true, so active_turn_flags() returns
the correct value and the approval_decision() logic auto-approves
remaining tool calls in the current turn.

(cherry picked from commit 2ccf048c8984d61e3341a4304d0796a1f965d3e7)

* test(runtime): cover remembered auto approve on active turn

---------

Co-authored-by: Ben Gao <bengao168@msn.com>
2026-05-24 22:19:50 -05:00
jayzhu de9937c7a7 fix(skills): parse YAML block scalars in SKILL.md frontmatter (#1908)
Closes #1907. Thanks @zlh124 for the clear parser-level repro, implementation, and block-scalar/chomping test coverage.
2026-05-24 21:20:10 -05:00
Hunter Bown d22da53e2d feat(v0.8.45): land control-plane workstream slices (#2035)
Includes cancellable file_search/list_dir behavior, deterministic sub-agent whale-species nicknames, and an honest /balance command scaffold for the provider-billing work. Reviewed the overlapping file-search cancellation contribution in #2044 from @h3c-hexin; that PR's Windows failure was unrelated to the cancellation code, and the contributor context is preserved here.
2026-05-24 21:18:54 -05:00
Hunter Bown b220113a79 fix(release): keep receipt test stable on 1.88 2026-05-24 17:57:27 -05:00
Hunter Bown f13108bb81 fix(release): keep receipt truncation stable 2026-05-24 17:50:39 -05:00
Hunter Bown dbbc51a700 fix(release): satisfy v0.8.44 parity clippy 2026-05-24 17:17:03 -05:00
Hunter Bown 0ebc04f043 fix(tests): repair Windows CI failures
- composer_history: raise deadline to 10s on Windows for writer thread
- prompts: make memory_guidance tier-order assertion CRLF-agnostic
- gitattributes: enforce LF line endings for include_str!() prompt files

Regression from the v0.8.44 release changes — the writer thread batching
and the updated constitutional tier ordering in memory_guidance.md both
uncovered Windows-only test flakes.
2026-05-24 17:11:26 -05:00
Hunter Bown 411ae89c19 fix(release): repair v0.8.44 gates 2026-05-24 17:11:26 -05:00
Hunter Bown 93ee76810b feat(v0.8.44): one-time config migration from ~/.deepseek/ to ~/.codewhale/
migrate_config_if_needed() copies config.toml on first launch.
Called in run_interactive after config creation. Non-fatal,
never overwrites an existing primary config.
2026-05-24 16:25:17 -05:00
Hunter Bown 1a311c591f chore: bump version to 0.8.44
Workspace version 0.8.43 → 0.8.44. All path dependency pins
and npm package version updated accordingly.
2026-05-24 16:22:44 -05:00
Hunter Bown 11d1d5c277 feat(v0.8.44): human-readable agent role labels in transcript cards
#1981: DelegateCard now shows readable roles (scout, builder,
reviewer, etc.) instead of raw agent_type strings, and uses the
completion summary as the primary detail when available. Raw
agent_ids are truncated to 8 chars as secondary detail.
2026-05-24 16:13:10 -05:00
Hunter Bown 80111ffad3 feat(v0.8.44): plan detail display + session picker on startup
#834: PlanPromptView now renders the plan explanation and steps
(when update_plan was called) before the action options. Uses
PlanSnapshot from the shared plan state.

#1638: Session picker auto-opens on clean startup when saved
sessions exist and no --resume/--continue/--fresh was specified.
No new TuiOptions field needed — uses existing resume_session_id.
2026-05-24 16:07:03 -05:00
Hunter Bown c63d042c15 feat(v0.8.44): steer instead of queue when busy-waiting (#2009)
When the model is busy but not actively streaming text (waiting on
tool results, sub-agents, or shell commands), Enter now tries to steer
the message into the current turn rather than silently queueing it.
If steering fails, the message falls back to queuing.

During active streaming, Enter still queues to avoid interrupting
in-flight reasoning. Ctrl+Enter forces Steer in all busy states.
2026-05-24 15:39:14 -05:00
Hunter Bown 698722c946 feat(cli): --continue/-c flag forwards to TUI resume path
Other agent: root_tui_passthrough() builds forwarded args, rejects
--continue + -p combo (directs to codewhale exec --continue).
Tests: parses_top_level_continue, top_level_continue_rejects_one_shot.

Session picker: formatting cleanup on test calls.
2026-05-24 15:36:54 -05:00
Hunter Bown ea0a129f15 fix: add missing rename_mode/rename_input in test constructors 2026-05-24 15:28:37 -05:00
Hunter Bown 1364ebb7ca feat(v0.8.44): session picker inline rename + checklist sidebar refresh
#1600: 'r' keybinding in session picker for inline rename.
Enter inline rename mode, type new title, Enter to confirm, Esc to cancel.
Updates the saved session metadata and refreshes the picker list.

#1787: checklist_write, checklist_update, update_plan now trigger
immediate Work sidebar refresh (previously only todo_write did).
2026-05-24 15:19:54 -05:00
Hunter Bown b46e0edebe feat(v0.8.44): add codew convenience alias binary
Permanent short-form shim — forwards silently to codewhale.
Six fewer keystrokes, no deprecation warning. Ships alongside
codewhale and the legacy deepseek alias.
2026-05-24 15:09:10 -05:00
Hunter Bown 425dadfd0f feat(v0.8.44): doctor output + remaining hardcoded path fixes
- Doctor: add 'State Root' section showing active root, legacy status,
  and dual-root detection
- Doctor (text + JSON): use codewhale_config resolver for config path
- deepseek_home_dir(): now resolves to CodeWhale home
- composer_stash: writes to ~/.codewhale/composer_stash.jsonl
- merge_project_config: checks .codewhale/ before .deepseek/
- Text/config paths default to .codewhale/ not .deepseek/
2026-05-24 15:07:41 -05:00
Hunter Bown a3f50fe851 feat(v0.8.44): P0 state root migration to ~/.codewhale with legacy compat
#2011: migrate app state to ~/.codewhale
- Add CodeWhalePaths: codewhale_home(), legacy_deepseek_home(),
  resolve_state_dir(), ensure_state_dir() in codewhale-config
- Config: resolve_config_path supports CODEWHALE_CONFIG_PATH env,
  default_config_path prefers ~/.codewhale/config.toml
- Project overlay: checks .codewhale/config.toml before .deepseek/
- Sessions: default_sessions_dir uses resolve_state_dir with fallback
- Workspace trust: writes to CodeWhale home via ensure_state_dir
- Init: ensure_deepseek_gitignored adds both .codewhale/ and .deepseek/
- .gitignore: adds .codewhale/

#2010: session artifact hygiene
- /save without path now writes to managed sessions dir instead of cwd
- Boot-time session prune via cleanup_old_sessions (MAX_SESSIONS=50)
- sessions_dir() public accessor for checkpoint path resolution

Fix: load_recent_checkpoint now uses manager.sessions_dir() instead
of hardcoding ~/.deepseek/sessions/checkpoints/
2026-05-24 15:04:06 -05:00
Hunter Bown 25ce4f5970 feat(v0.8.44): SWE-bench adapter, markdown table fix, contributor sync, receipt truncation fix
- SWE-bench: codewhale swebench run/export writes prediction JSONL
  from working-tree diff, with untracked-file inclusion via git add -N
- CLI: --workspace / -C global flag forwards to TUI for file ops
- CLI: codewhale exec --auto semantics clarified in help text
- Markdown: table pipes inside inline code no longer create phantom columns
  (split_table_cells with backtick-awareness)
- Receipt: floor_char_boundary prevents multibyte UTF-8 slice panic
- Contributors: Ling (LING71671 #1839 #1911), Ben Younes (ousamabenyounes #1938),
  jeoor npm fix (#1860) credited across all 3 READMEs
- ja-JP README: 19 contributors synced to parity with EN/zh-CN (80 each)
- Docs: SWEBENCH.md, RECURSIVE_SELF_IMPROVEMENT.md, MODES.md exec clarification
- Sub-agent footer: Alt+V hint now says 'details' not 'raw'
2026-05-24 14:47:42 -05:00
Hunter Bown 494988118c feat(prompts): Constitution of CodeWhale — tiered prompt architecture
- Replace flat base.md with Constitutional hierarchy: Preamble + 7 Articles
- We begin with Brother Whale — founding intelligence, not personality
- Dynamic model identity: {model_id} template injected at runtime
- Article VII: Hierarchy of Law — 9-tier conflict resolution
- Goal mode: remove read-only claim, add Goal Loop + Wakeup Check
- Personality (calm.md): Tier 8 subordination, cannot override constitution
- Memory: Tier 7 enforcement, imperatives treated as preferences
- Handoff: Tier 9 staleability, subordinate to evidence and user
- Approval prompts: Tier 2 Statute markers
- Authority recap appended at end of system prompt
- model_id threaded through PromptSessionContext → engine + UI
- 9 new tests: constitutional order, model injection, goal correctness
2026-05-24 12:07:30 -05:00
Hunter Bown f592d7085a fix(tui): add file_tree_visible field to App for CI compile 2026-05-24 10:36:52 -05:00
Hunter Bown c86c8f4174 fix(tui): collapse collapsible if into match guard for Rust 1.95 clippy 2026-05-24 10:26:26 -05:00
Hunter Bown 8ba573e7e8 fix(tui): remove unused WLCOPY_BIN constant causing dead-code warning on Linux parity check 2026-05-24 09:08:45 -05:00
Hunter Bown 22c2c4b818 fix(tui): drop thinking from cell_has_detail_target; credit README contributors
Fixes the macOS test failure on PR #1988 and the contributor-credit
gate from scripts/release/check-versions.sh.

cell_has_detail_target() was matching HistoryCell::Thinking, which
caused the activity footer to append " · ⌥+V raw" to thinking cells
that have no separate raw detail target. The detail-card flow only
exists for tool / sub-agent cells; thinking renders its own raw text
inline. Removing Thinking from the match arm restores the behavior the
existing
activity_footer_hint_surfaces_visible_thinking_without_raw_tool_hint
test asserts.

The CHANGELOG.md 0.8.43 section now credits the 30 contributors added
to README acknowledgements in this cycle, satisfying the README-vs-
CHANGELOG cross-check in check-versions.sh. crates/tui/CHANGELOG.md is
re-synced so the matching guard passes.

Verified locally on macOS:
- cargo fmt --all -- --check         : clean
- cargo clippy --workspace --all-targets --all-features --locked -D warnings : clean
- cargo test --workspace --all-features --locked : 41 suites, 0 failed
- ./scripts/release/check-versions.sh : Version state OK
- ./scripts/release/publish-crates.sh dry-run : all 14 crates OK
- cargo build --release --locked : clean

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 07:57:29 -05:00
Hunter Bown b0d48d8d03 style: use clamp() instead of min().max() pattern 2026-05-24 04:37:13 -05:00
Hunter Bown 54698849c8 fix(docs): refresh stale references and wire decision card rendering
- npm/codewhale/README.md: remove DeepSeek-first language
- docs/INSTALL.md: scoop install codewhale (not deepseek-tui)
- Wire decision card overlay rendering in main render loop
- Decision cards now appear centered on transcript when active
2026-05-24 04:31:35 -05:00
Hunter Bown 78d72842c3 docs(release): add thinking block toggle and sub-agent fix to CHANGELOG 2026-05-24 04:21:40 -05:00
Hunter Bown af59f7a732 fix(engine): drain late sub-agent completions before turn break (#1961)
Before the turn breaks at the thinking-only checkpoint, drain
any sub-agent completions that arrived between the last hold
check and now. If a child finished while we were running the
final status check, surface its sentinel immediately rather
than delaying it to the next turn.
2026-05-24 04:21:21 -05:00
Hunter Bown 805ec668f2 feat(tui): add keyboard toggle for thinking block collapse (#1972)
- Thinking cells now qualify as detail targets alongside tools and sub-agents
- Space key on empty composer toggles the focused cell's collapsed state
- Status message confirms expand/collapse action
- Builds on existing collapsed_cells HashSet from mouse context menu
2026-05-24 04:18:22 -05:00