mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 01:25:37 -05:00
Fix intellisense for .NET Interactive SQL kernel (#19254)
This commit is contained in:
@@ -17,6 +17,10 @@ const DotnetInteractiveLanguagePrefix = 'dotnet-interactive.';
|
||||
export const DotnetInteractiveDisplayName = '.NET Interactive';
|
||||
|
||||
export function convertToVSCodeNotebookCell(cellKind: azdata.nb.CellType, cellIndex: number, cellUri: URI, docUri: URI, cellLanguage: string, cellSource?: string | string[]): vscode.NotebookCell {
|
||||
// We only use this notebook field for .NET Interactive's intellisense, which only uses the notebook's URI
|
||||
let notebook = <vscode.NotebookDocument>{
|
||||
uri: docUri
|
||||
};
|
||||
return <vscode.NotebookCell>{
|
||||
kind: cellKind === CellTypes.Code ? NotebookCellKind.Code : NotebookCellKind.Markup,
|
||||
index: cellIndex,
|
||||
@@ -24,10 +28,9 @@ export function convertToVSCodeNotebookCell(cellKind: azdata.nb.CellType, cellIn
|
||||
uri: cellUri,
|
||||
languageId: cellLanguage,
|
||||
getText: () => Array.isArray(cellSource) ? cellSource.join('') : (cellSource ?? ''),
|
||||
notebook: notebook
|
||||
},
|
||||
notebook: <vscode.NotebookDocument>{
|
||||
uri: docUri
|
||||
},
|
||||
notebook: notebook,
|
||||
outputs: [],
|
||||
metadata: {},
|
||||
mime: undefined
|
||||
|
||||
Reference in New Issue
Block a user