diff --git a/README.md b/README.md index 91f182b..c61556c 100644 --- a/README.md +++ b/README.md @@ -236,8 +236,8 @@ description = "review this pane's recent output" ``` `annotate.review` opens a code review of the focused pane's git changes. Comment on lines of -the diff, then send the comments to the agent in that pane. A folder with no repository or no -changes shows an error instead. It works on macOS and Linux, and has no default key: +the diff, then send the comments to the agent in that pane. A folder with no repository +shows an error instead. It works on macOS and Linux, and has no default key: ```toml [[keys.command]] @@ -247,6 +247,19 @@ command = "annotate.review" description = "review this repo's changes" ``` +With nothing uncommitted, `annotate.review` opens a picker instead: uncommitted, unstaged or +staged changes, the branch, or a recent commit. The cursor starts on the first row with +changes, so after an agent has committed it is already on the newest commit. `annotate.review-pick` +opens that picker straight away, and `p` inside a review brings it back. It has no default key: + +```toml +[[keys.command]] +key = "prefix+ctrl+p" +type = "plugin_action" +command = "annotate.review-pick" +description = "pick changes to review" +``` + In the review, `d` goes to the definition of a word on the cursor's line, and `ctrl+o` goes back. `o` shows the whole file as it is now and `O` as it was before the change; `Esc` returns to the diff. `x` marks a file viewed, and the file list ticks it. `z` hides or shows the notes, diff --git a/herdr-plugin.toml b/herdr-plugin.toml index aacfde7..273f542 100644 --- a/herdr-plugin.toml +++ b/herdr-plugin.toml @@ -1,6 +1,6 @@ id = "annotate" name = "Annotate" -version = "0.11.6" +version = "0.11.7" min_herdr_version = "0.8.0" description = "Comment on terminal selections and copy annotations as agent context." platforms = ["linux", "macos", "windows"] @@ -150,3 +150,13 @@ description = "Review the focused pane's uncommitted git changes in plannotator- contexts = ["workspace", "pane"] platforms = ["macos", "linux"] command = ["./bin/plannotator-tui.exe", "herdr", "review"] + +# The change picker over the same repository: uncommitted, unstaged or staged changes, the +# branch, or a recent commit. Nothing is captured first, so the pane opens at once. +[[actions]] +id = "review-pick" +title = "Annotate: pick changes to review" +description = "Pick what to review in the focused pane's git repository: uncommitted, unstaged or staged changes, the branch, or a recent commit." +contexts = ["workspace", "pane"] +platforms = ["macos", "linux"] +command = ["./bin/plannotator-tui.exe", "herdr", "review", "--pick"] diff --git a/links/herdr-plugin.toml b/links/herdr-plugin.toml index 27c6d92..cfda6e4 100644 --- a/links/herdr-plugin.toml +++ b/links/herdr-plugin.toml @@ -15,7 +15,7 @@ id = "annotate-links" name = "Annotate Links" -version = "0.11.6" +version = "0.11.7" min_herdr_version = "0.8.0" description = "Open Ctrl-clicked file:// Markdown links in Annotate (needs the Annotate Full plugin)." platforms = ["linux", "macos", "windows"] diff --git a/lite/herdr-plugin.toml b/lite/herdr-plugin.toml index f28a099..9845d42 100644 --- a/lite/herdr-plugin.toml +++ b/lite/herdr-plugin.toml @@ -8,7 +8,7 @@ id = "annotate" name = "Annotate" -version = "0.11.6" +version = "0.11.7" min_herdr_version = "0.8.0" description = "Comment on terminal selections and copy annotations as agent context." platforms = ["linux", "macos", "windows"] diff --git a/plannotator-tui.version b/plannotator-tui.version index e5cbde3..b80f98e 100644 --- a/plannotator-tui.version +++ b/plannotator-tui.version @@ -1 +1 @@ -0.11.6 +0.11.7 diff --git a/scripts/test-fetch-plannotator-tui.ps1 b/scripts/test-fetch-plannotator-tui.ps1 index 4db938d..0010cdf 100644 --- a/scripts/test-fetch-plannotator-tui.ps1 +++ b/scripts/test-fetch-plannotator-tui.ps1 @@ -74,7 +74,7 @@ try { $result = Invoke-Fetcher Assert-True ($result.ExitCode -eq 0) "local override failed: $($result.Output)" Assert-BytesEqual $source $destination "local override bytes differ" - Assert-True ((Get-Content -LiteralPath $stamp -Raw) -ceq "0.11.6") "local stamp differs" + Assert-True ((Get-Content -LiteralPath $stamp -Raw) -ceq "0.11.7") "local stamp differs" $env:PLANNOTATOR_TUI_BIN = $null $env:PLANNOTATOR_TUI_RELEASE_BASE = "http://127.0.0.1:1/must-not-be-requested" @@ -120,7 +120,7 @@ try { Assert-True ($result.ExitCode -eq 0) "download fixture failed: $($result.Output)" Assert-True ($result.Output -match "x86_64-pc-windows-msvc") "x64 target was not selected" Assert-BytesEqual $source $destination "downloaded destination bytes differ" - Assert-True ((Get-Content -LiteralPath $stamp -Raw) -ceq "0.11.6") "download stamp differs" + Assert-True ((Get-Content -LiteralPath $stamp -Raw) -ceq "0.11.7") "download stamp differs" Set-Content -LiteralPath $stamp -NoNewline -Value "preserve-this-stamp" $beforeHash = (Get-FileHash -Algorithm SHA256 -LiteralPath $destination).Hash diff --git a/scripts/test-fetch-plannotator-tui.sh b/scripts/test-fetch-plannotator-tui.sh index 7aabb9e..5604665 100644 --- a/scripts/test-fetch-plannotator-tui.sh +++ b/scripts/test-fetch-plannotator-tui.sh @@ -14,7 +14,7 @@ cp "$repository_root/plannotator-tui.version" "$plugin_root/" source_binary="$source_root/plannotator-tui local" cat > "$source_binary" <<'EOF' #!/usr/bin/env sh -printf 'plannotator-tui 0.11.6\n' +printf 'plannotator-tui 0.11.7\n' EOF chmod +x "$source_binary" printf 'old destination' > "$plugin_root/bin/plannotator-tui.exe" @@ -23,10 +23,10 @@ printf 'old-version' > "$plugin_root/bin/plannotator-tui.version" PLANNOTATOR_TUI_BIN="$source_binary" bash "$plugin_root/scripts/fetch-plannotator-tui.sh" cmp "$source_binary" "$plugin_root/bin/plannotator-tui.exe" -test "$(cat "$plugin_root/bin/plannotator-tui.version")" = 0.11.6 +test "$(cat "$plugin_root/bin/plannotator-tui.version")" = 0.11.7 test ! -e "$plugin_root/bin/plannotator-tui" -test "$("$plugin_root/bin/plannotator-tui.exe" --version)" = "plannotator-tui 0.11.6" -test "$(bash "$plugin_root/scripts/plannotator-tui.sh" --version)" = "plannotator-tui 0.11.6" +test "$("$plugin_root/bin/plannotator-tui.exe" --version)" = "plannotator-tui 0.11.7" +test "$(bash "$plugin_root/scripts/plannotator-tui.sh" --version)" = "plannotator-tui 0.11.7" output="$(bash "$plugin_root/scripts/fetch-plannotator-tui.sh")" case "$output" in diff --git a/scripts/test-windows-full-manifest.py b/scripts/test-windows-full-manifest.py index 391ddc0..9598b58 100644 --- a/scripts/test-windows-full-manifest.py +++ b/scripts/test-windows-full-manifest.py @@ -183,8 +183,8 @@ def check_distributed(path: Path, version_path: Path, native_version_path: Path) manifest = load(path) check_top_level_windows(path, manifest) check_native_lite(path, manifest) - if version_path.read_text(encoding="utf-8").strip() != "0.11.6": - fail(version_path, "plannotator-tui.version is not 0.11.6") + if version_path.read_text(encoding="utf-8").strip() != "0.11.7": + fail(version_path, "plannotator-tui.version is not 0.11.7") if native_version_path.read_text(encoding="utf-8").strip() != "0.2.4": fail(native_version_path, "herdr-annotate.version is not 0.2.4") @@ -321,7 +321,7 @@ def check_links(path: Path, root_path: Path) -> None: # Root actions left out of Windows Full: plannotator-tui's code review is macOS and Linux only. -UNIX_ONLY_ACTIONS = {"review"} +UNIX_ONLY_ACTIONS = {"review", "review-pick"} def surface(path: Path, manifest: dict[str, object], table: str) -> set[tuple[object, ...]]: diff --git a/windows-full/herdr-plugin.toml b/windows-full/herdr-plugin.toml index 1a6fca8..834321d 100644 --- a/windows-full/herdr-plugin.toml +++ b/windows-full/herdr-plugin.toml @@ -21,7 +21,7 @@ id = "annotate" name = "Annotate" -version = "0.11.6" +version = "0.11.7" min_herdr_version = "0.9.0" description = "Comment on terminal selections and copy annotations as agent context." platforms = ["windows"]