Operator feedback on the Ask-Claude ergonomics (relates to #42/#43/#60):
- One user-facing command `cowriting.edit` ("Ask Claude to Edit") routes to the
selection or whole-document flow at runtime via the pure `routeEdit` helper
(selection → editSelection; none / tab right-click → editDocument). The two
underlying commands stay registered for the seams + E2E but are hidden from the
palette, and the split menu pairs collapse to one entry.
- Keybindings with `mac` variants (the missing variant is why ⌃⌥R "didn't work"
on macOS — Option combos are unreliable there): `cmd+alt+e`/`ctrl+alt+e` for
Ask-Claude-to-Edit, `cmd+alt+r`/`ctrl+alt+r` for the review panel.
- The instruction prompt now renders INLINE at the selection/cursor via a
dedicated Comments-API controller (`InlineAskController`, `cowriting.askClaude`)
instead of the top-center QuickInput — VS Code's Inline-Chat-style placement.
Both Ask-Claude entry points (editSelection + the preview's askClaude) share it.
Tests: routeEdit unit tests; E2E menu/palette assertions updated for the unified
command; E2E drives the inline prompt by stubbing `api.inlineAsk.prompt`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Spec §6.4: replace the scheme!=file / !isUnderRoot rejections with a single
!isAuthorable branch. isUnderRoot retained as a routing input. Per-condition
messaging (#24) kept for no-editor / empty-selection / non-{file,untitled}.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
cowriting.editSelection collapsed four distinct failures (no editor / no
selection / unsaved / outside the workspace folder) into one misleading
"select some text in a workspace document first" warning — so editing a
selection in a file OUTSIDE the EDH workspace root (e.g. a content-repo file
while the EDH opens sandbox/) was rejected as if no text were selected.
- New pure, vscode-free src/workspacePath.ts: isUnderRoot() (separator-bounded
membership, fixing a latent startsWith() prefix collision where a sibling
whose name prefixes the root — e.g. vscode-cowriting-plugin-content vs
vscode-cowriting-plugin — falsely matched) + selectionRejection() (one
message per condition). Unit-tested (8 cases), incl. the reported bug.
- Wire isUnderRoot into all five membership checks: extension.ts (editSelection
guard + renderIfOpen) and the thread/attribution/proposal controllers.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>