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 | ConfigurationTelemetryContribution.getValueToReport | private getValueToReport(key: string, target: ConfigurationTarget.USER_LOCAL | ConfigurationTarget.WORKSPACE): string | undefined {
const inpsectData = this.configurationService.inspect(key);
const value = target === ConfigurationTarget.USER_LOCAL ? inpsectData.user?.value : inpsectData.workspace?.value;
if (isNu... | /**
* Report value of a setting only if it is an enum, boolean, or number or an array of those.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/telemetry/browser/telemetry.contribution.ts#L264-L284 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalFontMetrics.getFont | getFont(w: Window, xtermCore?: IXtermCore, excludeDimensions?: boolean): ITerminalFont {
const editorConfig = this._configurationService.getValue<IEditorOptions>('editor');
let fontFamily = this._terminalConfigurationService.config.fontFamily || editorConfig.fontFamily || EDITOR_FONT_DEFAULTS.fontFamily || 'monosp... | /**
* Gets the font information based on the terminal.integrated.fontFamily
* terminal.integrated.fontSize, terminal.integrated.lineHeight configuration properties
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalConfigurationService.ts#L108-L166 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | clampInt | function clampInt<T>(source: any, minimum: number, maximum: number, fallback: T): number | T {
let r = parseInt(source, 10);
if (isNaN(r)) {
return fallback;
}
if (typeof minimum === 'number') {
r = Math.max(minimum, r);
}
if (typeof maximum === 'number') {
r = Math.min(maximum, r);
}
return r;
} | // #endregion TerminalFontMetrics | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalConfigurationService.ts#L238-L250 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalContextActionRunner.runAction | protected override async runAction(action: IAction, context?: InstanceContext | InstanceContext[]): Promise<void> {
if (Array.isArray(context) && context.every(e => e instanceof InstanceContext)) {
// arg1: The (first) focused instance
// arg2: All selected instances
await action.run(context?.[0], context);
... | // eslint-disable-next-line @typescript-eslint/naming-convention | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalContextMenu.ts#L40-L48 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalEditor.createEditor | protected createEditor(parent: HTMLElement): void {
this._editorInstanceElement = parent;
this._overflowGuardElement = dom.$('.terminal-overflow-guard.terminal-editor');
this._editorInstanceElement.appendChild(this._overflowGuardElement);
this._registerListeners();
} | // eslint-disable-next-line @typescript-eslint/naming-convention | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalEditor.ts#L110-L115 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalEditor._registerDisposableActions | private _registerDisposableActions(dropdownAction: IAction, dropdownMenuActions: IAction[]): void {
this._disposableStore.clear();
if (dropdownAction instanceof Action) {
this._disposableStore.add(dropdownAction);
}
dropdownMenuActions.filter(a => a instanceof Action).forEach(a => this._disposableStore.add(a... | /**
* Actions might be of type Action (disposable) or Separator or SubmenuAction, which don't extend Disposable
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalEditor.ts#L182-L188 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalEditorInput.setCopyLaunchConfig | setCopyLaunchConfig(launchConfig: IShellLaunchConfig) {
this._copyLaunchConfig = launchConfig;
} | /**
* Sets the launch config to use for the next call to EditorInput.copy, which will be used when
* the editor's split command is run.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.ts#L85-L87 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalEditorInput.terminalInstance | get terminalInstance(): ITerminalInstance | undefined {
return this._isDetached ? undefined : this._terminalInstance;
} | /**
* Returns the terminal instance for this input if it has not yet been detached from the input.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.ts#L92-L94 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalEditorInput.detachInstance | detachInstance() {
if (!this._isShuttingDown) {
this._terminalInstance?.detachFromElement();
this._terminalInstance?.setParentContextKeyService(this._contextKeyService);
this._isDetached = true;
}
} | /**
* Detach the instance from the input such that when the input is disposed it will not dispose
* of the terminal instance/process.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.ts#L224-L230 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalGroupService.setActiveGroupByIndex | setActiveGroupByIndex(index: number, force?: boolean) {
// Unset active group when the last group is removed
if (index === -1 && this.groups.length === 0) {
if (this.activeGroupIndex !== -1) {
this.activeGroupIndex = -1;
this._onDidChangeActiveGroup.fire(this.activeGroup);
this._onDidChangeActiveInst... | /**
* @param force Whether to force the group change, this should be used when the previous active
* group has been removed.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalGroupService.ts#L247-L270 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalGroupService.updateVisibility | updateVisibility() {
const visible = this._viewsService.isViewVisible(TERMINAL_VIEW_ID);
this.groups.forEach((g, i) => g.setVisible(visible && i === this.activeGroupIndex));
} | /**
* Visibility should be updated in the following cases:
* 1. Toggle `TERMINAL_VIEW_ID` visibility
* 2. Change active group
* 3. Change instances in active group
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalGroupService.ts#L502-L505 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalInstance.processId | get processId(): number | undefined { return this._processManager.shellProcessId; } | // TODO: Ideally processId would be merged into processReady | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts#L263-L263 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalInstance.processReady | get processReady(): Promise<void> { return this._processManager.ptyProcessReady; } | // TODO: Should this be an event as it can fire twice? | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts#L266-L266 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalInstance._evaluateColsAndRows | private _evaluateColsAndRows(width: number, height: number): number | null {
// Ignore if dimensions are undefined or 0
if (!width || !height) {
this._setLastKnownColsAndRows();
return null;
}
const dimension = this._getDimension(width, height);
if (!dimension) {
this._setLastKnownColsAndRows();
... | /**
* Evaluates and sets the cols and rows of the terminal if possible.
* @param width The width of the container.
* @param height The height of the container.
* @return The terminal's width if it requires a layout.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts#L692-L719 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalInstance._createXterm | protected async _createXterm(): Promise<XtermTerminal | undefined> {
const Terminal = await TerminalInstance.getXtermConstructor(this._keybindingService, this._contextKeyService);
if (this.isDisposed) {
return undefined;
}
const disableShellIntegrationReporting = (this.shellLaunchConfig.executable === undef... | /**
* Create xterm.js instance and attach data listeners.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts#L773-L889 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalInstance._open | private _open(): void {
if (!this.xterm || this.xterm.raw.element) {
return;
}
if (!this._container || !this._container.isConnected) {
throw new Error('A container element needs to be set with `attachToElement` and be part of the DOM before calling `_open`');
}
const xtermElement = document.createElem... | /**
* Opens the the terminal instance inside the parent DOM element previously set with
* `attachToElement`, you must ensure the parent DOM element is explicitly visible before
* invoking this function as it performs some DOM calculations internally
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts#L963-L1136 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalInstance._onProcessExit | private async _onProcessExit(exitCodeOrError?: number | ITerminalLaunchError): Promise<void> {
// Prevent dispose functions being triggered multiple times
if (this._isExiting) {
return;
}
const parsedExitResult = parseExitResult(exitCodeOrError, this.shellLaunchConfig, this._processManager.processState, this... | /**
* Called when either a process tied to a terminal has exited or when a terminal renderer
* simulates a process exiting (e.g. custom execution task).
* @param exitCode The exit code of the process, this is undefined when the terminal was exited
* through user action.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts#L1564-L1639 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalInstance._flushXtermData | private _flushXtermData(): Promise<void> {
if (this._latestXtermWriteData === this._latestXtermParseData) {
return Promise.resolve();
}
let retries = 0;
return new Promise<void>(r => {
const interval = dom.disposableWindowInterval(dom.getActiveWindow().window, () => {
if (this._latestXtermWriteData ==... | /**
* Ensure write calls to xterm.js have finished before resolving.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts#L1669-L1682 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalProcessManager._resolveEnvironment | private async _resolveEnvironment(backend: ITerminalBackend, variableResolver: terminalEnvironment.VariableResolver | undefined, shellLaunchConfig: IShellLaunchConfig): Promise<IProcessEnvironment> {
const workspaceFolder = terminalEnvironment.getWorkspaceForTerminal(shellLaunchConfig.cwd, this._workspaceContextServi... | // Fetch any extension environment additions and apply them | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts#L433-L463 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | SeamlessRelaunchDataFilter.disableSeamlessRelaunch | disableSeamlessRelaunch() {
this._disableSeamlessRelaunch = true;
this._stopRecording();
this.triggerSwap();
} | /**
* Disables seamless relaunch for the active process
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts#L773-L777 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | SeamlessRelaunchDataFilter.triggerSwap | triggerSwap() {
// Clear the swap timeout if it exists
if (this._swapTimeout) {
mainWindow.clearTimeout(this._swapTimeout);
this._swapTimeout = undefined;
}
// Do nothing if there's nothing being recorder
if (!this._firstRecorder) {
return;
}
// Clear the first recorder if no second process was ... | /**
* Trigger the swap of the processes if needed (eg. timeout, input)
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts#L782-L822 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalService.foregroundInstances | get foregroundInstances(): ITerminalInstance[] {
return this._terminalGroupService.instances.concat(this._terminalEditorService.instances);
} | /** Gets all non-background terminals. */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalService.ts#L99-L101 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalService._getIndexFromId | private _getIndexFromId(terminalId: number): number {
let terminalIndex = -1;
this.instances.forEach((terminalInstance, i) => {
if (terminalInstance.instanceId === terminalId) {
terminalIndex = i;
}
});
if (terminalIndex === -1) {
throw new Error(`Terminal with ID ${terminalId} does not exist (has ... | // TODO: Remove this, it should live in group/editor servioce | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalService.ts#L895-L906 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalViewPane.renderBody | protected override renderBody(container: HTMLElement): void {
super.renderBody(container);
if (!this._parentDomElement) {
this._updateForShellIntegration(container);
}
this._parentDomElement = container;
this._parentDomElement.classList.add('integrated-terminal');
domStylesheetsJs.createStyleSheet(this.... | // eslint-disable-next-line @typescript-eslint/naming-convention | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalView.ts#L192-L238 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalViewPane.layoutBody | protected override layoutBody(height: number, width: number): void {
super.layoutBody(height, width);
this._terminalTabbedView?.layout(width, height);
} | // eslint-disable-next-line @typescript-eslint/naming-convention | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalView.ts#L248-L251 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalViewPane._registerDisposableActions | private _registerDisposableActions(dropdownAction: IAction, dropdownMenuActions: IAction[]): void {
this._disposableStore.clear();
if (dropdownAction instanceof Action) {
this._disposableStore.add(dropdownAction);
}
dropdownMenuActions.filter(a => a instanceof Action).forEach(a => this._disposableStore.add(a... | /**
* Actions might be of type Action (disposable) or Separator or SubmenuAction, which don't extend Disposable
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalView.ts#L301-L307 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | SingleTerminalTabActionViewItem.updateLabel | protected override updateLabel(e?: ITerminalInstance): void {
// Only update if it's the active instance
if (e && e !== this._terminalGroupService.activeInstance) {
return;
}
if (this._elementDisposables.length === 0 && this.element && this.label) {
// Right click opens context menu
this._elementDispo... | // eslint-disable-next-line @typescript-eslint/naming-convention | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/terminalView.ts#L470-L552 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | XtermTerminal.constructor | constructor(
xtermCtor: typeof RawXtermTerminal,
options: IXtermTerminalOptions,
@IConfigurationService private readonly _configurationService: IConfigurationService,
@IInstantiationService private readonly _instantiationService: IInstantiationService,
@ITerminalLogService private readonly _logService: ITermi... | /**
* @param xtermCtor The xterm.js constructor, this is passed in so it can be fetched lazily
* outside of this class such that {@link raw} is not nullable.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts#L174-L325 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | XtermTerminal._writeText | _writeText(data: string): void {
this.raw.write(data);
} | // eslint-disable-next-line @typescript-eslint/naming-convention | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts#L872-L874 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | RemoteTerminalChannelClient.installAutoReply | installAutoReply(match: string, reply: string): Promise<void> {
return this._channel.call(RemoteTerminalChannelRequest.InstallAutoReply, [match, reply]);
} | // #region Pty service contribution RPC calls | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/common/remote/remoteTerminalChannel.ts#L318-L320 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LocalTerminalBackend._proxy | private get _proxy(): IPtyService { return this._directProxy || this._localPtyService; } | /**
* Communicate to the direct proxy (renderer<->ptyhost) if it's available, otherwise use the
* indirect proxy (renderer<->main<->ptyhost). The latter may not need to actually launch the
* pty host, for example when detecting profiles.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/electron-sandbox/localTerminalBackend.ts#L68-L68 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LocalTerminalBackend._connectToDirectProxy | private async _connectToDirectProxy(): Promise<void> {
// Check if connecting is in progress
if (this._directProxyClientEventually) {
await this._directProxyClientEventually.p;
return;
}
this._logService.debug('Starting pty host');
const directProxyClientEventually = new DeferredPromise<MessagePortClie... | /**
* Request a direct connection to the pty host, this will launch the pty host process if necessary.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/electron-sandbox/localTerminalBackend.ts#L108-L158 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LocalTerminalBackend.installAutoReply | installAutoReply(match: string, reply: string): Promise<void> {
return this._proxy.installAutoReply(match, reply);
} | // #region Pty service contribution RPC calls | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/electron-sandbox/localTerminalBackend.ts#L366-L368 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | assertPathsMatch | function assertPathsMatch(a: string, b: string): void {
strictEqual(Uri.file(a).fsPath, Uri.file(b).fsPath);
} | // This helper checks the paths in a cross-platform friendly manner | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/test/common/terminalEnvironment.test.ts#L183-L185 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | profilesEqual | function profilesEqual(actualProfiles: ITerminalProfile[], expectedProfiles: ITerminalProfile[]) {
strictEqual(actualProfiles.length, expectedProfiles.length, `Actual: ${actualProfiles.map(e => e.profileName).join(',')}\nExpected: ${expectedProfiles.map(e => e.profileName).join(',')}`);
for (const expected of expecte... | /**
* Assets that two profiles objects are equal, this will treat explicit undefined and unset
* properties the same. Order of the profiles is ignored.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminal/test/node/terminalProfiles.test.ts#L18-L29 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalChatController.terminalChatWidget | get terminalChatWidget(): TerminalChatWidget | undefined { return this._terminalChatWidget?.value; } | /**
* The terminal chat widget for the controller, this will be undefined if xterm is not ready yet (ie. the
* terminal is still initializing). This wraps the inline chat widget.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.ts#L42-L42 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalClipboardContribution.paste | async paste(): Promise<void> {
await this._paste(await this._clipboardService.readText());
} | /**
* Focuses and pastes the contents of the clipboard into the terminal instance.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/clipboard/browser/terminal.clipboard.contribution.ts#L83-L85 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalClipboardContribution.pasteSelection | async pasteSelection(): Promise<void> {
await this._paste(await this._clipboardService.readText('selection'));
} | /**
* Focuses and pastes the contents of the selection clipboard into the terminal instance.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/clipboard/browser/terminal.clipboard.contribution.ts#L90-L92 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalClipboardContribution.overrideCopyOnSelection | overrideCopyOnSelection(value: boolean): IDisposable {
if (this._overrideCopySelection !== undefined) {
throw new Error('Cannot set a copy on selection override multiple times');
}
this._overrideCopySelection = value;
return toDisposable(() => this._overrideCopySelection = undefined);
} | /**
* Override the copy on selection feature with a custom value.
* @param value Whether to enable copySelection.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/clipboard/browser/terminal.clipboard.contribution.ts#L160-L166 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | parseConfigValue | function parseConfigValue(value: unknown): 'auto' | 'always' | 'never' {
// Valid value
if (typeof value === 'string') {
if (value === 'auto' || value === 'always' || value === 'never') {
return value;
}
}
// Legacy backwards compatibility
if (typeof value === 'boolean') {
return value ? 'auto' :... | // Get config value | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/clipboard/browser/terminalClipboard.ts#L23-L36 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | describeEnvironmentChanges | function describeEnvironmentChanges(collection: IMergedEnvironmentVariableCollection, scope: EnvironmentVariableScope | undefined): string {
let content = `# ${localize('envChanges', 'Terminal Environment Changes')}`;
const globalDescriptions = collection.getDescriptionMap(undefined);
const workspaceDescriptions = c... | // #endregion | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/environmentChanges/browser/terminal.environmentChanges.contribution.ts#L52-L78 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalHistoryContribution.runRecent | async runRecent(type: 'command' | 'cwd', filterMode?: 'fuzzy' | 'contiguous', value?: string): Promise<void> {
return this._instantiationService.invokeFunction(showRunRecentQuickPick,
this._ctx.instance,
this._terminalInRunCommandPicker,
type,
filterMode,
value,
);
} | /**
* Triggers a quick pick that displays recent commands or cwds. Selecting one will
* rerun it in the active terminal.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/history/browser/terminal.history.contribution.ts#L69-L77 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | proxyLinkProvider | const proxyLinkProvider: OmitFirstArg<ITerminalExternalLinkProvider['provideLinks']> = async (bufferLineNumber) => {
return this.externalProvideLinksCb?.(bufferLineNumber);
}; | // Forward any external link provider requests to the registered provider if it exists. This | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkManager.ts#L392-L394 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalLinkQuickpick._generatePicks | private async _generatePicks(links: (ILink | TerminalLink)[], ignoreLinks?: ILink[]): Promise<ITerminalLinkQuickPickItem[] | undefined> {
if (!links) {
return;
}
const linkTextKeys: Set<string> = new Set();
const linkUriKeys: Set<string> = new Set();
const picks: ITerminalLinkQuickPickItem[] = [];
for (c... | /**
* @param ignoreLinks Links with labels to not include in the picks.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkQuickpick.ts#L182-L234 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalLocalLinkDetector._validateAndGetLink | private async _validateAndGetLink(linkText: string | undefined, bufferRange: IBufferRange, linkCandidates: string[], trimRangeMap?: Map<string, number>): Promise<ITerminalSimpleLink | undefined> {
const linkStat = await this._validateLinkCandidates(linkCandidates);
if (linkStat) {
let type: TerminalBuiltinLinkTy... | /**
* Validates a set of link candidates and returns a link if validated.
* @param linkText The link text, this should be undefined to use the link stat value
* @param trimRangeMap A map of link candidates to the amount of buffer range they need trimmed.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/links/browser/terminalLocalLinkDetector.ts#L288-L320 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalQuickFixAddon._resolveQuickFixes | private async _resolveQuickFixes(command: ITerminalCommand, aliases?: string[][]): Promise<void> {
const terminal = this._terminal;
if (!terminal || command.wasReplayed) {
return;
}
if (command.command !== '' && this._lastQuickFixId) {
this._disposeQuickFix(command, this._lastQuickFixId);
}
const res... | /**
* Resolves quick fixes, if any, based on the
* @param command & its output
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/quickFix/browser/quickFixAddon.ts#L187-L221 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalQuickFixAddon._registerQuickFixDecoration | private _registerQuickFixDecoration(): void {
if (!this._terminal) {
return;
}
this._decoration.clear();
this._decorationDisposables.clear();
const quickFixes = this._quickFixes;
if (!quickFixes || quickFixes.length === 0) {
return;
}
const marker = this._terminal.registerMarker();
if (!marker)... | /**
* Registers a decoration with the quick fixes
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/quickFix/browser/quickFixAddon.ts#L249-L305 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TerminalCompletionList.constructor | constructor(items?: ITerminalCompletion[], resourceRequestConfig?: TerminalResourceRequestConfig) {
this.items = items;
this.resourceRequestConfig = resourceRequestConfig;
} | /**
* Creates a new completion list.
*
* @param items The completion items.
* @param isIncomplete The list is not complete.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/suggest/browser/terminalCompletionService.ts#L56-L59 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | StringReader.eatChar | eatChar(char: string) {
if (this._input[this.index] !== char) {
return;
}
this.index++;
return char;
} | /**
* Advances the reader and returns the character if it matches.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L249-L256 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | StringReader.eatStr | eatStr(substr: string) {
if (this._input.slice(this.index, substr.length) !== substr) {
return;
}
this.index += substr.length;
return substr;
} | /**
* Advances the reader and returns the string if it matches.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L261-L268 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | StringReader.eatGradually | eatGradually(substr: string): MatchResult {
const prevIndex = this.index;
for (let i = 0; i < substr.length; i++) {
if (i > 0 && this.eof) {
return MatchResult.Buffer;
}
if (!this.eatChar(substr[i])) {
this.index = prevIndex;
return MatchResult.Failure;
}
}
return MatchResult.Success;
... | /**
* Matches and eats the substring character-by-character. If EOF is reached
* before the substring is consumed, it will buffer. Index is not moved
* if it's not a match.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L275-L289 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | StringReader.eatRe | eatRe(re: RegExp) {
const match = re.exec(this._input.slice(this.index));
if (!match) {
return;
}
this.index += match[0].length;
return match;
} | /**
* Advances the reader and returns the regex if it matches.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L294-L302 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | StringReader.eatCharCode | eatCharCode(min = 0, max = min + 1) {
const code = this._input.charCodeAt(this.index);
if (code < min || code >= max) {
return undefined;
}
this.index++;
return code;
} | /**
* Advances the reader and returns the character if the code matches.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L307-L315 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | PredictionStats.accuracy | get accuracy() {
let correctCount = 0;
for (const [, correct] of this._stats) {
if (correct) {
correctCount++;
}
}
return correctCount / (this._stats.length || 1);
} | /**
* Gets the percent (0-1) of predictions that were accurate.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L651-L660 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | PredictionStats.sampleSize | get sampleSize() {
return this._stats.length;
} | /**
* Gets the number of recorded stats.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L665-L667 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | PredictionStats.latency | get latency() {
const latencies = this._stats.filter(([, correct]) => correct).map(([s]) => s).sort();
return {
count: latencies.length,
min: latencies[0],
median: latencies[Math.floor(latencies.length / 2)],
max: latencies[latencies.length - 1],
};
} | /**
* Gets latency stats of successful predictions.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L672-L681 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | PredictionStats.maxLatency | get maxLatency() {
let max = -Infinity;
for (const [latency, correct] of this._stats) {
if (correct) {
max = Math.max(latency, max);
}
}
return max;
} | /**
* Gets the maximum observed latency.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L686-L695 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | PredictionTimeline.undoAllPredictions | undoAllPredictions() {
const buffer = this._getActiveBuffer();
if (this._showPredictions && buffer) {
this.terminal.write(this._currentGenerationPredictions.reverse()
.map(p => p.rollback(this.physicalCursor(buffer))).join(''));
}
this._expected = [];
} | /**
* Undoes any predictions written and resets expectations.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L804-L812 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | PredictionTimeline.beforeServerInput | beforeServerInput(input: string): string {
const originalInput = input;
if (this._inputBuffer) {
input = this._inputBuffer + input;
this._inputBuffer = undefined;
}
if (!this._expected.length) {
this._clearPredictionState();
return input;
}
const buffer = this._getActiveBuffer();
if (!buffer... | /**
* Should be called when input is incoming to the temrinal.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L817-L931 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | PredictionTimeline._clearPredictionState | private _clearPredictionState() {
this._expected = [];
this.clearCursor();
this._lookBehind = undefined;
} | /**
* Clears any expected predictions and stored state. Should be called when
* the pty gives us something we don't recognize.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L937-L941 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | PredictionTimeline.addPrediction | addPrediction(buffer: IBuffer, prediction: IPrediction) {
this._expected.push({ gen: this._currentGen, p: prediction });
this._addedEmitter.fire(prediction);
if (this._currentGen !== this._expected[0].gen) {
prediction.apply(buffer, this.tentativeCursor(buffer));
return false;
}
const text = predictio... | /**
* Appends a typeahead prediction.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L946-L967 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | PredictionTimeline.peekEnd | peekEnd(): IPrediction | undefined {
return this._expected[this._expected.length - 1]?.p;
} | /**
* Peeks the last prediction written.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L992-L994 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | PredictionTimeline.peekStart | peekStart(): IPrediction | undefined {
return this._expected[0]?.p;
} | /**
* Peeks the first pending prediction.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L999-L1001 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | PredictionTimeline.physicalCursor | physicalCursor(buffer: IBuffer) {
if (!this._physicalCursor) {
if (this._showPredictions) {
flushOutput(this.terminal);
}
this._physicalCursor = new Cursor(this.terminal.rows, this.terminal.cols, buffer);
}
return this._physicalCursor;
} | /**
* Current position of the cursor in the terminal.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L1006-L1015 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | PredictionTimeline.tentativeCursor | tentativeCursor(buffer: IBuffer) {
if (!this._tenativeCursor) {
this._tenativeCursor = this.physicalCursor(buffer).clone();
}
return this._tenativeCursor;
} | /**
* Cursor position if all predictions and boundaries that have been inserted
* so far turn out to be successfully predicted.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L1021-L1027 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | attributesToArgs | const attributesToArgs = (cell: XtermAttributes) => {
if (cell.isAttributeDefault()) { return [0]; }
const args = [];
if (cell.isBold()) { args.push(1); }
if (cell.isDim()) { args.push(2); }
if (cell.isItalic()) { args.push(3); }
if (cell.isUnderline()) { args.push(4); }
if (cell.isBlink()) { args.push(5); }
i... | /**
* Gets the escape sequence args to restore state/appearance in the cell.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L1043-L1064 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | attributesToSeq | const attributesToSeq = (cell: XtermAttributes) => `${VT.Csi}${attributesToArgs(cell).join(';')}m`; | /**
* Gets the escape sequence to restore state/appearance in the cell.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L1069-L1069 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | getColorWidth | const getColorWidth = (params: (number | number[])[], pos: number) => {
const accu = [0, 0, -1, 0, 0, 0];
let cSpace = 0;
let advance = 0;
do {
const v = params[pos + advance];
accu[advance + cSpace] = typeof v === 'number' ? v : v[0];
if (typeof v !== 'number') {
let i = 0;
do {
if (accu[1] === 5)... | /**
* @see https://github.com/xtermjs/xterm.js/blob/065eb13a9d3145bea687239680ec9696d9112b8e/src/common/InputHandler.ts#L2127
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L1088-L1118 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TypeAheadStyle.expectIncomingStyle | expectIncomingStyle(n = 1) {
this._expectedIncomingStyles += n * 2;
} | /**
* Signals that a style was written to the terminal and we should watch
* for it coming in.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L1146-L1148 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TypeAheadStyle.startTracking | startTracking() {
this._expectedIncomingStyles = 0;
this._onDidWriteSGR(attributesToArgs(core(this._terminal)._inputHandler._curAttrData));
this._csiHandler = this._terminal.parser.registerCsiHandler({ final: 'm' }, args => {
this._onDidWriteSGR(args);
return false;
});
} | /**
* Starts tracking for CSI changes in the terminal.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L1153-L1160 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TypeAheadStyle.dispose | dispose() {
this._stopTracking();
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L1173-L1175 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TypeAheadStyle.onUpdate | onUpdate(style: ITerminalTypeAheadConfiguration['localEchoStyle']) {
const { applyArgs, undoArgs } = this._getArgs(style);
this._applyArgs = applyArgs;
this._undoArgs = this._originalUndoArgs = undoArgs;
this.apply = TypeAheadStyle._compileArgs(this._applyArgs);
this.undo = TypeAheadStyle._compileArgs(this._u... | /**
* Updates the current typeahead style.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts#L1244-L1250 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | CoverageDetailsModel.describe | public describe(detail: CoverageDetailsWithBranch, model: ITextModel): IMarkdownString | undefined {
if (detail.type === DetailType.Declaration) {
return namedDetailLabel(detail.name, detail);
} else if (detail.type === DetailType.Statement) {
const text = wrapName(model.getValueInRange(tidyLocation(detail.lo... | /** Gets the markdown description for the given detail */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/codeCoverageDecorations.ts#L446-L471 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | tidyLocation | function tidyLocation(location: Range | Position): Range {
if (location instanceof Position) {
return Range.fromPositions(location, new Position(location.lineNumber, 0x7FFFFFFF));
}
return location;
} | // 'tidies' the range by normalizing it into a range and removing leading | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/codeCoverageDecorations.ts#L486-L492 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | CoverageToolbarWidget.getId | public getId(): string {
return 'coverage-summary-widget';
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/codeCoverageDecorations.ts#L564-L566 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | CoverageToolbarWidget.getDomNode | public getDomNode(): HTMLElement {
return this._domNode.root;
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/codeCoverageDecorations.ts#L569-L571 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | CoverageToolbarWidget.getPosition | public getPosition(): IOverlayWidgetPosition | null {
return {
preference: OverlayWidgetPositionPreference.TOP_CENTER,
stackOridinal: 9,
};
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/codeCoverageDecorations.ts#L574-L579 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ManagedTestCoverageBars.visible | public get visible() {
return !!this._coverage;
} | /** Gets whether coverage is currently visible for the resource. */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testCoverageBars.ts#L72-L74 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExplorerTestCoverageBars.setResource | public setResource(resource: URI | undefined, transaction?: ITransaction) {
this.resource.set(resource, transaction);
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testCoverageBars.ts#L228-L230 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DeclarationCoverageNode.contains | public contains(location: Range | Position) {
const own = this.data.location;
return own instanceof Range && (location instanceof Range ? own.containsRange(location) : own.containsPosition(location));
} | /** Gets whether this function has a defined range and contains the given range. */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testCoverageView.ts#L148-L151 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | FileCoverageRenderer.renderTemplate | public renderTemplate(container: HTMLElement): FileTemplateData {
const templateDisposables = new DisposableStore();
container.classList.add('testing-stdtree-container', 'test-coverage-list-item');
return {
container,
bars: templateDisposables.add(this.instantiationService.createInstance(ManagedTestCoverag... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testCoverageView.ts#L543-L556 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | FileCoverageRenderer.renderElement | public renderElement(node: ITreeNode<CoverageTreeElement, FuzzyScore>, _index: number, templateData: FileTemplateData): void {
this.doRender(node.element as TestCoverageFileNode, templateData, node.filterData);
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testCoverageView.ts#L559-L561 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | FileCoverageRenderer.renderCompressedElements | public renderCompressedElements(node: ITreeNode<ICompressedTreeNode<CoverageTreeElement>, FuzzyScore>, _index: number, templateData: FileTemplateData): void {
this.doRender(node.element.elements, templateData, node.filterData);
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testCoverageView.ts#L564-L566 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | FileCoverageRenderer.doRender | private doRender(element: CoverageTreeElement | CoverageTreeElement[], templateData: FileTemplateData, filterData: FuzzyScore | undefined) {
templateData.elementsDisposables.clear();
const stat = (element instanceof Array ? element[element.length - 1] : element) as TestCoverageFileNode;
const file = stat.value!;... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testCoverageView.ts#L573-L596 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DeclarationCoverageRenderer.renderTemplate | public renderTemplate(container: HTMLElement): DeclarationTemplateData {
const templateDisposables = new DisposableStore();
container.classList.add('test-coverage-list-item', 'testing-stdtree-container');
const icon = dom.append(container, dom.$('.state'));
const label = dom.append(container, dom.$('.label'));... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testCoverageView.ts#L616-L630 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DeclarationCoverageRenderer.renderElement | public renderElement(node: ITreeNode<CoverageTreeElement, FuzzyScore>, _index: number, templateData: DeclarationTemplateData): void {
this.doRender(node.element as DeclarationCoverageNode, templateData, node.filterData);
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testCoverageView.ts#L633-L635 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DeclarationCoverageRenderer.renderCompressedElements | public renderCompressedElements(node: ITreeNode<ICompressedTreeNode<CoverageTreeElement>, FuzzyScore>, _index: number, templateData: DeclarationTemplateData): void {
this.doRender(node.element.elements[node.element.elements.length - 1] as DeclarationCoverageNode, templateData, node.filterData);
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testCoverageView.ts#L638-L640 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DeclarationCoverageRenderer.doRender | private doRender(element: DeclarationCoverageNode, templateData: DeclarationTemplateData, _filterData: FuzzyScore | undefined) {
const covered = !!element.hits;
const icon = covered ? testingWasCovered : testingStatesToIcons.get(TestResultState.Unset);
templateData.container.classList.toggle('not-covered', !cover... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testCoverageView.ts#L647-L654 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | GetSelectedProfiles.run | public override run(accessor: ServicesAccessor) {
const profiles = accessor.get(ITestProfileService);
return [
...profiles.getGroupDefaultProfiles(TestRunProfileBitset.Run),
...profiles.getGroupDefaultProfiles(TestRunProfileBitset.Debug),
...profiles.getGroupDefaultProfiles(TestRunProfileBitset.Coverage),
... | /**
* @override
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testExplorerActions.ts#L553-L568 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | GetExplorerSelection.runInView | public override runInView(_accessor: ServicesAccessor, view: TestingExplorerView) {
const { include, exclude } = view.getTreeIncludeExclude(TestRunProfileBitset.Run, undefined, 'selected');
const mapper = (i: InternalTestItem) => i.item.extId;
return { include: include.map(mapper), exclude: exclude.map(mapper) };... | /**
* @override
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testExplorerActions.ts#L579-L583 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | CancelTestRunAction.run | public async run(accessor: ServicesAccessor, resultId?: string, taskId?: string) {
const resultService = accessor.get(ITestResultService);
const testService = accessor.get(ITestService);
if (resultId) {
testService.cancelTestRun(resultId, taskId);
} else {
for (const run of resultService.results) {
if... | /**
* @override
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testExplorerActions.ts#L732-L744 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingViewAsListAction.runInView | public runInView(_accessor: ServicesAccessor, view: TestingExplorerView) {
view.viewModel.viewMode = TestExplorerViewMode.List;
} | /**
* @override
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testExplorerActions.ts#L766-L768 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingViewAsTreeAction.runInView | public runInView(_accessor: ServicesAccessor, view: TestingExplorerView) {
view.viewModel.viewMode = TestExplorerViewMode.Tree;
} | /**
* @override
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testExplorerActions.ts#L790-L792 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingSortByStatusAction.runInView | public runInView(_accessor: ServicesAccessor, view: TestingExplorerView) {
view.viewModel.viewSorting = TestExplorerViewSorting.ByStatus;
} | /**
* @override
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testExplorerActions.ts#L815-L817 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingSortByLocationAction.runInView | public runInView(_accessor: ServicesAccessor, view: TestingExplorerView) {
view.viewModel.viewSorting = TestExplorerViewSorting.ByLocation;
} | /**
* @override
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testExplorerActions.ts#L839-L841 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingSortByDurationAction.runInView | public runInView(_accessor: ServicesAccessor, view: TestingExplorerView) {
view.viewModel.viewSorting = TestExplorerViewSorting.ByDuration;
} | /**
* @override
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testExplorerActions.ts#L863-L865 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | CollapseAllAction.runInView | public runInView(_accessor: ServicesAccessor, view: TestingExplorerView) {
view.viewModel.collapseAll();
} | /**
* @override
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testExplorerActions.ts#L918-L920 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ClearTestResultsAction.run | public run(accessor: ServicesAccessor) {
accessor.get(ITestResultService).clear();
} | /**
* @override
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testExplorerActions.ts#L952-L954 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | CachedDecorations.getForExactTests | public getForExactTests(testIds: string[]) {
const key = testIds.sort().join('\0\0');
return this.runByIdKey.get(key);
} | /** Gets a test run decoration that contains exactly the given test IDs */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingDecorations.ts#L97-L100 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | CachedDecorations.addTest | public addTest(d: RunTestDecoration) {
const key = d.testIds.sort().join('\0\0');
this.runByIdKey.set(key, d);
} | /** Adds a new test run decroation */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingDecorations.ts#L102-L105 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.