@codingame/monaco-vscode-extensions-service-override
Version:
VSCode public API plugged on the monaco editor - extensions service-override
28 lines (24 loc) • 1.26 kB
JavaScript
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
import { IChatStatusItemService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatStatus/chatStatusItemService.service';
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
import { MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
let MainThreadChatStatus = class MainThreadChatStatus extends Disposable {
constructor(_extHostContext, _chatStatusItemService) {
super();
this._chatStatusItemService = _chatStatusItemService;
}
$setEntry(id, entry) {
this._chatStatusItemService.setOrUpdateEntry({
id,
label: entry.title,
description: entry.description,
detail: entry.detail
});
}
$disposeEntry(id) {
this._chatStatusItemService.deleteEntry(id);
}
};
MainThreadChatStatus = __decorate([extHostNamedCustomer(MainContext.MainThreadChatStatus), ( __param(1, IChatStatusItemService))], MainThreadChatStatus);
export { MainThreadChatStatus };