Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/workbench/contrib/chat/browser/attachments/chatScreenshotContext.ts
4780 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 { VSBuffer } from '../../../../../base/common/buffer.js';
7
import { localize } from '../../../../../nls.js';
8
import { IChatRequestVariableEntry } from '../../common/attachments/chatVariableEntries.js';
9
10
export const ScreenshotVariableId = 'screenshot-focused-window';
11
12
export function convertBufferToScreenshotVariable(buffer: VSBuffer): IChatRequestVariableEntry {
13
return {
14
id: ScreenshotVariableId,
15
name: localize('screenshot', 'Screenshot'),
16
value: buffer.buffer,
17
kind: 'image'
18
};
19
}
20
21