jiebi/CodeConvo huggingface dataset:
import { IDisposable } from 'vs/base/common/lifecycle'; import { Event } from 'vs/base/common/event'; import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; <del> import { IViewDescriptorService, IViewsService, ViewContainerLocation } from 'vs/workbench/common/views'; </del> <ins> import { IViewDescriptorService, IViewsService } from 'vs/workbench/common/views'; </ins> import { IOpenerService } from 'vs/platform/opener/common/opener'; import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity'; import { EditorResourceAccessor, SideBySideEditor } from 'vs/workbench/common/editor';
import { Codicon } from 'vs/base/common/codicons'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IEditorResolverService } from 'vs/workbench/services/editor/common/editorResolverService'; <del> import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/browser/panecomposite'; </del> import { EditorOpenSource } from 'vs/platform/editor/common/editor'; import { ResourceMap } from 'vs/base/common/map'; import { isInputElement } from 'vs/base/browser/ui/list/listWidget';
} async run(accessor: ServicesAccessor): Promise<void> { <del> const paneCompositeService = accessor.get(IPaneCompositePartService); </del> <ins> const viewsService = accessor.get(IViewsService); </ins> const explorerService = accessor.get(IExplorerService); <del> await paneCompositeService.openPaneComposite(VIEWLET_ID, ViewContainerLocation.Sidebar); </del> <ins> await viewsService.openView(VIEW_ID); </ins> await explorerService.refresh(); } });
"@vscode/l10n-dev": "0.0.30", "@vscode/telemetry-extractor": "^1.10.2", "@vscode/test-cli": "^0.0.3", <del> "@vscode/test-electron": "^2.3.5", </del> <ins> "@vscode/test-electron": "^2.3.8", </ins> "@vscode/test-web": "^0.0.42", "@vscode/v8-heap-parser": "^0.1.0", "@vscode/vscode-perf": "^0.0.14",
supports-color "^9.4.0" yargs "^17.7.2" <del> "@vscode/test-electron@^2.3.5": version "2.3.5" resolved "https://registry.yarnpkg.com/@vscode/test-electron/-/test-electron-2.3.5.tgz#c472c5bdce1329aeb4762b8aa7a2cbe7aa783aac" integrity sha512-lAW7nQ0HuPqJnGJrtCzEKZCICtRizeP6qNanyCrjmdCOAAWjX3ixiG8RVPwqsYPQBWLPgYuE12qQlwXsOR/2fQ== </del> <ins> "@vscode/test-electron@^2.3.8": version "2.3.8" resolved "https://registry.yarnpkg.com/@vscode/test-electron/-/test-electron-2.3.8.tgz#06a7c50b38cfac0ede833905e088d55c61cd12d3" integrity sha512-b4aZZsBKtMGdDljAsOPObnAi7+VWIaYl3ylCz1jTs+oV6BZ4TNHcVNC3xUn0azPeszBmwSBDQYfFESIaUQnrOg== </ins> dependencies: http-proxy-agent "^4.0.1" https-proxy-agent "^5.0.0"
} else if (name === 'nu') { // nushell requires ^ before quoted path to treat it as a command command = `^'${process.execPath}' ${extraArgs} -p '"${mark}" + JSON.stringify(process.env) + "${mark}"'`; shellArgs = ['-i', '-l', '-c']; <ins> } else if (name === 'xonsh') { // #200374: native implementation is shorter command = `import os, json; print("${mark}", json.dumps(dict(os.environ)), "${mark}")`; shellArgs = ['-i', '-l', '-c']; </ins> } else { command = `'${process.execPath}' ${extraArgs} -p '"${mark}" + JSON.stringify(process.env) + "${mark}"'`;
readonly position: number; } <ins> function stickyScrollNodeStateEquals<T, TFilterData>(node1: StickyScrollNode<T, TFilterData>, node2: StickyScrollNode<T, TFilterData>) { return node1.position === node2.position && stickyScrollNodeEquals(node1, node2); } </ins> function stickyScrollNodeEquals<T, TFilterData>(node1: StickyScrollNode<T, TFilterData>, node2: StickyScrollNode<T, TFilterData>) { <del> return node1.position === node2.position && node1.node.element === node2.node.element && </del> <ins> return node1.node.element === node2.node.element && </ins> node1.startIndex === node2.startIndex && node1.height === node2.height && node1.endIndex === node2.endIndex; } <del> class StickyScrollState<T, TFilterData, TRef> extends Disposable { </del> <ins> class StickyScrollState<T, TFilterData, TRef> { </ins> constructor( readonly stickyNodes: StickyScrollNode<T, TFilterData>[] = [] <del> ) { super(); } </del> <ins> ) { } </ins> get count(): number { return this.stickyNodes.length; } equal(state: StickyScrollState<T, TFilterData, TRef>): boolean { <del> return equals(this.stickyNodes, state.stickyNodes, stickyScrollNodeEquals); </del> <ins> return equals(this.stickyNodes, state.stickyNodes, stickyScrollNodeStateEquals); </ins> } lastNodePartiallyVisible(): boolean {
return secondLastStickyNode.position + secondLastStickyNode.height !== lastStickyNode.position; } <del> addDisposable(disposable: IDisposable): void { this._register(disposable); </del> <ins> animationStateChanged(previousState: StickyScrollState<T, TFilterData, TRef>): boolean { if (!equals(this.stickyNodes, previousState.stickyNodes, stickyScrollNodeEquals)) { return false; } if (this.count === 0) { return false; } const lastStickyNode = this.stickyNodes[this.count - 1]; const previousLastStickyNode = previousState.stickyNodes[previousState.count - 1]; return lastStickyNode.position !== previousLastStickyNode.position; </ins> } }
private readonly _rootDomNode: HTMLElement; private _previousState: StickyScrollState<T, TFilterData, TRef> | undefined; <ins> private _previousElements: HTMLElement[] = []; private _previousStateDisposables: DisposableStore = new DisposableStore(); </ins> private stickyScrollFocus: StickyScrollFocus<T, TFilterData, TRef>; readonly onDidChangeHasFocus: Event<boolean>;
private readonly accessibilityProvider: IListAccessibilityProvider<T> | undefined, ) { <del> this._rootDomNode = document.createElement('div'); this._rootDomNode.classList.add('monaco-tree-sticky-container'); </del> <ins> this._rootDomNode = $('.monaco-tree-sticky-container'); </ins> container.appendChild(this._rootDomNode); <ins> const shadow = $('.monaco-tree-sticky-container-shadow'); this._rootDomNode.appendChild(shadow); </ins> this.stickyScrollFocus = new StickyScrollFocus(this._rootDomNode, view); this.onDidChangeHasFocus = this.stickyScrollFocus.onDidChangeHasFocus; this.onContextMenu = this.stickyScrollFocus.onContextMenu;
this.setVisible(isVisible); } <del> // Remove previous state this._previousState?.dispose(); this._previousState = state; </del> if (!isVisible) { <ins> this._previousState = undefined; this._previousElements = []; this._previousStateDisposables.clear(); </ins> return; } <del> const elements = Array(state.count); for (let stickyIndex = state.count - 1; stickyIndex >= 0; stickyIndex--) { const stickyNode = state.stickyNodes[stickyIndex]; const { element, disposable } = this.createElement(stickyNode, stickyIndex, state.count); elements[stickyIndex] = element; </del> <ins> const lastStickyNode = state.stickyNodes[state.count - 1]; </ins> <del> this._rootDomNode.appendChild(element); state.addDisposable(disposable); </del> <ins> // If the new state is only a change in the last node's position, update the position of the last element if (this._previousState && state.animationStateChanged(this._previousState)) { this._previousElements[this._previousState.count - 1].style.top = `${lastStickyNode.position}px`; </ins> } <ins> // create new dom elements else { this._previousStateDisposables.clear(); </ins> <del> this.stickyScrollFocus.updateElements(elements, state); </del> <ins> const elements = Array(state.count); for (let stickyIndex = state.count - 1; stickyIndex >= 0; stickyIndex--) { const stickyNode = state.stickyNodes[stickyIndex]; </ins> <del> // Add shadow element to the end of the widget const shadow = $('.monaco-tree-sticky-container-shadow'); this._rootDomNode.appendChild(shadow); state.addDisposable(toDisposable(() => shadow.remove())); </del> <ins> const { element, disposable } = this.createElement(stickyNode, stickyIndex, state.count); elements[stickyIndex] = element; this._rootDomNode.appendChild(element); this._previousStateDisposables.add(disposable); } this.stickyScrollFocus.updateElements(elements, state); this._previousState = state; this._previousElements = elements; } </ins> // Set the height of the widget to the bottom of the last sticky node <del> const lastStickyNode = state.stickyNodes[state.count - 1]; </del> this._rootDomNode.style.height = `${lastStickyNode.position + lastStickyNode.height}px`; }
command: 'git.commit', title: l10n.t('{0} Continue', '$(check)'), tooltip: this.state.isCommitInProgress ? l10n.t('Continuing Rebase...') : l10n.t('Continue Rebase'), <del> arguments: [this.repository.sourceControl, ''] </del> <ins> arguments: [this.repository.sourceControl, null] </ins> }; }
command: 'git.commit', title: l10n.t('{0} Commit', '$(check)'), tooltip: this.state.isCommitInProgress ? l10n.t('Committing Changes...') : l10n.t('Commit Changes'), <del> arguments: [this.repository.sourceControl, ''] </del> <ins> arguments: [this.repository.sourceControl, null] </ins> }; }
const childNodes: INotebookVariableElement[] = []; if (parent.indexedChildrenCount > variablePageSize) { <del> // TODO: improve handling of large number of children const indexedChildCountLimit = 100000; const limit = Math.min(parent.indexedChildrenCount, indexedChildCountLimit); for (let start = 0; start < limit; start += variablePageSize) { let end = start + variablePageSize; if (end > limit) { end = limit; </del> <ins> const nestedPageSize = Math.floor(Math.max(parent.indexedChildrenCount / variablePageSize, 100)); const indexedChildCountLimit = 1_000_000; let start = parent.indexStart ?? 0; const last = start + Math.min(parent.indexedChildrenCount, indexedChildCountLimit); for (; start < last; start += nestedPageSize) { let end = start + nestedPageSize; if (end > last) { end = last; </ins> } childNodes.push({
assert.equal(variables[0].extHostId, parent.extHostId, 'ExtHostId should match the parent since we will use it to get the real children'); }); <ins> test('Get children for very large list', async () => { const parent = { kind: 'variable', notebook: notebookModel, id: '1', extHostId: 1, name: 'list', value: '[...]', hasNamedChildren: false, indexedChildrenCount: 1_000_000 } as INotebookVariableElement; results = []; const groups = await dataSource.getChildren(parent); const children = await dataSource.getChildren(groups[99]); assert(children.length === 100, 'We should have a full page of child groups'); assert(!provideVariablesCalled, 'provideVariables should not be called'); assert.equal(children[0].extHostId, parent.extHostId, 'ExtHostId should match the parent since we will use it to get the real children'); }); </ins> test('Cancel while enumerating through children', async () => { const parent = { kind: 'variable', notebook: notebookModel, id: '1', extHostId: 1, name: 'list', value: '[...]', hasNamedChildren: false, indexedChildrenCount: 10 } as INotebookVariableElement; results = [
public onDidChangeTaskSystemInfo: Event<void> = this._onDidChangeTaskSystemInfo.event; private _onDidReconnectToTasks: Emitter<void> = new Emitter(); public onDidReconnectToTasks: Event<void> = this._onDidReconnectToTasks.event; <ins> private _onDidChangeTaskConfig: Emitter<void> = new Emitter(); public onDidChangeTaskConfig: Event<void> = this._onDidChangeTaskConfig.event; </ins> public get isReconnected(): boolean { return this._tasksReconnected; } constructor(
this._updateSetup(folderSetup); return this._updateWorkspaceTasks(TaskRunSource.FolderOpen); })); <del> this._register(this._configurationService.onDidChangeConfiguration((e) => { </del> <ins> this._register(this._configurationService.onDidChangeConfiguration(async (e) => { </ins> if (!e.affectsConfiguration('tasks') || (!this._taskSystem && !this._workspaceTasksPromise)) { return; }
} this._setTaskLRUCacheLimit(); <del> return this._updateWorkspaceTasks(TaskRunSource.ConfigurationChange); </del> <ins> await this._updateWorkspaceTasks(TaskRunSource.ConfigurationChange); this._onDidChangeTaskConfig.fire(); </ins> })); this._taskRunningState = TASK_RUNNING_STATE.bindTo(_contextKeyService); this._onDidStateChange = this._register(new Emitter());
this._logService.trace('RunAutomaticTasks: Awaiting task system info.'); await Event.toPromise(Event.once(this._taskService.onDidChangeTaskSystemInfo)); } <del> const workspaceTasks = await this._taskService.getWorkspaceTasks(TaskRunSource.FolderOpen); </del> <ins> let workspaceTasks = await this._taskService.getWorkspaceTasks(TaskRunSource.FolderOpen); </ins> this._logService.trace(`RunAutomaticTasks: Found ${workspaceTasks.size} automatic tasks`); <del> await this._runWithPermission(this._taskService, this._configurationService, workspaceTasks); </del> <ins> let autoTasks = this._findAutoTasks(this._taskService, workspaceTasks); this._logService.trace(`RunAutomaticTasks: taskNames=${JSON.stringify(autoTasks.taskNames)}`); // As seen in some cases with the Remote SSH extension, the tasks configuration is loaded after we have come // to this point. Let's give it some extra time. if (autoTasks.taskNames.length === 0) { const updatedWithinTimeout = await Promise.race([ new Promise<boolean>((resolve) => { Event.toPromise(Event.once(this._taskService.onDidChangeTaskConfig)).then(() => resolve(true)); }), new Promise<boolean>((resolve) => { const timer = setTimeout(() => { clearTimeout(timer); resolve(false); }, 10000); })]); if (!updatedWithinTimeout) { this._logService.trace(`RunAutomaticTasks: waited some extra time, but no update of tasks configuration`); return; } workspaceTasks = await this._taskService.getWorkspaceTasks(TaskRunSource.FolderOpen); autoTasks = this._findAutoTasks(this._taskService, workspaceTasks); this._logService.trace(`RunAutomaticTasks: updated taskNames=${JSON.stringify(autoTasks.taskNames)}`); } this._runWithPermission(this._taskService, this._configurationService, autoTasks.tasks, autoTasks.taskNames); </ins> } private _runTasks(taskService: ITaskService, tasks: Array<Task | Promise<Task | undefined>>) {
return { tasks, taskNames, locations }; } <del> private async _runWithPermission(taskService: ITaskService, configurationService: IConfigurationService, workspaceTaskResult: Map<string, IWorkspaceFolderTaskResult>) { const { tasks, taskNames } = this._findAutoTasks(taskService, workspaceTaskResult); </del> <ins> private async _runWithPermission(taskService: ITaskService, configurationService: IConfigurationService, tasks: (Task | Promise<Task | undefined>)[], taskNames: string[]) { </ins> if (taskNames.length === 0) { return; }
} finalMatchedTargets.add(uri); }); <ins> }).catch(err => { // temporary fix for https://github.com/microsoft/vscode/issues/205044: don't show notebook results for remotehub repos. if (err.code === 'ENOENT') { console.warn(`Could not find notebook search results, ignoring notebook results.`); return { limitHit: false, messages: [], }; } else { throw err; } </ins> }); })) ));
return this.input.selectionEnd === this.input.value.length && this.input.selectionStart === this.input.selectionEnd; } <del> public getSelection(): IRange | null { const selectionStart = this.input.selectionStart; if (selectionStart === null) { return null; } const selectionEnd = this.input.selectionEnd ?? selectionStart; return { start: selectionStart, end: selectionEnd, }; } </del> public enable(): void { this.input.removeAttribute('disabled'); }
return this.ui.keyMods; } <del> get valueSelection() { const selection = this.ui.inputBox.getSelection(); if (!selection) { return undefined; } return [selection.start, selection.end]; } set valueSelection(valueSelection: Readonly<[number, number]> | undefined) { </del> <ins> set valueSelection(valueSelection: Readonly<[number, number]>) { </ins> this._valueSelection = valueSelection; this.valueSelectionUpdated = true; this.update();
this.update(); } <del> get valueSelection() { const selection = this.ui.inputBox.getSelection(); if (!selection) { return undefined; } return [selection.start, selection.end]; } set valueSelection(valueSelection: Readonly<[number, number]> | undefined) { </del> <ins> set valueSelection(valueSelection: Readonly<[number, number]>) { </ins> this._valueSelection = valueSelection; this.valueSelectionUpdated = true; this.update();
'terminal.ansiGreen': { index: 2, defaults: { <del> light: '#00BC00', </del> <ins> light: '#107C10', </ins> dark: '#0DBC79', hcDark: '#00cd00', <del> hcLight: '#00bc00' </del> <ins> hcLight: '#136C13' </ins> } }, 'terminal.ansiYellow': {
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { NOTEBOOK_VARIABLE_VIEW_ENABLED } from 'vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys'; export class NotebookVariables extends Disposable implements IWorkbenchContribution { private listeners: IDisposable[] = []; private configListener: IDisposable;
this.viewEnabled = NOTEBOOK_VARIABLE_VIEW_ENABLED.bindTo(contextKeyService); <del> this.listeners.push(this.editorService.onDidEditorsChange(() => this.handleInitEvent())); this.listeners.push(this.notebookExecutionStateService.onDidChangeExecution(() => this.handleInitEvent())); </del> <ins> this.listeners.push(this.editorService.onDidActiveEditorChange(() => this.handleInitEvent())); this.listeners.push(this.notebookExecutionStateService.onDidChangeExecution((e) => this.handleInitEvent())); </ins> this.configListener = configurationService.onDidChangeConfiguration((e) => this.handleConfigChange(e)); }
if (this.configurationService.getValue(NotebookSetting.notebookVariablesView) && this.editorService.activeEditorPane?.getId() === 'workbench.editor.notebook') { <del> if (this.hasVariableProvider()) { </del> <ins> if (this.hasVariableProvider() && !this.initialized && this.initializeView()) { </ins> this.viewEnabled.set(true); <del> } if (!this.initialized && this.initializeView()) { </del> this.initialized = true; this.listeners.forEach(listener => listener.dispose()); }
private setActiveNotebook() { const current = this.activeNotebook; const activeEditorPane = this.editorService.activeEditorPane; <del> if (activeEditorPane && activeEditorPane.getId() === 'workbench.editor.notebook') { </del> <ins> if (activeEditorPane?.getId() === 'workbench.editor.notebook') { </ins> const notebookDocument = getNotebookEditorFromEditorPane(activeEditorPane)?.getViewModel()?.notebookDocument; this.activeNotebook = notebookDocument; }
import { IViewsService } from 'vs/workbench/services/views/common/viewsService'; import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer'; import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry'; <del> import { IQuickPickItem, IQuickInputService, IQuickPickSeparator } from 'vs/platform/quickinput/common/quickInput'; </del> <ins> import { IQuickPickItem, IQuickInputService, IQuickPickSeparator, QuickPickInput } from 'vs/platform/quickinput/common/quickInput'; </ins> import { AUX_WINDOW_GROUP, AUX_WINDOW_GROUP_TYPE, IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { assertIsDefined } from 'vs/base/common/types'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
const editorService = accessor.get(IEditorService); const fileConfigurationService = accessor.get(IFilesConfigurationService); <del> const entries: IOutputChannelQuickPickItem[] = outputService.getChannelDescriptors().filter(c => c.file && c.log) .map(channel => (<IOutputChannelQuickPickItem>{ id: channel.id, label: channel.label, channel })); const argName = args && typeof args === 'string' ? args : undefined; </del> let entry: IOutputChannelQuickPickItem | undefined; <del> if (argName) { entry = entries.find(e => e.id === argName); </del> <ins> const argName = args && typeof args === 'string' ? args : undefined; const extensionChannels: IOutputChannelQuickPickItem[] = []; const coreChannels: IOutputChannelQuickPickItem[] = []; for (const c of outputService.getChannelDescriptors()) { if (c.file && c.log) { const e = { id: c.id, label: c.label, channel: c }; if (c.extensionId) { extensionChannels.push(e); } else { coreChannels.push(e); } if (e.id === argName) { entry = e; } } </ins> } if (!entry) { <del> entry = await quickInputService.pick(entries, { placeHolder: nls.localize('selectlogFile', "Select Log File") }); </del> <ins> const entries: QuickPickInput[] = [...extensionChannels.sort((a, b) => a.label.localeCompare(b.label))]; if (entries.length && coreChannels.length) { entries.push({ type: 'separator' }); entries.push(...coreChannels.sort((a, b) => a.label.localeCompare(b.label))); } entry = <IOutputChannelQuickPickItem | undefined>await quickInputService.pick(entries, { placeHolder: nls.localize('selectlogFile', "Select Log File") }); </ins> } if (entry) { const resource = assertIsDefined(entry.channel.file);
githubAccessToken }, dataOverrides); <ins> if (issueReporterData.extensionId) { const extensionExists = extensionData.some(extension => extension.id === issueReporterData.extensionId); if (!extensionExists) { console.error(`Extension with ID ${issueReporterData.extensionId} does not exist.`); } } </ins> if (issueReporterData.extensionId && this.extensionIdentifierSet.has(issueReporterData.extensionId)) { ipcRenderer.send(`vscode:triggerReporterMenuResponse:${issueReporterData.extensionId}`, issueReporterData); this.extensionIdentifierSet.delete(new ExtensionIdentifier(issueReporterData.extensionId));
previewStart = assertIsDefined(this.editor.getPosition()); } <ins> const endPosition = new Position(previewStart.lineNumber, previewStart.column + text.length); </ins> this.editor.executeEdits(EditorDictation.ID, [ EditOperation.replace(Range.fromPositions(previewStart, previewStart.with(undefined, previewStart.column + lastReplaceTextLength)), text) ], [ <del> Selection.fromPositions(new Position(previewStart.lineNumber, previewStart.column + text.length)) </del> <ins> Selection.fromPositions(endPosition) </ins> ]); if (isPreview) {
LanguageModelSystemMessage: extHostTypes.LanguageModelChatSystemMessage, LanguageModelUserMessage: extHostTypes.LanguageModelChatUserMessage, LanguageModelAssistantMessage: extHostTypes.LanguageModelChatAssistantMessage, <ins> LanguageModelError: extHostTypes.LanguageModelError, </ins> NewSymbolName: extHostTypes.NewSymbolName, NewSymbolNameTag: extHostTypes.NewSymbolNameTag, InlineEdit: extHostTypes.InlineEdit,
import { ILogService } from 'vs/platform/log/common/log'; import { ExtHostLanguageModelsShape, IMainContext, MainContext, MainThreadLanguageModelsShape } from 'vs/workbench/api/common/extHost.protocol'; import * as typeConvert from 'vs/workbench/api/common/extHostTypeConverters'; <ins> import { LanguageModelError } from 'vs/workbench/api/common/extHostTypes'; </ins> import type * as vscode from 'vscode'; import { Progress } from 'vs/platform/progress/common/progress'; import { IChatMessage, IChatResponseFragment, ILanguageModelChatMetadata } from 'vs/workbench/contrib/chat/common/languageModels';
const metadata = await this._proxy.$prepareChatAccess(from, languageModelId, options.justification); if (!metadata || !this._languageModelIds.has(languageModelId)) { <del> throw new Error(`Language model '${languageModelId}' is unknown.`); </del> <ins> throw LanguageModelError.NotFound(`Language model '${languageModelId}' is unknown.`); </ins> } if (this._isUsingAuth(from, metadata)) { const success = await this._getAuthAccess(extension, { identifier: metadata.extension, displayName: metadata.auth.providerLabel }, options.justification, options.silent); if (!success || !this._modelAccessList.get(from)?.has(metadata.extension)) { <del> throw new Error(`Language model '${languageModelId}' cannot be used by '${from.value}'.`); </del> <ins> throw LanguageModelError.NoPermissions(`Language model '${languageModelId}' cannot be used by '${from.value}'.`); </ins> } }
} } <ins> export class LanguageModelError extends Error { static NotFound(message?: string): LanguageModelError { return new LanguageModelError(message, LanguageModelError.NotFound.name); } static NoPermissions(message?: string): LanguageModelError { return new LanguageModelError(message, LanguageModelError.NoPermissions.name); } readonly code: string; constructor(message?: string, code?: string, cause?: Error) { super(message, { cause }); this.name = 'LanguageModelError'; this.code = code ?? ''; } } </ins> //#endregion //#region ai