mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
Experimental Notebook Diff based on Multi-file diff (#226113)
* Experimental Notebook diff based on Multi-file dif * Stat resolving * Fix test * Add actions * Misc * Fixes
This commit is contained in:
@@ -12,6 +12,9 @@ import { InlineChatController } from 'vs/workbench/contrib/inlineChat/browser/in
|
||||
import { IInlineChatSessionService } from './inlineChatSessionService';
|
||||
import { INotebookEditorService } from 'vs/workbench/contrib/notebook/browser/services/notebookEditorService';
|
||||
import { CellUri } from 'vs/workbench/contrib/notebook/common/notebookCommon';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { NotebookTextDiffEditor } from 'vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor';
|
||||
import { NotebookMultiTextDiffEditor } from 'vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor';
|
||||
|
||||
export class InlineChatNotebookContribution {
|
||||
|
||||
@@ -19,6 +22,7 @@ export class InlineChatNotebookContribution {
|
||||
|
||||
constructor(
|
||||
@IInlineChatSessionService sessionService: IInlineChatSessionService,
|
||||
@IEditorService editorService: IEditorService,
|
||||
@INotebookEditorService notebookEditorService: INotebookEditorService,
|
||||
) {
|
||||
|
||||
@@ -58,6 +62,11 @@ export class InlineChatNotebookContribution {
|
||||
return fallback;
|
||||
}
|
||||
|
||||
const activeEditor = editorService.activeEditorPane;
|
||||
if (activeEditor && (activeEditor.getId() === NotebookTextDiffEditor.ID || activeEditor.getId() === NotebookMultiTextDiffEditor.ID)) {
|
||||
return `<notebook>${editor.getId()}#${uri}`;
|
||||
}
|
||||
|
||||
throw illegalState('Expected notebook editor');
|
||||
}
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user