@theia/ai-copilot 1.75.0 → 1.76.0-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -14
- package/lib/browser/copilot-auth-dialog.d.ts.map +1 -1
- package/lib/browser/copilot-auth-dialog.js +12 -4
- package/lib/browser/copilot-auth-dialog.js.map +1 -1
- package/lib/browser/copilot-frontend-application-contribution.d.ts +15 -1
- package/lib/browser/copilot-frontend-application-contribution.d.ts.map +1 -1
- package/lib/browser/copilot-frontend-application-contribution.js +52 -24
- package/lib/browser/copilot-frontend-application-contribution.js.map +1 -1
- package/lib/common/copilot-auth-service.d.ts +27 -24
- package/lib/common/copilot-auth-service.d.ts.map +1 -1
- package/lib/common/copilot-language-models-manager.d.ts +3 -21
- package/lib/common/copilot-language-models-manager.d.ts.map +1 -1
- package/lib/common/copilot-language-models-manager.js +1 -13
- package/lib/common/copilot-language-models-manager.js.map +1 -1
- package/lib/common/copilot-preferences.d.ts +1 -0
- package/lib/common/copilot-preferences.d.ts.map +1 -1
- package/lib/common/copilot-preferences.js +24 -6
- package/lib/common/copilot-preferences.js.map +1 -1
- package/lib/common/index.d.ts +0 -1
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +0 -1
- package/lib/common/index.js.map +1 -1
- package/lib/node/copilot-auth-service-impl.d.ts +25 -16
- package/lib/node/copilot-auth-service-impl.d.ts.map +1 -1
- package/lib/node/copilot-auth-service-impl.js +67 -183
- package/lib/node/copilot-auth-service-impl.js.map +1 -1
- package/lib/node/copilot-auth-service-impl.spec.js +104 -168
- package/lib/node/copilot-auth-service-impl.spec.js.map +1 -1
- package/lib/node/copilot-backend-module.d.ts.map +1 -1
- package/lib/node/copilot-backend-module.js +10 -2
- package/lib/node/copilot-backend-module.js.map +1 -1
- package/lib/node/copilot-cli-auth-provider.d.ts +146 -0
- package/lib/node/copilot-cli-auth-provider.d.ts.map +1 -0
- package/lib/node/copilot-cli-auth-provider.js +430 -0
- package/lib/node/copilot-cli-auth-provider.js.map +1 -0
- package/lib/node/copilot-cli-auth-provider.spec.d.ts +2 -0
- package/lib/node/copilot-cli-auth-provider.spec.d.ts.map +1 -0
- package/lib/node/copilot-cli-auth-provider.spec.js +249 -0
- package/lib/node/copilot-cli-auth-provider.spec.js.map +1 -0
- package/lib/node/copilot-cli-locator.d.ts +120 -0
- package/lib/node/copilot-cli-locator.d.ts.map +1 -0
- package/lib/node/copilot-cli-locator.js +348 -0
- package/lib/node/copilot-cli-locator.js.map +1 -0
- package/lib/node/copilot-cli-locator.spec.d.ts +2 -0
- package/lib/node/copilot-cli-locator.spec.d.ts.map +1 -0
- package/lib/node/copilot-cli-locator.spec.js +327 -0
- package/lib/node/copilot-cli-locator.spec.js.map +1 -0
- package/lib/node/copilot-credential-store.d.ts +45 -0
- package/lib/node/copilot-credential-store.d.ts.map +1 -0
- package/lib/node/copilot-credential-store.js +96 -0
- package/lib/node/copilot-credential-store.js.map +1 -0
- package/lib/node/copilot-credential-store.spec.d.ts +2 -0
- package/lib/node/copilot-credential-store.spec.d.ts.map +1 -0
- package/lib/node/copilot-credential-store.spec.js +93 -0
- package/lib/node/copilot-credential-store.spec.js.map +1 -0
- package/lib/node/copilot-language-models-manager-impl.d.ts +20 -18
- package/lib/node/copilot-language-models-manager-impl.d.ts.map +1 -1
- package/lib/node/copilot-language-models-manager-impl.js +39 -67
- package/lib/node/copilot-language-models-manager-impl.js.map +1 -1
- package/lib/node/copilot-language-models-manager-impl.spec.d.ts +2 -0
- package/lib/node/copilot-language-models-manager-impl.spec.d.ts.map +1 -0
- package/lib/node/copilot-language-models-manager-impl.spec.js +119 -0
- package/lib/node/copilot-language-models-manager-impl.spec.js.map +1 -0
- package/lib/node/copilot-runtime-env.d.ts +20 -0
- package/lib/node/copilot-runtime-env.d.ts.map +1 -0
- package/lib/node/copilot-runtime-env.js +49 -0
- package/lib/node/copilot-runtime-env.js.map +1 -0
- package/lib/node/copilot-sdk-client-provider.d.ts +103 -0
- package/lib/node/copilot-sdk-client-provider.d.ts.map +1 -0
- package/lib/node/copilot-sdk-client-provider.js +247 -0
- package/lib/node/copilot-sdk-client-provider.js.map +1 -0
- package/lib/node/copilot-sdk-client-provider.spec.d.ts +2 -0
- package/lib/node/copilot-sdk-client-provider.spec.d.ts.map +1 -0
- package/lib/node/copilot-sdk-client-provider.spec.js +215 -0
- package/lib/node/copilot-sdk-client-provider.spec.js.map +1 -0
- package/lib/node/copilot-sdk-language-model.d.ts +85 -0
- package/lib/node/copilot-sdk-language-model.d.ts.map +1 -0
- package/lib/node/copilot-sdk-language-model.js +301 -0
- package/lib/node/copilot-sdk-language-model.js.map +1 -0
- package/lib/node/copilot-sdk-language-model.spec.d.ts +2 -0
- package/lib/node/copilot-sdk-language-model.spec.d.ts.map +1 -0
- package/lib/node/copilot-sdk-language-model.spec.js +302 -0
- package/lib/node/copilot-sdk-language-model.spec.js.map +1 -0
- package/lib/node/copilot-sdk-loader.d.ts +57 -0
- package/lib/node/copilot-sdk-loader.d.ts.map +1 -0
- package/lib/node/copilot-sdk-loader.js +133 -0
- package/lib/node/copilot-sdk-loader.js.map +1 -0
- package/lib/node/copilot-sdk-loader.spec.d.ts +2 -0
- package/lib/node/copilot-sdk-loader.spec.d.ts.map +1 -0
- package/lib/node/copilot-sdk-loader.spec.js +113 -0
- package/lib/node/copilot-sdk-loader.spec.js.map +1 -0
- package/lib/node/copilot-sdk-mappers.d.ts +49 -0
- package/lib/node/copilot-sdk-mappers.d.ts.map +1 -0
- package/lib/node/copilot-sdk-mappers.js +147 -0
- package/lib/node/copilot-sdk-mappers.js.map +1 -0
- package/lib/node/copilot-sdk-mappers.spec.d.ts +2 -0
- package/lib/node/copilot-sdk-mappers.spec.d.ts.map +1 -0
- package/lib/node/copilot-sdk-mappers.spec.js +133 -0
- package/lib/node/copilot-sdk-mappers.spec.js.map +1 -0
- package/lib/node/copilot-sdk-types.d.ts +198 -0
- package/lib/node/copilot-sdk-types.d.ts.map +1 -0
- package/lib/{common/copilot-oauth-config.js → node/copilot-sdk-types.js} +2 -13
- package/lib/node/copilot-sdk-types.js.map +1 -0
- package/lib/node/index.d.ts +9 -1
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +9 -1
- package/lib/node/index.js.map +1 -1
- package/package.json +4 -6
- package/src/browser/copilot-auth-dialog.tsx +12 -8
- package/src/browser/copilot-frontend-application-contribution.ts +62 -29
- package/src/common/copilot-auth-service.ts +28 -24
- package/src/common/copilot-language-models-manager.ts +3 -28
- package/src/common/copilot-preferences.ts +24 -5
- package/src/common/index.ts +0 -1
- package/src/node/copilot-auth-service-impl.spec.ts +122 -207
- package/src/node/copilot-auth-service-impl.ts +63 -218
- package/src/node/copilot-backend-module.ts +11 -2
- package/src/node/copilot-cli-auth-provider.spec.ts +315 -0
- package/src/node/copilot-cli-auth-provider.ts +444 -0
- package/src/node/copilot-cli-locator.spec.ts +386 -0
- package/src/node/copilot-cli-locator.ts +363 -0
- package/src/node/copilot-credential-store.spec.ts +106 -0
- package/src/node/copilot-credential-store.ts +99 -0
- package/src/node/copilot-language-models-manager-impl.spec.ts +137 -0
- package/src/node/copilot-language-models-manager-impl.ts +51 -85
- package/src/node/copilot-runtime-env.ts +46 -0
- package/src/node/copilot-sdk-client-provider.spec.ts +253 -0
- package/src/node/copilot-sdk-client-provider.ts +241 -0
- package/src/node/copilot-sdk-language-model.spec.ts +363 -0
- package/src/node/copilot-sdk-language-model.ts +329 -0
- package/src/node/copilot-sdk-loader.spec.ts +126 -0
- package/src/node/copilot-sdk-loader.ts +142 -0
- package/src/node/copilot-sdk-mappers.spec.ts +151 -0
- package/src/node/copilot-sdk-mappers.ts +161 -0
- package/src/node/copilot-sdk-types.ts +276 -0
- package/src/node/index.ts +9 -1
- package/lib/common/copilot-oauth-config.d.ts +0 -33
- package/lib/common/copilot-oauth-config.d.ts.map +0 -1
- package/lib/common/copilot-oauth-config.js.map +0 -1
- package/lib/node/copilot-language-model.d.ts +0 -34
- package/lib/node/copilot-language-model.d.ts.map +0 -1
- package/lib/node/copilot-language-model.js +0 -236
- package/lib/node/copilot-language-model.js.map +0 -1
- package/lib/node/copilot-language-model.spec.d.ts +0 -2
- package/lib/node/copilot-language-model.spec.d.ts.map +0 -1
- package/lib/node/copilot-language-model.spec.js +0 -89
- package/lib/node/copilot-language-model.spec.js.map +0 -1
- package/src/common/copilot-oauth-config.ts +0 -55
- package/src/node/copilot-language-model.spec.ts +0 -106
- package/src/node/copilot-language-model.ts +0 -273
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 EclipseSource GmbH and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { expect } from 'chai';
|
|
18
|
+
import { LanguageModelMessage } from '@theia/ai-core';
|
|
19
|
+
import type { ModelInfo } from './copilot-sdk-types';
|
|
20
|
+
import { selectSdkModelIds, buildSdkPrompt, buildSdkSystemMessage } from './copilot-sdk-mappers';
|
|
21
|
+
|
|
22
|
+
// Minimal ModelInfo factory: selectSdkModelIds only reads `id` and `policy.state`.
|
|
23
|
+
function model(id: string, state?: 'enabled' | 'disabled' | 'unconfigured'): ModelInfo {
|
|
24
|
+
return { id, policy: state ? { state } : undefined } as unknown as ModelInfo;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
describe('copilot-sdk-mappers - selectSdkModelIds', () => {
|
|
28
|
+
it('keeps enabled and unconfigured models and drops disabled ones', () => {
|
|
29
|
+
const result = selectSdkModelIds([
|
|
30
|
+
model('gpt-4o', 'enabled'),
|
|
31
|
+
model('o1', 'disabled'),
|
|
32
|
+
model('claude', 'unconfigured'),
|
|
33
|
+
model('gpt-5')
|
|
34
|
+
]);
|
|
35
|
+
expect(result).to.deep.equal(['gpt-4o', 'claude', 'gpt-5']);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('preserves order and removes duplicates', () => {
|
|
39
|
+
const result = selectSdkModelIds([
|
|
40
|
+
model('a', 'enabled'),
|
|
41
|
+
model('b', 'enabled'),
|
|
42
|
+
model('a', 'enabled')
|
|
43
|
+
]);
|
|
44
|
+
expect(result).to.deep.equal(['a', 'b']);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('drops a dated release when its family is offered as well', () => {
|
|
48
|
+
const result = selectSdkModelIds([
|
|
49
|
+
model('gpt-5'),
|
|
50
|
+
model('gpt-5-2026-04-17'),
|
|
51
|
+
model('claude-sonnet-5'),
|
|
52
|
+
model('claude-sonnet-5-20260514')
|
|
53
|
+
]);
|
|
54
|
+
expect(result).to.deep.equal(['gpt-5', 'claude-sonnet-5']);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it('keeps a dated release that is the only way to select that model', () => {
|
|
58
|
+
const result = selectSdkModelIds([model('gpt-5'), model('o5-preview-2026-03-01')]);
|
|
59
|
+
expect(result).to.deep.equal(['gpt-5', 'o5-preview-2026-03-01']);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it('keeps a dated release whose family is disabled by policy', () => {
|
|
63
|
+
const result = selectSdkModelIds([model('gpt-5', 'disabled'), model('gpt-5-2026-04-17')]);
|
|
64
|
+
expect(result).to.deep.equal(['gpt-5-2026-04-17']);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it('returns an empty list when given no models', () => {
|
|
68
|
+
expect(selectSdkModelIds([])).to.deep.equal([]);
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
describe('copilot-sdk-mappers - buildSdkPrompt', () => {
|
|
73
|
+
it('forwards a lone user turn verbatim with no system text', () => {
|
|
74
|
+
const messages: LanguageModelMessage[] = [
|
|
75
|
+
{ actor: 'user', type: 'text', text: 'hello world' }
|
|
76
|
+
];
|
|
77
|
+
const result = buildSdkPrompt(messages);
|
|
78
|
+
expect(result.systemText).to.equal('');
|
|
79
|
+
expect(result.prompt).to.equal('hello world');
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it('extracts and concatenates system messages', () => {
|
|
83
|
+
const messages: LanguageModelMessage[] = [
|
|
84
|
+
{ actor: 'system', type: 'text', text: 'You are helpful.' },
|
|
85
|
+
{ actor: 'system', type: 'text', text: 'Be concise.' },
|
|
86
|
+
{ actor: 'user', type: 'text', text: 'hi' }
|
|
87
|
+
];
|
|
88
|
+
const result = buildSdkPrompt(messages);
|
|
89
|
+
expect(result.systemText).to.equal('You are helpful.\n\nBe concise.');
|
|
90
|
+
expect(result.prompt).to.equal('hi');
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
it('renders a multi-message history as a role-labelled transcript', () => {
|
|
94
|
+
const messages: LanguageModelMessage[] = [
|
|
95
|
+
{ actor: 'user', type: 'text', text: 'first' },
|
|
96
|
+
{ actor: 'ai', type: 'text', text: 'reply' },
|
|
97
|
+
{ actor: 'user', type: 'text', text: 'second' }
|
|
98
|
+
];
|
|
99
|
+
const result = buildSdkPrompt(messages);
|
|
100
|
+
expect(result.prompt).to.equal('User: first\n\nAssistant: reply\n\nUser: second');
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
it('drops thinking messages from the conversation body', () => {
|
|
104
|
+
const messages: LanguageModelMessage[] = [
|
|
105
|
+
{ actor: 'ai', type: 'thinking', thinking: 'internal', signature: 's' },
|
|
106
|
+
{ actor: 'user', type: 'text', text: 'only user' }
|
|
107
|
+
];
|
|
108
|
+
const result = buildSdkPrompt(messages);
|
|
109
|
+
expect(result.prompt).to.equal('only user');
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
it('summarises tool use and tool result messages in the transcript', () => {
|
|
113
|
+
const messages: LanguageModelMessage[] = [
|
|
114
|
+
{ actor: 'user', type: 'text', text: 'run it' },
|
|
115
|
+
{ actor: 'ai', type: 'tool_use', id: 'call_1', name: 'foo', input: { x: 1 } },
|
|
116
|
+
{ actor: 'user', type: 'tool_result', tool_use_id: 'call_1', name: 'foo', content: 'done' }
|
|
117
|
+
];
|
|
118
|
+
const result = buildSdkPrompt(messages);
|
|
119
|
+
expect(result.prompt).to.equal(
|
|
120
|
+
'User: run it\n\nAssistant: [tool call: foo {"x":1}]\n\nUser: [tool result: done]'
|
|
121
|
+
);
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
describe('copilot-sdk-mappers - buildSdkSystemMessage', () => {
|
|
126
|
+
it('carries the system text as the content of the system message', () => {
|
|
127
|
+
const systemMessage = buildSdkSystemMessage('be helpful');
|
|
128
|
+
expect(systemMessage?.mode).to.equal('customize');
|
|
129
|
+
expect(systemMessage?.content).to.equal('be helpful');
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
it('removes the agent instructions of the CLI that the Theia prompt replaces', () => {
|
|
133
|
+
const systemMessage = buildSdkSystemMessage('be helpful');
|
|
134
|
+
const sections = systemMessage?.mode === 'customize' ? systemMessage.sections : undefined;
|
|
135
|
+
expect(Object.keys(sections ?? {})).to.have.members(['identity', 'tone', 'guidelines', 'code_change_rules']);
|
|
136
|
+
for (const section of Object.values(sections ?? {})) {
|
|
137
|
+
expect(section?.action).to.equal('remove');
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
it('keeps the tool instructions of the CLI, which tool calling relies on', () => {
|
|
142
|
+
const systemMessage = buildSdkSystemMessage('be helpful');
|
|
143
|
+
const sections = systemMessage?.mode === 'customize' ? systemMessage.sections : undefined;
|
|
144
|
+
expect(sections).to.not.have.property('tool_instructions');
|
|
145
|
+
expect(sections).to.not.have.property('safety');
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
it('configures nothing when the request has no system text', () => {
|
|
149
|
+
expect(buildSdkSystemMessage('')).to.be.undefined;
|
|
150
|
+
});
|
|
151
|
+
});
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 EclipseSource GmbH and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { LanguageModelMessage } from '@theia/ai-core';
|
|
18
|
+
import type { ModelInfo, SystemMessageConfig } from './copilot-sdk-types';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Recognizes an id that names a dated release of another model, such as
|
|
22
|
+
* `gpt-4o-2024-11-20` or `claude-sonnet-5-20260514` for `gpt-4o` and `claude-sonnet-5`.
|
|
23
|
+
*/
|
|
24
|
+
const DATED_MODEL_ID = /^(.+?)-(\d{4}-\d{2}-\d{2}|\d{8})$/;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Selects the model IDs that should be surfaced to Theia from the list returned
|
|
28
|
+
* by `CopilotClient.listModels()`.
|
|
29
|
+
*
|
|
30
|
+
* Models whose policy is explicitly `disabled` are filtered out; `enabled` and
|
|
31
|
+
* `unconfigured` models are kept. Order is preserved and duplicates are removed.
|
|
32
|
+
*
|
|
33
|
+
* The list can name the same model both by its family and by its dated releases. Offering the user
|
|
34
|
+
* several entries that select the same model is noise, so a dated release is dropped when the family
|
|
35
|
+
* it belongs to is offered as well. It is kept when it is the only way to select that model.
|
|
36
|
+
*/
|
|
37
|
+
export function selectSdkModelIds(models: ModelInfo[]): string[] {
|
|
38
|
+
const available = new Set(models.filter(model => model.id && model.policy?.state !== 'disabled').map(model => model.id));
|
|
39
|
+
const result: string[] = [];
|
|
40
|
+
const seen = new Set<string>();
|
|
41
|
+
for (const model of models) {
|
|
42
|
+
if (!model.id || seen.has(model.id)) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
if (model.policy && model.policy.state === 'disabled') {
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
const family = model.id.match(DATED_MODEL_ID)?.[1];
|
|
49
|
+
if (family && available.has(family)) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
seen.add(model.id);
|
|
53
|
+
result.push(model.id);
|
|
54
|
+
}
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The result of flattening a Theia message history into a single prompt for the
|
|
60
|
+
* agentic Copilot SDK session.
|
|
61
|
+
*/
|
|
62
|
+
export interface SdkPrompt {
|
|
63
|
+
/** Concatenated content of all system messages (may be empty). */
|
|
64
|
+
systemText: string;
|
|
65
|
+
/** The user-facing prompt body derived from the non-system messages. */
|
|
66
|
+
prompt: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function roleLabel(message: LanguageModelMessage): string {
|
|
70
|
+
switch (message.actor) {
|
|
71
|
+
case 'ai':
|
|
72
|
+
return 'Assistant';
|
|
73
|
+
case 'system':
|
|
74
|
+
return 'System';
|
|
75
|
+
default:
|
|
76
|
+
return 'User';
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function messageToText(message: LanguageModelMessage): string {
|
|
81
|
+
if (LanguageModelMessage.isTextMessage(message)) {
|
|
82
|
+
return message.text;
|
|
83
|
+
}
|
|
84
|
+
if (LanguageModelMessage.isToolUseMessage(message)) {
|
|
85
|
+
return `[tool call: ${message.name} ${JSON.stringify(message.input)}]`;
|
|
86
|
+
}
|
|
87
|
+
if (LanguageModelMessage.isToolResultMessage(message)) {
|
|
88
|
+
const content = message.content === undefined
|
|
89
|
+
? ''
|
|
90
|
+
: (typeof message.content === 'string' ? message.content : JSON.stringify(message.content));
|
|
91
|
+
return `[tool result: ${content}]`;
|
|
92
|
+
}
|
|
93
|
+
if (LanguageModelMessage.isImageMessage(message)) {
|
|
94
|
+
return '[image omitted]';
|
|
95
|
+
}
|
|
96
|
+
return '';
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Flattens a Theia message history into an {@link SdkPrompt}.
|
|
101
|
+
*
|
|
102
|
+
* The Copilot SDK session is a stateful agent that accepts a single prompt
|
|
103
|
+
* string per `send()` call, so the full Theia history is collapsed here. System
|
|
104
|
+
* messages are extracted separately and become the system message of the session,
|
|
105
|
+
* see {@link buildSdkSystemMessage}. A lone user turn is forwarded verbatim;
|
|
106
|
+
* richer histories are rendered as a role-labelled transcript.
|
|
107
|
+
*
|
|
108
|
+
* This is a lossy mapping by design, see the limitations documented in the package
|
|
109
|
+
* README, and is intended for single-turn requests.
|
|
110
|
+
*/
|
|
111
|
+
export function buildSdkPrompt(messages: LanguageModelMessage[]): SdkPrompt {
|
|
112
|
+
const systemParts: string[] = [];
|
|
113
|
+
const conversation: LanguageModelMessage[] = [];
|
|
114
|
+
for (const message of messages) {
|
|
115
|
+
if (message.actor === 'system' && LanguageModelMessage.isTextMessage(message)) {
|
|
116
|
+
systemParts.push(message.text);
|
|
117
|
+
} else if (message.type !== 'thinking') {
|
|
118
|
+
conversation.push(message);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const systemText = systemParts.join('\n\n').trim();
|
|
123
|
+
|
|
124
|
+
let prompt: string;
|
|
125
|
+
if (conversation.length === 1 && LanguageModelMessage.isTextMessage(conversation[0]) && conversation[0].actor === 'user') {
|
|
126
|
+
prompt = conversation[0].text;
|
|
127
|
+
} else {
|
|
128
|
+
prompt = conversation
|
|
129
|
+
.map(message => `${roleLabel(message)}: ${messageToText(message)}`)
|
|
130
|
+
.join('\n\n')
|
|
131
|
+
.trim();
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return { systemText, prompt };
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Builds the system message configuration of a session from the system text of a request.
|
|
139
|
+
*
|
|
140
|
+
* The CLI is an agent with a system prompt of its own, while a Theia agent brings a complete one.
|
|
141
|
+
* The sections that describe who the agent is and how it should work are therefore removed, so that
|
|
142
|
+
* they cannot contradict the prompt of the Theia agent, and the prompt is added in their place. The
|
|
143
|
+
* sections that make tool calling work and the ones that carry the safety rules of the CLI are kept:
|
|
144
|
+
* this integration declares Theia's tools to the CLI, so the model still has to be told how to call
|
|
145
|
+
* them. Replacing the message as a whole would drop those as well.
|
|
146
|
+
*/
|
|
147
|
+
export function buildSdkSystemMessage(systemText: string): SystemMessageConfig | undefined {
|
|
148
|
+
if (!systemText) {
|
|
149
|
+
return undefined;
|
|
150
|
+
}
|
|
151
|
+
return {
|
|
152
|
+
mode: 'customize',
|
|
153
|
+
sections: {
|
|
154
|
+
identity: { action: 'remove' },
|
|
155
|
+
tone: { action: 'remove' },
|
|
156
|
+
guidelines: { action: 'remove' },
|
|
157
|
+
code_change_rules: { action: 'remove' }
|
|
158
|
+
},
|
|
159
|
+
content: systemText
|
|
160
|
+
};
|
|
161
|
+
}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 EclipseSource GmbH and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
// The declarations in this file mirror the API of the GitHub Copilot SDK '@github/copilot-sdk' (1.0.9)
|
|
18
|
+
// - https://github.com/github/copilot-sdk
|
|
19
|
+
// '@github/copilot-sdk' copyright:
|
|
20
|
+
/*---------------------------------------------------------------------------------------------
|
|
21
|
+
* Copyright GitHub, Inc.
|
|
22
|
+
* Licensed under the MIT License. See LICENSE in the project root for license information.
|
|
23
|
+
*--------------------------------------------------------------------------------------------*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The part of the Copilot SDK API this integration uses, mirrored by hand.
|
|
27
|
+
*
|
|
28
|
+
* Mirrored from `@github/copilot-sdk` 1.0.9 (protocol version 3), which the Copilot CLI 1.0.79 ships.
|
|
29
|
+
* The package is deliberately not a dependency: it depends on the CLI, a large proprietary binary that
|
|
30
|
+
* would end up in the tree and the lockfile of every application. The CLI is a prerequisite on the
|
|
31
|
+
* backend host instead, see `CopilotCliLocator`, and the SDK is loaded from it at runtime, see
|
|
32
|
+
* `CopilotSdkLoader`.
|
|
33
|
+
*
|
|
34
|
+
* Only what this integration passes to the SDK or reads from it is declared, so a drift shows up as a
|
|
35
|
+
* compile error here rather than at runtime. `scripts/copilot-sdk-mirror` checks the mirror against a
|
|
36
|
+
* released SDK and runs in CI on a schedule; update the version above along with the declarations.
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
// ============================================================================
|
|
40
|
+
// Models, from `dist/types.d.ts`
|
|
41
|
+
// ============================================================================
|
|
42
|
+
|
|
43
|
+
export interface ModelPolicy {
|
|
44
|
+
state: 'enabled' | 'disabled' | 'unconfigured';
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** A model as reported by {@link CopilotClient.listModels}. */
|
|
48
|
+
export interface ModelInfo {
|
|
49
|
+
/** Model identifier, for example `claude-sonnet-4.5`. */
|
|
50
|
+
id: string;
|
|
51
|
+
policy?: ModelPolicy;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// ============================================================================
|
|
55
|
+
// System message, from `dist/types.d.ts`
|
|
56
|
+
// ============================================================================
|
|
57
|
+
|
|
58
|
+
/** The sections the runtime assembles its system prompt from. Unknown ids are a silent no-op there. */
|
|
59
|
+
export type SystemMessageSection =
|
|
60
|
+
| 'preamble'
|
|
61
|
+
| 'identity'
|
|
62
|
+
| 'tone'
|
|
63
|
+
| 'tool_efficiency'
|
|
64
|
+
| 'environment_context'
|
|
65
|
+
| 'code_change_rules'
|
|
66
|
+
| 'guidelines'
|
|
67
|
+
| 'safety'
|
|
68
|
+
| 'tool_instructions'
|
|
69
|
+
| 'custom_instructions'
|
|
70
|
+
| 'runtime_instructions'
|
|
71
|
+
| 'last_instructions';
|
|
72
|
+
|
|
73
|
+
export type SectionTransformFn = (currentContent: string) => string | Promise<string>;
|
|
74
|
+
|
|
75
|
+
export type SectionOverrideAction = 'replace' | 'remove' | 'append' | 'prepend' | 'preserve' | SectionTransformFn;
|
|
76
|
+
|
|
77
|
+
export interface SectionOverride {
|
|
78
|
+
action: SectionOverrideAction;
|
|
79
|
+
content?: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** The SDK foundation plus the given content. */
|
|
83
|
+
export interface SystemMessageAppendConfig {
|
|
84
|
+
mode?: 'append';
|
|
85
|
+
content?: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** The given content as the entire system message. */
|
|
89
|
+
export interface SystemMessageReplaceConfig {
|
|
90
|
+
mode: 'replace';
|
|
91
|
+
content: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** The SDK structure with section-level overrides, which is what this integration uses. */
|
|
95
|
+
export interface SystemMessageCustomizeConfig {
|
|
96
|
+
mode: 'customize';
|
|
97
|
+
sections?: Partial<Record<SystemMessageSection, SectionOverride>>;
|
|
98
|
+
content?: string;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export type SystemMessageConfig = SystemMessageAppendConfig | SystemMessageReplaceConfig | SystemMessageCustomizeConfig;
|
|
102
|
+
|
|
103
|
+
// ============================================================================
|
|
104
|
+
// Tools, from `dist/types.d.ts`
|
|
105
|
+
// ============================================================================
|
|
106
|
+
|
|
107
|
+
/** What the runtime tells a tool handler about its invocation. */
|
|
108
|
+
export interface ToolInvocation {
|
|
109
|
+
sessionId: string;
|
|
110
|
+
toolCallId: string;
|
|
111
|
+
toolName: string;
|
|
112
|
+
arguments: unknown;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export type ToolHandler = (args: unknown, invocation: ToolInvocation) => Promise<unknown> | unknown;
|
|
116
|
+
|
|
117
|
+
/** A tool declared to the runtime. `parameters` also accepts a Zod schema upstream. */
|
|
118
|
+
export interface Tool {
|
|
119
|
+
name: string;
|
|
120
|
+
description?: string;
|
|
121
|
+
parameters?: Record<string, unknown>;
|
|
122
|
+
handler?: ToolHandler;
|
|
123
|
+
/** When true, the tool runs without a permission prompt of the runtime. */
|
|
124
|
+
skipPermission?: boolean;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// ============================================================================
|
|
128
|
+
// Permissions, from `dist/types.d.ts` and `dist/generated/rpc.d.ts`
|
|
129
|
+
// ============================================================================
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* A permission request of the runtime, upstream a union over the kind of operation with its own fields.
|
|
133
|
+
* Only `managedApprovalRequired` is read, which managed policy sets for a request it reserves for the
|
|
134
|
+
* user.
|
|
135
|
+
*/
|
|
136
|
+
export interface PermissionRequest {
|
|
137
|
+
readonly kind: string;
|
|
138
|
+
readonly managedApprovalRequired?: boolean;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/** The decisions this integration can return. Upstream also has scopes that outlive a request. */
|
|
142
|
+
export type PermissionRequestResult =
|
|
143
|
+
| { kind: 'approve-once' }
|
|
144
|
+
| { kind: 'reject', feedback?: string }
|
|
145
|
+
/** No user is available to confirm the request. */
|
|
146
|
+
| { kind: 'user-not-available' }
|
|
147
|
+
/** Leaves the request pending, so that another connected client can answer it. */
|
|
148
|
+
| { kind: 'no-result' };
|
|
149
|
+
|
|
150
|
+
export type PermissionHandler = (
|
|
151
|
+
request: PermissionRequest,
|
|
152
|
+
invocation: { sessionId: string, managedSettingsEnabled?: boolean }
|
|
153
|
+
) => Promise<PermissionRequestResult> | PermissionRequestResult;
|
|
154
|
+
|
|
155
|
+
// ============================================================================
|
|
156
|
+
// Session events, from `dist/generated/session-events.d.ts`
|
|
157
|
+
// ============================================================================
|
|
158
|
+
|
|
159
|
+
/** The envelope every session event comes in. */
|
|
160
|
+
export interface SessionEvent<T extends string, D> {
|
|
161
|
+
readonly type: T;
|
|
162
|
+
readonly data: D;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** The session events this integration listens to, keyed by their type discriminator. */
|
|
166
|
+
export interface CopilotSessionEvents {
|
|
167
|
+
'assistant.message_delta': SessionEvent<'assistant.message_delta', {
|
|
168
|
+
readonly deltaContent: string
|
|
169
|
+
}>;
|
|
170
|
+
'assistant.reasoning_delta': SessionEvent<'assistant.reasoning_delta', {
|
|
171
|
+
readonly deltaContent: string
|
|
172
|
+
}>;
|
|
173
|
+
'assistant.message': SessionEvent<'assistant.message', {
|
|
174
|
+
readonly content: string,
|
|
175
|
+
readonly outputTokens?: number
|
|
176
|
+
}>;
|
|
177
|
+
'assistant.usage': SessionEvent<'assistant.usage', {
|
|
178
|
+
readonly inputTokens?: number,
|
|
179
|
+
readonly outputTokens?: number
|
|
180
|
+
}>;
|
|
181
|
+
/** Nothing of its payload is read, the event itself is the signal that the turn is over. */
|
|
182
|
+
'session.idle': SessionEvent<'session.idle', unknown>;
|
|
183
|
+
'session.error': SessionEvent<'session.error', {
|
|
184
|
+
readonly errorType: string,
|
|
185
|
+
readonly message: string,
|
|
186
|
+
readonly statusCode?: number,
|
|
187
|
+
readonly stack?: string
|
|
188
|
+
}>;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export type CopilotSessionEventType = keyof CopilotSessionEvents;
|
|
192
|
+
|
|
193
|
+
// ============================================================================
|
|
194
|
+
// Session, from `dist/session.d.ts`
|
|
195
|
+
// ============================================================================
|
|
196
|
+
|
|
197
|
+
/** A conversation with the runtime, upstream a class with resume, fork and sharing on top. */
|
|
198
|
+
export interface CopilotSession {
|
|
199
|
+
readonly sessionId: string;
|
|
200
|
+
/**
|
|
201
|
+
* Registers a handler for one type of event and returns the function that removes it again.
|
|
202
|
+
*/
|
|
203
|
+
on<K extends CopilotSessionEventType>(eventType: K, handler: (event: CopilotSessionEvents[K]) => void): () => void;
|
|
204
|
+
/** Sends a turn and resolves with the id of the message it created. */
|
|
205
|
+
send(options: { prompt: string }): Promise<string>;
|
|
206
|
+
/** Stops the turn in flight. */
|
|
207
|
+
abort(): Promise<void>;
|
|
208
|
+
/** Releases the session in memory, leaving what it persisted in place. */
|
|
209
|
+
disconnect(): Promise<void>;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// ============================================================================
|
|
213
|
+
// Client, from `dist/client.d.ts` and `dist/types.d.ts`
|
|
214
|
+
// ============================================================================
|
|
215
|
+
|
|
216
|
+
/** How the SDK reaches the runtime. This integration always spawns the CLI it located. */
|
|
217
|
+
export interface StdioRuntimeConnection {
|
|
218
|
+
readonly kind: 'stdio';
|
|
219
|
+
readonly path?: string;
|
|
220
|
+
readonly args?: readonly string[];
|
|
221
|
+
readonly env?: Record<string, string>;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export type RuntimeConnection = StdioRuntimeConnection;
|
|
225
|
+
|
|
226
|
+
/** The `RuntimeConnection` value of the SDK, of which only the stdio factory is used. */
|
|
227
|
+
export interface RuntimeConnectionFactory {
|
|
228
|
+
readonly forStdio: (options?: { path?: string, args?: readonly string[], env?: Record<string, string> }) => StdioRuntimeConnection;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Selects the defaults of the runtime: `copilot-cli` brings the ambient behaviour of the CLI along,
|
|
233
|
+
* `empty` requires the application to opt into what it needs.
|
|
234
|
+
*/
|
|
235
|
+
export type CopilotClientMode = 'empty' | 'copilot-cli';
|
|
236
|
+
|
|
237
|
+
/** The client options this integration sets. */
|
|
238
|
+
export interface CopilotClientOptions {
|
|
239
|
+
connection?: RuntimeConnection;
|
|
240
|
+
mode?: CopilotClientMode;
|
|
241
|
+
/** Copilot home of the runtime, which becomes its `COPILOT_HOME`. Required in `empty` mode. */
|
|
242
|
+
baseDirectory?: string;
|
|
243
|
+
logLevel?: 'none' | 'error' | 'warning' | 'info' | 'debug' | 'all';
|
|
244
|
+
env?: Record<string, string | undefined>;
|
|
245
|
+
gitHubToken?: string;
|
|
246
|
+
/** When false, only an explicit token is used and no sign-in found on the host. */
|
|
247
|
+
useLoggedInUser?: boolean;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/** The session configuration this integration passes. */
|
|
251
|
+
export interface SessionConfig {
|
|
252
|
+
model?: string;
|
|
253
|
+
streaming?: boolean;
|
|
254
|
+
tools?: Tool[];
|
|
255
|
+
systemMessage?: SystemMessageConfig;
|
|
256
|
+
/**
|
|
257
|
+
* The tools to enable, as source-qualified patterns such as `custom:*` or `builtin:<name>`.
|
|
258
|
+
* Required in `empty` mode.
|
|
259
|
+
*/
|
|
260
|
+
availableTools?: string[];
|
|
261
|
+
onPermissionRequest?: PermissionHandler;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/** The runtime as seen by this integration, upstream a class with the full session and status API. */
|
|
265
|
+
export interface CopilotClient {
|
|
266
|
+
/** Starts the runtime and connects to it. */
|
|
267
|
+
start(): Promise<void>;
|
|
268
|
+
/** Stops the runtime and resolves with the errors its cleanup ran into, if any. */
|
|
269
|
+
stop(): Promise<Error[]>;
|
|
270
|
+
listModels(): Promise<ModelInfo[]>;
|
|
271
|
+
createSession(config: SessionConfig): Promise<CopilotSession>;
|
|
272
|
+
/** Removes a session and what it persisted in the Copilot home. */
|
|
273
|
+
deleteSession(sessionId: string): Promise<void>;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export type CopilotClientConstructor = new (options?: CopilotClientOptions) => CopilotClient;
|
package/src/node/index.ts
CHANGED
|
@@ -15,5 +15,13 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
export * from './copilot-auth-service-impl';
|
|
18
|
-
export * from './copilot-language-model';
|
|
19
18
|
export * from './copilot-language-models-manager-impl';
|
|
19
|
+
export * from './copilot-cli-auth-provider';
|
|
20
|
+
export * from './copilot-cli-locator';
|
|
21
|
+
export * from './copilot-credential-store';
|
|
22
|
+
export * from './copilot-runtime-env';
|
|
23
|
+
export * from './copilot-sdk-client-provider';
|
|
24
|
+
export * from './copilot-sdk-loader';
|
|
25
|
+
export * from './copilot-sdk-mappers';
|
|
26
|
+
export * from './copilot-sdk-language-model';
|
|
27
|
+
export * from './copilot-sdk-types';
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export declare const CopilotOAuthConfig: unique symbol;
|
|
2
|
-
/**
|
|
3
|
-
* Configuration for the GitHub Copilot OAuth Device Flow.
|
|
4
|
-
* Bind this symbol to a custom value in your container module to override the defaults
|
|
5
|
-
* and use your own GitHub OAuth application.
|
|
6
|
-
*/
|
|
7
|
-
export interface CopilotOAuthConfig {
|
|
8
|
-
/**
|
|
9
|
-
* The GitHub OAuth App client ID used to initiate the device flow.
|
|
10
|
-
* Defaults to the built-in Theia Copilot OAuth App client ID.
|
|
11
|
-
*/
|
|
12
|
-
readonly clientId: string;
|
|
13
|
-
/**
|
|
14
|
-
* The User-Agent header sent with GitHub API requests.
|
|
15
|
-
* Defaults to `'Theia-Copilot/1.0.0'`.
|
|
16
|
-
*/
|
|
17
|
-
readonly userAgent: string;
|
|
18
|
-
/**
|
|
19
|
-
* The service name used to store credentials in the system keystore.
|
|
20
|
-
* Defaults to `'theia-copilot-auth'`.
|
|
21
|
-
*/
|
|
22
|
-
readonly keystoreService: string;
|
|
23
|
-
/**
|
|
24
|
-
* The account name used to store credentials in the system keystore.
|
|
25
|
-
* Defaults to `'github-copilot'`.
|
|
26
|
-
*/
|
|
27
|
-
readonly keystoreAccount: string;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Default OAuth configuration for the built-in Theia Copilot integration.
|
|
31
|
-
*/
|
|
32
|
-
export declare const DEFAULT_COPILOT_OAUTH_CONFIG: CopilotOAuthConfig;
|
|
33
|
-
//# sourceMappingURL=copilot-oauth-config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"copilot-oauth-config.d.ts","sourceRoot":"","sources":["../../src/common/copilot-oauth-config.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAE/D;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CACpC;AAED;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,kBAK1C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"copilot-oauth-config.js","sourceRoot":"","sources":["../../src/common/copilot-oauth-config.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,wCAAwC;AACxC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEnE,QAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;AA8B/D;;GAEG;AACU,QAAA,4BAA4B,GAAuB;IAC5D,QAAQ,EAAE,sBAAsB;IAChC,SAAS,EAAE,qBAAqB;IAChC,eAAe,EAAE,oBAAoB;IACrC,eAAe,EAAE,gBAAgB;CACpC,CAAC"}
|