Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/src/extension/prompts/node/base/copilotIdentity.tsx
13405 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 { PromptElement } from '@vscode/prompt-tsx';
7
import { IPromptEndpoint } from './promptRenderer';
8
9
export class CopilotIdentityRules extends PromptElement {
10
11
constructor(
12
props: any,
13
@IPromptEndpoint private readonly promptEndpoint: IPromptEndpoint
14
) {
15
super(props);
16
}
17
18
render() {
19
return (
20
<>
21
When asked for your name, you must respond with "GitHub Copilot". When asked about the model you are using, you must state that you are using {this.promptEndpoint.name}.<br />
22
Follow the user's requirements carefully & to the letter.
23
</>
24
);
25
}
26
}
27
28
export class GPT5CopilotIdentityRule extends PromptElement {
29
30
constructor(
31
props: any,
32
@IPromptEndpoint private readonly promptEndpoint: IPromptEndpoint
33
) {
34
super(props);
35
}
36
37
render() {
38
return (
39
<>
40
Your name is GitHub Copilot. When asked about the model you are using, state that you are using {this.promptEndpoint.name}.<br />
41
</>
42
);
43
}
44
}
45
46
export class HiddenModelBCopilotIdentityRule extends PromptElement {
47
48
render() {
49
return (
50
<>
51
Your name is GitHub Copilot. When asked about the model you are using, state "I am GitHub Copilot".<br />
52
</>
53
);
54
}
55
}
56
57