Merge pull request #958 from microsoft/isidorn/delightful-viper

add cat_context variable
This commit is contained in:
Isidor Nikolic
2024-02-15 15:47:55 +01:00
committed by GitHub

View File

@ -89,6 +89,28 @@ export function activate(context: vscode.ExtensionContext) {
}
};
vscode.chat.registerVariable('cat_context', 'Describes the state of mind and version of the cat', {
resolve: (name, context, token) => {
if (name == 'cat_context') {
const mood = Math.random() > 0.5 ? 'happy' : 'grumpy';
return [
{
level: vscode.ChatVariableLevel.Short,
value: 'version 1.3 ' + mood
},
{
level: vscode.ChatVariableLevel.Medium,
value: 'I am a playful cat, version 1.3, and I am ' + mood
},
{
level: vscode.ChatVariableLevel.Full,
value: 'I am a playful cat, version 1.3, this version prefer to explain everything using mouse and tail metaphores. I am ' + mood
}
]
}
}
});
context.subscriptions.push(
agent,
// Register the command handler for the /meow followup