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 | DebugMemoryFileSystemProvider.writeFile | public async writeFile(resource: URI, content: Uint8Array) {
const { offset } = this.parseUri(resource);
if (!offset) {
throw createFileSystemProviderError(`Range must be present to read a file`, FileSystemProviderErrorCode.FileNotFound);
}
const fd = await this.open(resource, { create: false });
try {
... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugMemory.ts#L125-L138 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugMemoryFileSystemProvider.readFile | public async readFile(resource: URI) {
const { offset } = this.parseUri(resource);
if (!offset) {
throw createFileSystemProviderError(`Range must be present to read a file`, FileSystemProviderErrorCode.FileNotFound);
}
const data = new Uint8Array(offset.toOffset - offset.fromOffset);
const fd = await this... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugMemory.ts#L141-L156 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugMemoryFileSystemProvider.read | public async read(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number> {
const memory = this.fdMemory.get(fd);
if (!memory) {
throw createFileSystemProviderError(`No file with that descriptor open`, FileSystemProviderErrorCode.Unavailable);
}
const ranges = await memor... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugMemory.ts#L159-L190 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugMemoryFileSystemProvider.write | public write(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number> {
const memory = this.fdMemory.get(fd);
if (!memory) {
throw createFileSystemProviderError(`No file with that descriptor open`, FileSystemProviderErrorCode.Unavailable);
}
return memory.region.write(pos,... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugMemory.ts#L193-L200 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugService.state | get state(): State {
const focusedSession = this.viewModel.focusedSession;
if (focusedSession) {
return focusedSession.state;
}
return this.initializing ? State.Initializing : State.Inactive;
} | //---- state management | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugService.ts#L263-L270 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugService.startDebugging | async startDebugging(launch: ILaunch | undefined, configOrName?: IConfig | string, options?: IDebugSessionOptions, saveBeforeStart = !options?.parentSession): Promise<boolean> {
const message = options && options.noDebug ? nls.localize('runTrust', "Running executes build tasks and program code from your workspace.") ... | /**
* main entry point
* properly manages compounds, checks for errors and handles the initializing state.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugService.ts#L352-L449 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugService.createSession | private async createSession(launch: ILaunch | undefined, config: IConfig | undefined, options?: IDebugSessionOptions): Promise<boolean> {
// We keep the debug type in a separate variable 'type' so that a no-folder config has no attributes.
// Storing the type in the config would break extensions that assume that th... | /**
* gets the debugger for the type, resolves configurations by providers, substitutes variables and runs prelaunch tasks
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugService.ts#L454-L594 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugService.doCreateSession | private async doCreateSession(sessionId: string, root: IWorkspaceFolder | undefined, configuration: { resolved: IConfig; unresolved: IConfig | undefined }, options?: IDebugSessionOptions): Promise<boolean> {
const session = this.instantiationService.createInstance(DebugSession, sessionId, configuration, root, this.m... | /**
* instantiates the new session, initializes the session, registers session listeners and reports telemetry
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugService.ts#L599-L666 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugService.focusStackFrame | async focusStackFrame(_stackFrame: IStackFrame | undefined, _thread?: IThread, _session?: IDebugSession, options?: { explicit?: boolean; preserveFocus?: boolean; sideBySide?: boolean; pinned?: boolean }): Promise<void> {
const { stackFrame, thread, session } = getStackFrameThreadAndSessionToFocus(this.model, _stackFr... | //---- focus management | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugService.ts#L983-L1012 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugService.addWatchExpression | addWatchExpression(name?: string): void {
const we = this.model.addWatchExpression(name);
if (!name) {
this.viewModel.setSelectedExpression(we, false);
}
this.debugStorage.storeWatchExpressions(this.model.getWatchExpressions());
} | //---- watches | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugService.ts#L1016-L1022 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugService.canSetBreakpointsIn | canSetBreakpointsIn(model: ITextModel): boolean {
return this.adapterManager.canSetBreakpointsIn(model);
} | //---- breakpoints | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugService.ts#L1041-L1043 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugService.unlinkTriggeredBreakpoints | private unlinkTriggeredBreakpoints(allBreakpoints: readonly IBreakpoint[], removedBreakpoints: readonly IBreakpoint[]): uri[] {
const affectedUris: uri[] = [];
for (const removed of removedBreakpoints) {
for (const existing of allBreakpoints) {
if (!removedBreakpoints.includes(existing) && existing.triggered... | /**
* Removes the condition of triggered breakpoints that depended on
* breakpoints in `removedBreakpoints`. Returns the URIs of resources that
* had their breakpoints changed in this way.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugService.ts#L1212-L1224 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugSession.onDidChangeState | get onDidChangeState(): Event<void> {
return this._onDidChangeState.event;
} | //---- events | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugSession.ts#L291-L293 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugSession.onDidCustomEvent | get onDidCustomEvent(): Event<DebugProtocol.Event> {
return this._onDidCustomEvent.event;
} | //---- DAP events | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugSession.ts#L309-L311 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugSession.initialize | async initialize(dbgr: IDebugger): Promise<void> {
if (this.raw) {
// if there was already a connection make sure to remove old listeners
await this.shutdown();
}
try {
const debugAdapter = await dbgr.createDebugAdapter(this);
this.raw = this.instantiationService.createInstance(RawDebugSession, debu... | /**
* create and initialize a new debug adapter for this session
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugSession.ts#L338-L382 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugSession.launchOrAttach | async launchOrAttach(config: IConfig): Promise<void> {
if (!this.raw) {
throw new Error(localize('noDebugAdapter', "No debugger available, can not send '{0}'", 'launch or attach'));
}
if (this.parentSession && this.parentSession.state === State.Inactive) {
throw canceled();
}
// __sessionID only used f... | /**
* launch or attach to the debuggee
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugSession.ts#L387-L403 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugSession.terminate | async terminate(restart = false): Promise<void> {
if (!this.raw) {
// Adapter went down but it did not send a 'terminated' event, simulate like the event has been sent
this.onDidExitAdapter();
}
this.cancelAllRequests();
if (this._options.lifecycleManagedByParent && this.parentSession) {
await this.pa... | /**
* terminate the current debug adapter session
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugSession.ts#L408-L431 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugSession.disconnect | async disconnect(restart = false, suspend = false): Promise<void> {
if (!this.raw) {
// Adapter went down but it did not send a 'terminated' event, simulate like the event has been sent
this.onDidExitAdapter();
}
this.cancelAllRequests();
if (this._options.lifecycleManagedByParent && this.parentSession) ... | /**
* end the current debug adapter session
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugSession.ts#L436-L453 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugSession.restart | async restart(): Promise<void> {
if (!this.raw) {
throw new Error(localize('noDebugAdapter', "No debugger available, can not send '{0}'", 'restart'));
}
this.cancelAllRequests();
if (this._options.lifecycleManagedByParent && this.parentSession) {
await this.parentSession.restart();
} else {
await th... | /**
* restart debug adapter session
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugSession.ts#L458-L469 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugSession.getThread | getThread(threadId: number): Thread | undefined {
return this.threads.get(threadId);
} | //---- threads | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugSession.ts#L928-L930 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugSession.registerListeners | private registerListeners(): void {
if (!this.raw) {
return;
}
this.rawListeners.add(this.raw.onDidInitialize(async () => {
aria.status(
this.configuration.noDebug
? localize('debuggingStartedNoDebug', "Started running without debugging.")
: localize('debuggingStarted', "Debugging started.")
... | //---- private | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugSession.ts#L1049-L1321 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugSession.shutdown | private shutdown(): void {
this.rawListeners.clear();
if (this.raw) {
// Send out disconnect and immediatly dispose (do not wait for response) #127418
this.raw.disconnect({});
this.raw.dispose();
this.raw = undefined;
}
this.fetchThreadsScheduler?.dispose();
this.fetchThreadsScheduler = undefined;... | // Disconnects and clears state. Session can be initialized again for a new connection. | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugSession.ts#L1460-L1474 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugSession.getSourceForUri | getSourceForUri(uri: URI): Source | undefined {
return this.sources.get(this.uriIdentityService.asCanonicalUri(uri).toString());
} | //---- sources | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugSession.ts#L1484-L1486 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugSession.getReplElements | getReplElements(): IReplElement[] {
return this.repl.getReplElements();
} | // REPL | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugSession.ts#L1533-L1535 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ThreadStatusScheduler.run | public async run(threadIdsP: Promise<number[]>, operation: (threadId: number, ct: CancellationToken) => Promise<unknown>) {
const cancelledWhileLookingUpThreads = new Set<number | undefined>();
this.pendingCancellations.push(cancelledWhileLookingUpThreads);
const threadIds = await threadIdsP;
// Now that we go... | /**
* Runs the operation.
* If thread is undefined it affects all threads.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugSession.ts#L1591-L1624 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ThreadStatusScheduler.cancel | public cancel(threadIds?: readonly number[]) {
if (!threadIds) {
for (const [_, op] of this.threadOps) {
op.cancel();
}
this.threadOps.clearAndDisposeAll();
for (const s of this.pendingCancellations) {
s.add(undefined);
}
} else {
for (const threadId of threadIds) {
this.threadOps.get(... | /**
* Cancels all ongoing state operations on the given threads.
* If threads is undefined it cancel all threads.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugSession.ts#L1630-L1648 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugToolBar.getStoredXPosition | private getStoredXPosition() {
const currentWindow = dom.getWindow(this.layoutService.activeContainer);
const isMainWindow = currentWindow === mainWindow;
const storedPercentage = isMainWindow
? Number(this.storageService.get(DEBUG_TOOLBAR_POSITION_KEY, StorageScope.PROFILE))
: this.auxWindowCoordinates.get... | /** Gets the stored X position of the middle of the toolbar based on the current window width */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/debugToolBar.ts#L267-L274 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DisassemblyView.focusedCurrentInstructionReference | get focusedCurrentInstructionReference() {
return this._debugService.getViewModel().focusedStackFrame?.thread.getTopStackFrame()?.instructionPointerReference;
} | // Instruction reference of the top stack frame of the focused stack | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/disassemblyView.ts#L151-L153 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DisassemblyView.getReferenceAddress | getReferenceAddress(instructionReference: string) {
return this._referenceToMemoryAddress.get(instructionReference);
} | /** Gets the address associated with the instruction reference. */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/disassemblyView.ts#L367-L369 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DisassemblyView.goToAddress | private goToAddress(address: bigint, focus?: boolean): boolean {
if (!this._disassembledInstructions) {
return false;
}
if (!address) {
return false;
}
const index = this.getIndexFromAddress(address);
if (index >= 0) {
this._disassembledInstructions.reveal(index);
if (focus) {
this._disas... | /**
* Go to the address provided. If no address is provided, reveal the address of the currently focused stack frame. Returns false if that address is not available.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/disassemblyView.ts#L374-L395 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DisassemblyView.primeMemoryReference | private async primeMemoryReference(instructionReference: string) {
if (this._referenceToMemoryAddress.has(instructionReference)) {
return true;
}
const s = await this.debugSession?.disassemble(instructionReference, 0, 0, 1);
if (s && s.length > 0) {
try {
this._referenceToMemoryAddress.set(instructio... | /**
* Sets the memory reference address. We don't just loadDisassembledInstructions
* for this, since we can't really deal with discontiguous ranges (we can't
* detect _if_ a range is discontiguous since we don't know how much memory
* comes between instructions.)
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/disassemblyView.ts#L431-L447 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DisassemblyView.loadDisassembledInstructions | private async loadDisassembledInstructions(instructionReference: string, offset: number, instructionOffset: number, instructionCount: number): Promise<number> {
const session = this.debugSession;
const resultEntries = await session?.disassemble(instructionReference, offset, instructionOffset, instructionCount);
... | /** Loads disasembled instructions. Returns the number of instructions that were loaded. */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/disassemblyView.ts#L450-L584 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DisassemblyView.reloadDisassembly | private reloadDisassembly(instructionReference: string, offset: number) {
if (!this._disassembledInstructions) {
return;
}
this._loadingLock = true; // stop scrolling during the load.
this.clear();
this._instructionBpList = this._debugService.getModel().getInstructionBreakpoints();
this.loadDisassembled... | /**
* Clears the table and reload instructions near the target address
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/disassemblyView.ts#L610-L630 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LinkDetector.linkify | linkify(text: string, splitLines?: boolean, workspaceFolder?: IWorkspaceFolder, includeFulltext?: boolean, hoverBehavior?: DebugLinkHoverBehaviorTypeData, highlights?: IHighlight[]): HTMLElement {
return this._linkify(text, splitLines, workspaceFolder, includeFulltext, hoverBehavior, highlights);
} | /**
* Matches and handles web urls, absolute and relative file links in the string provided.
* Returns <span/> element that wraps the processed string, where matched links are replaced by <a/>.
* 'onclick' event is attached to all anchored links that opens them in the editor.
* When splitLines is true, each lin... | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/linkDetector.ts#L94-L96 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LinkDetector.linkifyLocation | linkifyLocation(text: string, locationReference: number, session: IDebugSession, hoverBehavior?: DebugLinkHoverBehaviorTypeData) {
const link = this.createLink(text);
this.decorateLink(link, undefined, text, hoverBehavior, async (preserveFocus: boolean) => {
const location = await session.resolveLocationReferenc... | /**
* Linkifies a location reference.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/linkDetector.ts#L195-L208 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LinkDetector.makeReferencedLinkDetector | makeReferencedLinkDetector(locationReference: number, session: IDebugSession): ILinkDetector {
return {
linkify: (text, splitLines, workspaceFolder, includeFulltext, hoverBehavior, highlights) =>
this._linkify(text, splitLines, workspaceFolder, includeFulltext, hoverBehavior, highlights, { locationReference, s... | /**
* Makes an {@link ILinkDetector} that links everything in the output to the
* reference if they don't have other explicit links.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/linkDetector.ts#L214-L220 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | BaseTreeItem.getId | getId(): string {
const parent = this.getParent();
return parent ? `${parent.getId()}/${this.getInternalId()}` : this.getInternalId();
} | // a dynamic ID based on the parent chain; required for reparenting (see #55448) | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts#L125-L128 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | BaseTreeItem.getParent | getParent(): BaseTreeItem | undefined {
if (this._parent) {
if (this._parent.isSkipped()) {
return this._parent.getParent();
}
return this._parent;
}
return undefined;
} | // skips intermediate single-child nodes | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts#L135-L143 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | BaseTreeItem.hasChildren | hasChildren(): boolean {
const child = this.oneChild();
if (child) {
return child.hasChildren();
}
return this._children.size > 0;
} | // skips intermediate single-child nodes | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts#L156-L162 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | BaseTreeItem.getChildren | getChildren(): BaseTreeItem[] {
const child = this.oneChild();
if (child) {
return child.getChildren();
}
const array: BaseTreeItem[] = [];
for (const child of this._children.values()) {
array.push(child);
}
return array.sort((a, b) => this.compare(a, b));
} | // skips intermediate single-child nodes | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts#L165-L175 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | BaseTreeItem.getLabel | getLabel(separateRootFolder = true): string {
const child = this.oneChild();
if (child) {
const sep = (this instanceof RootFolderTreeItem && separateRootFolder) ? ' • ' : posix.sep;
return `${this._label}${sep}${child.getLabel()}`;
}
return this._label;
} | // skips intermediate single-child nodes | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts#L178-L185 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | BaseTreeItem.getHoverLabel | getHoverLabel(): string | undefined {
if (this._source && this._parent && this._parent._source) {
return this._source.raw.path || this._source.raw.name;
}
const label = this.getLabel(false);
const parent = this.getParent();
if (parent) {
const hover = parent.getHoverLabel();
if (hover) {
return `... | // skips intermediate single-child nodes | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts#L188-L201 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | BaseTreeItem.getSource | getSource(): Source | undefined {
const child = this.oneChild();
if (child) {
return child.getSource();
}
return this._source;
} | // skips intermediate single-child nodes | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts#L204-L210 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | asTreeElement | function asTreeElement(item: BaseTreeItem, viewState?: IViewState): ITreeElement<LoadedScriptsItem> {
const children = item.getChildren();
const collapsed = viewState ? !viewState.expanded.has(item.getId()) : !(item instanceof SessionTreeItem);
return {
element: item,
collapsed,
collapsible: item.hasChildren(... | /**
* This maps a model item into a view model item.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts#L403-L413 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | RawDebugSession.readyForBreakpoints | get readyForBreakpoints(): boolean {
return this._readyForBreakpoints;
} | /**
* DA is ready to accepts setBreakpoint requests.
* Becomes true after "initialized" events has been received.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts#L193-L195 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | RawDebugSession.onDidInitialize | get onDidInitialize(): Event<DebugProtocol.InitializedEvent> {
return this._onDidInitialize.event;
} | //---- DAP events | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts#L199-L201 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | RawDebugSession.start | async start(): Promise<void> {
if (!this.debugAdapter) {
return Promise.reject(new Error(nls.localize('noDebugAdapterStart', "No debug adapter, can not start debug session.")));
}
await this.debugAdapter.startSession();
this.startTime = new Date().getTime();
} | /**
* Starts the underlying debug adapter and tracks the session time for telemetry.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts#L268-L275 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | RawDebugSession.initialize | async initialize(args: DebugProtocol.InitializeRequestArguments): Promise<DebugProtocol.InitializeResponse | undefined> {
const response = await this.send('initialize', args, undefined, undefined, false);
if (response) {
this.mergeCapabilities(response.body);
}
return response;
} | /**
* Send client capabilities to the debug adapter and receive DA capabilities in return.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts#L280-L287 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | RawDebugSession.disconnect | disconnect(args: DebugProtocol.DisconnectArguments): Promise<any> {
const terminateDebuggee = this.capabilities.supportTerminateDebuggee ? args.terminateDebuggee : undefined;
const suspendDebuggee = this.capabilities.supportTerminateDebuggee && this.capabilities.supportSuspendDebuggee ? args.suspendDebuggee : undef... | /**
* Terminate the debuggee and shutdown the adapter
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts#L292-L296 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | RawDebugSession.launchOrAttach | async launchOrAttach(config: IConfig): Promise<DebugProtocol.Response | undefined> {
const response = await this.send(config.request, config, undefined, undefined, false);
if (response) {
this.mergeCapabilities(response.body);
}
return response;
} | //---- DAP requests | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts#L300-L307 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | RawDebugSession.terminate | terminate(restart = false): Promise<DebugProtocol.TerminateResponse | undefined> {
if (this.capabilities.supportsTerminateRequest) {
if (!this.terminated) {
this.terminated = true;
return this.send('terminate', { restart }, undefined);
}
return this.disconnect({ terminateDebuggee: true, restart });
... | /**
* Try killing the debuggee softly...
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts#L312-L321 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | RawDebugSession.shutdown | private async shutdown(error?: Error, restart = false, terminateDebuggee: boolean | undefined = undefined, suspendDebuggee: boolean | undefined = undefined): Promise<void> {
if (!this.inShutdown) {
this.inShutdown = true;
if (this.debugAdapter) {
try {
const args: DebugProtocol.DisconnectArguments = { ... | //---- private | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts#L592-L617 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | autoExpandElements | const autoExpandElements = async (elements: IReplElement[]) => {
for (const element of elements) {
if (element instanceof ReplGroup) {
if (element.autoExpand && !autoExpanded.has(element.getId())) {
autoExpanded.add(element.getId());
await this.tree!.expand(element);
}
if... | // Automatically expand repl group elements when specified | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/repl.ts#L600-L613 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | Repl.render | override render(): void {
super.render();
this._register(registerNavigableContainer({
name: 'repl',
focusNotifiers: [this, this.filterWidget],
focusNextWidget: () => {
const element = this.tree?.getHTMLElement();
if (this.filterWidget.hasFocus()) {
this.tree?.domFocus();
} else if (element... | // --- Creation | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/repl.ts#L624-L646 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | Repl.refreshReplElements | private refreshReplElements(noDelay: boolean): void {
if (this.tree && this.isVisible()) {
if (this.refreshScheduler.isScheduled()) {
return;
}
this.refreshScheduler.schedule(noDelay ? 0 : undefined);
}
} | // --- Update | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/repl.ts#L796-L804 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ReplDelegate.estimateHeight | protected estimateHeight(element: IReplElement, ignoreValueLength = false): number {
const lineHeight = this.replOptions.replConfiguration.lineHeight;
const countNumberOfLines = (str: string) => str.match(/\n/g)?.length ?? 0;
const hasValue = (e: any): e is { value: string } => typeof e.value === 'string';
if ... | /**
* With wordWrap enabled, this is an estimate. With wordWrap disabled, this is the real height that the list will use.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/replViewer.ts#L345-L360 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | getContextForVariableMenuWithDataAccess | async function getContextForVariableMenuWithDataAccess(parentContext: IContextKeyService, variable: Variable) {
const session = variable.getSession();
if (!session || !session.capabilities.supportsDataBreakpoints) {
return getContextForVariableMenuBase(parentContext, variable);
}
const contextKeys: [string, unkn... | /**
* Gets a context key overlay that has context for the given variable, including data access info.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/variablesView.ts#L276-L306 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | getContextForVariableMenuBase | function getContextForVariableMenuBase(parentContext: IContextKeyService, variable: Variable, additionalContext: [string, unknown][] = []) {
variableInternalContext = variable;
return getContextForVariable(parentContext, variable, additionalContext);
} | /**
* Gets a context key overlay that has context for the given variable.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/variablesView.ts#L311-L314 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | VisualizedVariableRenderer.rendererOnVisualizationRange | public static rendererOnVisualizationRange(model: IViewModel, tree: AsyncDataTree<any, any, any>): IDisposable {
return model.onDidChangeVisualization(({ original }) => {
if (!tree.hasNode(original)) {
return;
}
const parent: IExpression = tree.getParentElement(original);
tree.updateChildren(parent, ... | /**
* Registers a helper that rerenders the tree when visualization is requested
* or cancelled./
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/variablesView.ts#L428-L438 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | getContextForWatchExpressionMenu | function getContextForWatchExpressionMenu(parentContext: IContextKeyService, expression: IExpression) {
return parentContext.createOverlay([
[CONTEXT_CAN_VIEW_MEMORY.key, expression.memoryReference !== undefined],
[CONTEXT_WATCH_ITEM_TYPE.key, 'expression']
]);
} | /**
* Gets a context key overlay that has context for the given expression.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/browser/watchExpressionsView.ts#L395-L400 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugContentProvider.refreshDebugContent | static refreshDebugContent(resource: uri): void {
DebugContentProvider.INSTANCE?.createOrUpdateContentModel(resource, false);
} | /**
* Reload the model content of the given resource.
* If there is no model for the given resource, this method does nothing.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/debugContentProvider.ts#L68-L70 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugContentProvider.createOrUpdateContentModel | private createOrUpdateContentModel(resource: uri, createIfNotExists: boolean): Promise<ITextModel> | null {
const model = this.modelService.getModel(resource);
if (!model && !createIfNotExists) {
// nothing to do
return null;
}
let session: IDebugSession | undefined;
if (resource.query) {
const da... | /**
* Create or reload the model content of the given resource.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/debugContentProvider.ts#L75-L146 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExpressionContainer.getChildrenInChunks | private get getChildrenInChunks(): boolean {
return !!this.indexedVariables;
} | // The adapter explicitly sents the children count of an expression only if there are lots of children which should be chunked. | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/debugModel.ts#L183-L185 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | VisualizedExpression.edit | public async edit(newValue: string) {
try {
await this.visualizer.editTreeItem(this.treeId, this.treeItem, newValue);
return true;
} catch (e) {
this.errorMessage = e.message;
return false;
}
} | /** Edits the value, sets the {@link errorMessage} and returns false if unsuccessful */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/debugModel.ts#L293-L301 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | Thread.fetchCallStack | async fetchCallStack(levels = 20): Promise<void> {
if (this.stopped) {
const start = this.callStack.length;
const callStack = await this.getCallStackImpl(start, levels);
this.reachedEndOfCallStack = callStack.length < levels;
if (start < this.callStack.length) {
// Set the stack frames for exact posit... | /**
* Queries the debug adapter for the callstack and returns a promise
* which completes once the call stack has been retrieved.
* If the thread is not stopped, it returns a promise to an empty array.
* Only fetches the first stack frame for performance reasons. Calling this method consecutive times
* gets t... | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/debugModel.ts#L626-L640 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | Thread.exceptionInfo | get exceptionInfo(): Promise<IExceptionInfo | undefined> {
if (this.stoppedDetails && this.stoppedDetails.reason === 'exception') {
if (this.session.capabilities.supportsExceptionInfoRequest) {
return this.session.exceptionInfo(this.threadId);
}
return Promise.resolve({
description: this.stoppedDetai... | /**
* Returns exception info promise if the exception was thrown, otherwise undefined
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/debugModel.ts#L677-L688 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExceptionBreakpoint.setFallback | setFallback(isFallback: boolean) {
this.fallback = isFallback;
} | /**
* Used to specify which breakpoints to show when no session is specified.
* Useful when no session is active and we want to show the exception breakpoints from the last session.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/debugModel.ts#L1321-L1323 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExceptionBreakpoint.isSupportedSession | isSupportedSession(sessionId?: string): boolean {
return sessionId ? this.supportedSessions.has(sessionId) : this.fallback;
} | /**
* Checks if the breakpoint is applicable for the specified session.
* If sessionId is undefined, returns true if this breakpoint is a fallback breakpoint.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/debugModel.ts#L1333-L1335 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugModel.fetchCallstack | async fetchCallstack(thread: IThread, levels?: number): Promise<void> {
if ((<Thread>thread).reachedEndOfCallStack) {
return;
}
const totalFrames = thread.stoppedDetails?.totalFrames;
const remainingFrames = (typeof totalFrames === 'number') ? (totalFrames - thread.getCallStack().length) : undefined;
if... | /**
* Update the call stack and notify the call stack view that changes have occurred.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/debugModel.ts#L1557-L1576 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugModel.setExceptionBreakpointFallbackSession | setExceptionBreakpointFallbackSession(sessionId: string): void {
this.exceptionBreakpoints.forEach(ebp => ebp.setFallback(ebp.isSupportedSession(sessionId)));
} | // This is done to keep track of the exception breakpoints to show when no session is active. | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/debugModel.ts#L1715-L1717 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugVisualizerService.getApplicableFor | public async getApplicableFor(variable: IExpression, token: CancellationToken): Promise<IReference<DebugVisualizer[]>> {
if (!(variable instanceof Variable)) {
return emptyRef;
}
const threadId = variable.getThreadId();
if (threadId === undefined) { // an expression, not a variable
return emptyRef;
}
... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/debugVisualizers.ts#L118-L168 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugVisualizerService.register | public register(handle: VisualizerHandle): IDisposable {
const key = toKey(handle.extensionId, handle.id);
this.handles.set(key, handle);
return toDisposable(() => this.handles.delete(key));
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/debugVisualizers.ts#L171-L175 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugVisualizerService.registerTree | public registerTree(treeId: string, handle: VisualizerTreeHandle): IDisposable {
this.trees.set(treeId, handle);
return toDisposable(() => this.trees.delete(treeId));
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/debugVisualizers.ts#L178-L181 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugVisualizerService.getVisualizedNodeFor | public async getVisualizedNodeFor(treeId: string, expr: IExpression): Promise<VisualizedExpression | undefined> {
if (!(expr instanceof Variable)) {
return;
}
const threadId = expr.getThreadId();
if (threadId === undefined) {
return;
}
const tree = this.trees.get(treeId);
if (!tree) {
return;
... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/debugVisualizers.ts#L184-L210 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugVisualizerService.getVisualizedChildren | public async getVisualizedChildren(session: IDebugSession | undefined, treeId: string, treeElementId: number): Promise<IExpression[]> {
const node = this.trees.get(treeId);
const children = await node?.getChildren(treeElementId) || [];
return children.map(c => new VisualizedExpression(session, this, treeId, c, un... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/debugVisualizers.ts#L213-L217 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | DebugVisualizerService.editTreeItem | public async editTreeItem(treeId: string, treeItem: IDebugVisualizationTreeItem, newValue: string): Promise<void> {
const newItem = await this.trees.get(treeId)?.editItem?.(treeItem.id, newValue);
if (newItem) {
Object.assign(treeItem, newItem); // replace in-place so rerenders work
}
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/debugVisualizers.ts#L220-L225 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | mixin | function mixin(destination: any, source: any, overwrite: boolean, level = 0): any {
if (!isObject(destination)) {
return source;
}
if (isObject(source)) {
Object.keys(source).forEach(key => {
if (key !== '__proto__') {
if (isObject(destination[key]) && isObject(source[key])) {
mixin... | /**
* Copies all properties of source into destination. The optional parameter "overwrite" allows to control
* if existing non-structured properties on the destination should be overwritten or not. Defaults to true (overwrite).
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/debugger.ts#L58-L87 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | RawObjectReplElement.constructor | constructor(private id: string, public name: string, public valueObj: any, public sourceData?: IReplElementSource, public annotation?: string) { } | // upper bound of children per value | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/replModel.ts#L108-L108 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ReplModel.clone | clone() {
const newRepl = new ReplModel(this.configurationService);
newRepl.replElements = this.replElements.slice();
return newRepl;
} | /** Returns a new REPL model that's a copy of this one. */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/common/replModel.ts#L361-L365 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | getSequenceOutput | function getSequenceOutput(sequence: string): HTMLSpanElement {
const root: HTMLSpanElement = handleANSIOutput(sequence, linkDetector, session.root, []);
assert.strictEqual(1, root.children.length);
const child: Node = root.lastChild!;
if (isHTMLSpanElement(child)) {
return child;
} else {
assert.fail('... | /**
* Apply an ANSI sequence to {@link #getSequenceOutput}.
*
* @param sequence The ANSI sequence to stylize.
* @returns An {@link HTMLSpanElement} that contains the stylized text.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/test/browser/debugANSIHandling.test.ts#L84-L93 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | assertSingleSequenceElement | function assertSingleSequenceElement(sequence: string, assertion: (child: HTMLSpanElement) => void): void {
const child: HTMLSpanElement = getSequenceOutput(sequence + 'content');
assert.strictEqual('content', child.textContent);
assertion(child);
} | /**
* Assert that a given ANSI sequence maintains added content following the ANSI code, and that
* the provided {@param assertion} passes.
*
* @param sequence The ANSI sequence to verify. The provided sequence should contain ANSI codes
* only, and should not include actual text content as it is provided by t... | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/test/browser/debugANSIHandling.test.ts#L103-L107 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | assertInlineColor | function assertInlineColor(element: HTMLSpanElement, colorType: 'background' | 'foreground' | 'underline', color?: RGBA | undefined, message?: string, colorShouldMatch: boolean = true): void {
if (color !== undefined) {
const cssColor = Color.Format.CSS.formatRGB(
new Color(color)
);
if (colorType === 'b... | /**
* Assert that a given DOM element has the custom inline CSS style matching
* the color value provided.
* @param element The HTML span element to look at.
* @param colorType If `foreground`, will check the element's css `color`;
* if `background`, will check the element's css `backgroundColor`.
* if `und... | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/test/browser/debugANSIHandling.test.ts#L123-L151 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | assertMultipleSequenceElements | function assertMultipleSequenceElements(sequence: string, assertions: Array<(child: HTMLSpanElement) => void>, elementsExpected?: number): void {
if (elementsExpected === undefined) {
elementsExpected = assertions.length;
}
const root: HTMLSpanElement = handleANSIOutput(sequence, linkDetector, session.root, []... | /**
* Assert that a given ANSI sequence produces the expected number of {@link HTMLSpanElement} children. For
* each child, run the provided assertion.
*
* @param sequence The ANSI sequence to verify.
* @param assertions A set of assertions to run on the resulting children.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/test/browser/debugANSIHandling.test.ts#L394-L408 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | assertSequencestrictEqualToContent | function assertSequencestrictEqualToContent(sequence: string): void {
const child: HTMLSpanElement = getSequenceOutput(sequence);
assert(child.textContent === sequence);
} | /**
* Assert that the provided ANSI sequence exactly matches the text content of the resulting
* {@link HTMLSpanElement}.
*
* @param sequence The ANSI sequence to verify.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/test/browser/debugANSIHandling.test.ts#L953-L956 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | assertEmptyOutput | function assertEmptyOutput(sequence: string) {
const child: HTMLSpanElement = getSequenceOutput(sequence + 'content');
assert.strictEqual('content', child.textContent);
assert.strictEqual(0, child.classList.length);
} | /**
* Assert that a given ANSI sequence maintains added content following the ANSI code, and that
* the expression itself is thrown away.
*
* @param sequence The ANSI sequence to verify. The provided sequence should contain ANSI codes
* only, and should not include actual text content as it is provided by thi... | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/test/browser/debugANSIHandling.test.ts#L982-L986 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | assertElementIsLink | function assertElementIsLink(element: Element) {
assert(isHTMLAnchorElement(element));
} | /**
* Assert that a given Element is an anchor element.
*
* @param element The Element to verify.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/test/browser/linkDetector.test.ts#L37-L39 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | assertWatchExpressions | function assertWatchExpressions(watchExpressions: Expression[], expectedName: string) {
assert.strictEqual(watchExpressions.length, 2);
watchExpressions.forEach(we => {
assert.strictEqual(we.available, false);
assert.strictEqual(we.reference, 0);
assert.strictEqual(we.name, expectedName);
});
} | // Expressions | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/debug/test/browser/watch.test.ts#L13-L20 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | EditSessionsContribution.registerContributedEditSessionOptions | private registerContributedEditSessionOptions() {
continueEditSessionExtPoint.setHandler(extensions => {
const continueEditSessionOptions: ContinueEditSessionItem[] = [];
for (const extension of extensions) {
if (!isProposedApiEnabled(extension.description, 'contribEditSessions')) {
continue;
}
... | //#region Continue Edit Session extension contribution point | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/editSessions/browser/editSessions.contribution.ts#L864-L899 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | EditSessionsWorkbenchService.constructor | constructor(
@IFileService private readonly fileService: IFileService,
@IStorageService private readonly storageService: IStorageService,
@IQuickInputService private readonly quickInputService: IQuickInputService,
@IAuthenticationService private readonly authenticationService: IAuthenticationService,
@IExtens... | // TODO@joyceerhl lifecycle hack | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/editSessions/browser/editSessionsStorageService.ts#L73-L99 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | EditSessionsWorkbenchService.write | async write(resource: SyncResource, content: string | EditSession): Promise<string> {
await this.initialize('write', false);
if (!this.initialized) {
throw new Error('Please sign in to store your edit session.');
}
if (typeof content !== 'string' && content.machine === undefined) {
content.machine = awai... | /**
* @param resource: The resource to retrieve content for.
* @param content An object representing resource state to be restored.
* @returns The ref of the stored state.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/editSessions/browser/editSessionsStorageService.ts#L106-L122 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | EditSessionsWorkbenchService.read | async read(resource: SyncResource, ref: string | undefined): Promise<{ ref: string; content: string } | undefined> {
await this.initialize('read', false);
if (!this.initialized) {
throw new Error('Please sign in to apply your latest edit session.');
}
let content: string | undefined | null;
const headers ... | /**
* @param resource: The resource to retrieve content for.
* @param ref: A specific content ref to retrieve content for, if it exists.
* If undefined, this method will return the latest saved edit session, if any.
*
* @returns An object representing the requested or latest state, if any.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/editSessions/browser/editSessionsStorageService.ts#L131-L157 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | EditSessionsWorkbenchService.doInitialize | private async doInitialize(reason: 'read' | 'write', silent: boolean): Promise<boolean> {
// Wait for authentication extensions to be registered
await this.extensionService.whenInstalledExtensionsRegistered();
if (!this.serverConfiguration?.url) {
throw new Error('Unable to initialize sessions sync as session... | /**
*
* Ensures that the store client is initialized,
* meaning that authentication is configured and it
* can be used to communicate with the remote storage service
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/editSessions/browser/editSessionsStorageService.ts#L206-L239 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | EditSessionsWorkbenchService.getAccountPreference | private async getAccountPreference(reason: 'read' | 'write'): Promise<AuthenticationSession & { providerId: string } | undefined> {
const disposables = new DisposableStore();
const quickpick = disposables.add(this.quickInputService.createQuickPick<ExistingSession | AuthenticationProviderOption | IQuickPickItem>({ u... | /**
*
* Prompts the user to pick an authentication option for storing and getting edit sessions.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/editSessions/browser/editSessionsStorageService.ts#L313-L336 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | EditSessionsWorkbenchService.getAllSessions | private async getAllSessions() {
const authenticationProviders = await this.getAuthenticationProviders();
const accounts = new Map<string, ExistingSession>();
let currentSession: ExistingSession | undefined;
for (const provider of authenticationProviders) {
const sessions = await this.authenticationService.... | /**
*
* Returns all authentication sessions available from {@link getAuthenticationProviders}.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/editSessions/browser/editSessionsStorageService.ts#L363-L389 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | EditSessionsWorkbenchService.getAuthenticationProviders | private async getAuthenticationProviders() {
if (!this.serverConfiguration) {
throw new Error('Unable to get configured authentication providers as session sync preference is not configured in product.json.');
}
// Get the list of authentication providers configured in product.json
const authenticationProvi... | /**
*
* Returns all authentication providers which can be used to authenticate
* to the remote storage service, based on product.json configuration
* and registered authentication providers.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/editSessions/browser/editSessionsStorageService.ts#L397-L413 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | WorkspaceStateSynchroniser.applyResult | protected override applyResult(remoteUserData: IRemoteUserData, lastSyncUserData: IRemoteUserData | null, result: [IResourcePreview, IAcceptResult][], force: boolean): Promise<void> {
throw new Error('Method not implemented.');
} | // TODO@joyceerhl implement AbstractSynchronizer in full | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/editSessions/common/workspaceStateSync.ts#L156-L158 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | EncryptionContribution.migrateToGnomeLibsecret | private async migrateToGnomeLibsecret(): Promise<void> {
if (!isLinux || this.storageService.getBoolean('encryption.migratedToGnomeLibsecret', StorageScope.APPLICATION, false)) {
return;
}
try {
const content = await this.fileService.readFile(this.environmentService.argvResource);
const argv = parse<{ 'p... | /**
* Migrate the user from using the gnome or gnome-keyring password-store to gnome-libsecret.
* TODO@TylerLeonhardt: This migration can be removed in 3 months or so and then storage
* can be cleaned up.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/encryption/electron-sandbox/encryption.contribution.ts#L31-L45 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | isUnresponsive | const isUnresponsive = (extension: IRuntimeExtension): boolean =>
extension.unresponsiveProfile === profileInfo; | // bubble up extensions that have caused slowness | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.ts#L183-L184 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExtensionRecommendationNotificationService.ignoredRecommendations | get ignoredRecommendations(): string[] {
return distinct([...(<string[]>JSON.parse(this.storageService.get(ignoreImportantExtensionRecommendationStorageKey, StorageScope.PROFILE, '[]')))].map(i => i.toLowerCase()));
} | // Ignored Important Recommendations | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.ts#L122-L124 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ExtensionRecommendationNotificationService.doShowRecommendationsNotification | private async doShowRecommendationsNotification(severity: Severity, message: string, choices: IPromptChoice[], source: RecommendationSource, token: CancellationToken): Promise<boolean> {
const disposables = new DisposableStore();
try {
const recommendationsNotification = disposables.add(new RecommendationsNotifi... | /**
* Show recommendations in Queue
* At any time only one recommendation is shown
* If a new recommendation comes in
* => If no recommendation is visible, show it immediately
* => Otherwise, add to the pending queue
* => If it is not exe based and has higher or same priority as current, hide the curr... | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.ts#L364-L385 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.