Skip to content

Generic command palette: AGENTS.md, scoped review, sessions, model override#1

Merged
anirudhakulkarni merged 2 commits into
mainfrom
feat/generic-command-palette
Jul 3, 2026
Merged

Generic command palette: AGENTS.md, scoped review, sessions, model override#1
anirudhakulkarni merged 2 commits into
mainfrom
feat/generic-command-palette

Conversation

@anirudhakulkarni

Copy link
Copy Markdown
Contributor

Summary

  • ByteAskReview now prompts for scope (uncommitted / base branch / commit / whole repo) instead of always reviewing everything, matching what byteask review actually supports.
  • ByteAskAgents opens or scaffolds the nearest AGENTS.md — the primary lever for steering the agent, previously unreachable from the plugin.
  • ByteAskSessions surfaces archive/unarchive/delete alongside a "browse all sessions" entry (existing resume/fork unchanged).
  • ByteAskModel sets a transient -m/-c override for future invocations without editing Lua config; ! clears it.
  • CI load-test and AGENTS.md docs 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 . — clean
  • luacheck lua/ plugin/ --globals vim — 0 warnings/errors
  • actionlint .github/workflows/*.yml — clean
  • Headless load-test asserting all 11 :ByteAsk* commands register
  • Unit-level checks of new logic (headless nvim, no real byteask binary needed):
    • apply_common_flags layers ByteAskModel overrides over setup() defaults and falls back cleanly on clear
    • find_upward locates AGENTS.md walking up the tree, returns nil at root when absent
    • ByteAskReview scope selection builds the exact --uncommitted/--base <branch>/--commit <sha> argv matching byteask review --help
  • Manual exercise against a live byteask install (needs a maintainer with the CLI + a real session to fully exercise ByteAskSessions archive/delete against a live account)

🤖 Generated with Claude Code

anirudhakulkarni and others added 2 commits July 3, 2026 15:15
…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>
@anirudhakulkarni

Copy link
Copy Markdown
Contributor Author

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: config.set_override used vim.tbl_deep_extend('force', ...) to merge the new override into the old one, so blanking the model or -c field in a second :ByteAskModel call silently kept the stale value instead of clearing it — contradicting the prompt's own "blank = default"/"blank = none" text. Fixed in 75b90d9: set_override now replaces wholesale, the model commits as soon as the first prompt resolves (so cancelling the second prompt can't discard it), the -c prompt prefills with the current overrides, and malformed -c entries now warn instead of vanishing silently. Also improved session archive/unarchive/delete failure messages to include stderr. Re-verified all argv-construction paths headlessly after the fix; CI green.

@anirudhakulkarni anirudhakulkarni merged commit 4fe667e into main Jul 3, 2026
3 checks passed
@anirudhakulkarni anirudhakulkarni deleted the feat/generic-command-palette branch July 3, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant