ide на основе vs code
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ServicesAccessor } from '../../../../../platform/instantiation/common/instantiation.js';
import { IEditorService } from '../../../../services/editor/common/editorService.js';
import { getDefaultNewChatSessionTypeAndReason, IResolvedNewChatSessionType } from '../../common/constants.js';
import { getChatSessionType, getNewChatSessionResource } from '../../common/model/chatUri.js';
import { IChatEditorOptions } from '../widgetHosts/editor/chatEditor.js';
import { ChatEditorInput } from '../widgetHosts/editor/chatEditorInput.js';
export async function clearChatEditor(accessor: ServicesAccessor, chatEditorInput?: ChatEditorInput, resolvedSessionType?: IResolvedNewChatSessionType): Promise<void> {
const editorService = accessor.get(IEditorService);
if (!chatEditorInput) {
const editorInput = editorService.activeEditor;
chatEditorInput = editorInput instanceof ChatEditorInput ? editorInput : undefined;
}
if (chatEditorInput instanceof ChatEditorInput) {
const currentResource = chatEditorInput.sessionResource;
const currentSessionType = currentResource ? getChatSessionType(currentResource) : undefined;
const resolved = resolvedSessionType ?? getDefaultNewChatSessionTypeAndReason(accessor, {
currentSessionType,
});
const resource = getNewChatSessionResource(resolved.sessionType);
const options: IChatEditorOptions = { pinned: true, sessionTypeSelectionReason: resolved.selectionReason };
// A chat editor can only be open in one group
const identifier = editorService.findEditors(chatEditorInput.resource)[0];
await editorService.replaceEditors([{
editor: chatEditorInput,
replacement: { resource, options }
}], identifier.groupId);
}
}