1
>
/*---------------------------------------------------------------------------------------------
promptTypes.ts
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 { LanguageSelector } from '../../../../../editor/common/languageSelector.js';
7
>
import { localize } from '../../../../../nls.js';
8
>
9
>
/**
10
>
* Documentation link for the reusable prompts feature.
11
>
*/
12
>
export const PROMPT_DOCUMENTATION_URL = 'https://aka.ms/vscode-ghcp-prompt-snippets';
13
>
export const INSTRUCTIONS_DOCUMENTATION_URL = 'https://aka.ms/vscode-ghcp-custom-instructions';
14
>
export const AGENT_DOCUMENTATION_URL = 'https://aka.ms/vscode-ghcp-custom-chat-modes'; // todo
15
>
export const SKILL_DOCUMENTATION_URL = 'https://aka.ms/vscode-agent-skills';
16
>
// TODO: update link when available
17
>
export const HOOK_DOCUMENTATION_URL = 'https://aka.ms/vscode-chat-hooks';
18
>
19
>
/**
20
>
* Language ID for the reusable prompt syntax.
21
>
*/
22
>
export const PROMPT_LANGUAGE_ID = 'prompt';
23
>
24
>
/**
25
>
* Language ID for instructions syntax.
26
>
*/
27
>
export const INSTRUCTIONS_LANGUAGE_ID = 'instructions';
28
>
29
>
/**
30
>
* Language ID for agent syntax.
31
>
*/
32
>
export const AGENT_LANGUAGE_ID = 'chatagent';
33
>
34
>
/**
35
>
* Language ID for skill syntax.
36
>
*/
37
>
export const SKILL_LANGUAGE_ID = 'skill';
38
>
39
>
/**
40
>
* Prompt and instructions files language selector.
41
>
*/
42
>
export const ALL_PROMPTS_LANGUAGE_SELECTOR: LanguageSelector = [PROMPT_LANGUAGE_ID, INSTRUCTIONS_LANGUAGE_ID, AGENT_LANGUAGE_ID, SKILL_LANGUAGE_ID];
43
>
44
>
/**
45
>
* Configuration key for enabling the agent debug log feature.
46
>
*/
47
>
export const AGENT_DEBUG_LOG_ENABLED_SETTING = 'github.copilot.chat.agentDebugLog.enabled';
48
>
49
>
/**
50
>
* Configuration key for enabling file logging for the agent debug log.
51
>
*/
52
>
export const AGENT_DEBUG_LOG_FILE_LOGGING_ENABLED_SETTING = 'github.copilot.chat.agentDebugLog.fileLogging.enabled';
53
>
54
>
/**
55
>
* Configuration key for enabling agent debug logging for agent host (Copilot CLI) sessions.
56
>
* Registered in core (see `chat.shared.contribution.ts`) since only core consumes it.
57
>
*/
58
>
export const AgentHostAgentDebugLogEnabledSettingId = 'chat.agentHost.agentDebugLog.enabled';
59
>
60
>
/**
61
>
* Configuration key for the maximum number of debug events kept in memory for
62
>
* agent host (Copilot CLI) sessions. Registered in core (see
63
>
* `chat.shared.contribution.ts`) since only core consumes it.
64
>
*/
65
>
export const AgentHostAgentDebugLogMaxEventsSettingId = 'chat.agentHost.agentDebugLog.maxEventsInMemory';
66
>
67
>
/**
68
>
* The name of the troubleshoot slash command / skill.
69
>
*/
70
>
export const TROUBLESHOOT_COMMAND_NAME = 'troubleshoot';
71
>
72
>
/**
73
>
* URI scheme used by the Copilot extension for built-in skills.
74
>
*/
75
>
export const COPILOT_SKILL_URI_SCHEME = 'copilot-skill';
76
>
77
>
/**
78
>
* Path fragment that identifies the troubleshoot skill in a URI.
79
>
*/
80
>
export const TROUBLESHOOT_SKILL_PATH = 'troubleshoot/SKILL.md';
81
>
82
>
/**
83
>
* The language id for a prompts type.
84
>
*/
85
>
export function getLanguageIdForPromptsType(type: PromptsType): string {
86
switch (type) {
87
case PromptsType.prompt: