Add chat variable id and rename to 'references' (#212480)

* Add chat variable id

* Rename 'variables' to 'references'

* Replace other 'variables' usages

* Fix tests
This commit is contained in:
Rob Lourens
2024-05-13 14:30:14 -07:00
committed by GitHub
parent 85f4f03265
commit 6643db734a
25 changed files with 89 additions and 42 deletions

View File

@@ -71,7 +71,7 @@ suite('chat', () => {
});
test('participant and variable', async () => {
disposables.push(chat.registerChatVariableResolver('myVar', 'My variable', {
disposables.push(chat.registerChatVariableResolver('myVarId', 'myVar', 'My variable', 'My variable', {
resolve(_name, _context, _token) {
return [{ level: ChatVariableLevel.Full, value: 'myValue' }];
}
@@ -81,7 +81,7 @@ suite('chat', () => {
commands.executeCommand('workbench.action.chat.open', { query: '@participant hi #myVar' });
const request = await deferred.p;
assert.strictEqual(request.prompt, 'hi #myVar');
assert.strictEqual(request.variables[0].value, 'myValue');
assert.strictEqual(request.references[0].value, 'myValue');
});
test('result metadata is returned to the followup provider', async () => {