Helps Windows users running bash script who were stuck on old versions.
The mv command may not overwrite properly on Windows due to file locking
or .exe extension mismatch.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Users with older installations at ~/.local/bin had PATH conflicts
where the old binary took precedence over the new install location.
Now removes plannotator from old locations before installing.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Add agent filtering to experimental.chat.system.transform hook to prevent
injecting plan submission prompts into agents that shouldn't receive them:
- Hardcoded exclusion for "build" agent
- Dynamic exclusion for agents with mode "subagent" (e.g., general, explore)
- Skip injection if agent detection fails (safer behavior)
The plan agent and other primary agents will continue to receive the prompt.
Co-authored-by: cognitive <152830360+METAeuPHORIC@users.noreply.github.com>
- Add new "Comment" editor mode that shows input directly on selection
- Add type-to-comment in Selection mode: typing while toolbar is open
auto-transitions to comment input with the typed character
- Add initialStep/initialType props to AnnotationToolbar for direct input
- Fix autofocus timing for portal-rendered toolbar
Closes#93
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Addresses community feedback on v0.6.6 sub-agent fix:
1. Add `config` hook to register `submit_plan` in `primary_tools`
- OpenCode natively hides these tools from ALL sub-agents
- Works for custom sub-agents too, not just general/explore
2. Replace buggy `chat.message` hook with `experimental.chat.system.transform`
- chat.message was persisting the reminder to ALL user messages
- system.transform injects once into system prompt
3. Remove hardcoded runtime sub-agent check
- No longer needed with primary_tools handling it
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Increases the plannotator hook timeout from 30 minutes to 4 days
(345600 seconds) to prevent the server from being killed during
extended plan review sessions.
Fixes#84
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* fix: use @plannotator/web-highlighter for proper newline handling
- Switch from web-highlighter to @plannotator/web-highlighter@0.8.1
- Use source.text from highlighter (preserves newlines in cross-block selections)
- Update dependency to ^0.8.1 which fixes exports field for bundlers
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add Cmd+C keyboard shortcut for copying selected text
Closes#60
When text is selected and the annotation toolbar is visible, Cmd+C (Mac)
or Ctrl+C (Windows/Linux) will copy the selected text with proper newlines
preserved between block elements.
This works because @plannotator/web-highlighter@0.8.1 now captures text
using Selection.toString() which preserves newlines for cross-block
selections.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: don't intercept Cmd+C in input/textarea fields
Prevents the custom copy handler from intercepting Cmd+C when the user
is focused in an input or textarea (e.g., annotation comment input).
Previously, copying text from an input would copy the original plan
selection instead.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- No annotations → Approve (proceed with implementation)
- With annotations → Send Feedback (request revision)
Works in both plan review and code review UIs. Respects input focus
to avoid conflict with existing Cmd+Enter to save annotation edits.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Keep clearing both ~/.cache/opencode and ~/.bun/install/cache paths
to match Windows behavior (belt and suspenders).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The `files` array in package.json was missing plannotator.html and
review-editor.html, causing them to be omitted from npm publishes.
This explains why users were stuck on old versions.
Also fixes incorrect cache path in docs and install script.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The Plan Submission system prompt was being injected into ALL requests,
including title generation. This caused the title generator to see the
wrong system prompt and attempt to call submit_plan instead of generating
a title.
This fix detects title generation requests by checking for "title generator"
or "generate a title" in the existing system prompt and skips injecting
the Plan Submission instructions for those requests.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add "Custom path..." option to vault dropdown so users can save plans
to any folder, not just registered Obsidian vaults.
- Add customPath field to ObsidianSettings interface
- Add CUSTOM_PATH_SENTINEL and getEffectiveVaultPath() helper
- Show conditional text input when custom path is selected
- Resolve effective path before sending to server
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix config access: use response.data.share instead of response.share
- Make config read lazy to avoid blocking plugin init
- Add --disable-sharing and --keep flags to sandbox script
- Add sharingEnabled to test-server.ts
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add deployment-level configuration to disable URL sharing for
security/privacy concerns.
Configuration methods:
- Claude Code: PLANNOTATOR_SHARE=disabled env var
- OpenCode: "share": "disabled" in opencode.json (primary), env var fallback
When disabled:
- Quick Share button hidden in annotation panel
- Share tab hidden in export modal (shows only Raw Diff)
Closes#69
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* bugfix: Add WSL detection for browser opening utility
* fix: add empty title param to Windows start command
The Windows `start` command interprets the first quoted argument as
a window title. Without an empty title `""`, paths with spaces like
"C:\Program Files\..." would be misinterpreted, causing custom
browser settings to fail silently.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Michael Ramos <mdramos8@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add permission mode utility and setup dialog
Add cookie-based storage for permission mode preference with first-time
setup dialog for Claude Code users. Supports three modes:
- Auto-accept Edits (default)
- Bypass Permissions (equivalent to --dangerously-skip-permissions)
- Manual Approval
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: integrate permission mode in editor and settings
- Show first-time setup dialog for Claude Code users
- Add permission mode dropdown to Settings (Claude Code only)
- Pass selected mode in approve request
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: output updatedPermissions in hook response
Use Claude Code 2.1.7+ hook protocol to preserve permission mode after
plan approval. Extracts permission_mode from hook input, allows client
to override via request, and outputs setMode in updatedPermissions.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
The postinstall script previously hardcoded ~/.config/opencode/command
as the destination for slash command files. This causes issues for users
running OpenCode in portable/XDG-compliant environments where
XDG_CONFIG_HOME is set to a custom location.
This change uses ${XDG_CONFIG_HOME:-$HOME/.config} which:
- Uses XDG_CONFIG_HOME when set (for portable installations)
- Falls back to ~/.config for standard installations (no behavior change)
This follows the XDG Base Directory Specification and ensures the plugin
works correctly in containerized, portable, or multi-user environments.
Co-authored-by: Aleksey Bragin <ab@alfabox.net>
In Windows PowerShell 5.1, Invoke-WebRequest returns .Content as a byte
array (System.Byte[]) for non-HTML responses, not a string. This causes
the installer to fail with:
Method invocation failed because [System.Byte] does not contain a
method named 'Split'.
This fix:
- Adds -UseBasicParsing to avoid security warning prompts
- Detects if Content is byte[] and converts to string using UTF8 encoding
- Maintains compatibility with PowerShell 7+ where Content is already a string
Fixes installation on Windows PowerShell 5.1 (the default on Windows 10/11).
Co-authored-by: Tafheem Malik <maliktafheem@yvp5c.onmicrosoft.com>
- Add Windows PowerShell install script (install.ps1)
- Install slash commands for both Claude Code and OpenCode
- Update OpenCode README with install script instructions
- Simplify UpdateBanner to use same install command for both platforms
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove early exit when no uncommitted changes - user can switch to
"Last commit" or other diff types via dropdown.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Show correct origin badge (Claude Code orange, OpenCode gray)
- Always show file tree sidebar when diff options available
- Update README with v0.5.0 label
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add "after you restart Claude Code" to /plannotator-review message
- Symlink install scripts to marketing/public for automatic deploys
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update version in root, opencode-plugin, and server packages
- Add code review feature to README
- Build artifacts for release
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
## Summary
Complete code review system for reviewing git diffs with annotations.
### Features
- Interactive diff viewer with split/unified views
- Line-level annotation system
- Diff type selector (uncommitted, last commit, vs main branch)
- Dynamic default branch detection
- Empty state handling
- Simplified UX with streamlined feedback flow
Closes#51Closes#56