feat(ux): unify "Ask Claude to Edit" + inline prompt at selection; fix keybindings #62
Reference in New Issue
Block a user
Delete Branch "s60-edit-ux"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Operator-feedback UX polish on the Ask-Claude ergonomics (relates to #42/#43/#60).
What & why
1. One "Ask Claude to Edit" command.
cowriting.editroutes to the selection or whole-document flow at runtime via the purerouteEdithelper (selection → editSelection; none / tab right-click → editDocument). The two underlying commands stay registered for the seams + E2E but are hidden from the palette; the split menu pairs collapse to a single entry. You now see one "Ask Claude to Edit" everywhere.2. Keybindings with
macvariants. The missing mac variant is whyCtrl+Alt+R"didn't work" on macOS (Option-key combos are unreliable there). Now:Cmd/Ctrl+Alt+E= Ask Claude to Edit,Cmd/Ctrl+Alt+R= review panel. Both rebindable.3. Inline prompt at the selection. The instruction box now renders INLINE at the selection/cursor via a dedicated Comments-API controller (
InlineAskController, idcowriting.askClaude) — VS Code's Inline-Chat-style placement — instead of the top-center QuickInput. Shared by both Ask-Claude entry points.Verification
routeEdittests) + src/E2E typecheck + build green.api.inlineAsk.prompt); not runnable locally (known env issue).🤖 Generated with Claude Code
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>