Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add expression field to help access non-root variables #205400

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export interface INotebookVariableElement {
readonly name: string;
readonly value: string;
readonly type?: string;
readonly expression?: string;
readonly language?: string;
readonly indexedChildrenCount: number;
readonly indexStart?: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { ICellExecutionStateChangedEvent, IExecutionStateChangedEvent, INotebook
import { INotebookKernelService } from 'vs/workbench/contrib/notebook/common/notebookKernelService';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';

export type contextMenuArg = { source?: string; type?: string; value?: string; language?: string; extensionId?: string };
export type contextMenuArg = { source?: string; type?: string; value?: string; expression?: string; language?: string; extensionId?: string };

export class NotebookVariablesView extends ViewPane {

Expand Down Expand Up @@ -111,6 +111,7 @@ export class NotebookVariablesView extends ViewPane {
source: element.notebook.uri.toString(),
value: element.value,
type: element.type,
expression: element.expression,
language: element.language,
extensionId: element.extensionId
};
Expand Down
3 changes: 3 additions & 0 deletions src/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ declare module 'vscode' {
*/
value: string;

/** The code that represents how the variable would be accessed in the runtime environment */
expression?: string;

/** The type of the variable's value */
type?: string;

Expand Down
Loading