feat(#41): Open Cowriting Review Panel from markdown file/tab right-click
The review preview (`cowriting.showTrackChangesPreview`) was only reachable from the command palette and `ctrl+alt+r` — neither where a writer's hand naturally goes. Add the obvious right-click entry points to the plugin's central surface: - `explorer/context` + `editor/title/context` menu items gated on `resourceLangId == markdown`, both invoking `showTrackChangesPreview`. - The command now resolves the *clicked* document: it opens the passed Uri if it isn't already an open document (the Explorer case), instead of falling back to the active editor. No-arg invocation (palette / keybinding) is unchanged. - Retitle the command to "Open Cowriting Review Panel" so the menus read the operator's wording (palette shows "Cowriting: Open Cowriting Review Panel"). E2E: clicked-doc resolution (open + not-yet-open + no-arg fallback), both menu contributions present + markdown-gated, title, and keybinding unchanged. Closes #41. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+15
-1
@@ -76,7 +76,7 @@
|
||||
},
|
||||
{
|
||||
"command": "cowriting.showTrackChangesPreview",
|
||||
"title": "Cowriting: Open Review Preview",
|
||||
"title": "Open Cowriting Review Panel",
|
||||
"category": "Cowriting"
|
||||
},
|
||||
{
|
||||
@@ -119,6 +119,20 @@
|
||||
"group": "navigation@9"
|
||||
}
|
||||
],
|
||||
"editor/title/context": [
|
||||
{
|
||||
"command": "cowriting.showTrackChangesPreview",
|
||||
"when": "resourceLangId == markdown",
|
||||
"group": "1_cowriting"
|
||||
}
|
||||
],
|
||||
"explorer/context": [
|
||||
{
|
||||
"command": "cowriting.showTrackChangesPreview",
|
||||
"when": "resourceLangId == markdown",
|
||||
"group": "navigation@9"
|
||||
}
|
||||
],
|
||||
"editor/context": [
|
||||
{
|
||||
"command": "cowriting.editSelection",
|
||||
|
||||
Reference in New Issue
Block a user