Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/src/extension/intents/common/intents.ts
13399 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { defaultAgentName, editingSessionAgentName, editorAgentName, editsAgentName, getChatParticipantNameFromId, terminalAgentName, vscodeAgentName } from '../../../platform/chat/common/chatAgents';
7
8
/**
9
* Create a mode name for gh telemetry
10
*/
11
export function participantIdToModeName(participantId: string): string {
12
const name = getChatParticipantNameFromId(participantId);
13
14
switch (name) {
15
case defaultAgentName:
16
case vscodeAgentName:
17
case 'terminalPanel':
18
return 'ask';
19
case editsAgentName:
20
return 'agent';
21
case editingSessionAgentName:
22
return 'edit';
23
case editorAgentName:
24
case terminalAgentName: // Count terminal and "etc" as 'inline'
25
default:
26
return 'inline';
27
}
28
}
29