@theia/ai-chat 1.54.0
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 +30 -0
- package/lib/browser/ai-chat-frontend-module.d.ts +4 -0
- package/lib/browser/ai-chat-frontend-module.d.ts.map +1 -0
- package/lib/browser/ai-chat-frontend-module.js +51 -0
- package/lib/browser/ai-chat-frontend-module.js.map +1 -0
- package/lib/browser/ai-chat-preferences.d.ts +4 -0
- package/lib/browser/ai-chat-preferences.d.ts.map +1 -0
- package/lib/browser/ai-chat-preferences.js +32 -0
- package/lib/browser/ai-chat-preferences.js.map +1 -0
- package/lib/browser/frontend-chat-service.d.ts +8 -0
- package/lib/browser/frontend-chat-service.d.ts.map +1 -0
- package/lib/browser/frontend-chat-service.js +67 -0
- package/lib/browser/frontend-chat-service.js.map +1 -0
- package/lib/common/chat-agent-service.d.ts +34 -0
- package/lib/common/chat-agent-service.d.ts.map +1 -0
- package/lib/common/chat-agent-service.js +75 -0
- package/lib/common/chat-agent-service.js.map +1 -0
- package/lib/common/chat-agents-variable-contribution.d.ts +17 -0
- package/lib/common/chat-agents-variable-contribution.d.ts.map +1 -0
- package/lib/common/chat-agents-variable-contribution.js +51 -0
- package/lib/common/chat-agents-variable-contribution.js.map +1 -0
- package/lib/common/chat-agents.d.ts +86 -0
- package/lib/common/chat-agents.d.ts.map +1 -0
- package/lib/common/chat-agents.js +307 -0
- package/lib/common/chat-agents.js.map +1 -0
- package/lib/common/chat-model.d.ts +319 -0
- package/lib/common/chat-model.d.ts.map +1 -0
- package/lib/common/chat-model.js +527 -0
- package/lib/common/chat-model.js.map +1 -0
- package/lib/common/chat-request-parser.d.ts +20 -0
- package/lib/common/chat-request-parser.d.ts.map +1 -0
- package/lib/common/chat-request-parser.js +158 -0
- package/lib/common/chat-request-parser.js.map +1 -0
- package/lib/common/chat-request-parser.spec.d.ts +2 -0
- package/lib/common/chat-request-parser.spec.d.ts.map +1 -0
- package/lib/common/chat-request-parser.spec.js +108 -0
- package/lib/common/chat-request-parser.spec.js.map +1 -0
- package/lib/common/chat-service.d.ts +72 -0
- package/lib/common/chat-service.d.ts.map +1 -0
- package/lib/common/chat-service.js +170 -0
- package/lib/common/chat-service.js.map +1 -0
- package/lib/common/command-chat-agents.d.ts +33 -0
- package/lib/common/command-chat-agents.d.ts.map +1 -0
- package/lib/common/command-chat-agents.js +327 -0
- package/lib/common/command-chat-agents.js.map +1 -0
- package/lib/common/index.d.ts +10 -0
- package/lib/common/index.d.ts.map +1 -0
- package/lib/common/index.js +28 -0
- package/lib/common/index.js.map +1 -0
- package/lib/common/orchestrator-chat-agent.d.ts +22 -0
- package/lib/common/orchestrator-chat-agent.d.ts.map +1 -0
- package/lib/common/orchestrator-chat-agent.js +140 -0
- package/lib/common/orchestrator-chat-agent.js.map +1 -0
- package/lib/common/parsed-chat-request.d.ts +66 -0
- package/lib/common/parsed-chat-request.d.ts.map +1 -0
- package/lib/common/parsed-chat-request.js +83 -0
- package/lib/common/parsed-chat-request.js.map +1 -0
- package/lib/common/universal-chat-agent.d.ts +15 -0
- package/lib/common/universal-chat-agent.d.ts.map +1 -0
- package/lib/common/universal-chat-agent.js +102 -0
- package/lib/common/universal-chat-agent.js.map +1 -0
- package/package.json +54 -0
- package/src/browser/ai-chat-frontend-module.ts +66 -0
- package/src/browser/ai-chat-preferences.ts +32 -0
- package/src/browser/frontend-chat-service.ts +66 -0
- package/src/common/chat-agent-service.ts +85 -0
- package/src/common/chat-agents-variable-contribution.ts +81 -0
- package/src/common/chat-agents.ts +384 -0
- package/src/common/chat-model.ts +776 -0
- package/src/common/chat-request-parser.spec.ts +120 -0
- package/src/common/chat-request-parser.ts +220 -0
- package/src/common/chat-service.ts +236 -0
- package/src/common/command-chat-agents.ts +352 -0
- package/src/common/index.ts +24 -0
- package/src/common/orchestrator-chat-agent.ts +151 -0
- package/src/common/parsed-chat-request.ts +112 -0
- package/src/common/universal-chat-agent.ts +109 -0
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2024 EclipseSource GmbH.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
/*---------------------------------------------------------------------------------------------
|
|
18
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
19
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
20
|
+
*--------------------------------------------------------------------------------------------*/
|
|
21
|
+
// Partially copied from https://github.com/microsoft/vscode/blob/a2cab7255c0df424027be05d58e1b7b941f4ea60/src/vs/workbench/contrib/chat/common/chatAgents.ts
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.AbstractStreamParsingChatAgent = exports.AbstractTextToModelParsingChatAgent = exports.AbstractChatAgent = exports.ChatAgent = exports.ChatAgentLocation = exports.SystemMessageDescription = void 0;
|
|
24
|
+
const tslib_1 = require("tslib");
|
|
25
|
+
const ai_core_1 = require("@theia/ai-core");
|
|
26
|
+
const common_1 = require("@theia/ai-core/lib/common");
|
|
27
|
+
const core_1 = require("@theia/core");
|
|
28
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
+
const chat_model_1 = require("./chat-model");
|
|
30
|
+
var SystemMessageDescription;
|
|
31
|
+
(function (SystemMessageDescription) {
|
|
32
|
+
function fromResolvedPromptTemplate(resolvedPrompt) {
|
|
33
|
+
return {
|
|
34
|
+
text: resolvedPrompt.text,
|
|
35
|
+
functionDescriptions: resolvedPrompt.functionDescriptions
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
SystemMessageDescription.fromResolvedPromptTemplate = fromResolvedPromptTemplate;
|
|
39
|
+
})(SystemMessageDescription || (exports.SystemMessageDescription = SystemMessageDescription = {}));
|
|
40
|
+
/**
|
|
41
|
+
* The location from where an chat agent may be invoked.
|
|
42
|
+
* Based on the location, a different context may be available.
|
|
43
|
+
*/
|
|
44
|
+
var ChatAgentLocation;
|
|
45
|
+
(function (ChatAgentLocation) {
|
|
46
|
+
ChatAgentLocation["Panel"] = "panel";
|
|
47
|
+
ChatAgentLocation["Terminal"] = "terminal";
|
|
48
|
+
ChatAgentLocation["Notebook"] = "notebook";
|
|
49
|
+
ChatAgentLocation["Editor"] = "editor";
|
|
50
|
+
})(ChatAgentLocation || (exports.ChatAgentLocation = ChatAgentLocation = {}));
|
|
51
|
+
(function (ChatAgentLocation) {
|
|
52
|
+
ChatAgentLocation.ALL = [ChatAgentLocation.Panel, ChatAgentLocation.Terminal, ChatAgentLocation.Notebook, ChatAgentLocation.Editor];
|
|
53
|
+
function fromRaw(value) {
|
|
54
|
+
switch (value) {
|
|
55
|
+
case 'panel': return ChatAgentLocation.Panel;
|
|
56
|
+
case 'terminal': return ChatAgentLocation.Terminal;
|
|
57
|
+
case 'notebook': return ChatAgentLocation.Notebook;
|
|
58
|
+
case 'editor': return ChatAgentLocation.Editor;
|
|
59
|
+
}
|
|
60
|
+
return ChatAgentLocation.Panel;
|
|
61
|
+
}
|
|
62
|
+
ChatAgentLocation.fromRaw = fromRaw;
|
|
63
|
+
})(ChatAgentLocation || (exports.ChatAgentLocation = ChatAgentLocation = {}));
|
|
64
|
+
exports.ChatAgent = Symbol('ChatAgent');
|
|
65
|
+
let AbstractChatAgent = class AbstractChatAgent {
|
|
66
|
+
constructor(id, languageModelRequirements, defaultLanguageModelPurpose, iconClass = 'codicon codicon-copilot', locations = ChatAgentLocation.ALL, tags = ['Chat']) {
|
|
67
|
+
this.id = id;
|
|
68
|
+
this.languageModelRequirements = languageModelRequirements;
|
|
69
|
+
this.defaultLanguageModelPurpose = defaultLanguageModelPurpose;
|
|
70
|
+
this.iconClass = iconClass;
|
|
71
|
+
this.locations = locations;
|
|
72
|
+
this.tags = tags;
|
|
73
|
+
}
|
|
74
|
+
async invoke(request) {
|
|
75
|
+
var _a, _b;
|
|
76
|
+
try {
|
|
77
|
+
const languageModel = await this.getLanguageModel(this.defaultLanguageModelPurpose);
|
|
78
|
+
if (!languageModel) {
|
|
79
|
+
throw new Error('Couldn\'t find a matching language model. Please check your setup!');
|
|
80
|
+
}
|
|
81
|
+
const messages = await this.getMessages(request.session);
|
|
82
|
+
this.recordingService.recordRequest({
|
|
83
|
+
agentId: this.id,
|
|
84
|
+
sessionId: request.session.id,
|
|
85
|
+
timestamp: Date.now(),
|
|
86
|
+
requestId: request.id,
|
|
87
|
+
request: request.request.text,
|
|
88
|
+
messages
|
|
89
|
+
});
|
|
90
|
+
const systemMessageDescription = await this.getSystemMessageDescription();
|
|
91
|
+
const tools = new Map();
|
|
92
|
+
if (systemMessageDescription) {
|
|
93
|
+
const systemMsg = {
|
|
94
|
+
actor: 'system',
|
|
95
|
+
type: 'text',
|
|
96
|
+
query: systemMessageDescription.text
|
|
97
|
+
};
|
|
98
|
+
// insert system message at the beginning of the request messages
|
|
99
|
+
messages.unshift(systemMsg);
|
|
100
|
+
(_a = systemMessageDescription.functionDescriptions) === null || _a === void 0 ? void 0 : _a.forEach((tool, id) => {
|
|
101
|
+
tools.set(id, tool);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
(_b = this.getTools(request)) === null || _b === void 0 ? void 0 : _b.forEach(tool => tools.set(tool.id, tool));
|
|
105
|
+
const cancellationToken = new core_1.CancellationTokenSource();
|
|
106
|
+
request.response.onDidChange(() => {
|
|
107
|
+
if (request.response.isCanceled) {
|
|
108
|
+
cancellationToken.cancel();
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
const languageModelResponse = await this.callLlm(languageModel, messages, tools.size > 0 ? Array.from(tools.values()) : undefined, cancellationToken.token);
|
|
112
|
+
await this.addContentsToResponse(languageModelResponse, request);
|
|
113
|
+
request.response.complete();
|
|
114
|
+
this.recordingService.recordResponse({
|
|
115
|
+
agentId: this.id,
|
|
116
|
+
sessionId: request.session.id,
|
|
117
|
+
timestamp: Date.now(),
|
|
118
|
+
requestId: request.response.requestId,
|
|
119
|
+
response: request.response.response.asString()
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
catch (e) {
|
|
123
|
+
this.handleError(request, e);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
handleError(request, error) {
|
|
127
|
+
request.response.response.addContent(new chat_model_1.ErrorChatResponseContentImpl(error));
|
|
128
|
+
request.response.error(error);
|
|
129
|
+
}
|
|
130
|
+
getLanguageModelSelector(languageModelPurpose) {
|
|
131
|
+
return this.languageModelRequirements.find(req => req.purpose === languageModelPurpose);
|
|
132
|
+
}
|
|
133
|
+
async getLanguageModel(languageModelPurpose) {
|
|
134
|
+
return this.selectLanguageModel(this.getLanguageModelSelector(languageModelPurpose));
|
|
135
|
+
}
|
|
136
|
+
async selectLanguageModel(selector) {
|
|
137
|
+
const languageModel = await this.languageModelRegistry.selectLanguageModel({ agent: this.id, ...selector });
|
|
138
|
+
if (!languageModel) {
|
|
139
|
+
throw new Error('Couldn\'t find a language model. Please check your setup!');
|
|
140
|
+
}
|
|
141
|
+
return languageModel;
|
|
142
|
+
}
|
|
143
|
+
async getMessages(model, includeResponseInProgress = false) {
|
|
144
|
+
const requestMessages = model.getRequests().flatMap(request => {
|
|
145
|
+
const messages = [];
|
|
146
|
+
const text = request.message.parts.map(part => part.promptText).join('');
|
|
147
|
+
messages.push({
|
|
148
|
+
actor: 'user',
|
|
149
|
+
type: 'text',
|
|
150
|
+
query: text,
|
|
151
|
+
});
|
|
152
|
+
if (request.response.isComplete || includeResponseInProgress) {
|
|
153
|
+
messages.push({
|
|
154
|
+
actor: 'ai',
|
|
155
|
+
type: 'text',
|
|
156
|
+
query: request.response.response.asString(),
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
return messages;
|
|
160
|
+
});
|
|
161
|
+
return requestMessages;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* @returns the list of tools used by this agent, or undefined if none is needed.
|
|
165
|
+
*/
|
|
166
|
+
getTools(request) {
|
|
167
|
+
return request.message.toolRequests.size > 0
|
|
168
|
+
? [...request.message.toolRequests.values()]
|
|
169
|
+
: undefined;
|
|
170
|
+
}
|
|
171
|
+
async callLlm(languageModel, messages, tools, token) {
|
|
172
|
+
const languageModelResponse = languageModel.request({
|
|
173
|
+
messages,
|
|
174
|
+
tools,
|
|
175
|
+
}, token);
|
|
176
|
+
return languageModelResponse;
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
exports.AbstractChatAgent = AbstractChatAgent;
|
|
180
|
+
tslib_1.__decorate([
|
|
181
|
+
(0, inversify_1.inject)(common_1.LanguageModelRegistry),
|
|
182
|
+
tslib_1.__metadata("design:type", Object)
|
|
183
|
+
], AbstractChatAgent.prototype, "languageModelRegistry", void 0);
|
|
184
|
+
tslib_1.__decorate([
|
|
185
|
+
(0, inversify_1.inject)(core_1.ILogger),
|
|
186
|
+
tslib_1.__metadata("design:type", Object)
|
|
187
|
+
], AbstractChatAgent.prototype, "logger", void 0);
|
|
188
|
+
tslib_1.__decorate([
|
|
189
|
+
(0, inversify_1.inject)(ai_core_1.CommunicationRecordingService),
|
|
190
|
+
tslib_1.__metadata("design:type", Object)
|
|
191
|
+
], AbstractChatAgent.prototype, "recordingService", void 0);
|
|
192
|
+
tslib_1.__decorate([
|
|
193
|
+
(0, inversify_1.inject)(ai_core_1.PromptService),
|
|
194
|
+
tslib_1.__metadata("design:type", Object)
|
|
195
|
+
], AbstractChatAgent.prototype, "promptService", void 0);
|
|
196
|
+
exports.AbstractChatAgent = AbstractChatAgent = tslib_1.__decorate([
|
|
197
|
+
(0, inversify_1.injectable)(),
|
|
198
|
+
tslib_1.__metadata("design:paramtypes", [String, Array, String, String, Array, Array])
|
|
199
|
+
], AbstractChatAgent);
|
|
200
|
+
let AbstractTextToModelParsingChatAgent = class AbstractTextToModelParsingChatAgent extends AbstractChatAgent {
|
|
201
|
+
async addContentsToResponse(languageModelResponse, request) {
|
|
202
|
+
const responseAsText = await (0, ai_core_1.getTextOfResponse)(languageModelResponse);
|
|
203
|
+
const parsedCommand = await this.parseTextResponse(responseAsText);
|
|
204
|
+
const content = this.createResponseContent(parsedCommand, request);
|
|
205
|
+
request.response.response.addContent(content);
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
exports.AbstractTextToModelParsingChatAgent = AbstractTextToModelParsingChatAgent;
|
|
209
|
+
exports.AbstractTextToModelParsingChatAgent = AbstractTextToModelParsingChatAgent = tslib_1.__decorate([
|
|
210
|
+
(0, inversify_1.injectable)()
|
|
211
|
+
], AbstractTextToModelParsingChatAgent);
|
|
212
|
+
let AbstractStreamParsingChatAgent = class AbstractStreamParsingChatAgent extends AbstractChatAgent {
|
|
213
|
+
async addContentsToResponse(languageModelResponse, request) {
|
|
214
|
+
var _a;
|
|
215
|
+
if ((0, common_1.isLanguageModelTextResponse)(languageModelResponse)) {
|
|
216
|
+
request.response.response.addContent(new chat_model_1.MarkdownChatResponseContentImpl(languageModelResponse.text));
|
|
217
|
+
request.response.complete();
|
|
218
|
+
this.recordingService.recordResponse({
|
|
219
|
+
agentId: this.id,
|
|
220
|
+
sessionId: request.session.id,
|
|
221
|
+
timestamp: Date.now(),
|
|
222
|
+
requestId: request.response.requestId,
|
|
223
|
+
response: request.response.response.asString()
|
|
224
|
+
});
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
if ((0, common_1.isLanguageModelStreamResponse)(languageModelResponse)) {
|
|
228
|
+
for await (const token of languageModelResponse.stream) {
|
|
229
|
+
const newContents = this.parse(token, request.response.response.content);
|
|
230
|
+
if ((0, core_1.isArray)(newContents)) {
|
|
231
|
+
newContents.forEach(newContent => request.response.response.addContent(newContent));
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
request.response.response.addContent(newContents);
|
|
235
|
+
}
|
|
236
|
+
const lastContent = request.response.response.content.pop();
|
|
237
|
+
if (lastContent === undefined) {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
const text = (_a = lastContent.asString) === null || _a === void 0 ? void 0 : _a.call(lastContent);
|
|
241
|
+
if (text === undefined) {
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
let curSearchIndex = 0;
|
|
245
|
+
const result = [];
|
|
246
|
+
while (curSearchIndex < text.length) {
|
|
247
|
+
// find start of code block: ```[language]\n<code>[\n]```
|
|
248
|
+
const codeStartIndex = text.indexOf('```', curSearchIndex);
|
|
249
|
+
if (codeStartIndex === -1) {
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
// find language specifier if present
|
|
253
|
+
const newLineIndex = text.indexOf('\n', codeStartIndex + 3);
|
|
254
|
+
const language = codeStartIndex + 3 < newLineIndex ? text.substring(codeStartIndex + 3, newLineIndex) : undefined;
|
|
255
|
+
// find end of code block
|
|
256
|
+
const codeEndIndex = text.indexOf('```', codeStartIndex + 3);
|
|
257
|
+
if (codeEndIndex === -1) {
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
// add text before code block as markdown content
|
|
261
|
+
result.push(new chat_model_1.MarkdownChatResponseContentImpl(text.substring(curSearchIndex, codeStartIndex)));
|
|
262
|
+
// add code block as code content
|
|
263
|
+
const codeText = text.substring(newLineIndex + 1, codeEndIndex).trimEnd();
|
|
264
|
+
result.push(new chat_model_1.CodeChatResponseContentImpl(codeText, language));
|
|
265
|
+
curSearchIndex = codeEndIndex + 3;
|
|
266
|
+
}
|
|
267
|
+
if (result.length > 0) {
|
|
268
|
+
result.forEach(r => {
|
|
269
|
+
request.response.response.addContent(r);
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
request.response.response.addContent(lastContent);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
request.response.complete();
|
|
277
|
+
this.recordingService.recordResponse({
|
|
278
|
+
agentId: this.id,
|
|
279
|
+
sessionId: request.session.id,
|
|
280
|
+
timestamp: Date.now(),
|
|
281
|
+
requestId: request.response.requestId,
|
|
282
|
+
response: request.response.response.asString()
|
|
283
|
+
});
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
this.logger.error('Received unknown response in agent. Return response as text');
|
|
287
|
+
request.response.response.addContent(new chat_model_1.MarkdownChatResponseContentImpl(JSON.stringify(languageModelResponse)));
|
|
288
|
+
}
|
|
289
|
+
parse(token, previousContent) {
|
|
290
|
+
const content = token.content;
|
|
291
|
+
// eslint-disable-next-line no-null/no-null
|
|
292
|
+
if (content !== undefined && content !== null) {
|
|
293
|
+
return new chat_model_1.MarkdownChatResponseContentImpl(content);
|
|
294
|
+
}
|
|
295
|
+
const toolCalls = token.tool_calls;
|
|
296
|
+
if (toolCalls !== undefined) {
|
|
297
|
+
const toolCallContents = toolCalls.map(toolCall => { var _a, _b; return new chat_model_1.ToolCallChatResponseContentImpl(toolCall.id, (_a = toolCall.function) === null || _a === void 0 ? void 0 : _a.name, (_b = toolCall.function) === null || _b === void 0 ? void 0 : _b.arguments, toolCall.finished, toolCall.result); });
|
|
298
|
+
return toolCallContents;
|
|
299
|
+
}
|
|
300
|
+
return new chat_model_1.MarkdownChatResponseContentImpl('');
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
exports.AbstractStreamParsingChatAgent = AbstractStreamParsingChatAgent;
|
|
304
|
+
exports.AbstractStreamParsingChatAgent = AbstractStreamParsingChatAgent = tslib_1.__decorate([
|
|
305
|
+
(0, inversify_1.injectable)()
|
|
306
|
+
], AbstractStreamParsingChatAgent);
|
|
307
|
+
//# sourceMappingURL=chat-agents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-agents.js","sourceRoot":"","sources":["../../src/common/chat-agents.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,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;AAChF;;;gGAGgG;AAChG,6JAA6J;;;;AAE7J,4CASwB;AACxB,sDAOmC;AACnC,sCAA2F;AAC3F,4DAAkE;AAElE,6CASsB;AAsBtB,IAAiB,wBAAwB,CAOxC;AAPD,WAAiB,wBAAwB;IACrC,SAAgB,0BAA0B,CAAC,cAAsC;QAC7E,OAAO;YACH,IAAI,EAAE,cAAc,CAAC,IAAI;YACzB,oBAAoB,EAAE,cAAc,CAAC,oBAAoB;SAC5D,CAAC;IACN,CAAC;IALe,mDAA0B,6BAKzC,CAAA;AACL,CAAC,EAPgB,wBAAwB,wCAAxB,wBAAwB,QAOxC;AAED;;;GAGG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IACzB,oCAAe,CAAA;IACf,0CAAqB,CAAA;IACrB,0CAAqB,CAAA;IACrB,sCAAiB,CAAA;AACrB,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B;AAED,WAAiB,iBAAiB;IACjB,qBAAG,GAAwB,CAAC,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,CAAC,QAAQ,EAAE,iBAAiB,CAAC,QAAQ,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAEpJ,SAAgB,OAAO,CAAC,KAAa;QACjC,QAAQ,KAAK,EAAE,CAAC;YACZ,KAAK,OAAO,CAAC,CAAC,OAAO,iBAAiB,CAAC,KAAK,CAAC;YAC7C,KAAK,UA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A+B,CAAC,OAAO,CAAC,CAAC;QACxD,CAAC;QACD,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC;QACnC,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC1B,MAAM,gBAAgB,GAAG,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,eAC9C,OAAA,IAAI,4CAA+B,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAA,QAAQ,CAAC,QAAQ,0CAAE,IAAI,EAAE,MAAA,QAAQ,CAAC,QAAQ,0CAAE,SAAS,EAAE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA,EAAA,CAAC,CAAC;YACjJ,OAAO,gBAAgB,CAAC;QAC5B,CAAC;QACD,OAAO,IAAI,4CAA+B,CAAC,EAAE,CAAC,CAAC;IACnD,CAAC;CAEJ,CAAA;AAxGqB,wEAA8B;yCAA9B,8BAA8B;IADnD,IAAA,sBAAU,GAAE;GACS,8BAA8B,CAwGnD"}
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { Command, Emitter, Event, URI } from '@theia/core';
|
|
2
|
+
import { MarkdownString, MarkdownStringImpl } from '@theia/core/lib/common/markdown-rendering';
|
|
3
|
+
import { Position } from '@theia/core/shared/vscode-languageserver-protocol';
|
|
4
|
+
import { ChatAgentLocation } from './chat-agents';
|
|
5
|
+
import { ParsedChatRequest } from './parsed-chat-request';
|
|
6
|
+
/**********************
|
|
7
|
+
* INTERFACES AND TYPE GUARDS
|
|
8
|
+
**********************/
|
|
9
|
+
export type ChatChangeEvent = ChatAddRequestEvent | ChatAddResponseEvent | ChatRemoveRequestEvent;
|
|
10
|
+
export interface ChatAddRequestEvent {
|
|
11
|
+
kind: 'addRequest';
|
|
12
|
+
request: ChatRequestModel;
|
|
13
|
+
}
|
|
14
|
+
export interface ChatAddResponseEvent {
|
|
15
|
+
kind: 'addResponse';
|
|
16
|
+
response: ChatResponseModel;
|
|
17
|
+
}
|
|
18
|
+
export type ChatRequestRemovalReason = 'removal' | 'resend' | 'adoption';
|
|
19
|
+
export interface ChatRemoveRequestEvent {
|
|
20
|
+
kind: 'removeRequest';
|
|
21
|
+
requestId: string;
|
|
22
|
+
responseId?: string;
|
|
23
|
+
reason: ChatRequestRemovalReason;
|
|
24
|
+
}
|
|
25
|
+
export interface ChatModel {
|
|
26
|
+
readonly onDidChange: Event<ChatChangeEvent>;
|
|
27
|
+
readonly id: string;
|
|
28
|
+
readonly location: ChatAgentLocation;
|
|
29
|
+
getRequests(): ChatRequestModel[];
|
|
30
|
+
isEmpty(): boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface ChatRequest {
|
|
33
|
+
readonly text: string;
|
|
34
|
+
readonly displayText?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ChatRequestModel {
|
|
37
|
+
readonly id: string;
|
|
38
|
+
readonly session: ChatModel;
|
|
39
|
+
readonly request: ChatRequest;
|
|
40
|
+
readonly response: ChatResponseModel;
|
|
41
|
+
readonly message: ParsedChatRequest;
|
|
42
|
+
readonly agentId?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface ChatProgressMessage {
|
|
45
|
+
kind: 'progressMessage';
|
|
46
|
+
id: string;
|
|
47
|
+
status: 'inProgress' | 'completed' | 'failed';
|
|
48
|
+
content: string;
|
|
49
|
+
}
|
|
50
|
+
export interface ChatResponseContent {
|
|
51
|
+
kind: string;
|
|
52
|
+
/**
|
|
53
|
+
* Represents the content as a string. Returns `undefined` if the content
|
|
54
|
+
* is purely informational and/or visual and should not be included in the overall
|
|
55
|
+
* representation of the response.
|
|
56
|
+
*/
|
|
57
|
+
asString?(): string | undefined;
|
|
58
|
+
merge?(nextChatResponseContent: ChatResponseContent): boolean;
|
|
59
|
+
}
|
|
60
|
+
export declare namespace ChatResponseContent {
|
|
61
|
+
function is(obj: unknown): obj is ChatResponseContent;
|
|
62
|
+
function hasAsString(obj: ChatResponseContent): obj is Required<Pick<ChatResponseContent, 'asString'>> & ChatResponseContent;
|
|
63
|
+
function hasMerge(obj: ChatResponseContent): obj is Required<Pick<ChatResponseContent, 'merge'>> & ChatResponseContent;
|
|
64
|
+
}
|
|
65
|
+
export interface TextChatResponseContent extends Required<ChatResponseContent> {
|
|
66
|
+
kind: 'text';
|
|
67
|
+
content: string;
|
|
68
|
+
}
|
|
69
|
+
export interface ErrorChatResponseContent extends ChatResponseContent {
|
|
70
|
+
kind: 'error';
|
|
71
|
+
error: Error;
|
|
72
|
+
}
|
|
73
|
+
export interface MarkdownChatResponseContent extends Required<ChatResponseContent> {
|
|
74
|
+
kind: 'markdownContent';
|
|
75
|
+
content: MarkdownString;
|
|
76
|
+
}
|
|
77
|
+
export interface CodeChatResponseContent extends ChatResponseContent {
|
|
78
|
+
kind: 'code';
|
|
79
|
+
code: string;
|
|
80
|
+
language?: string;
|
|
81
|
+
location?: Location;
|
|
82
|
+
}
|
|
83
|
+
export interface HorizontalLayoutChatResponseContent extends Required<ChatResponseContent> {
|
|
84
|
+
kind: 'horizontal';
|
|
85
|
+
content: ChatResponseContent[];
|
|
86
|
+
}
|
|
87
|
+
export interface ToolCallChatResponseContent extends Required<ChatResponseContent> {
|
|
88
|
+
kind: 'toolCall';
|
|
89
|
+
id?: string;
|
|
90
|
+
name?: string;
|
|
91
|
+
arguments?: string;
|
|
92
|
+
finished: boolean;
|
|
93
|
+
result?: string;
|
|
94
|
+
}
|
|
95
|
+
export interface Location {
|
|
96
|
+
uri: URI;
|
|
97
|
+
position: Position;
|
|
98
|
+
}
|
|
99
|
+
export declare namespace Location {
|
|
100
|
+
function is(obj: unknown): obj is Location;
|
|
101
|
+
}
|
|
102
|
+
export interface CustomCallback {
|
|
103
|
+
label: string;
|
|
104
|
+
callback: () => Promise<void>;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* A command chat response content represents a command that is offered to the user for execution.
|
|
108
|
+
* It either refers to an already registered Theia command or provides a custom callback.
|
|
109
|
+
* If both are given, the custom callback will be preferred.
|
|
110
|
+
*/
|
|
111
|
+
export interface CommandChatResponseContent extends ChatResponseContent {
|
|
112
|
+
kind: 'command';
|
|
113
|
+
command?: Command;
|
|
114
|
+
customCallback?: CustomCallback;
|
|
115
|
+
arguments?: unknown[];
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* An informational chat response content represents a message that is purely informational and should not be included in the overall representation of the response.
|
|
119
|
+
*/
|
|
120
|
+
export interface InformationalChatResponseContent extends ChatResponseContent {
|
|
121
|
+
kind: 'informational';
|
|
122
|
+
content: MarkdownString;
|
|
123
|
+
}
|
|
124
|
+
export declare namespace TextChatResponseContent {
|
|
125
|
+
function is(obj: unknown): obj is TextChatResponseContent;
|
|
126
|
+
}
|
|
127
|
+
export declare namespace MarkdownChatResponseContent {
|
|
128
|
+
function is(obj: unknown): obj is MarkdownChatResponseContent;
|
|
129
|
+
}
|
|
130
|
+
export declare namespace InformationalChatResponseContent {
|
|
131
|
+
function is(obj: unknown): obj is InformationalChatResponseContent;
|
|
132
|
+
}
|
|
133
|
+
export declare namespace CommandChatResponseContent {
|
|
134
|
+
function is(obj: unknown): obj is CommandChatResponseContent;
|
|
135
|
+
}
|
|
136
|
+
export declare namespace CodeChatResponseContent {
|
|
137
|
+
function is(obj: unknown): obj is CodeChatResponseContent;
|
|
138
|
+
}
|
|
139
|
+
export declare namespace HorizontalLayoutChatResponseContent {
|
|
140
|
+
function is(obj: unknown): obj is HorizontalLayoutChatResponseContent;
|
|
141
|
+
}
|
|
142
|
+
export declare namespace ToolCallChatResponseContent {
|
|
143
|
+
function is(obj: unknown): obj is ToolCallChatResponseContent;
|
|
144
|
+
}
|
|
145
|
+
export declare namespace ErrorChatResponseContent {
|
|
146
|
+
function is(obj: unknown): obj is ErrorChatResponseContent;
|
|
147
|
+
}
|
|
148
|
+
export interface ChatResponse {
|
|
149
|
+
readonly content: ChatResponseContent[];
|
|
150
|
+
asString(): string;
|
|
151
|
+
}
|
|
152
|
+
export interface ChatResponseModel {
|
|
153
|
+
readonly onDidChange: Event<void>;
|
|
154
|
+
readonly id: string;
|
|
155
|
+
readonly requestId: string;
|
|
156
|
+
readonly progressMessages: ChatProgressMessage[];
|
|
157
|
+
readonly response: ChatResponse;
|
|
158
|
+
readonly isComplete: boolean;
|
|
159
|
+
readonly isCanceled: boolean;
|
|
160
|
+
readonly isError: boolean;
|
|
161
|
+
readonly agentId?: string;
|
|
162
|
+
readonly errorObject?: Error;
|
|
163
|
+
}
|
|
164
|
+
/**********************
|
|
165
|
+
* Implementations
|
|
166
|
+
**********************/
|
|
167
|
+
export declare class ChatModelImpl implements ChatModel {
|
|
168
|
+
readonly location: ChatAgentLocation;
|
|
169
|
+
protected readonly _onDidChangeEmitter: Emitter<ChatChangeEvent>;
|
|
170
|
+
onDidChange: Event<ChatChangeEvent>;
|
|
171
|
+
protected _requests: ChatRequestModelImpl[];
|
|
172
|
+
protected _id: string;
|
|
173
|
+
constructor(location?: ChatAgentLocation);
|
|
174
|
+
getRequests(): ChatRequestModelImpl[];
|
|
175
|
+
get id(): string;
|
|
176
|
+
addRequest(parsedChatRequest: ParsedChatRequest, agentId?: string): ChatRequestModelImpl;
|
|
177
|
+
isEmpty(): boolean;
|
|
178
|
+
}
|
|
179
|
+
export declare class ChatRequestModelImpl implements ChatRequestModel {
|
|
180
|
+
readonly message: ParsedChatRequest;
|
|
181
|
+
protected readonly _id: string;
|
|
182
|
+
protected _session: ChatModel;
|
|
183
|
+
protected _request: ChatRequest;
|
|
184
|
+
protected _response: ChatResponseModelImpl;
|
|
185
|
+
protected _agentId?: string;
|
|
186
|
+
constructor(session: ChatModel, message: ParsedChatRequest, agentId?: string);
|
|
187
|
+
get id(): string;
|
|
188
|
+
get session(): ChatModel;
|
|
189
|
+
get request(): ChatRequest;
|
|
190
|
+
get response(): ChatResponseModelImpl;
|
|
191
|
+
get agentId(): string | undefined;
|
|
192
|
+
}
|
|
193
|
+
export declare class ErrorChatResponseContentImpl implements ErrorChatResponseContent {
|
|
194
|
+
readonly kind = "error";
|
|
195
|
+
protected _error: Error;
|
|
196
|
+
constructor(error: Error);
|
|
197
|
+
get error(): Error;
|
|
198
|
+
asString(): string | undefined;
|
|
199
|
+
}
|
|
200
|
+
export declare class TextChatResponseContentImpl implements TextChatResponseContent {
|
|
201
|
+
readonly kind = "text";
|
|
202
|
+
protected _content: string;
|
|
203
|
+
constructor(content: string);
|
|
204
|
+
get content(): string;
|
|
205
|
+
asString(): string;
|
|
206
|
+
merge(nextChatResponseContent: TextChatResponseContent): boolean;
|
|
207
|
+
}
|
|
208
|
+
export declare class MarkdownChatResponseContentImpl implements MarkdownChatResponseContent {
|
|
209
|
+
readonly kind = "markdownContent";
|
|
210
|
+
protected _content: MarkdownStringImpl;
|
|
211
|
+
constructor(content: string);
|
|
212
|
+
get content(): MarkdownString;
|
|
213
|
+
asString(): string;
|
|
214
|
+
merge(nextChatResponseContent: MarkdownChatResponseContent): boolean;
|
|
215
|
+
}
|
|
216
|
+
export declare class InformationalChatResponseContentImpl implements InformationalChatResponseContent {
|
|
217
|
+
readonly kind = "informational";
|
|
218
|
+
protected _content: MarkdownStringImpl;
|
|
219
|
+
constructor(content: string);
|
|
220
|
+
get content(): MarkdownString;
|
|
221
|
+
asString(): string | undefined;
|
|
222
|
+
merge(nextChatResponseContent: InformationalChatResponseContent): boolean;
|
|
223
|
+
}
|
|
224
|
+
export declare class CodeChatResponseContentImpl implements CodeChatResponseContent {
|
|
225
|
+
readonly kind = "code";
|
|
226
|
+
protected _code: string;
|
|
227
|
+
protected _language?: string;
|
|
228
|
+
protected _location?: Location;
|
|
229
|
+
constructor(code: string, language?: string, location?: Location);
|
|
230
|
+
get code(): string;
|
|
231
|
+
get language(): string | undefined;
|
|
232
|
+
get location(): Location | undefined;
|
|
233
|
+
asString(): string;
|
|
234
|
+
merge(nextChatResponseContent: CodeChatResponseContent): boolean;
|
|
235
|
+
}
|
|
236
|
+
export declare class ToolCallChatResponseContentImpl implements ToolCallChatResponseContent {
|
|
237
|
+
readonly kind = "toolCall";
|
|
238
|
+
protected _id?: string;
|
|
239
|
+
protected _name?: string;
|
|
240
|
+
protected _arguments?: string;
|
|
241
|
+
protected _finished?: boolean;
|
|
242
|
+
protected _result?: string;
|
|
243
|
+
constructor(id?: string, name?: string, arg_string?: string, finished?: boolean, result?: string);
|
|
244
|
+
get id(): string | undefined;
|
|
245
|
+
get name(): string | undefined;
|
|
246
|
+
get arguments(): string | undefined;
|
|
247
|
+
get finished(): boolean;
|
|
248
|
+
get result(): string | undefined;
|
|
249
|
+
asString(): string;
|
|
250
|
+
merge(nextChatResponseContent: ToolCallChatResponseContent): boolean;
|
|
251
|
+
}
|
|
252
|
+
export declare const COMMAND_CHAT_RESPONSE_COMMAND: Command;
|
|
253
|
+
export declare class CommandChatResponseContentImpl implements CommandChatResponseContent {
|
|
254
|
+
command?: Command | undefined;
|
|
255
|
+
customCallback?: CustomCallback | undefined;
|
|
256
|
+
protected args?: unknown[] | undefined;
|
|
257
|
+
readonly kind = "command";
|
|
258
|
+
constructor(command?: Command | undefined, customCallback?: CustomCallback | undefined, args?: unknown[] | undefined);
|
|
259
|
+
get arguments(): unknown[];
|
|
260
|
+
asString(): string;
|
|
261
|
+
}
|
|
262
|
+
export declare class HorizontalLayoutChatResponseContentImpl implements HorizontalLayoutChatResponseContent {
|
|
263
|
+
readonly kind = "horizontal";
|
|
264
|
+
protected _content: ChatResponseContent[];
|
|
265
|
+
constructor(content?: ChatResponseContent[]);
|
|
266
|
+
get content(): ChatResponseContent[];
|
|
267
|
+
asString(): string;
|
|
268
|
+
merge(nextChatResponseContent: ChatResponseContent): boolean;
|
|
269
|
+
}
|
|
270
|
+
declare class ChatResponseImpl implements ChatResponse {
|
|
271
|
+
protected readonly _onDidChangeEmitter: Emitter<void>;
|
|
272
|
+
onDidChange: Event<void>;
|
|
273
|
+
protected _content: ChatResponseContent[];
|
|
274
|
+
protected _responseRepresentation: string;
|
|
275
|
+
constructor();
|
|
276
|
+
get content(): ChatResponseContent[];
|
|
277
|
+
addContent(nextContent: ChatResponseContent): void;
|
|
278
|
+
protected _updateResponseRepresentation(): void;
|
|
279
|
+
asString(): string;
|
|
280
|
+
}
|
|
281
|
+
declare class ChatResponseModelImpl implements ChatResponseModel {
|
|
282
|
+
protected readonly _onDidChangeEmitter: Emitter<void>;
|
|
283
|
+
onDidChange: Event<void>;
|
|
284
|
+
protected _id: string;
|
|
285
|
+
protected _requestId: string;
|
|
286
|
+
protected _progressMessages: ChatProgressMessage[];
|
|
287
|
+
protected _response: ChatResponseImpl;
|
|
288
|
+
protected _isComplete: boolean;
|
|
289
|
+
protected _isCanceled: boolean;
|
|
290
|
+
protected _agentId?: string;
|
|
291
|
+
protected _isError: boolean;
|
|
292
|
+
protected _errorObject: Error | undefined;
|
|
293
|
+
constructor(requestId: string, agentId?: string);
|
|
294
|
+
get id(): string;
|
|
295
|
+
get requestId(): string;
|
|
296
|
+
get progressMessages(): ChatProgressMessage[];
|
|
297
|
+
addProgressMessage(message: {
|
|
298
|
+
content: string;
|
|
299
|
+
} & Partial<Omit<ChatProgressMessage, 'kind'>>): ChatProgressMessage;
|
|
300
|
+
getProgressMessage(id: string): ChatProgressMessage | undefined;
|
|
301
|
+
updateProgressMessage(message: {
|
|
302
|
+
id: string;
|
|
303
|
+
} & Partial<Omit<ChatProgressMessage, 'kind'>>): void;
|
|
304
|
+
get response(): ChatResponseImpl;
|
|
305
|
+
get isComplete(): boolean;
|
|
306
|
+
get isCanceled(): boolean;
|
|
307
|
+
get agentId(): string | undefined;
|
|
308
|
+
overrideAgentId(agentId: string): void;
|
|
309
|
+
complete(): void;
|
|
310
|
+
cancel(): void;
|
|
311
|
+
error(error: Error): void;
|
|
312
|
+
get errorObject(): Error | undefined;
|
|
313
|
+
get isError(): boolean;
|
|
314
|
+
}
|
|
315
|
+
export declare class ErrorChatResponseModelImpl extends ChatResponseModelImpl {
|
|
316
|
+
constructor(requestId: string, error: Error, agentId?: string);
|
|
317
|
+
}
|
|
318
|
+
export {};
|
|
319
|
+
//# sourceMappingURL=ch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