revu-vscode

βš™οΈ How it works

The flow from selecting code to exporting a prompt-led Markdown review.

πŸ”„ The flow

  1. Select one or more lines in any file.
  2. Annotate β€” click the comment-add button in the editor title bar, press Cmd+Shift+N (Ctrl+Shift+N on Windows/Linux), or right-click and choose revu: Add Annotation.
  3. Type your note in the comment thread and submit. The annotation appears inline in the gutter and in the revu sidebar.
  4. Export β€” open the revu sidebar in the activity bar, optionally pick a review prompt, then send the review to a chat client, copy it, or preview it as Markdown.

πŸ“ What revu produces

Every annotation is rendered into a single Markdown payload, grouped by file and ordered by line. The payload is prefixed with a review prompt so the AI knows what to do with it:

Code review β€” inline annotations per file and line. Each annotation is an issue, question, or required change. Implement all changes.

## src/auth.ts

- **Ln 12** β€” use verifyPassword instead of hashPassword, it's timing-safe
- **Ln 28** β€” missing rate limiting before this DB call

## src/api.ts

- **Ln 6** β€” session ID should come from a signed cookie, not a plain header

🎯 Choosing the prompt

The Edit Review Prompt button in the sidebar offers three templates β€” Code Review, Refactor, and Explain β€” plus a Custom option where you write your own. The chosen prompt is persisted to .revu.json and reused for every export until you change it.

πŸ“‹ The sidebar panel

The revu sidebar lists every annotation. Click any entry to jump straight to its line. The panel has two view modes β€” flat and grouped by file β€” toggled with the Cycle View Mode button. Annotations on files with uncommitted changes are flagged with a modified-diff icon.