jiebi/CodeConvo huggingface dataset:
}); KeybindingsRegistry.registerCommandAndKeybindingRule({ <ins> id: 'list.showHover', weight: KeybindingWeight.WorkbenchContrib, primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyI), when: WorkbenchListFocusContextKey, handler: async (accessor: ServicesAccessor, ...args: any[]) => { const listService = accessor.get(IListService); const lastFocusedList = listService.lastFocusedList; if (!lastFocusedList) { return; } // Check if a tree element is focused const focus = lastFocusedList.getFocus(); if (!focus || (focus.length === 0)) { return; } // As the tree does not know anything about the rendered DOM elements // we have to traverse the dom to find the HTMLElements const treeDOM = lastFocusedList.getHTMLElement(); const scrollableElement = treeDOM.querySelector('.monaco-scrollable-element'); const listRows = scrollableElement?.querySelector('.monaco-list-rows'); const focusedElement = listRows?.querySelector('.focused'); if (!focusedElement) { return; } // Check if the focused element has a hover, otherwise find the first child with a hover const elementWithHover = focusedElement.matches('[custom-hover="true"]') ? focusedElement : focusedElement.querySelector('[custom-hover="true"]'); if (!elementWithHover) { return; } toggleCustomHover(elementWithHover as HTMLElement, lastFocusedList); }, }); let activeHover: undefined | HTMLElement; let disposable: IDisposable | undefined; function toggleCustomHover(element: HTMLElement, list: WorkbenchListWidget) { const show = !element.getAttribute('custom-hover-active'); const mouseEvent = new MouseEvent(show ? EventType.MOUSE_OVER : EventType.MOUSE_LEAVE, { view: getActiveWindow(), bubbles: true, cancelable: true, }); element.dispatchEvent(mouseEvent); if (activeHover === element && !show) { activeHover = undefined; disposable?.dispose(); disposable = undefined; } else { activeHover = element; disposable = list.onDidBlur(() => { toggleCustomHover(element, list); }); } } KeybindingsRegistry.registerCommandAndKeybindingRule({ </ins> id: 'list.toggleExpand', weight: KeybindingWeight.WorkbenchContrib, when: WorkbenchListFocusContextKey,
return result[0].resource; }); } else if (fileExists && (tasksExistInFile || content)) { <del> if (content) { this._configurationService.updateValue('tasks', json.parse(content), target); </del> <ins> const statResource = stat?.resource; if (content && statResource) { this._configurationService.updateValue('tasks', json.parse(content), { resource: statResource }, target); </ins> } <del> return stat?.resource; </del> <ins> return statResource; </ins> } return undefined; }).then((resource) => {
// Do not trigger state if current state is manual and incoming state is automatic if (!isManualToAutoTransition) { this.setState(newState); <ins> } else { // Reset the new state after getting code actions back. setTimeout(() => { this.setState(newState); }, 500); </ins> } }, undefined); this._codeActionOracle.value.trigger({ type: CodeActionTriggerType.Auto, triggerAction: CodeActionTriggerSource.Default });
localize('window.systemColorTheme.light', "Enforce a light system color theme."), localize('window.systemColorTheme.dark', "Enforce a dark system color theme."), ], <del> markdownDescription: localize({ key: 'window.systemColorTheme', comment: ['{0} and {1} will become links to other settings.'] }, "Overrides the system color theme that is used for native UI elements such as native dialogs, menus and title bar. Even if your OS is configured in light appearance mode, you can select a dark system color theme for the window. You can also configure to automatically adjust based on the {0} setting. Note: Using this setting will disable {1}", formatSettingAsLink(ThemeSettings.COLOR_THEME), formatSettingAsLink(ThemeSettings.DETECT_COLOR_SCHEME)), </del> <ins> markdownDescription: localize({ key: 'window.systemColorTheme', comment: ['{0} and {1} will become links to other settings.'] }, "Overrides the system color theme that is used for native UI elements such as native dialogs, menus and title bar. Even if your OS is configured in light appearance mode, you can select a dark system color theme for the window. You can also configure to automatically adjust based on the {0} setting. Note: Using this setting will disable {1}.", formatSettingAsLink(ThemeSettings.COLOR_THEME), formatSettingAsLink(ThemeSettings.DETECT_COLOR_SCHEME)), </ins> default: 'default', included: ENABLE_SYSTEM_COLOR_SCHEME_SETTING, scope: ConfigurationScope.APPLICATION,
import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { IThemeService } from 'vs/platform/theme/common/themeService'; <del> import { IActiveNotebookEditor, ICellViewModel, INotebookEditor, type INotebookViewCellsUpdateEvent } from 'vs/workbench/contrib/notebook/browser/notebookBrowser'; </del> <ins> import { IActiveNotebookEditor, ICellViewModel, INotebookEditor } from 'vs/workbench/contrib/notebook/browser/notebookBrowser'; </ins> import { CellKind, NotebookCellsChangeType, NotebookSetting } from 'vs/workbench/contrib/notebook/common/notebookCommon'; import { INotebookExecutionStateService, NotebookExecutionType } from 'vs/workbench/contrib/notebook/common/notebookExecutionStateService'; import { OutlineChangeEvent, OutlineConfigKeys, OutlineTarget } from 'vs/workbench/services/outline/browser/outline';
readonly outlineKind = 'notebookCells'; get activeElement(): OutlineEntry | undefined { <ins> if (this.delayedOutlineRecompute.isTriggered()) { this.delayedOutlineRecompute.cancel(); this._recomputeState(); } </ins> return this._activeEntry; } private readonly _outlineEntryFactory: NotebookOutlineEntryFactory; <del> private readonly delayRecomputeActive: () => void; </del> <ins> private readonly delayedOutlineRecompute: Delayer<void>;; </ins> constructor( private readonly _editor: INotebookEditor, private readonly _target: OutlineTarget,
@IConfigurationService private readonly _configurationService: IConfigurationService, ) { this._outlineEntryFactory = new NotebookOutlineEntryFactory(notebookExecutionStateService); <del> const delayerRecomputeActive = this._disposables.add(new Delayer(10)); this.delayRecomputeActive = () => delayerRecomputeActive.trigger(() => this._recomputeActive()); this._disposables.add(Event.debounce<void, void>( _editor.onDidChangeSelection, (last, _current) => last, 200 )(() => { this.delayRecomputeActive(); </del> <ins> const delayerRecomputeActive = this._disposables.add(new Delayer(200)); this._disposables.add(_editor.onDidChangeSelection(() => { delayerRecomputeActive.trigger(() => this._recomputeActive()); </ins> }, this)) <del> this._disposables.add(Event.debounce<INotebookViewCellsUpdateEvent, INotebookViewCellsUpdateEvent>( _editor.onDidChangeViewCells, (last, _current) => last ?? _current, 200 )(() => { this.delayRecomputeActive(); }, this) ); </del> // .3s of a delay is sufficient, 100-200s is too quick and will unnecessarily block the ui thread. // Given we're only updating the outline when the user types, we can afford to wait a bit. <del> const delayer = this._disposables.add(new Delayer<void>(300)); const delayedRecompute = () => delayer.trigger(() => this._recomputeState()); </del> <ins> this.delayedOutlineRecompute = this._disposables.add(new Delayer<void>(300)); const delayedRecompute = () => { delayerRecomputeActive.cancel(); // Active is always recomputed after a recomputing the outline state. this.delayedOutlineRecompute.trigger(() => this._recomputeState()); }; </ins> this._disposables.add(_configurationService.onDidChangeConfiguration(e => { if (e.affectsConfiguration(NotebookSetting.outlineShowMarkdownHeadersOnly) ||
return; } disposable.add(this._editor.textModel.onDidChangeContent(contentChanges => { <del> if (contentChanges.rawEvents.some(c => c.kind === NotebookCellsChangeType.ChangeCellContent)) { </del> <ins> if (contentChanges.rawEvents.some(c => c.kind === NotebookCellsChangeType.ChangeCellContent || c.kind === NotebookCellsChangeType.ChangeCellInternalMetadata || c.kind === NotebookCellsChangeType.Move || c.kind === NotebookCellsChangeType.ModelChange)) { </ins> delayedRecompute(); } }));
// tests already encompass their children. if (!test) { // no-op <del> } else if (!test.item.uri) { queue.push(test.children.values()); continue; } else if (ident.extUri.isEqualOrParent(test.item.uri, uri)) { </del> <ins> } else if (test.item.uri && ident.extUri.isEqualOrParent(test.item.uri, uri)) { </ins> yield test; <del> } else if (ident.extUri.isEqualOrParent(uri, test.item.uri)) { </del> <ins> } else if (!test.item.uri || ident.extUri.isEqualOrParent(uri, test.item.uri)) { </ins> if (test.expand === TestItemExpandState.Expandable) { await testService.collection.expand(test.item.extId, 1); }
/// Number of bytes for the secret keys. See workbench.ts for their usage. const SECRET_KEY_BYTES: usize = 32; /// Path to mint the key combining server and client parts. <del> const SECRET_KEY_MINT_PATH: &str = "/_vscode-cli/mint-key"; </del> <ins> const SECRET_KEY_MINT_PATH: &str = "_vscode-cli/mint-key"; </ins> /// Cookie set to the `SECRET_KEY_MINT_PATH` const PATH_COOKIE_NAME: &str = "vscode-secret-key-path"; <del> /// Cookie set to the `SECRET_KEY_MINT_PATH` const PATH_COOKIE_VALUE: &str = concatcp!( PATH_COOKIE_NAME, "=", SECRET_KEY_MINT_PATH, "; SameSite=Strict; Path=/" ); </del> /// HTTP-only cookie where the client's secret half is stored. const SECRET_KEY_COOKIE_NAME: &str = "vscode-cli-secret-half";
/// Handler function for an inbound request async fn handle(ctx: HandleContext, req: Request<Body>) -> Result<Response<Body>, Infallible> { let client_key_half = get_client_key_half(&req); <del> let mut res = match req.uri().path() { SECRET_KEY_MINT_PATH => handle_secret_mint(ctx, req), _ => handle_proxied(ctx, req).await, </del> <ins> let path = req.uri().path(); let mut res = if path.starts_with(&ctx.cm.base_path) && path.get(ctx.cm.base_path.len()..).unwrap_or_default() == SECRET_KEY_MINT_PATH { handle_secret_mint(&ctx, req) } else { handle_proxied(&ctx, req).await </ins> }; <del> append_secret_headers(&mut res, &client_key_half); </del> <ins> append_secret_headers(&ctx.cm.base_path, &mut res, &client_key_half); </ins> Ok(res) } <del> async fn handle_proxied(ctx: HandleContext, req: Request<Body>) -> Response<Body> { </del> <ins> async fn handle_proxied(ctx: &HandleContext, req: Request<Body>) -> Response<Body> { </ins> let release = if let Some((r, _)) = get_release_from_path(req.uri().path(), ctx.cm.platform) { r } else {
/// Appends headers to response to maintain the secret storage of the workbench: /// sets the `PATH_COOKIE_VALUE` so workbench.ts knows about the 'mint' endpoint, /// and maintains the http-only cookie the client will use for cookies. <del> fn append_secret_headers(res: &mut Response<Body>, client_key_half: &SecretKeyPart) { </del> <ins> fn append_secret_headers( base_path: &str, res: &mut Response<Body>, client_key_half: &SecretKeyPart, ) { </ins> let headers = res.headers_mut(); headers.append( hyper::header::SET_COOKIE, <del> PATH_COOKIE_VALUE.parse().unwrap(), </del> <ins> format!( "{}={}{}; SameSite=Strict; Path=/", PATH_COOKIE_NAME, base_path, SECRET_KEY_MINT_PATH, ) .parse() .unwrap(), </ins> ); headers.append( hyper::header::SET_COOKIE,
(release.quality, release.commit.clone()) } <ins> fn normalize_base_path(p: &str) -> String { let p = p.trim_matches('/'); if p.is_empty() { return "/".to_string(); } format!("/{}/", p.trim_matches('/')) } </ins> impl ConnectionManager { pub fn new(ctx: &CommandContext, platform: Platform, args: ServeWebArgs) -> Arc<Self> { <ins> let base_path = normalize_base_path(args.server_base_path.as_deref().unwrap_or_default()); </ins> Arc::new(Self { platform, args, <ins> base_path, </ins> log: ctx.log.clone(), cache: DownloadCache::new(ctx.paths.web_server_storage()), update_service: UpdateService::new(
import { Button } from '../../../../base/browser/ui/button/button.js'; import { ITreeElement } from '../../../../base/browser/ui/tree/tree.js'; import { Action } from '../../../../base/common/actions.js'; <del> import { Delayer } from '../../../../base/common/async.js'; </del> <ins> import { Delayer, raceTimeout } from '../../../../base/common/async.js'; </ins> import { CancellationToken, CancellationTokenSource } from '../../../../base/common/cancellation.js'; import { fromNow } from '../../../../base/common/date.js'; import { isCancellationError } from '../../../../base/common/errors.js';
import { AbstractSettingRenderer, HeightChangeParams, ISettingLinkClickEvent, resolveConfiguredUntrustedSettings, createTocTreeForExtensionSettings, resolveSettingsTree, SettingsTree, SettingTreeRenderers } from './settingsTree.js'; import { ISettingsEditorViewState, parseQuery, SearchResultIdx, SearchResultModel, SettingsTreeElement, SettingsTreeGroupChild, SettingsTreeGroupElement, SettingsTreeModel, SettingsTreeSettingElement } from './settingsTreeModels.js'; import { createTOCIterator, TOCTree, TOCTreeModel } from './tocTree.js'; <del> import { CONTEXT_SETTINGS_EDITOR, CONTEXT_SETTINGS_ROW_FOCUS, CONTEXT_SETTINGS_SEARCH_FOCUS, CONTEXT_TOC_ROW_FOCUS, ENABLE_LANGUAGE_FILTER, EXTENSION_SETTING_TAG, FEATURE_SETTING_TAG, ID_SETTING_TAG, IPreferencesSearchService, ISearchProvider, LANGUAGE_SETTING_TAG, MODIFIED_SETTING_TAG, POLICY_SETTING_TAG, REQUIRE_TRUSTED_WORKSPACE_SETTING_TAG, SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, SETTINGS_EDITOR_COMMAND_SUGGEST_FILTERS, WORKSPACE_TRUST_SETTING_TAG, getExperimentalExtensionToggleData } from '../common/preferences.js'; </del> <ins> import { CONTEXT_SETTINGS_EDITOR, CONTEXT_SETTINGS_ROW_FOCUS, CONTEXT_SETTINGS_SEARCH_FOCUS, CONTEXT_TOC_ROW_FOCUS, ENABLE_LANGUAGE_FILTER, EXTENSION_FETCH_TIMEOUT_MS, EXTENSION_SETTING_TAG, FEATURE_SETTING_TAG, ID_SETTING_TAG, IPreferencesSearchService, ISearchProvider, LANGUAGE_SETTING_TAG, MODIFIED_SETTING_TAG, POLICY_SETTING_TAG, REQUIRE_TRUSTED_WORKSPACE_SETTING_TAG, SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, SETTINGS_EDITOR_COMMAND_SUGGEST_FILTERS, WORKSPACE_TRUST_SETTING_TAG, getExperimentalExtensionToggleData } from '../common/preferences.js'; </ins> import { settingsHeaderBorder, settingsSashBorder, settingsTextInputBorder } from '../common/settingsEditorColorRegistry.js'; import { IEditorGroup, IEditorGroupsService } from '../../../services/editor/common/editorGroupsService.js'; import { IOpenSettingsOptions, IPreferencesService, ISearchResult, ISetting, ISettingsEditorModel, ISettingsEditorOptions, ISettingsGroup, SettingMatchType, SettingValueType, validateSettingsEditorOptions } from '../../../services/preferences/common/preferences.js';
// Create the entry. extensionInstalled is false in this case. let manifest: IExtensionManifest | null = null; try { <del> manifest = await this.extensionGalleryService.getManifest(extension, CancellationToken.None); </del> <ins> manifest = await raceTimeout( this.extensionGalleryService.getManifest(extension, CancellationToken.None), EXTENSION_FETCH_TIMEOUT_MS ) ?? null; </ins> } catch (e) { // Likely a networking issue. // Skip adding a button for this extension to the Settings editor. continue; } <ins> if (manifest === null) { continue; } </ins> const contributesConfiguration = manifest?.contributes?.configuration; let groupTitle: string | undefined;
*  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ <ins> import { raceTimeout } from '../../../../base/common/async.js'; </ins> import { CancellationToken } from '../../../../base/common/cancellation.js'; import { IStringDictionary } from '../../../../base/common/collections.js'; import { IExtensionRecommendations } from '../../../../base/common/product.js';
// Recommend prerelease if not on Stable. const isStable = productService.quality === 'stable'; try { <del> const [extension] = await extensionGalleryService.getExtensions([{ id: extensionId, preRelease: !isStable }], CancellationToken.None); if (extension) { recommendedExtensionsGalleryInfo[key] = extension; </del> <ins> const extensions = await raceTimeout(extensionGalleryService.getExtensions([{ id: extensionId, preRelease: !isStable }], CancellationToken.None), EXTENSION_FETCH_TIMEOUT_MS); if (extensions?.length === 1) { recommendedExtensionsGalleryInfo[key] = extensions[0]; </ins> } else { // same as network connection fail. we do not want a blank settings page: https://github.com/microsoft/vscode/issues/195722 // so instead of returning partial data we return undefined here
import { Action2, MenuId } from 'vs/platform/actions/common/actions'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; <ins> import { getCommandsContext, resolveCommandsContext } from 'vs/workbench/browser/parts/editor/editorCommands'; import { IEditorCommandsContext } from 'vs/workbench/common/editor'; </ins> import { TextFileEditor } from 'vs/workbench/contrib/files/browser/editors/textFileEditor'; import { MultiDiffEditor } from 'vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditor'; import { MultiDiffEditorInput } from 'vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput'; <ins> import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; </ins> import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; export class GoToFileAction extends Action2 {
}); } <del> async run(accessor: ServicesAccessor, ...args: any[]): Promise<void> { const editorService = accessor.get(IEditorService); const activeEditor = editorService.activeEditor; </del> <ins> async run(accessor: ServicesAccessor, resourceOrContext?: URI | IEditorCommandsContext, context?: IEditorCommandsContext): Promise<void> { const { editor } = resolveCommandsContext(accessor.get(IEditorGroupsService), getCommandsContext(accessor, resourceOrContext, context)); </ins> <del> if (activeEditor instanceof MultiDiffEditorInput) { const viewModel = await activeEditor.getViewModel(); </del> <ins> if (editor instanceof MultiDiffEditorInput) { const viewModel = await editor.getViewModel(); </ins> viewModel.collapseAll(); } }
}); } <del> async run(accessor: ServicesAccessor, ...args: any[]): Promise<void> { const editorService = accessor.get(IEditorService); const activeEditor = editorService.activeEditor; </del> <ins> async run(accessor: ServicesAccessor, resourceOrContext?: URI | IEditorCommandsContext, context?: IEditorCommandsContext): Promise<void> { const { editor } = resolveCommandsContext(accessor.get(IEditorGroupsService), getCommandsContext(accessor, resourceOrContext, context)); </ins> <del> if (activeEditor instanceof MultiDiffEditorInput) { const viewModel = await activeEditor.getViewModel(); </del> <ins> if (editor instanceof MultiDiffEditorInput) { const viewModel = await editor.getViewModel(); </ins> viewModel.expandAll(); } }
} }); } else if (e.kind === 'removeRequest') { <del> // TODO@jrieken this currently is buggy when removing not the very last request/response // if (this._session!.lastExchange?.response instanceof ReplyResponse) { // 	try { // 		this._session!.hunkData.ignoreTextModelNChanges = true; // 		await this._strategy!.undoChanges(this._session!.lastExchange.response.modelAltVersionId); // 	} finally { // 		this._session!.hunkData.ignoreTextModelNChanges = false; // 	} // } </del> <ins> // TODO@jrieken this is buggy/weird when having code changes from multiple turns because // logically they are all the same hunks this._strategy?.cancel(); </ins> } }));
import { ICommandService } from 'vs/platform/commands/common/commands'; import { TestCommandService } from 'vs/editor/test/browser/editorTestServices'; import { INotebookEditorService } from 'vs/workbench/contrib/notebook/browser/services/notebookEditorService'; <ins> import { RerunAction } from 'vs/workbench/contrib/inlineChat/browser/inlineChatActions'; </ins> suite('InteractiveChatController', function () {
assert.ok(model.getValue().includes('MANUAL')); }); <ins> test('re-run should discard pending edits', async function () { let count = 1; store.add(chatAgentService.registerDynamicAgent({ id: 'testEditorAgent2', ...agentData }, { async invoke(request, progress, history, token) { progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(1, 1, 1, 1), text: request.message + (count++) }] }); return {}; }, })); ctrl = instaService.createInstance(TestController, editor); const rerun = new RerunAction(); model.setValue(''); const p = ctrl.waitFor([...TestController.INIT_SEQUENCE, State.SHOW_REQUEST, State.SHOW_RESPONSE, State.WAIT_FOR_INPUT]); const r = ctrl.run({ message: 'PROMPT_', autoSend: true }); await p; assert.strictEqual(model.getValue(), 'PROMPT_1'); const p2 = ctrl.waitFor([State.SHOW_REQUEST, State.SHOW_RESPONSE, State.WAIT_FOR_INPUT]); await instaService.invokeFunction(rerun.runInlineChatCommand, ctrl, editor); await p2; assert.strictEqual(model.getValue(), 'PROMPT_2'); ctrl.finishExistingSession(); await r; }); </ins> });
}); <ins> testApiCmd('DocumentLink[] vscode.executeLinkProvider returns lack tooltip #213970', async function () { disposables.push(extHost.registerDocumentLinkProvider(nullExtensionDescription, defaultSelector, <vscode.DocumentLinkProvider>{ provideDocumentLinks(): any { const link = new types.DocumentLink(new types.Range(0, 0, 0, 20), URI.parse('foo:bar')); link.tooltip = 'Link Tooltip'; return [link]; } })); await rpcProtocol.sync(); const links1 = await commands.executeCommand<vscode.DocumentLink[]>('vscode.executeLinkProvider', model.uri); assert.strictEqual(links1.length, 1); assert.strictEqual(links1[0].tooltip, 'Link Tooltip'); }); </ins> test('Color provider', function () {
const isAllowed = chatAgentNameService.getAgentNameRestriction(agent); let name = `${isAllowed ? agent.name : getFullyQualifiedId(agent)}`; <del> const isDupe = isAllowed && chatAgentService.getAgentsByName(agent.name).length > 1; </del> <ins> const isDupe = isAllowed && chatAgentService.agentHasDupeName(agent.id); </ins> if (isDupe) { name += ` (${agent.publisherDisplayName})`; }
return { suggestions: agents.map((agent, i): CompletionItem => { <del> const { label: agentLabel, isDupe } = getAgentCompletionDetails(agent, agents, this.chatAgentNameService); </del> <ins> const { label: agentLabel, isDupe } = this.getAgentCompletionDetails(agent); </ins> return { // Leading space is important because detail has no space at the start by design label: isDupe ?
const justAgents: CompletionItem[] = agents .filter(a => !a.isDefault) .map(agent => { <del> const { label: agentLabel, isDupe } = getAgentCompletionDetails(agent, agents, this.chatAgentNameService); </del> <ins> const { label: agentLabel, isDupe } = this.getAgentCompletionDetails(agent); </ins> const detail = agent.description; return {
return { suggestions: justAgents.concat( agents.flatMap(agent => agent.slashCommands.map((c, i) => { <del> const { label: agentLabel, isDupe } = getAgentCompletionDetails(agent, agents, this.chatAgentNameService); </del> <ins> const { label: agentLabel, isDupe } = this.getAgentCompletionDetails(agent); </ins> const withSlash = `${chatSubcommandLeader}${c.name}`; return { label: { label: withSlash, description: agentLabel, detail: isDupe ? ` (${agent.publisherDisplayName})` : undefined },
} })); } <ins> private getAgentCompletionDetails(agent: IChatAgentData): { label: string; isDupe: boolean } { const isAllowed = this.chatAgentNameService.getAgentNameRestriction(agent); const agentLabel = `${chatAgentLeader}${isAllowed ? agent.name : getFullyQualifiedId(agent)}`; const isDupe = isAllowed && this.chatAgentService.agentHasDupeName(agent.id); return { label: agentLabel, isDupe }; } </ins> } Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench).registerWorkbenchContribution(AgentCompletions, LifecyclePhase.Eventually);