feat: open edit tool changes in VS Code diff view with line focus
Tool-card clicks for edit-like actions now open a VS Code diff instead of only the file Diff view focuses the first changed line for faster review Uses a virtual readonly original buffer to avoid opening unsaved draft tabs
This commit is contained in:
@@ -6,7 +6,13 @@ export const createVSCodeEditorAPI = (): EditorAPI => ({
|
||||
openFile: async (path: string, line?: number, column?: number) => {
|
||||
await sendBridgeMessage('editor:openFile', { path, line, column });
|
||||
},
|
||||
openDiff: async (original: string, modified: string, label?: string) => {
|
||||
await sendBridgeMessage('editor:openDiff', { original, modified, label });
|
||||
openDiff: async (original: string, modified: string, label?: string, options?: { line?: number; patch?: string }) => {
|
||||
await sendBridgeMessage('editor:openDiff', {
|
||||
original,
|
||||
modified,
|
||||
label,
|
||||
line: options?.line,
|
||||
patch: options?.patch,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user