feat(ux): unify Ask-Claude-to-Edit on a split-below multi-line webview
Operator feedback iteration on the Ask-Claude input. Replaces the inline comment-thread box (and the top-center QuickInput before it) with ONE input for both scopes: a multi-line webview in a split pane below the document. - New `editInstructionInput.ts` (`promptEditInstruction`): a tall, resizable textarea + Send, opened via `newGroupBelow` so it sits under the document, not over it. Auto-focused; ⌘↵/Ctrl↵ sends; Esc cancels. Cancel/Esc confirms ONLY when there's text to lose (a webview can read its own textarea); closing the tab is an explicit dismiss. On submit/cancel the split collapses AND focus is handed back to the document, so the bottom panel (Output/Debug Console) no longer pops. - Selection edits use the same box; the document above keeps the selection highlighted (inactive-selection style) so the user sees what Claude will edit — the selection is captured before the prompt, never touched. - Removes the whole inline-comment mechanism: deletes `inlineAsk.ts` (InlineAskController), the `cowriting.askClaude.submit`/`.cancel` commands, their comment-thread menus, and the Escape keybinding — net deletion. One overridable seam `TrackChangesPreviewController.askEditInstruction` (used by editSelection and the preview), stubbed by the host E2E. Sealed webview (INV-8/35): collects text only, no SDK/secret surface, no network. 242 unit + typecheck (src + e2e) + build green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -64,16 +64,6 @@
|
||||
"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",
|
||||
@@ -133,14 +123,6 @@
|
||||
"command": "cowriting.rejectProposal",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "cowriting.askClaude.submit",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "cowriting.askClaude.cancel",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "cowriting.pinDiffBaseline",
|
||||
"when": "editorLangId == markdown"
|
||||
@@ -205,11 +187,6 @@
|
||||
"command": "cowriting.reply",
|
||||
"group": "inline",
|
||||
"when": "commentController == cowriting.threads"
|
||||
},
|
||||
{
|
||||
"command": "cowriting.askClaude.submit",
|
||||
"group": "inline",
|
||||
"when": "commentController == cowriting.askClaude"
|
||||
}
|
||||
],
|
||||
"comments/commentThread/title": [
|
||||
@@ -222,11 +199,6 @@
|
||||
"command": "cowriting.reopenThread",
|
||||
"group": "inline",
|
||||
"when": "commentController == cowriting.threads && commentThread =~ /^resolved$/"
|
||||
},
|
||||
{
|
||||
"command": "cowriting.askClaude.cancel",
|
||||
"group": "inline",
|
||||
"when": "commentController == cowriting.askClaude"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user