#42 (SLICE-1, reach): selection-aware Ask-Claude from editor body + tab #49
Reference in New Issue
Block a user
Delete Branch "f12-slice1-ask-claude-menus"
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?
SLICE-1 — #42 (reach) of the document-edit flow (
specs/coauthoring-document-edit-flow.md§7.2, INV-38).Makes "Ask Claude to Edit" reachable from the editor body and the editor tab, selection-aware — a selection routes to
editSelection, no selection toeditDocument— both gated to markdown/authorable docs, both flowing through the singlerunEditAndProposepath (no divergent edit code).Changes
editSelection+editDocumenttoeditor/context(selection-aware, markdown +file/untitled) andeditor/title/context(selection-aware,resourceLangId == markdown). Markdown-gate the existingeditor/contexteditSelectionentry to match INV-38 (command handler unchanged; palette still reaches any authorable doc).cowriting.editDocumentaccepts the clicked tab's resource Uri (editor/title/context), targeting that document (opening it if needed) and falling back to the active editor with no arg — mirroringshowTrackChangesPreview's #41 clicked-doc resolution.editDocument(uri)targets the tab doc not the active editor; no-arg falls back to the active editor.Tests
208 unit + 65/5 host E2E green (4 new F12 tests + existing editDocument test).
Deferred decision (for review)
Markdown-gating
editSelection'seditor/contextentry: spec §5/INV-38 want both Ask-Claude entries markdown-gated, but F8 made theeditSelectioncommand work on any authorable doc. Followed the spec for the menu (removes the body right-click Edit-Selection on non-markdown files; the F10 review surface is markdown-only anyway); command behavior intact.Session 0043. Next slices: #47 (review, P1), #46 (accept).
🤖 Generated with Claude Code