Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,18 @@ command = "annotate.terminal"
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:

```toml
[[keys.command]]
key = "prefix+ctrl+r"
type = "plugin_action"
command = "annotate.review"
description = "review this repo's changes"
```

`annotate.gate` opens the same folder review as `annotate.open`, with an **Approve** button
(`A`). The agent gets `The user approved.` (with any notes as non-blocking guidance), or your
numbered feedback as usual. Use it when an agent should wait for your sign-off. It has no
Expand Down
11 changes: 10 additions & 1 deletion herdr-plugin.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id = "annotate"
name = "Annotate"
version = "0.9.10"
version = "0.10.0"
min_herdr_version = "0.8.0"
description = "Comment on terminal selections and copy annotations as agent context."
platforms = ["linux", "macos", "windows"]
Expand Down Expand Up @@ -141,3 +141,12 @@ description = "Review the focused pane's recent terminal output in plannotator-t
contexts = ["pane"]
platforms = ["macos", "linux"]
command = ["./bin/plannotator-tui.exe", "herdr", "terminal"]

# No default key; bind one in Herdr's config (see the README). Code review is macOS and Linux only.
[[actions]]
id = "review"
title = "Annotate: review changes"
description = "Review the focused pane's uncommitted git changes in plannotator-tui and send comments to its agent."
contexts = ["workspace", "pane"]
platforms = ["macos", "linux"]
command = ["./bin/plannotator-tui.exe", "herdr", "review"]
2 changes: 1 addition & 1 deletion links/herdr-plugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

id = "annotate-links"
name = "Annotate Links"
version = "0.9.10"
version = "0.10.0"
min_herdr_version = "0.8.0"
description = "Open Ctrl-clicked file:// Markdown links in Annotate (needs the Annotate Full plugin)."
platforms = ["linux", "macos", "windows"]
Expand Down
2 changes: 1 addition & 1 deletion lite/herdr-plugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

id = "annotate"
name = "Annotate"
version = "0.9.10"
version = "0.10.0"
min_herdr_version = "0.8.0"
description = "Comment on terminal selections and copy annotations as agent context."
platforms = ["linux", "macos", "windows"]
Expand Down
2 changes: 1 addition & 1 deletion plannotator-tui.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.11
0.10.0
4 changes: 2 additions & 2 deletions scripts/test-fetch-plannotator-tui.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.11") "local stamp differs"
Assert-True ((Get-Content -LiteralPath $stamp -Raw) -ceq "0.10.0") "local stamp differs"

$env:PLANNOTATOR_TUI_BIN = $null
$env:PLANNOTATOR_TUI_RELEASE_BASE = "http://127.0.0.1:1/must-not-be-requested"
Expand Down Expand Up @@ -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.9.11") "download stamp differs"
Assert-True ((Get-Content -LiteralPath $stamp -Raw) -ceq "0.10.0") "download stamp differs"

Set-Content -LiteralPath $stamp -NoNewline -Value "preserve-this-stamp"
$beforeHash = (Get-FileHash -Algorithm SHA256 -LiteralPath $destination).Hash
Expand Down
8 changes: 4 additions & 4 deletions scripts/test-fetch-plannotator-tui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.11\n'
printf 'plannotator-tui 0.10.0\n'
EOF
chmod +x "$source_binary"
printf 'old destination' > "$plugin_root/bin/plannotator-tui.exe"
Expand All @@ -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.9.11
test "$(cat "$plugin_root/bin/plannotator-tui.version")" = 0.10.0
test ! -e "$plugin_root/bin/plannotator-tui"
test "$("$plugin_root/bin/plannotator-tui.exe" --version)" = "plannotator-tui 0.9.11"
test "$(bash "$plugin_root/scripts/plannotator-tui.sh" --version)" = "plannotator-tui 0.9.11"
test "$("$plugin_root/bin/plannotator-tui.exe" --version)" = "plannotator-tui 0.10.0"
test "$(bash "$plugin_root/scripts/plannotator-tui.sh" --version)" = "plannotator-tui 0.10.0"

output="$(bash "$plugin_root/scripts/fetch-plannotator-tui.sh")"
case "$output" in
Expand Down
14 changes: 10 additions & 4 deletions scripts/test-windows-full-manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.11":
fail(version_path, "plannotator-tui.version is not 0.9.11")
if version_path.read_text(encoding="utf-8").strip() != "0.10.0":
fail(version_path, "plannotator-tui.version is not 0.10.0")
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")

Expand Down Expand Up @@ -320,6 +320,10 @@ def check_links(path: Path, root_path: Path) -> None:
fail(path, f"handlers cover {covered!r}, not every platform")


# Root actions left out of Windows Full: plannotator-tui's code review is macOS and Linux only.
UNIX_ONLY_ACTIONS = {"review"}


def surface(path: Path, manifest: dict[str, object], table: str) -> set[tuple[object, ...]]:
"""Ids, titles, descriptions and contexts, so parity is compared rather than assumed."""
entries = manifest.get(table, [])
Expand Down Expand Up @@ -367,8 +371,10 @@ def check_windows_full(path: Path, root_path: Path) -> None:
if not script.is_file():
fail(path, f"build script {target!r} does not exist at {script}")

# Parity is the point of the variant: the same surface, reached a different way.
if surface(path, manifest, "actions") != surface(root_path, root, "actions"):
# Parity is the point of the variant: the same surface, reached a different way. The
# one exception is an action plannotator-tui can't run on Windows yet.
root_actions = {a for a in surface(root_path, root, "actions") if a[0] not in UNIX_ONLY_ACTIONS}
if surface(path, manifest, "actions") != root_actions:
fail(path, "action ids, titles, descriptions or contexts differ from the root manifest")

for table in ("actions", "panes", "link_handlers"):
Expand Down
2 changes: 1 addition & 1 deletion windows-full/herdr-plugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

id = "annotate"
name = "Annotate"
version = "0.9.10"
version = "0.10.0"
min_herdr_version = "0.9.0"
description = "Comment on terminal selections and copy annotations as agent context."
platforms = ["windows"]
Expand Down
Loading