Path: blob/main/src/vs/workbench/api/browser/mainThreadChatStatus.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { Disposable } from '../../../base/common/lifecycle.js';6import { IChatStatusItemService } from '../../contrib/chat/browser/chatStatusItemService.js';7import { IExtHostContext, extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';8import { ChatStatusItemDto, MainContext, MainThreadChatStatusShape } from '../common/extHost.protocol.js';910@extHostNamedCustomer(MainContext.MainThreadChatStatus)11export class MainThreadChatStatus extends Disposable implements MainThreadChatStatusShape {1213constructor(14_extHostContext: IExtHostContext,15@IChatStatusItemService private readonly _chatStatusItemService: IChatStatusItemService,16) {17super();18}1920$setEntry(id: string, entry: ChatStatusItemDto): void {21this._chatStatusItemService.setOrUpdateEntry({22id,23label: entry.title,24description: entry.description,25detail: entry.detail,26});27}2829$disposeEntry(id: string): void {30this._chatStatusItemService.deleteEntry(id);31}32}333435