feat(ux): unify "Ask Claude to Edit" + inline prompt at selection; fix keybindings (#62)

This commit was merged in pull request #62.
This commit is contained in:
2026-06-26 12:11:43 +00:00
parent a42e5f145d
commit 9432300e3c
9 changed files with 285 additions and 80 deletions
+53 -15
View File
@@ -59,6 +59,21 @@
"title": "Apply Agent Edit (internal seam)",
"category": "Cowriting"
},
{
"command": "cowriting.edit",
"title": "Ask Claude to Edit",
"category": "Cowriting"
},
{
"command": "cowriting.askClaude.submit",
"title": "Ask Claude to Edit",
"category": "Cowriting"
},
{
"command": "cowriting.askClaude.cancel",
"title": "Cancel",
"category": "Cowriting"
},
{
"command": "cowriting.editSelection",
"title": "Ask Claude to Edit Selection",
@@ -118,14 +133,30 @@
"command": "cowriting.rejectProposal",
"when": "false"
},
{
"command": "cowriting.askClaude.submit",
"when": "false"
},
{
"command": "cowriting.askClaude.cancel",
"when": "false"
},
{
"command": "cowriting.pinDiffBaseline",
"when": "editorLangId == markdown"
},
{
"command": "cowriting.editDocument",
"command": "cowriting.edit",
"when": "editorLangId == markdown"
},
{
"command": "cowriting.editSelection",
"when": "false"
},
{
"command": "cowriting.editDocument",
"when": "false"
},
{
"command": "cowriting.acceptAllProposals",
"when": "editorLangId == markdown"
@@ -140,13 +171,8 @@
],
"editor/title/context": [
{
"command": "cowriting.editSelection",
"when": "editorHasSelection && resourceLangId == markdown",
"group": "1_cowriting@1"
},
{
"command": "cowriting.editDocument",
"when": "!editorHasSelection && resourceLangId == markdown",
"command": "cowriting.edit",
"when": "resourceLangId == markdown",
"group": "1_cowriting@1"
},
{
@@ -164,13 +190,8 @@
],
"editor/context": [
{
"command": "cowriting.editSelection",
"when": "editorHasSelection && editorLangId == markdown && (resourceScheme == file || resourceScheme == untitled)",
"group": "1_cowriting@1"
},
{
"command": "cowriting.editDocument",
"when": "!editorHasSelection && editorLangId == markdown && (resourceScheme == file || resourceScheme == untitled)",
"command": "cowriting.edit",
"when": "editorLangId == markdown && (resourceScheme == file || resourceScheme == untitled)",
"group": "1_cowriting@1"
},
{
@@ -184,6 +205,11 @@
"command": "cowriting.reply",
"group": "inline",
"when": "commentController == cowriting.threads"
},
{
"command": "cowriting.askClaude.submit",
"group": "inline",
"when": "commentController == cowriting.askClaude"
}
],
"comments/commentThread/title": [
@@ -196,6 +222,11 @@
"command": "cowriting.reopenThread",
"group": "inline",
"when": "commentController == cowriting.threads && commentThread =~ /^resolved$/"
},
{
"command": "cowriting.askClaude.cancel",
"group": "inline",
"when": "commentController == cowriting.askClaude"
}
]
},
@@ -203,7 +234,14 @@
{
"command": "cowriting.showTrackChangesPreview",
"key": "ctrl+alt+r",
"mac": "cmd+alt+r",
"when": "editorLangId == markdown"
},
{
"command": "cowriting.edit",
"key": "ctrl+alt+e",
"mac": "cmd+alt+e",
"when": "editorTextFocus && editorLangId == markdown"
}
]
},