repo_name string | dataset string | owner string | lang string | func_name string | code string | docstring string | url string | sha string |
|---|---|---|---|---|---|---|---|---|
aide | github_2023 | codestoryai | typescript | ExtensionRecommendationNotificationService.getNextPendingNotificationIndex | private getNextPendingNotificationIndex(): number {
let index = this.pendingNotificaitons.length - 1;
if (this.pendingNotificaitons.length) {
for (let i = 0; i < this.pendingNotificaitons.length; i++) {
if (this.pendingNotificaitons[i].source <= this.pendingNotificaitons[index].source) {
index = i;
... | /**
* Return the recent high priroity pending notification
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.ts#L405-L415 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExtensionsContributions.registerGlobalActions | private registerGlobalActions(): void {
this._register(MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
command: {
id: VIEWLET_ID,
title: localize({ key: 'miPreferencesExtensions', comment: ['&& denotes a mnemonic'] }, "&&Extensions")
},
group: '2_configuration',
order: 3
}));
this... | // Global actions | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts#L613-L1296 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExtensionsContributions.registerContextMenuActions | private registerContextMenuActions(): void {
this.registerExtensionAction({
id: SetColorThemeAction.ID,
title: SetColorThemeAction.TITLE,
menu: {
id: MenuId.ExtensionContext,
group: THEME_ACTIONS_GROUP,
order: 0,
when: ContextKeyExpr.and(ContextKeyExpr.not('inExtensionEditor'), ContextKeyExp... | // Extension Context Menu | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts#L1299-L1874 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExtensionsListView.getAllRecommendationsModel | private async getAllRecommendationsModel(options: IQueryOptions, token: CancellationToken): Promise<IPagedModel<IExtension>> {
const localExtensions = await this.extensionsWorkbenchService.queryLocal(this.options.server);
const localExtensionIds = localExtensions.map(e => e.identifier.id.toLowerCase());
const al... | // Get All types of recommendations, trimmed to show a max of 8 at any given time | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts#L1075-L1112 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | FileBasedRecommendations.promptImportantRecommendations | private promptImportantRecommendations(uri: URI, model: ITextModel, extensionRecommendations?: IStringDictionary<IFileOpenCondition[]>): void {
if (model.isDisposed()) {
return;
}
const pattern = extname(uri).toLowerCase();
extensionRecommendations = extensionRecommendations ?? this.recommendationsByPattern... | /**
* Prompt the user to either install the recommended extension for the file type in the current editor model
* or prompt to search the marketplace if it has extensions that can support the file type
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.ts#L138-L257 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | WorkspaceRecommendations.fetch | private async fetch(): Promise<void> {
const extensionsConfigs = await this.workspaceExtensionsConfigService.getExtensionsConfigs();
const { invalidRecommendations, message } = await this.validateExtensions(extensionsConfigs);
if (invalidRecommendations.length) {
this.notificationService.warn(`The ${invalidR... | /**
* Parse all extensions.json files, fetch workspace recommendations, filter out invalid and unwanted ones
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/extensions/browser/workspaceRecommendations.ts#L103-L147 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ReportExtensionIssueAction.constructor | constructor(
private extension: IExtensionDescription,
@IWorkbenchIssueService private readonly issueService: IWorkbenchIssueService
) {
super(ReportExtensionIssueAction._id, ReportExtensionIssueAction._label, 'extension-action report-issue');
this.enabled = extension.isBuiltin || (!!extension.repository && !... | // TODO: Consider passing in IExtensionStatus or IExtensionHostProfile for additional data | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/extensions/common/reportExtensionIssueAction.ts#L17-L24 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerFileContributionRegistry.register | public register(descriptor: IExplorerFileContributionDescriptor): void {
this.descriptors.push(descriptor);
this._onDidRegisterDescriptor.fire(descriptor);
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/browser/explorerFileContrib.ts#L46-L49 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerFileContributionRegistry.create | public create(insta: IInstantiationService, container: HTMLElement, store: DisposableStore): IExplorerFileContribution[] {
return this.descriptors.map(d => {
const i = d.create(insta, container);
store.add(i);
return i;
});
} | /**
* Creates a new instance of all registered contributions.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/browser/explorerFileContrib.ts#L54-L60 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerService.findClosest | findClosest(resource: URI): ExplorerItem | null {
return this.model.findClosest(resource);
} | // IExplorerService methods | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/browser/explorerService.ts#L224-L226 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerService.onDidRunOperation | private async onDidRunOperation(e: FileOperationEvent): Promise<void> {
// When nesting, changes to one file in a folder may impact the rendered structure
// of all the folder's immediate children, thus a recursive refresh is needed.
// Ideally the tree would be able to recusively refresh just one level but that ... | // File events | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/browser/explorerService.ts#L387-L484 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerService.shouldAutoRevealItem | private shouldAutoRevealItem(item: ExplorerItem | undefined, ignore: boolean): boolean {
if (item === undefined || ignore) {
return true;
}
if (this.revealExcludeMatcher.matches(item.resource, name => !!(item.parent && item.parent.getChild(name)))) {
return false;
}
const root = item.root;
let current... | // Check if an item matches a explorer.autoRevealExclude pattern | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/browser/explorerService.ts#L487-L506 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | onError | function onError(notificationService: INotificationService, error: any): void {
if (error.message === 'string') {
error = error.message;
}
notificationService.error(toErrorMessage(error, false));
} | // 5mb | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/browser/fileActions.ts#L81-L87 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | askForOverwrite | async function askForOverwrite(fileService: IFileService, dialogService: IDialogService, targetResource: URI): Promise<boolean> {
const exists = await fileService.exists(targetResource);
if (!exists) {
return true;
}
// Ask for overwrite confirmation
const { confirmed } = await dialogService.confirm({
type: Se... | /**
* Checks to see if the resource already exists, if so prompts the user if they would be ok with it being overwritten
* @param fileService The file service
* @param dialogService The dialog service
* @param targetResource The resource to be overwritten
* @return A boolean indicating if the user is ok with resou... | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/browser/fileActions.ts#L490-L502 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | saveSelectedEditors | async function saveSelectedEditors(accessor: ServicesAccessor, options?: ISaveEditorsOptions): Promise<void> {
const editorGroupService = accessor.get(IEditorGroupsService);
const codeEditorService = accessor.get(ICodeEditorService);
const textFileService = accessor.get(ITextFileService);
// Retrieve selected or a... | // Save / Save As / Save All / Revert | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/browser/fileCommands.ts#L367-L425 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TextFileEditorTracker.reloadVisibleTextFileEditors | private reloadVisibleTextFileEditors(): void {
// the window got focus and we use this as a hint that files might have been changed outside
// of this window. since file events can be unreliable, we queue a load for models that
// are visible in any editor. since this is a fast operation in the case nothing has c... | //#region Window Focus Change: Update visible code editors when focus is gained that have a known text file model | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/browser/editors/textFileEditorTracker.ts#L109-L131 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | hasExpandedNode | function hasExpandedNode(tree: WorkbenchCompressibleAsyncDataTree<ExplorerItem | ExplorerItem[], ExplorerItem, FuzzyScore>, treeInput: ExplorerItem[]): boolean {
for (const folder of treeInput) {
if (tree.hasNode(folder) && !tree.isCollapsed(folder)) {
return true;
}
}
return false;
} | /**
* Whether or not any of the nodes in the tree are expanded
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/browser/views/explorerView.ts#L76-L83 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerView.renderHeader | protected override renderHeader(container: HTMLElement): void {
super.renderHeader(container);
// Expand on drag over
this.dragHandler = new DelayedDragHandler(container, () => this.setExpanded(true));
const titleElement = container.querySelector('.title') as HTMLElement;
const setHeader = () => {
titleE... | // Split view methods | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/browser/views/explorerView.ts#L271-L288 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerView.onConfigurationUpdated | private onConfigurationUpdated(event: IConfigurationChangeEvent | undefined): void {
if (!event || event.affectsConfiguration('explorer.autoReveal')) {
const configuration = this.configurationService.getValue<IFilesConfiguration>();
this._autoReveal = configuration?.explorer?.autoReveal;
}
// Push down con... | // React on events | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/browser/views/explorerView.ts#L579-L589 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerView.refresh | refresh(recursive: boolean, item?: ExplorerItem, cancelEditing: boolean = true): Promise<void> {
if (!this.tree || !this.isBodyVisible() || (item && !this.tree.hasNode(item)) || (this.findProvider?.isShowingFilterResults() && recursive)) {
// Tree node doesn't exist yet, when it becomes visible we will refresh
... | /**
* Refresh the contents of the explorer to get up to date data from the disk about the file structure.
* If the item is passed we refresh only that level of the tree, otherwise we do a full refresh.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/browser/views/explorerView.ts#L698-L710 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerFindProvider.startFilterSession | private startFilterSession(): void {
const tree = this.treeProvider();
const input = tree.getInput();
if (!input) {
return;
}
const roots = this.explorerService.roots.filter(root => this.searchSupportsScheme(root.resource.scheme));
this.filterSessionStartState = { viewState: tree.getViewState(), input, ... | // Filter | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts#L380-L391 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerFindProvider.startHighlightSession | private startHighlightSession(): void {
const roots = this.explorerService.roots.filter(root => this.searchSupportsScheme(root.resource.scheme));
this.highlightSessionStartState = { rootsWithProviders: new Set(roots) };
} | // Highlight | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts#L508-L511 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerFindProvider.searchSupportsScheme | private searchSupportsScheme(scheme: string): boolean {
// Limited by the search API
if (scheme !== Schemas.file && scheme !== Schemas.vscodeRemote) {
return false;
}
return this.searchService.schemeHasFileSearchProvider(scheme);
} | // Search | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts#L588-L594 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | FilesRenderer.getAriaLabel | getAriaLabel(element: ExplorerItem): string {
return element.name;
} | // IAccessibilityProvider | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts#L1206-L1208 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | FilesFilter.processIgnoreFile | private async processIgnoreFile(root: string, ignoreFileResource: URI, update?: boolean) {
// Get the name of the directory which the ignore file is in
const dirUri = dirname(ignoreFileResource);
const ignoreTree = this.ignoreTreesPerRoot.get(root);
if (!ignoreTree) {
return;
}
// Don't process a direct... | /**
* Given a .gitignore file resource, processes the resource and adds it to the ignore tree which hides explorer items
* @param root The root folder of the workspace as a string. Used for lookup key for ignore tree and resource list
* @param ignoreFileResource The resource of the .gitignore file
* @param upda... | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts#L1366-L1398 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerModel.findAll | findAll(resource: URI): ExplorerItem[] {
return coalesce(this.roots.map(root => root.find(resource)));
} | /**
* Returns an array of child stat from this stat that matches with the provided path.
* Starts matching from the first root.
* Will return empty array in case the FileStat does not exist.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/common/explorerModel.ts#L62-L64 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerModel.findClosest | findClosest(resource: URI): ExplorerItem | null {
const folder = this.contextService.getWorkspaceFolder(resource);
if (folder) {
const root = this.roots.find(r => this.uriIdentityService.extUri.isEqual(r.resource, folder.uri));
if (root) {
return root.find(resource);
}
}
return null;
} | /**
* Returns a FileStat that matches the passed resource.
* In case multiple FileStat are matching the resource (same folder opened multiple times) returns the FileStat that has the closest root.
* Will return undefined in case the FileStat does not exist.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/common/explorerModel.ts#L71-L81 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerItem.mergeLocalWithDisk | static mergeLocalWithDisk(disk: ExplorerItem, local: ExplorerItem): void {
if (disk.resource.toString() !== local.resource.toString()) {
return; // Merging only supported for stats with the same resource
}
// Stop merging when a folder is not resolved to avoid loosing local data
const mergingDirectories = d... | /**
* Merges the stat which was resolved from the disk with the local stat by copying over properties
* and children. The merge will only consider resolved stat elements to avoid overwriting data which
* exists locally.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/common/explorerModel.ts#L239-L295 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerItem.addChild | addChild(child: ExplorerItem): void {
// Inherit some parent properties to child
child._parent = this;
child.updateResource(false);
this.children.set(this.getPlatformAwareName(child.name), child);
} | /**
* Adds a child element to this folder.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/common/explorerModel.ts#L300-L305 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerItem.removeChild | removeChild(child: ExplorerItem): void {
this.nestedChildren = undefined;
this.children.delete(this.getPlatformAwareName(child.name));
} | /**
* Removes a child element from this folder.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/common/explorerModel.ts#L402-L405 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerItem.move | move(newParent: ExplorerItem): void {
this.nestedParent?.removeChild(this);
this._parent?.removeChild(this);
newParent.removeChild(this); // make sure to remove any previous version of the file if any
newParent.addChild(this);
this.updateResource(true);
} | /**
* Moves this element under a new parent element.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/common/explorerModel.ts#L421-L427 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerItem.rename | rename(renamedStat: { name: string; mtime?: number }): void {
// Merge a subset of Properties that can change on rename
this.updateName(renamedStat.name);
this._mtime = renamedStat.mtime;
// Update Paths including children
this.updateResource(true);
} | /**
* Tells this stat that it was renamed. This requires changes to all children of this stat (if any)
* so that the path property can be updated properly.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/common/explorerModel.ts#L447-L455 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerItem.find | find(resource: URI): ExplorerItem | null {
// Return if path found
// For performance reasons try to do the comparison as fast as possible
const ignoreCase = !this.fileService.hasCapability(resource, FileSystemProviderCapabilities.PathCaseSensitive);
if (resource && this.resource.scheme === resource.scheme && e... | /**
* Returns a child stat from this stat that matches with the provided path.
* Will return "null" in case the child does not exist.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/files/common/explorerModel.ts#L461-L471 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DefaultFormatter._updateStatus | private _updateStatus() {
this._languageStatusStore.clear();
const editor = getCodeEditor(this._editorService.activeTextEditorControl);
if (!editor || !editor.hasModel()) {
return;
}
const document = editor.getModel();
const formatter = getRealAndSyntheticDocumentFormattersOrdered(this._languageFeatur... | // --- status item | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/format/browser/formatActionsMultiple.ts#L199-L240 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | InlineChatController._nextState | protected async _nextState(state: State, options: InlineChatRunOptions): Promise<void> {
let nextState: State | void = state;
while (nextState && !this._isDisposed) {
this._log('setState to ', nextState);
const p: State | Promise<State> | Promise<void> = this[nextState](options);
this._onDidEnterState.fire... | // ---- state machine | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts#L295-L303 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | handleResponse | const handleResponse = () => {
this._updateCtxResponseType();
if (!localEditGroup) {
localEditGroup = <IChatTextEditGroup | undefined>response.response.value.find(part => part.kind === 'textEditGroup' && isEqual(part.uri, this._session?.textModelN.uri));
}
if (localEditGroup) {
localEditGroup.st... | // apply edits | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts#L676-L731 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | InlineChatController._showWidget | private _showWidget(headless: boolean = false, initialRender: boolean = false, position?: Position) {
assertType(this._editor.hasModel());
this._ctxVisible.set(true);
let widgetPosition: Position;
if (position) {
// explicit position wins
widgetPosition = position;
} else if (this._ui.rawValue?.positio... | // ---- | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts#L852-L889 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | InlineChatController.acceptInput | acceptInput() {
return this.chatWidget.acceptInput();
} | // ---- controller API | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts#L978-L980 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | lineRangeAsRange | function lineRangeAsRange(lineRange: LineRange, model: ITextModel): Range {
return lineRange.isEmpty
? new Range(lineRange.startLineNumber, 1, lineRange.startLineNumber, Number.MAX_SAFE_INTEGER)
: new Range(lineRange.startLineNumber, 1, lineRange.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER);
} | // --- | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.ts#L294-L298 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | InlineChatWidget.contentHeight | get contentHeight(): number {
const data = {
chatWidgetContentHeight: this._chatWidget.contentHeight,
statusHeight: getTotalHeight(this._elements.status),
extraHeight: this._getExtraHeight()
};
const result = data.chatWidgetContentHeight + data.statusHeight + data.extraHeight;
return result;
} | /**
* The content height of this widget is the size that would require no scrolling
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.ts#L347-L355 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | EditorBasedInlineChatWidget.contentHeight | override get contentHeight(): number {
let result = super.contentHeight;
if (this._accessibleViewer.value) {
result += this._accessibleViewer.value.height + 8 /* padding */;
}
return result;
} | // --- layout | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.ts#L539-L547 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | EditorBasedInlineChatWidget.showAccessibleHunk | showAccessibleHunk(session: Session, hunkData: HunkInformation): void {
this._elements.accessibleViewer.classList.remove('hidden');
this._accessibleViewer.clear();
this._accessibleViewer.value = this._instantiationService.createInstance(HunkAccessibleDiffViewer,
this._elements.accessibleViewer,
session,
... | // --- accessible viewer | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.ts#L571-L584 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | updateCursorIsAboveContextKey | const updateCursorIsAboveContextKey = () => {
if (!this.position || !this.editor.hasModel()) {
this._ctxCursorPosition.reset();
} else if (this.position.lineNumber === this.editor.getPosition().lineNumber) {
this._ctxCursorPosition.set('above');
} else if (this.position.lineNumber + 1 === this.editor.g... | // todo@jrieken listen ONLY when showing | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.ts#L130-L140 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | BaseIssueReporterService.applyStyles | private applyStyles(styles: IssueReporterStyles) {
const styleTag = document.createElement('style');
const content: string[] = [];
if (styles.inputBackground) {
content.push(`input[type="text"], textarea, select, .issues-container > .issue > .issue-state, .block-info { background-color: ${styles.inputBackgrou... | // TODO @justschen: After migration to Aux Window, switch to dedicated css. | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/issue/browser/baseIssueReporterService.ts#L160-L236 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | IssueFormService.closeReporter | async closeReporter(): Promise<void> {
this.issueReporterWindow?.close();
} | //#region used by issue reporter | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/issue/browser/issueFormService.ts#L142-L144 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NativeIssueFormService.openReporter | override async openReporter(data: IssueReporterData): Promise<void> {
if (this.hasToReload(data)) {
return;
}
const bounds = await this.nativeHostService.getActiveWindowPosition();
if (!bounds) {
return;
}
await this.openAuxIssueReporter(data, bounds);
// Get platform information
const { arch, ... | // override to grab platform info | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/issue/electron-sandbox/nativeIssueFormService.ts#L36-L59 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LanguageStatus._handleStorageChange | private _handleStorageChange() {
this._restoreState();
this._update();
} | // --- persisting dedicated items | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/languageStatus/browser/languageStatus.ts#L142-L145 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LanguageStatus._createViewModel | private _createViewModel(editor: ICodeEditor | null): LanguageStatusViewModel {
if (!editor?.hasModel()) {
return new LanguageStatusViewModel([], []);
}
const all = this._languageStatusService.getLanguageStatus(editor.getModel());
const combined: ILanguageStatus[] = [];
const dedicated: ILanguageStatus[] =... | // --- language status model and UI | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/languageStatus/browser/languageStatus.ts#L168-L182 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LanguageStatus._asStatusbarEntry | private static _asStatusbarEntry(item: ILanguageStatus): IStatusbarEntry {
let kind: StatusbarEntryKind | undefined;
if (item.severity === Severity.Warning) {
kind = 'warning';
} else if (item.severity === Severity.Error) {
kind = 'error';
}
const textValue = typeof item.label === 'string' ? item.labe... | // --- | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/languageStatus/browser/languageStatus.ts#L406-L426 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | openEntry | async function openEntry(entry: IWorkingCopyHistoryEntry, editorService: IEditorService, options?: IEditorOptions): Promise<void> {
const resource = LocalHistoryFileSystemProvider.toLocalHistoryFileSystem({ location: entry.location, associatedResource: entry.workingCopy.resource });
await editorService.openEditor({
... | //#endregion | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/localHistory/browser/localHistoryCommands.ts#L601-L609 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LocalHistoryFileSystemProvider.stat | async stat(resource: URI): Promise<IStat> {
const location = LocalHistoryFileSystemProvider.fromLocalHistoryFileSystem(resource).location;
// Special case: empty resource
if (isEqual(LocalHistoryFileSystemProvider.EMPTY_RESOURCE, location)) {
return { type: FileType.File, ctime: 0, mtime: 0, size: 0 };
}
... | //#region Supported File Operations | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/localHistory/browser/localHistoryFileSystemProvider.ts#L112-L122 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | SimpleSettingRenderer.constructor | constructor(
@IConfigurationService private readonly _configurationService: IConfigurationService,
@IContextMenuService private readonly _contextMenuService: IContextMenuService,
@IPreferencesService private readonly _preferencesService: IPreferencesService,
@ITelemetryService private readonly _telemetryService... | // setting ID to feature value | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/markdown/browser/markdownSettingRenderer.ts#L27-L36 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | readMarkers | const readMarkers = (resource?: URI) => this.markerService.read({ resource, severities: MarkerSeverity.Error | MarkerSeverity.Warning | MarkerSeverity.Info }); | // Markers Model | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/markers/browser/markersView.ts#L548-L548 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | MergeEditorInput.isDirty | override isDirty(): boolean {
return this._inputModel?.isDirty.get() ?? false;
} | // ---- FileEditorInput | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.ts#L173-L175 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | WorkspaceMergeEditorInputModel.revert | async revert(options?: IRevertOptions): Promise<void> {
await this.resultTextFileModel.revert(options);
} | /**
* If save resets the dirty state, revert must do so too.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.ts#L417-L419 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | toInputData | async function toInputData(data: MergeEditorInputData, textModelService: ITextModelService, store: DisposableStore): Promise<InputData> {
const ref = await textModelService.createModelReference(data.uri);
store.add(ref);
return {
textModel: ref.object.textEditorModel,
title: data.title,
description: data.descr... | /* ================= Utils ================== */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.ts#L493-L502 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LineRange.touches | public touches(other: LineRange): boolean {
return (
this.endLineNumberExclusive >= other.startLineNumber &&
other.endLineNumberExclusive >= this.startLineNumber
);
} | /**
* Returns false if there is at least one line between `this` and `other`.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.ts#L57-L62 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TextModelDiffs.diffs | public get diffs(): IObservableWithChange<DetailedLineRangeMapping[], TextModelDiffChangeReason> {
return this._diffs;
} | /**
* Diffs from base to input.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.ts#L71-L73 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TextModelDiffs.applyEditRelativeToOriginal | public applyEditRelativeToOriginal(edit: LineRangeEdit, transaction: ITransaction | undefined, group?: UndoRedoGroup): void {
this.ensureUpToDate();
const editMapping = new DetailedLineRangeMapping(
edit.range,
this.baseTextModel,
new LineRange(edit.range.startLineNumber, edit.newLines.length),
this.te... | /**
* Edit must be conflict free.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.ts#L159-L201 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | splitUpCommonEqualRangeMappings | function splitUpCommonEqualRangeMappings(
equalRangeMappings1: RangeMapping[],
equalRangeMappings2: RangeMapping[]
): CommonRangeMapping[] {
const result: CommonRangeMapping[] = [];
const events: { input: 0 | 1; start: boolean; inputPos: Position; outputPos: Position }[] = [];
for (const [input, rangeMappings] of... | /**
* It is `result[i][0].inputRange.equals(result[i][1].inputRange)`.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.ts#L122-L175 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | MergeEditor.getTitle | override getTitle(): string {
if (this.input) {
return this.input.getName();
}
return localize('mergeEditor', "Text Merge Editor");
} | // #endregion | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.ts#L150-L156 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | mirrorWordWrapTransientState | const mirrorWordWrapTransientState = (candidate: ITextModel) => {
const candidateState = readTransientState(candidate, this._codeEditorService);
writeTransientState(model.input2.textModel, candidateState, this._codeEditorService);
writeTransientState(model.input1.textModel, candidateState, this._codeEditorSer... | // word wrap special case - sync transient state from result model to input[1|2] models | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.ts#L309-L320 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | MergeEditor.getControl | override getControl(): ICodeEditor | undefined {
return this.inputResultView.editor;
} | // ---- interact with "outside world" via`getControl`, `scopedContextKeyService`: we only expose the result-editor keep the others internal | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.ts#L488-L490 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | MergeEditor.toggleBase | public toggleBase(): void {
this.setLayout({
...this._layoutMode.value,
showBase: !this._layoutMode.value.showBase
});
} | // --- layout | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.ts#L499-L504 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | AttachedHistory.pushAttachedHistoryElement | public pushAttachedHistoryElement(element: IAttachedHistoryElement): void {
this.attachedHistory.push({ altId: this.model.getAlternativeVersionId(), element });
} | /**
* Pushes an history item that is tied to the last text edit (or an extension of it).
* When the last text edit is undone/redone, so is is this history item.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.ts#L337-L339 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookContribution.updateCellUndoRedoComparisonKey | private updateCellUndoRedoComparisonKey(configurationService: IConfigurationService, undoRedoService: IUndoRedoService) {
const undoRedoPerCell = configurationService.getValue<boolean>(NotebookSetting.undoRedoPerCell);
if (!undoRedoPerCell) {
// Add comparison key to map cell => main document
if (!this._uriC... | // Add or remove the cell undo redo comparison key based on the user setting | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts#L284-L304 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookEditor.minimumWidth | override set minimumWidth(value: number) { /*noop*/ } | // these setters need to exist because this extends from EditorPane | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/notebookEditor.ts#L133-L133 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookEditor.scopedContextKeyService | override get scopedContextKeyService(): IContextKeyService | undefined {
return this._widget.value?.scopedContextKeyService;
} | //#region Editor Core | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/notebookEditor.ts#L137-L139 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookEditorWidget.getId | public getId(): string {
return this._uuid;
} | /**
* EditorId
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts#L486-L488 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookEditorWidget.getBaseCellEditorOptions | getBaseCellEditorOptions(language: string): IBaseCellEditorOptions {
const existingOptions = this._baseCellEditorOptions.get(language);
if (existingOptions) {
return existingOptions;
} else {
const options = new BaseCellEditorOptions(this, this.notebookOptions, this.configurationService, language);
this... | //#region Editor Core | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts#L568-L578 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookEditorWidget.focus | focus() {
this._isVisible = true;
this._editorFocus.set(true);
if (this._webviewFocused) {
this._webview?.focusWebview();
} else {
if (this.viewModel) {
const focusRange = this.viewModel.getFocus();
const element = this.viewModel.cellAt(focusRange.start);
// The notebook editor doesn't have ... | //#region Focus tracker | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts#L1962-L1995 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookEditorWidget.focusElement | focusElement(cell: ICellViewModel) {
this.viewModel?.updateSelectionsState({
kind: SelectionStateType.Handle,
primary: cell.handle,
selections: [cell.handle]
});
} | //#region Editor Features | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts#L2128-L2134 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookEditorWidget.deltaCellDecorations | deltaCellDecorations(oldDecorations: string[], newDecorations: INotebookDeltaDecoration[]): string[] {
const ret = this.viewModel?.deltaCellDecorations(oldDecorations, newDecorations) || [];
this._onDidChangeDecorations.fire();
return ret;
} | //#region Decorations | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts#L2260-L2264 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookEditorWidget.changeViewZones | changeViewZones(callback: (accessor: INotebookViewZoneChangeAccessor) => void): void {
this._list.changeViewZones(callback);
} | //#region View Zones | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts#L2277-L2279 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookEditorWidget._loadKernelPreloads | private async _loadKernelPreloads(): Promise<void> {
if (!this.hasModel()) {
return;
}
const { selected } = this.notebookKernelService.getMatchingKernel(this.textModel);
if (!this._webview?.isResolved()) {
await this._resolveWebview();
}
this._webview?.updateKernelPreloads(selected);
} | //#region Kernel/Execution | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts#L2284-L2293 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookEditorWidget._warmupCell | private async _warmupCell(viewCell: CodeCellViewModel) {
if (viewCell.isOutputCollapsed) {
return;
}
const outputs = viewCell.outputsViewModels;
for (const output of outputs.slice(0, outputDisplayLimit)) {
const [mimeTypes, pick] = output.resolveMimeTypes(this.textModel!, undefined);
if (!mimeTypes.fi... | //#region Find | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts#L2539-L2583 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookEditorWidget.getLayoutInfo | getLayoutInfo(): NotebookLayoutInfo {
if (!this._list) {
throw new Error('Editor is not initalized successfully');
}
if (!this._fontInfo) {
this._generateFontInfo();
}
return {
width: this._dimension?.width ?? 0,
height: this._dimension?.height ?? 0,
scrollHeight: this._list?.getScrollHeight(... | //#region MISC | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts#L2733-L2749 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookEditorWidget.postMessage | postMessage(message: any) {
if (this._webview?.isResolved()) {
this._webview.postKernelMessage(message);
}
} | //#region --- webview IPC ---- | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts#L2967-L2971 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookEditorWidget.addClassName | addClassName(className: string) {
this._overlayContainer.classList.add(className);
} | //#endregion | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts#L2975-L2977 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookEditorWidget._updateOutputHeight | private _updateOutputHeight(cellInfo: ICommonCellInfo, output: ICellOutputViewModel, outputHeight: number, isInit: boolean, source?: string): void {
const cell = this.viewModel?.viewCells.find(vc => vc.handle === cellInfo.cellHandle);
if (cell && cell instanceof CodeCellViewModel) {
const outputIndex = cell.outp... | //#region BacklayerWebview delegate | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts#L3076-L3092 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookEditorWidget.getContribution | getContribution<T extends INotebookEditorContribution>(id: string): T {
return <T>(this._contributions.get(id) || null);
} | //#region Editor Contributions | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts#L3200-L3202 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookEditorWidget.dispose | override dispose() {
this._isDisposed = true;
// dispose webview first
this._webview?.dispose();
this._webview = null;
this.notebookEditorService.removeNotebookEditor(this);
dispose(this._contributions.values());
this._contributions.clear();
this._localStore.clear();
dispose(this._localCellStateList... | //#endregion | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts#L3206-L3245 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | forEachCell | function forEachCell(editor: INotebookEditor, callback: (cell: ICellViewModel, index: number) => void) {
for (let i = 0; i < editor.getLength(); i++) {
const cell = editor.cellAt(i);
callback(cell!, i);
}
} | //#endregion | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.ts#L586-L591 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExecutionStateCellStatusBarItem._getItemsForCell | private _getItemsForCell(): INotebookCellStatusBarItem[] | undefined {
const runState = this._executionStateService.getCellExecution(this._cell.uri);
// Show the execution spinner for a minimum time
if (runState?.state === NotebookCellExecutionState.Executing && typeof this._showedExecutingStateTime !== 'number'... | /**
* Returns undefined if there should be no change, and an empty array if all items should be removed.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.ts#L134-L159 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NextPreviousChangeActionRunner.focusDiff | private async focusDiff(diff: CellDiffInfo, viewModel: INotebookViewModel) {
if (diff.type === 'delete') {
const top = this.deletedCellDecorator.getTop(diff.originalCellIndex);
if (typeof top === 'number') {
this.focusedDiff.set(diff, undefined);
this.notebookEditor.setScrollTop(top);
return true;
... | /**
* @returns `true` if focused to the next diff
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookChatActionsOverlay.ts#L227-L244 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | updateEditingState | const updateEditingState = () => {
const viewModel = this._notebookEditor.getViewModel() as NotebookViewModel | undefined;
if (!viewModel) {
return;
}
// search markup sources first to decide if a markup cell should be in editing mode
const wordSeparators = this._configurationService.inspect<string>(... | // we only update cell state if users are using the hybrid mode (both input and preview are enabled) | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.ts#L123-L159 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookMultiCursorController.initializeMultiSelectDecorations | private initializeMultiSelectDecorations(cell: TrackedCell | undefined) {
if (!cell) {
return;
}
const decorations: IModelDeltaDecoration[] = [];
cell.matchSelections.forEach(selection => {
// mock cursor at the end of the selection
decorations.push({
range: Selection.fromPositions(selection.getEn... | /**
* Updates the multicursor selection decorations for a specific matched cell
*
* @param cell -- match object containing the viewmodel + selections
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.ts#L822-L843 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookSelectionHighlighter.constructor | constructor(
private readonly notebookEditor: INotebookEditor,
@IConfigurationService private readonly configurationService: IConfigurationService,
) {
super();
this.isEnabled = this.configurationService.getValue<boolean>('editor.selectionHighlight');
this._register(this.configurationService.onDidChangeConf... | // private readonly runDelayer: Delayer<void> = this._register(new Delayer<void>(0)); | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.ts#L29-L84 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookInlineVariablesController.createNotebookInlineValueDecoration | private createNotebookInlineValueDecoration(lineNumber: number, contentText: string, column = Constants.MAX_SAFE_SMALL_INTEGER): IModelDeltaDecoration[] {
// If decoratorText is too long, trim and add ellipses. This could happen for minified files with everything on a single line
if (contentText.length > MAX_INLINE... | // taken from /src/vs/workbench/contrib/debug/browser/debugEditorContribution.ts | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.ts#L283-L325 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | filterEntry | function filterEntry(entry: OutlineEntry, showMarkdownHeadersOnly: boolean, showCodeCells: boolean, showCodeCellSymbols: boolean): boolean {
// if any are true, return true, this entry should NOT be included in the outline
if (
(showMarkdownHeadersOnly && entry.cell.cellKind === CellKind.Markup && entry.level === N... | /**
* Checks if the given outline entry should be filtered out of the outlinePane
*
* @param entry the OutlineEntry to check
* @param showMarkdownHeadersOnly whether to show only markdown headers
* @param showCodeCells whether to show code cells
* @param showCodeCellSymbols whether to show code cell symbols
* @r... | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.ts#L358-L369 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookCellOutline.activeElement | get activeElement(): OutlineEntry | undefined {
this.checkDelayer();
if (this._target === OutlineTarget.OutlinePane) {
return (this.config.treeDataSource as NotebookOutlinePaneProvider).getActiveEntry();
} else {
console.error('activeElement should not be called outside of the OutlinePane');
return undef... | // getters | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.ts#L529-L537 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookCellOutline.setDataSources | private setDataSources(): void {
const notebookEditor = this._editor.getControl();
this._outlineDataSourceReference?.dispose();
this._dataSourceDisposables.clear();
if (!notebookEditor?.hasModel()) {
this._outlineDataSourceReference = undefined;
} else {
this._outlineDataSourceReference = this._dataSou... | /**
* set up the primary data source + three viewing sources for the various outline views
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.ts#L666-L685 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookCellOutline.setModelListeners | private setModelListeners(): void {
this._modelDisposables.clear();
if (!this._editor.textModel) {
return;
}
// Perhaps this is the first time we're building the outline
if (!this.entries.length) {
this.computeSymbols();
}
// recompute state when there are notebook content changes
this._modelDis... | /**
* set up the listeners for the outline content, these respond to model changes in the notebook
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.ts#L690-L711 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TrimFinalNewLinesParticipant.findLastNonEmptyLine | private findLastNonEmptyLine(textBuffer: IReadonlyTextBuffer): number {
for (let lineNumber = textBuffer.getLineCount(); lineNumber >= 1; lineNumber--) {
const lineLength = textBuffer.getLineLength(lineNumber);
if (lineLength) {
// this line has content
return lineNumber;
}
}
// no line has conte... | /**
* returns 0 if the entire file is empty
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.ts#L217-L227 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | CodeActionParticipantUtils.getActionsToRun | static getActionsToRun(model: ITextModel, codeActionKind: HierarchicalKind, excludes: readonly HierarchicalKind[], languageFeaturesService: ILanguageFeaturesService, progress: IProgress<CodeActionProvider>, token: CancellationToken) {
return getCodeActions(languageFeaturesService.codeActionProvider, model, model.getF... | // @Yoyokrazy this could likely be modified to leverage the extensionID, therefore not getting actions from providers unnecessarily -- future work | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.ts#L632-L638 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | checkOutlineEntryContext | function checkOutlineEntryContext(context: any): context is NotebookOutlineEntryArgs {
return !!(context && context.notebookEditor && context.outlineEntry);
} | /**
* Take in context args and check if they exist. True if action is run from notebook sticky scroll context menu or
* notebook outline context menu.
*
* @param context - Notebook Outline Context containing a notebook editor and outline entry
* @returns true if context is valid, false otherwise
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.ts#L230-L232 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | checkNotebookCellContext | function checkNotebookCellContext(context: any): context is NotebookCellArgs {
return !!(context && context.notebookEditor && context.cell);
} | /**
* Take in context args and check if they exist. True if action is run from a cell toolbar menu (potentially from the
* notebook cell container or cell editor context menus, but not tested or implemented atm)
*
* @param context - Notebook Outline Context containing a notebook editor and outline entry
* @returns... | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.ts#L241-L243 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookChatController.isCellGeneratedByChat | isCellGeneratedByChat(cell: ICellViewModel) {
if (!this._notebookEditor.hasModel()) {
// no model attached yet
return false;
}
const cellId = NotebookCellTextModelLikeId.str({ uri: cell.uri, viewType: this._notebookEditor.textModel.viewType });
return this._promptCache.has(cellId);
} | // check if a cell is generated by prompt by checking prompt cache | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.ts#L883-L891 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookChatController.getPromptFromCache | getPromptFromCache(cell: ICellViewModel) {
if (!this._notebookEditor.hasModel()) {
// no model attached yet
return undefined;
}
const cellId = NotebookCellTextModelLikeId.str({ uri: cell.uri, viewType: this._notebookEditor.textModel.viewType });
return this._promptCache.get(cellId);
} | // get prompt from cache | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.ts#L894-L902 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | NotebookTextDiffEditor.getDomNode | getDomNode() {
return this._rootElement;
} | // } | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.ts#L811-L813 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.