92
93
private _buildBranchNamePrompt(userRequest: string): ICopilotUtilityChatMessage[] {
95
>
{
96
>
role: 'system',
97
>
content: [
98
>
'You are an expert in crafting pithy branch names for Git Repos based on chatbot conversations.',
99
>
'You are presented with a chat request, and you reply with a brief branch name that captures the main topic of that request.',
100
>
'The branch name should not be wrapped in quotes. It should be between 8-50 characters.',
101
>
'Here are some examples of good branch names:',
102
>
'- linkedlist-implementation',
103
>
'- adding-tree-view',
104
>
'- react-usestate-hook-usage',
105
>
].join(' '),
106
>
},
107
>
{
108
>
role: 'user',
109
>
content: `Please write a brief branch name for the following request:\n\n${userRequest}`,
110
>
},
111
>
];
112
>
}
113
114
private async _buildBranchName(request: IAgentBranchNameGeneratorRequest, branchNameHint: string | undefined): Promise<string> {