Generic command palette: AGENTS.md, scoped review, sessions, model override#1
Conversation
…ssions, model override Adds three commands and one behavior change, all surfacing Codex/byteask capabilities that already existed in the CLI but weren't reachable from the plugin: - ByteAskReview now prompts for scope (uncommitted / base branch / commit / whole repo) instead of always reviewing everything. - ByteAskAgents opens or scaffolds the nearest AGENTS.md, the primary lever for steering the agent's behavior in a repo. - ByteAskSessions surfaces archive/unarchive/delete alongside the existing resume/fork, plus a "browse all" entry. - ByteAskModel sets a transient model/-c override for future invocations without editing Lua config. Updates the CI load-test and AGENTS.md docs to the resulting 11-command set. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Self-review before merge caught a real bug: config.set_override used
vim.tbl_deep_extend('force', ...) to merge the new override into the old
one. Since a nil table field is simply absent (not an explicit unset),
blanking the model field or the -c field in a second :ByteAskModel call
silently kept the old value — directly contradicting the prompt text
("blank = default" / "blank = none"). Only :ByteAskModel! could clear it.
Fixes:
- set_override now replaces the override wholesale instead of merging, so a
blank field actually clears it.
- The model is committed as soon as the first prompt resolves, so cancelling
the second (optional) -c prompt can no longer discard a model change that
was already typed; the existing config carries over untouched in that case.
- The -c prompt now prefills with the currently-set overrides (so replacing
wholesale doesn't surprise a user who only meant to add one key).
- Malformed -c entries (missing '=') now warn instead of silently vanishing.
- Session archive/unarchive/delete failures now include the CLI's stderr
instead of just an exit code, and the manual argv construction there gets
the same "why no common flags" comment M.apply already documents.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Ran a self-review pass (line-by-line, removed-behavior, cross-file, reuse/simplification/efficiency, altitude, CLAUDE.md-conventions angles) before merging. Found and fixed one real bug: |
Summary
ByteAskReviewnow prompts for scope (uncommitted / base branch / commit / whole repo) instead of always reviewing everything, matching whatbyteask reviewactually supports.ByteAskAgentsopens or scaffolds the nearestAGENTS.md— the primary lever for steering the agent, previously unreachable from the plugin.ByteAskSessionssurfacesarchive/unarchive/deletealongside a "browse all sessions" entry (existingresume/forkunchanged).ByteAskModelsets a transient-m/-coverride for future invocations without editing Lua config;!clears it.AGENTS.mddocs updated to the resulting 11-command set.All new/changed commands stay in the plugin's existing zero-dependency style (
vim.ui.select/vim.ui.input,jobstart/termopen), no new plugin dependencies, no engine changes.Test plan
stylua --check .— cleanluacheck lua/ plugin/ --globals vim— 0 warnings/errorsactionlint .github/workflows/*.yml— clean:ByteAsk*commands registerbyteaskbinary needed):apply_common_flagslayersByteAskModeloverrides oversetup()defaults and falls back cleanly on clearfind_upwardlocatesAGENTS.mdwalking up the tree, returnsnilat root when absentByteAskReviewscope selection builds the exact--uncommitted/--base <branch>/--commit <sha>argv matchingbyteask review --helpbyteaskinstall (needs a maintainer with the CLI + a real session to fully exerciseByteAskSessionsarchive/delete against a live account)🤖 Generated with Claude Code