@theia/ai-chat 1.67.0-next.3 → 1.67.0-next.56
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 +1 -0
- package/package.json +9 -9
- package/{lib/common/context-variables.js → src/browser/context-file-validation-service.ts} +19 -7
- package/lib/browser/agent-delegation-tool.d.ts +0 -25
- package/lib/browser/agent-delegation-tool.d.ts.map +0 -1
- package/lib/browser/agent-delegation-tool.js +0 -196
- package/lib/browser/agent-delegation-tool.js.map +0 -1
- package/lib/browser/ai-chat-frontend-contribution.d.ts +0 -11
- package/lib/browser/ai-chat-frontend-contribution.d.ts.map +0 -1
- package/lib/browser/ai-chat-frontend-contribution.js +0 -56
- package/lib/browser/ai-chat-frontend-contribution.js.map +0 -1
- package/lib/browser/ai-chat-frontend-module.d.ts +0 -4
- package/lib/browser/ai-chat-frontend-module.d.ts.map +0 -1
- package/lib/browser/ai-chat-frontend-module.js +0 -143
- package/lib/browser/ai-chat-frontend-module.js.map +0 -1
- package/lib/browser/change-set-decorator-service.d.ts +0 -24
- package/lib/browser/change-set-decorator-service.d.ts.map +0 -1
- package/lib/browser/change-set-decorator-service.js +0 -66
- package/lib/browser/change-set-decorator-service.js.map +0 -1
- package/lib/browser/change-set-file-element-deserializer.d.ts +0 -7
- package/lib/browser/change-set-file-element-deserializer.d.ts.map +0 -1
- package/lib/browser/change-set-file-element-deserializer.js +0 -61
- package/lib/browser/change-set-file-element-deserializer.js.map +0 -1
- package/lib/browser/change-set-file-element.d.ts +0 -122
- package/lib/browser/change-set-file-element.d.ts.map +0 -1
- package/lib/browser/change-set-file-element.js +0 -435
- package/lib/browser/change-set-file-element.js.map +0 -1
- package/lib/browser/change-set-file-resource.d.ts +0 -4
- package/lib/browser/change-set-file-resource.d.ts.map +0 -1
- package/lib/browser/change-set-file-resource.js +0 -24
- package/lib/browser/change-set-file-resource.js.map +0 -1
- package/lib/browser/change-set-file-service.d.ts +0 -32
- package/lib/browser/change-set-file-service.d.ts.map +0 -1
- package/lib/browser/change-set-file-service.js +0 -161
- package/lib/browser/change-set-file-service.js.map +0 -1
- package/lib/browser/change-set-variable.d.ts +0 -11
- package/lib/browser/change-set-variable.d.ts.map +0 -1
- package/lib/browser/change-set-variable.js +0 -64
- package/lib/browser/change-set-variable.js.map +0 -1
- package/lib/browser/chat-session-store-impl.d.ts +0 -36
- package/lib/browser/chat-session-store-impl.d.ts.map +0 -1
- package/lib/browser/chat-session-store-impl.js +0 -287
- package/lib/browser/chat-session-store-impl.js.map +0 -1
- package/lib/browser/chat-tool-preference-bindings.d.ts +0 -34
- package/lib/browser/chat-tool-preference-bindings.d.ts.map +0 -1
- package/lib/browser/chat-tool-preference-bindings.js +0 -122
- package/lib/browser/chat-tool-preference-bindings.js.map +0 -1
- package/lib/browser/chat-tool-request-service.d.ts +0 -21
- package/lib/browser/chat-tool-request-service.d.ts.map +0 -1
- package/lib/browser/chat-tool-request-service.js +0 -90
- package/lib/browser/chat-tool-request-service.js.map +0 -1
- package/lib/browser/context-file-variable-label-provider.d.ts +0 -14
- package/lib/browser/context-file-variable-label-provider.d.ts.map +0 -1
- package/lib/browser/context-file-variable-label-provider.js +0 -63
- package/lib/browser/context-file-variable-label-provider.js.map +0 -1
- package/lib/browser/context-variable-label-provider.d.ts +0 -9
- package/lib/browser/context-variable-label-provider.d.ts.map +0 -1
- package/lib/browser/context-variable-label-provider.js +0 -55
- package/lib/browser/context-variable-label-provider.js.map +0 -1
- package/lib/browser/custom-agent-factory.d.ts +0 -4
- package/lib/browser/custom-agent-factory.d.ts.map +0 -1
- package/lib/browser/custom-agent-factory.js +0 -20
- package/lib/browser/custom-agent-factory.js.map +0 -1
- package/lib/browser/custom-agent-frontend-application-contribution.d.ts +0 -13
- package/lib/browser/custom-agent-frontend-application-contribution.d.ts.map +0 -1
- package/lib/browser/custom-agent-frontend-application-contribution.js +0 -83
- package/lib/browser/custom-agent-frontend-application-contribution.js.map +0 -1
- package/lib/browser/delegation-response-content.d.ts +0 -20
- package/lib/browser/delegation-response-content.d.ts.map +0 -1
- package/lib/browser/delegation-response-content.js +0 -47
- package/lib/browser/delegation-response-content.js.map +0 -1
- package/lib/browser/file-chat-variable-contribution.d.ts +0 -32
- package/lib/browser/file-chat-variable-contribution.d.ts.map +0 -1
- package/lib/browser/file-chat-variable-contribution.js +0 -241
- package/lib/browser/file-chat-variable-contribution.js.map +0 -1
- package/lib/browser/frontend-chat-service.d.ts +0 -15
- package/lib/browser/frontend-chat-service.d.ts.map +0 -1
- package/lib/browser/frontend-chat-service.js +0 -72
- package/lib/browser/frontend-chat-service.js.map +0 -1
- package/lib/browser/image-context-variable-contribution.d.ts +0 -27
- package/lib/browser/image-context-variable-contribution.d.ts.map +0 -1
- package/lib/browser/image-context-variable-contribution.js +0 -149
- package/lib/browser/image-context-variable-contribution.js.map +0 -1
- package/lib/browser/task-context-service.d.ts +0 -46
- package/lib/browser/task-context-service.d.ts.map +0 -1
- package/lib/browser/task-context-service.js +0 -256
- package/lib/browser/task-context-service.js.map +0 -1
- package/lib/browser/task-context-storage-service.d.ts +0 -19
- package/lib/browser/task-context-storage-service.d.ts.map +0 -1
- package/lib/browser/task-context-storage-service.js +0 -80
- package/lib/browser/task-context-storage-service.js.map +0 -1
- package/lib/browser/task-context-variable-contribution.d.ts +0 -20
- package/lib/browser/task-context-variable-contribution.d.ts.map +0 -1
- package/lib/browser/task-context-variable-contribution.js +0 -101
- package/lib/browser/task-context-variable-contribution.js.map +0 -1
- package/lib/browser/task-context-variable-label-provider.d.ts +0 -21
- package/lib/browser/task-context-variable-label-provider.d.ts.map +0 -1
- package/lib/browser/task-context-variable-label-provider.js +0 -83
- package/lib/browser/task-context-variable-label-provider.js.map +0 -1
- package/lib/browser/task-context-variable.d.ts +0 -3
- package/lib/browser/task-context-variable.d.ts.map +0 -1
- package/lib/browser/task-context-variable.js +0 -33
- package/lib/browser/task-context-variable.js.map +0 -1
- package/lib/common/ai-chat-preferences.d.ts +0 -5
- package/lib/common/ai-chat-preferences.d.ts.map +0 -1
- package/lib/common/ai-chat-preferences.js +0 -40
- package/lib/common/ai-chat-preferences.js.map +0 -1
- package/lib/common/change-set-element-deserializer.d.ts +0 -30
- package/lib/common/change-set-element-deserializer.d.ts.map +0 -1
- package/lib/common/change-set-element-deserializer.js +0 -81
- package/lib/common/change-set-element-deserializer.js.map +0 -1
- package/lib/common/change-set.d.ts +0 -85
- package/lib/common/change-set.d.ts.map +0 -1
- package/lib/common/change-set.js +0 -133
- package/lib/common/change-set.js.map +0 -1
- package/lib/common/chat-agent-service.d.ts +0 -46
- package/lib/common/chat-agent-service.d.ts.map +0 -1
- package/lib/common/chat-agent-service.js +0 -79
- package/lib/common/chat-agent-service.js.map +0 -1
- package/lib/common/chat-agents-variable-contribution.d.ts +0 -17
- package/lib/common/chat-agents-variable-contribution.d.ts.map +0 -1
- package/lib/common/chat-agents-variable-contribution.js +0 -67
- package/lib/common/chat-agents-variable-contribution.js.map +0 -1
- package/lib/common/chat-agents.d.ts +0 -138
- package/lib/common/chat-agents.d.ts.map +0 -1
- package/lib/common/chat-agents.js +0 -428
- package/lib/common/chat-agents.js.map +0 -1
- package/lib/common/chat-auto-save.spec.d.ts +0 -2
- package/lib/common/chat-auto-save.spec.d.ts.map +0 -1
- package/lib/common/chat-auto-save.spec.js +0 -304
- package/lib/common/chat-auto-save.spec.js.map +0 -1
- package/lib/common/chat-content-deserializer.d.ts +0 -161
- package/lib/common/chat-content-deserializer.d.ts.map +0 -1
- package/lib/common/chat-content-deserializer.js +0 -166
- package/lib/common/chat-content-deserializer.js.map +0 -1
- package/lib/common/chat-content-deserializer.spec.d.ts +0 -2
- package/lib/common/chat-content-deserializer.spec.d.ts.map +0 -1
- package/lib/common/chat-content-deserializer.spec.js +0 -307
- package/lib/common/chat-content-deserializer.spec.js.map +0 -1
- package/lib/common/chat-model-serialization.d.ts +0 -110
- package/lib/common/chat-model-serialization.d.ts.map +0 -1
- package/lib/common/chat-model-serialization.js +0 -20
- package/lib/common/chat-model-serialization.js.map +0 -1
- package/lib/common/chat-model-serialization.spec.d.ts +0 -2
- package/lib/common/chat-model-serialization.spec.d.ts.map +0 -1
- package/lib/common/chat-model-serialization.spec.js +0 -278
- package/lib/common/chat-model-serialization.spec.js.map +0 -1
- package/lib/common/chat-model-util.d.ts +0 -7
- package/lib/common/chat-model-util.d.ts.map +0 -1
- package/lib/common/chat-model-util.js +0 -50
- package/lib/common/chat-model-util.js.map +0 -1
- package/lib/common/chat-model.d.ts +0 -923
- package/lib/common/chat-model.d.ts.map +0 -1
- package/lib/common/chat-model.js +0 -1791
- package/lib/common/chat-model.js.map +0 -1
- package/lib/common/chat-request-parser.d.ts +0 -38
- package/lib/common/chat-request-parser.d.ts.map +0 -1
- package/lib/common/chat-request-parser.js +0 -230
- package/lib/common/chat-request-parser.js.map +0 -1
- package/lib/common/chat-request-parser.spec.d.ts +0 -2
- package/lib/common/chat-request-parser.spec.d.ts.map +0 -1
- package/lib/common/chat-request-parser.spec.js +0 -235
- package/lib/common/chat-request-parser.spec.js.map +0 -1
- package/lib/common/chat-service-deletion.spec.d.ts +0 -2
- package/lib/common/chat-service-deletion.spec.d.ts.map +0 -1
- package/lib/common/chat-service-deletion.spec.js +0 -221
- package/lib/common/chat-service-deletion.spec.js.map +0 -1
- package/lib/common/chat-service.d.ts +0 -153
- package/lib/common/chat-service.d.ts.map +0 -1
- package/lib/common/chat-service.js +0 -474
- package/lib/common/chat-service.js.map +0 -1
- package/lib/common/chat-session-naming-prompt-template.d.ts +0 -3
- package/lib/common/chat-session-naming-prompt-template.d.ts.map +0 -1
- package/lib/common/chat-session-naming-prompt-template.js +0 -31
- package/lib/common/chat-session-naming-prompt-template.js.map +0 -1
- package/lib/common/chat-session-naming-service.d.ts +0 -26
- package/lib/common/chat-session-naming-service.d.ts.map +0 -1
- package/lib/common/chat-session-naming-service.js +0 -119
- package/lib/common/chat-session-naming-service.js.map +0 -1
- package/lib/common/chat-session-store.d.ts +0 -43
- package/lib/common/chat-session-store.d.ts.map +0 -1
- package/lib/common/chat-session-store.js +0 -20
- package/lib/common/chat-session-store.js.map +0 -1
- package/lib/common/chat-session-summary-agent-prompt.d.ts +0 -8
- package/lib/common/chat-session-summary-agent-prompt.d.ts.map +0 -1
- package/lib/common/chat-session-summary-agent-prompt.js +0 -33
- package/lib/common/chat-session-summary-agent-prompt.js.map +0 -1
- package/lib/common/chat-session-summary-agent.d.ts +0 -16
- package/lib/common/chat-session-summary-agent.d.ts.map +0 -1
- package/lib/common/chat-session-summary-agent.js +0 -48
- package/lib/common/chat-session-summary-agent.js.map +0 -1
- package/lib/common/chat-string-utils.d.ts +0 -3
- package/lib/common/chat-string-utils.d.ts.map +0 -1
- package/lib/common/chat-string-utils.js +0 -27
- package/lib/common/chat-string-utils.js.map +0 -1
- package/lib/common/chat-tool-preferences.d.ts +0 -23
- package/lib/common/chat-tool-preferences.d.ts.map +0 -1
- package/lib/common/chat-tool-preferences.js +0 -68
- package/lib/common/chat-tool-preferences.js.map +0 -1
- package/lib/common/chat-tool-request-service.d.ts +0 -18
- package/lib/common/chat-tool-request-service.d.ts.map +0 -1
- package/lib/common/chat-tool-request-service.js +0 -52
- package/lib/common/chat-tool-request-service.js.map +0 -1
- package/lib/common/context-details-variable.d.ts +0 -9
- package/lib/common/context-details-variable.d.ts.map +0 -1
- package/lib/common/context-details-variable.js +0 -57
- package/lib/common/context-details-variable.js.map +0 -1
- package/lib/common/context-summary-variable.d.ts +0 -9
- package/lib/common/context-summary-variable.d.ts.map +0 -1
- package/lib/common/context-summary-variable.js +0 -57
- package/lib/common/context-summary-variable.js.map +0 -1
- package/lib/common/context-variables.d.ts +0 -4
- package/lib/common/context-variables.d.ts.map +0 -1
- package/lib/common/context-variables.js.map +0 -1
- package/lib/common/custom-chat-agent.d.ts +0 -10
- package/lib/common/custom-chat-agent.d.ts.map +0 -1
- package/lib/common/custom-chat-agent.js +0 -40
- package/lib/common/custom-chat-agent.js.map +0 -1
- package/lib/common/image-context-variable.d.ts +0 -29
- package/lib/common/image-context-variable.d.ts.map +0 -1
- package/lib/common/image-context-variable.js +0 -114
- package/lib/common/image-context-variable.js.map +0 -1
- package/lib/common/index.d.ts +0 -13
- package/lib/common/index.d.ts.map +0 -1
- package/lib/common/index.js +0 -31
- package/lib/common/index.js.map +0 -1
- package/lib/common/parse-contents-with-incomplete-parts.spec.d.ts +0 -2
- package/lib/common/parse-contents-with-incomplete-parts.spec.d.ts.map +0 -1
- package/lib/common/parse-contents-with-incomplete-parts.spec.js +0 -103
- package/lib/common/parse-contents-with-incomplete-parts.spec.js.map +0 -1
- package/lib/common/parse-contents.d.ts +0 -12
- package/lib/common/parse-contents.d.ts.map +0 -1
- package/lib/common/parse-contents.js +0 -107
- package/lib/common/parse-contents.js.map +0 -1
- package/lib/common/parse-contents.spec.d.ts +0 -10
- package/lib/common/parse-contents.spec.d.ts.map +0 -1
- package/lib/common/parse-contents.spec.js +0 -146
- package/lib/common/parse-contents.spec.js.map +0 -1
- package/lib/common/parsed-chat-request.d.ts +0 -66
- package/lib/common/parsed-chat-request.d.ts.map +0 -1
- package/lib/common/parsed-chat-request.js +0 -83
- package/lib/common/parsed-chat-request.js.map +0 -1
- package/lib/common/response-content-matcher.d.ts +0 -69
- package/lib/common/response-content-matcher.d.ts.map +0 -1
- package/lib/common/response-content-matcher.js +0 -97
- package/lib/common/response-content-matcher.js.map +0 -1
- package/lib/node/ai-chat-backend-module.d.ts +0 -4
- package/lib/node/ai-chat-backend-module.d.ts.map +0 -1
- package/lib/node/ai-chat-backend-module.js +0 -26
- package/lib/node/ai-chat-backend-module.js.map +0 -1
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2025 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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.ToolConfirmationManager = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
-
const preferences_1 = require("@theia/core/lib/common/preferences");
|
|
22
|
-
const chat_tool_preferences_1 = require("../common/chat-tool-preferences");
|
|
23
|
-
/**
|
|
24
|
-
* Utility class to manage tool confirmation settings
|
|
25
|
-
*/
|
|
26
|
-
let ToolConfirmationManager = class ToolConfirmationManager {
|
|
27
|
-
constructor() {
|
|
28
|
-
// In-memory session overrides (not persisted), per chat
|
|
29
|
-
this.sessionOverrides = new Map();
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Get the confirmation mode for a specific tool, considering session overrides first (per chat)
|
|
33
|
-
*/
|
|
34
|
-
getConfirmationMode(toolId, chatId) {
|
|
35
|
-
const chatMap = this.sessionOverrides.get(chatId);
|
|
36
|
-
if (chatMap && chatMap.has(toolId)) {
|
|
37
|
-
return chatMap.get(toolId);
|
|
38
|
-
}
|
|
39
|
-
const toolConfirmation = this.preferences[chat_tool_preferences_1.TOOL_CONFIRMATION_PREFERENCE];
|
|
40
|
-
if (toolConfirmation[toolId]) {
|
|
41
|
-
return toolConfirmation[toolId];
|
|
42
|
-
}
|
|
43
|
-
if (toolConfirmation['*']) {
|
|
44
|
-
return toolConfirmation['*'];
|
|
45
|
-
}
|
|
46
|
-
return chat_tool_preferences_1.ToolConfirmationMode.ALWAYS_ALLOW; // Default to Always Allow
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Set the confirmation mode for a specific tool (persisted)
|
|
50
|
-
*/
|
|
51
|
-
setConfirmationMode(toolId, mode) {
|
|
52
|
-
const current = this.preferences[chat_tool_preferences_1.TOOL_CONFIRMATION_PREFERENCE] || {};
|
|
53
|
-
// Determine the global default (star entry), or fallback to schema default
|
|
54
|
-
let starMode = current['*'];
|
|
55
|
-
if (starMode === undefined) {
|
|
56
|
-
starMode = chat_tool_preferences_1.ToolConfirmationMode.ALWAYS_ALLOW;
|
|
57
|
-
}
|
|
58
|
-
if (mode === starMode) {
|
|
59
|
-
// Remove the toolId entry if it exists
|
|
60
|
-
if (toolId in current) {
|
|
61
|
-
const { [toolId]: _, ...rest } = current;
|
|
62
|
-
this.preferenceService.updateValue(chat_tool_preferences_1.TOOL_CONFIRMATION_PREFERENCE, rest);
|
|
63
|
-
}
|
|
64
|
-
// else, nothing to update
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
// Set or update the toolId entry
|
|
68
|
-
const updated = { ...current, [toolId]: mode };
|
|
69
|
-
this.preferenceService.updateValue(chat_tool_preferences_1.TOOL_CONFIRMATION_PREFERENCE, updated);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Set the confirmation mode for a specific tool for this session only (not persisted, per chat)
|
|
74
|
-
*/
|
|
75
|
-
setSessionConfirmationMode(toolId, mode, chatId) {
|
|
76
|
-
let chatMap = this.sessionOverrides.get(chatId);
|
|
77
|
-
if (!chatMap) {
|
|
78
|
-
chatMap = new Map();
|
|
79
|
-
this.sessionOverrides.set(chatId, chatMap);
|
|
80
|
-
}
|
|
81
|
-
chatMap.set(toolId, mode);
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Clear all session overrides for a specific chat, or all if no chatId is given
|
|
85
|
-
*/
|
|
86
|
-
clearSessionOverrides(chatId) {
|
|
87
|
-
if (chatId) {
|
|
88
|
-
this.sessionOverrides.delete(chatId);
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
this.sessionOverrides.clear();
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Get all tool confirmation settings
|
|
96
|
-
*/
|
|
97
|
-
getAllConfirmationSettings() {
|
|
98
|
-
return this.preferences[chat_tool_preferences_1.TOOL_CONFIRMATION_PREFERENCE] || {};
|
|
99
|
-
}
|
|
100
|
-
resetAllConfirmationModeSettings() {
|
|
101
|
-
const current = this.preferences[chat_tool_preferences_1.TOOL_CONFIRMATION_PREFERENCE] || {};
|
|
102
|
-
if ('*' in current) {
|
|
103
|
-
this.preferenceService.updateValue(chat_tool_preferences_1.TOOL_CONFIRMATION_PREFERENCE, { '*': current['*'] });
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
this.preferenceService.updateValue(chat_tool_preferences_1.TOOL_CONFIRMATION_PREFERENCE, {});
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
exports.ToolConfirmationManager = ToolConfirmationManager;
|
|
111
|
-
tslib_1.__decorate([
|
|
112
|
-
(0, inversify_1.inject)(chat_tool_preferences_1.ChatToolPreferences),
|
|
113
|
-
tslib_1.__metadata("design:type", Object)
|
|
114
|
-
], ToolConfirmationManager.prototype, "preferences", void 0);
|
|
115
|
-
tslib_1.__decorate([
|
|
116
|
-
(0, inversify_1.inject)(preferences_1.PreferenceService),
|
|
117
|
-
tslib_1.__metadata("design:type", Object)
|
|
118
|
-
], ToolConfirmationManager.prototype, "preferenceService", void 0);
|
|
119
|
-
exports.ToolConfirmationManager = ToolConfirmationManager = tslib_1.__decorate([
|
|
120
|
-
(0, inversify_1.injectable)()
|
|
121
|
-
], ToolConfirmationManager);
|
|
122
|
-
//# sourceMappingURL=chat-tool-preference-bindings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat-t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AI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;QAClC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,0BAA0B;QACtB,OAAO,IAAI,CAAC,WAAW,CAAC,oDAA4B,CAAC,IAAI,EAAE,CAAC;IAChE,CAAC;IAED,gCAAgC;QAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,oDAA4B,CAAC,IAAI,EAAE,CAAC;QACrE,IAAI,GAAG,IAAI,OAAO,EAAE,CAAC;YACjB,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,oDAA4B,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC5F,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,oDAA4B,EAAE,EAAE,CAAC,CAAC;QACzE,CAAC;IACL,CAAC;CACJ,CAAA;AA1FY,0DAAuB;AAEb;IADlB,IAAA,kBAAM,EAAC,2CAAmB,CAAC;;4DACwB;AAGjC;IADlB,IAAA,kBAAM,EAAC,+BAAiB,CAAC;;kEAC8B;kCAL/C,uBAAuB;IADnC,IAAA,sBAAU,GAAE;GACA,uBAAuB,CA0FnC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ToolRequest } from '@theia/ai-core';
|
|
2
|
-
import { ChatToolRequestService, ChatToolRequest } from '../common/chat-tool-request-service';
|
|
3
|
-
import { MutableChatRequestModel, ToolCallChatResponseContent } from '../common/chat-model';
|
|
4
|
-
import { ChatToolPreferences } from '../common/chat-tool-preferences';
|
|
5
|
-
import { ToolConfirmationManager } from './chat-tool-preference-bindings';
|
|
6
|
-
/**
|
|
7
|
-
* Frontend-specific implementation of ChatToolRequestService that handles tool confirmation
|
|
8
|
-
*/
|
|
9
|
-
export declare class FrontendChatToolRequestService extends ChatToolRequestService {
|
|
10
|
-
protected readonly confirmationManager: ToolConfirmationManager;
|
|
11
|
-
protected readonly preferences: ChatToolPreferences;
|
|
12
|
-
protected toChatToolRequest(toolRequest: ToolRequest, request: MutableChatRequestModel): ChatToolRequest;
|
|
13
|
-
/**
|
|
14
|
-
* Find existing tool call content or create a new one for confirmation tracking
|
|
15
|
-
*
|
|
16
|
-
* Looks for ToolCallChatResponseContent nodes where the name field matches the toolRequest id.
|
|
17
|
-
* Starts from the back of the content array to find the most recent match.
|
|
18
|
-
*/
|
|
19
|
-
protected findToolCallContent(toolRequest: ToolRequest, arguments_: string, request: MutableChatRequestModel): ToolCallChatResponseContent;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=chat-tool-request-service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat-tool-request-service.d.ts","sourceRoot":"","sources":["../../src/browser/chat-tool-request-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC9F,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAwB,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE1E;;GAEG;AACH,qBACa,8BAA+B,SAAQ,sBAAsB;IAGtE,SAAS,CAAC,QAAQ,CAAC,mBAAmB,EAAE,uBAAuB,CAAC;IAGhE,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,mBAAmB,CAAC;cAEjC,iBAAiB,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,uBAAuB,GAAG,eAAe;IAgCjH;;;;;OAKG;IACH,SAAS,CAAC,mBAAmB,CACzB,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,uBAAuB,GACjC,2BAA2B;CAgBjC"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2025 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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.FrontendChatToolRequestService = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
-
const chat_tool_request_service_1 = require("../common/chat-tool-request-service");
|
|
22
|
-
const chat_model_1 = require("../common/chat-model");
|
|
23
|
-
const chat_tool_preferences_1 = require("../common/chat-tool-preferences");
|
|
24
|
-
const chat_tool_preference_bindings_1 = require("./chat-tool-preference-bindings");
|
|
25
|
-
/**
|
|
26
|
-
* Frontend-specific implementation of ChatToolRequestService that handles tool confirmation
|
|
27
|
-
*/
|
|
28
|
-
let FrontendChatToolRequestService = class FrontendChatToolRequestService extends chat_tool_request_service_1.ChatToolRequestService {
|
|
29
|
-
toChatToolRequest(toolRequest, request) {
|
|
30
|
-
const confirmationMode = this.confirmationManager.getConfirmationMode(toolRequest.id, request.session.id);
|
|
31
|
-
return {
|
|
32
|
-
...toolRequest,
|
|
33
|
-
handler: async (arg_string) => {
|
|
34
|
-
switch (confirmationMode) {
|
|
35
|
-
case chat_tool_preferences_1.ToolConfirmationMode.DISABLED:
|
|
36
|
-
return { denied: true, message: `Tool ${toolRequest.id} is disabled` };
|
|
37
|
-
case chat_tool_preferences_1.ToolConfirmationMode.ALWAYS_ALLOW:
|
|
38
|
-
// Execute immediately without confirmation
|
|
39
|
-
return toolRequest.handler(arg_string, request);
|
|
40
|
-
case chat_tool_preferences_1.ToolConfirmationMode.CONFIRM:
|
|
41
|
-
default:
|
|
42
|
-
// Create confirmation requirement
|
|
43
|
-
const toolCallContent = this.findToolCallContent(toolRequest, arg_string, request);
|
|
44
|
-
const confirmed = await toolCallContent.confirmed;
|
|
45
|
-
if (confirmed) {
|
|
46
|
-
return toolRequest.handler(arg_string, request);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
// Return an object indicating the user denied the tool execution
|
|
50
|
-
// instead of throwing an error
|
|
51
|
-
return { denied: true, message: `Tool execution denied by user: ${toolRequest.id}` };
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Find existing tool call content or create a new one for confirmation tracking
|
|
59
|
-
*
|
|
60
|
-
* Looks for ToolCallChatResponseContent nodes where the name field matches the toolRequest id.
|
|
61
|
-
* Starts from the back of the content array to find the most recent match.
|
|
62
|
-
*/
|
|
63
|
-
findToolCallContent(toolRequest, arguments_, request) {
|
|
64
|
-
// Look for existing tool call content with matching ID
|
|
65
|
-
const response = request.response.response;
|
|
66
|
-
const contentArray = response.content;
|
|
67
|
-
// Start from the end of the array and find the first match
|
|
68
|
-
for (let i = contentArray.length - 1; i >= 0; i--) {
|
|
69
|
-
const content = contentArray[i];
|
|
70
|
-
if (chat_model_1.ToolCallChatResponseContent.is(content) &&
|
|
71
|
-
content.name === toolRequest.id) {
|
|
72
|
-
return content;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
throw new Error(`Tool call content for tool ${toolRequest.id} not found in the response`);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
exports.FrontendChatToolRequestService = FrontendChatToolRequestService;
|
|
79
|
-
tslib_1.__decorate([
|
|
80
|
-
(0, inversify_1.inject)(chat_tool_preference_bindings_1.ToolConfirmationManager),
|
|
81
|
-
tslib_1.__metadata("design:type", chat_tool_preference_bindings_1.ToolConfirmationManager)
|
|
82
|
-
], FrontendChatToolRequestService.prototype, "confirmationManager", void 0);
|
|
83
|
-
tslib_1.__decorate([
|
|
84
|
-
(0, inversify_1.inject)(chat_tool_preferences_1.ChatToolPreferences),
|
|
85
|
-
tslib_1.__metadata("design:type", Object)
|
|
86
|
-
], FrontendChatToolRequestService.prototype, "preferences", void 0);
|
|
87
|
-
exports.FrontendChatToolRequestService = FrontendChatToolRequestService = tslib_1.__decorate([
|
|
88
|
-
(0, inversify_1.injectable)()
|
|
89
|
-
], FrontendChatToolRequestService);
|
|
90
|
-
//# sourceMappingURL=chat-tool-request-service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat-tool-request-service.js","sourceRoot":"","sources":["../../src/browser/chat-tool-request-service.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;;;;AAGhF,4DAAkE;AAClE,mFAA8F;AAC9F,qDAA4F;AAC5F,2EAA4F;AAC5F,mFAA0E;AAE1E;;GAEG;AAEI,IAAM,8BAA8B,GAApC,MAAM,8BAA+B,SAAQ,kDAAsB;IAQnD,iBAAiB,CAAC,WAAwB,EAAE,OAAgC;QAC3F,MAAM,gBAAgB,GAAG,IAAI,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,WAAW,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAE1G,OAAO;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AG,YAAY,CAAC,CAAC,CAAC,CAAC;YAChC,IAAI,wCAA2B,CAAC,EAAE,CAAC,OAAO,CAAC;gBACvC,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,EAAE,EAAE,CAAC;gBAClC,OAAO,OAAO,CAAC;YACnB,CAAC;QACL,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,8BAA8B,WAAW,CAAC,EAAE,4BAA4B,CAAC,CAAC;IAC9F,CAAC;CACJ,CAAA;AAlEY,wEAA8B;AAGpB;IADlB,IAAA,kBAAM,EAAC,uDAAuB,CAAC;sCACQ,uDAAuB;2EAAC;AAG7C;IADlB,IAAA,kBAAM,EAAC,2CAAmB,CAAC;;mEACwB;yCAN3C,8BAA8B;IAD1C,IAAA,sBAAU,GAAE;GACA,8BAA8B,CAkE1C"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { URI } from '@theia/core';
|
|
2
|
-
import { LabelProvider, LabelProviderContribution } from '@theia/core/lib/browser';
|
|
3
|
-
import { ChangeSetFileService } from './change-set-file-service';
|
|
4
|
-
export declare class ContextFileVariableLabelProvider implements LabelProviderContribution {
|
|
5
|
-
protected readonly labelProvider: LabelProvider;
|
|
6
|
-
protected readonly changeSetFileService: ChangeSetFileService;
|
|
7
|
-
canHandle(element: object): number;
|
|
8
|
-
getIcon(element: object): string | undefined;
|
|
9
|
-
getName(element: object): string | undefined;
|
|
10
|
-
getLongName(element: object): string | undefined;
|
|
11
|
-
getDetails(element: object): string | undefined;
|
|
12
|
-
protected getUri(element: object): URI | undefined;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=context-file-variable-label-provider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-file-variable-label-provider.d.ts","sourceRoot":"","sources":["../../src/browser/context-file-variable-label-provider.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,qBACa,gCAAiC,YAAW,yBAAyB;IAG9E,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAGhD,SAAS,CAAC,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAE9D,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAOlC,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI5C,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI5C,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIhD,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI/C,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS;CAOrD"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2025 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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.ContextFileVariableLabelProvider = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const ai_core_1 = require("@theia/ai-core");
|
|
21
|
-
const core_1 = require("@theia/core");
|
|
22
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
23
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
24
|
-
const change_set_file_service_1 = require("./change-set-file-service");
|
|
25
|
-
let ContextFileVariableLabelProvider = class ContextFileVariableLabelProvider {
|
|
26
|
-
canHandle(element) {
|
|
27
|
-
if (ai_core_1.AIVariableResolutionRequest.is(element) && element.variable.name === 'file') {
|
|
28
|
-
return 10;
|
|
29
|
-
}
|
|
30
|
-
return -1;
|
|
31
|
-
}
|
|
32
|
-
getIcon(element) {
|
|
33
|
-
return this.labelProvider.getIcon(this.getUri(element));
|
|
34
|
-
}
|
|
35
|
-
getName(element) {
|
|
36
|
-
return this.labelProvider.getName(this.getUri(element));
|
|
37
|
-
}
|
|
38
|
-
getLongName(element) {
|
|
39
|
-
return this.labelProvider.getLongName(this.getUri(element));
|
|
40
|
-
}
|
|
41
|
-
getDetails(element) {
|
|
42
|
-
return this.labelProvider.getDetails(this.getUri(element));
|
|
43
|
-
}
|
|
44
|
-
getUri(element) {
|
|
45
|
-
if (!ai_core_1.AIVariableResolutionRequest.is(element)) {
|
|
46
|
-
return undefined;
|
|
47
|
-
}
|
|
48
|
-
return new core_1.URI(element.arg);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
exports.ContextFileVariableLabelProvider = ContextFileVariableLabelProvider;
|
|
52
|
-
tslib_1.__decorate([
|
|
53
|
-
(0, inversify_1.inject)(browser_1.LabelProvider),
|
|
54
|
-
tslib_1.__metadata("design:type", browser_1.LabelProvider)
|
|
55
|
-
], ContextFileVariableLabelProvider.prototype, "labelProvider", void 0);
|
|
56
|
-
tslib_1.__decorate([
|
|
57
|
-
(0, inversify_1.inject)(change_set_file_service_1.ChangeSetFileService),
|
|
58
|
-
tslib_1.__metadata("design:type", change_set_file_service_1.ChangeSetFileService)
|
|
59
|
-
], ContextFileVariableLabelProvider.prototype, "changeSetFileService", void 0);
|
|
60
|
-
exports.ContextFileVariableLabelProvider = ContextFileVariableLabelProvider = tslib_1.__decorate([
|
|
61
|
-
(0, inversify_1.injectable)()
|
|
62
|
-
], ContextFileVariableLabelProvider);
|
|
63
|
-
//# sourceMappingURL=context-file-variable-label-provider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-file-variable-label-provider.js","sourceRoot":"","sources":["../../src/browser/context-file-variable-label-provider.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;;;;AAEhF,4CAA6D;AAC7D,sCAAkC;AAClC,4DAAkE;AAClE,qDAAmF;AACnF,uEAAiE;AAG1D,IAAM,gCAAgC,GAAtC,MAAM,gCAAgC;IAQzC,SAAS,CAAC,OAAe;QACrB,IAAI,qCAA2B,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YAC9E,OAAO,EAAE,CAAC;QACd,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED,OAAO,CAAC,OAAe;QACnB,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAE,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO,CAAC,OAAe;QACnB,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAE,CAAC,CAAC;IAC7D,CAAC;IAED,WAAW,CAAC,OAAe;QACvB,OAAO,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAE,CAAC,CAAC;IACjE,CAAC;IAED,UAAU,CAAC,OAAe;QACtB,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAE,CAAC,CAAC;IAChE,CAAC;IAES,MAAM,CAAC,OAAe;QAC5B,IAAI,CAAC,qCAA2B,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3C,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,OAAO,IAAI,UAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;CAEJ,CAAA;AAtCY,4EAAgC;AAGtB;IADlB,IAAA,kBAAM,EAAC,uBAAa,CAAC;sCACY,uBAAa;uEAAC;AAG7B;IADlB,IAAA,kBAAM,EAAC,8CAAoB,CAAC;sCACY,8CAAoB;8EAAC;2CANrD,gCAAgC;IAD5C,IAAA,sBAAU,GAAE;GACA,gCAAgC,CAsC5C"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { LabelProviderContribution } from '@theia/core/lib/browser';
|
|
2
|
-
export declare class ContextVariableLabelProvider implements LabelProviderContribution {
|
|
3
|
-
canHandle(element: object): number;
|
|
4
|
-
getIcon(element: object): string | undefined;
|
|
5
|
-
getName(element: object): string | undefined;
|
|
6
|
-
getLongName(element: object): string | undefined;
|
|
7
|
-
getDetails(element: object): string | undefined;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=context-variable-label-provider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-variable-label-provider.d.ts","sourceRoot":"","sources":["../../src/browser/context-variable-label-provider.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAGpE,qBACa,4BAA6B,YAAW,yBAAyB;IAE1E,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAOlC,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI5C,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAO5C,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAOhD,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;CAOlD"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2025 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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.ContextVariableLabelProvider = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const ai_core_1 = require("@theia/ai-core");
|
|
21
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
|
-
let ContextVariableLabelProvider = class ContextVariableLabelProvider {
|
|
23
|
-
canHandle(element) {
|
|
24
|
-
if (ai_core_1.AIVariableResolutionRequest.is(element)) {
|
|
25
|
-
return 1;
|
|
26
|
-
}
|
|
27
|
-
return -1;
|
|
28
|
-
}
|
|
29
|
-
getIcon(element) {
|
|
30
|
-
return 'codicon codicon-variable';
|
|
31
|
-
}
|
|
32
|
-
getName(element) {
|
|
33
|
-
if (!ai_core_1.AIVariableResolutionRequest.is(element)) {
|
|
34
|
-
return undefined;
|
|
35
|
-
}
|
|
36
|
-
return element.variable.name;
|
|
37
|
-
}
|
|
38
|
-
getLongName(element) {
|
|
39
|
-
if (!ai_core_1.AIVariableResolutionRequest.is(element)) {
|
|
40
|
-
return undefined;
|
|
41
|
-
}
|
|
42
|
-
return element.variable.name + (element.arg ? ':' + element.arg : '');
|
|
43
|
-
}
|
|
44
|
-
getDetails(element) {
|
|
45
|
-
if (!ai_core_1.AIVariableResolutionRequest.is(element)) {
|
|
46
|
-
return undefined;
|
|
47
|
-
}
|
|
48
|
-
return element.arg;
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
exports.ContextVariableLabelProvider = ContextVariableLabelProvider;
|
|
52
|
-
exports.ContextVariableLabelProvider = ContextVariableLabelProvider = tslib_1.__decorate([
|
|
53
|
-
(0, inversify_1.injectable)()
|
|
54
|
-
], ContextVariableLabelProvider);
|
|
55
|
-
//# sourceMappingURL=context-variable-label-provider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-variable-label-provider.js","sourceRoot":"","sources":["../../src/browser/context-variable-label-provider.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;;;;AAEhF,4CAA6D;AAE7D,4DAA0D;AAGnD,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAErC,SAAS,CAAC,OAAe;QACrB,IAAI,qCAA2B,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;YAC1C,OAAO,CAAC,CAAC;QACb,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED,OAAO,CAAC,OAAe;QACnB,OAAO,0BAA0B,CAAC;IACtC,CAAC;IAED,OAAO,CAAC,OAAe;QACnB,IAAI,CAAC,qCAA2B,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3C,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;IACjC,CAAC;IAED,WAAW,CAAC,OAAe;QACvB,IAAI,CAAC,qCAA2B,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3C,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,UAAU,CAAC,OAAe;QACtB,IAAI,CAAC,qCAA2B,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3C,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,OAAO,OAAO,CAAC,GAAG,CAAC;IACvB,CAAC;CAEJ,CAAA;AAlCY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,sBAAU,GAAE;GACA,4BAA4B,CAkCxC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { CustomChatAgent } from '../common';
|
|
2
|
-
export declare const CustomAgentFactory: unique symbol;
|
|
3
|
-
export type CustomAgentFactory = (id: string, name: string, description: string, prompt: string, defaultLLM: string) => CustomChatAgent;
|
|
4
|
-
//# sourceMappingURL=custom-agent-factory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-agent-factory.d.ts","sourceRoot":"","sources":["../../src/browser/custom-agent-factory.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAC/D,MAAM,MAAM,kBAAkB,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,eAAe,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.CustomAgentFactory = void 0;
|
|
19
|
-
exports.CustomAgentFactory = Symbol('CustomAgentFactory');
|
|
20
|
-
//# sourceMappingURL=custom-agent-factory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-agent-factory.js","sourceRoot":"","sources":["../../src/browser/custom-agent-factory.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;;;AAInE,QAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { PromptFragmentCustomizationService } from '@theia/ai-core';
|
|
2
|
-
import { FrontendApplicationContribution } from '@theia/core/lib/browser';
|
|
3
|
-
import { CustomAgentFactory } from './custom-agent-factory';
|
|
4
|
-
export declare class AICustomAgentsFrontendApplicationContribution implements FrontendApplicationContribution {
|
|
5
|
-
protected readonly customAgentFactory: CustomAgentFactory;
|
|
6
|
-
protected readonly customizationService: PromptFragmentCustomizationService;
|
|
7
|
-
private readonly agentService;
|
|
8
|
-
private readonly chatAgentService;
|
|
9
|
-
private knownCustomAgents;
|
|
10
|
-
onStart(): void;
|
|
11
|
-
onStop(): void;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=custom-agent-frontend-application-contribution.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-agent-frontend-application-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/custom-agent-frontend-application-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAwC,kCAAkC,EAAE,MAAM,gBAAgB,CAAC;AAC1G,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAG1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,qBACa,6CAA8C,YAAW,+BAA+B;IAEjG,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAG1D,SAAS,CAAC,QAAQ,CAAC,oBAAoB,EAAE,kCAAkC,CAAC;IAG5E,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;IAG5C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAmB;IAEpD,OAAO,CAAC,iBAAiB,CAAkD;IAC3E,OAAO,IAAI,IAAI;IAiCf,MAAM,IAAI,IAAI;CAEjB"}
|
|
@@ -1,83 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.AICustomAgentsFrontendApplicationContribution = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const ai_core_1 = require("@theia/ai-core");
|
|
21
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
|
-
const common_1 = require("../common");
|
|
23
|
-
const custom_agent_factory_1 = require("./custom-agent-factory");
|
|
24
|
-
let AICustomAgentsFrontendApplicationContribution = class AICustomAgentsFrontendApplicationContribution {
|
|
25
|
-
constructor() {
|
|
26
|
-
this.knownCustomAgents = new Map();
|
|
27
|
-
}
|
|
28
|
-
onStart() {
|
|
29
|
-
var _a, _b;
|
|
30
|
-
(_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getCustomAgents().then(customAgents => {
|
|
31
|
-
customAgents.forEach(agent => {
|
|
32
|
-
this.customAgentFactory(agent.id, agent.name, agent.description, agent.prompt, agent.defaultLLM);
|
|
33
|
-
this.knownCustomAgents.set(agent.id, agent);
|
|
34
|
-
});
|
|
35
|
-
}).catch(e => {
|
|
36
|
-
console.error('Failed to load custom agents', e);
|
|
37
|
-
});
|
|
38
|
-
(_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.onDidChangeCustomAgents(() => {
|
|
39
|
-
var _a;
|
|
40
|
-
(_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getCustomAgents().then(customAgents => {
|
|
41
|
-
const customAgentsToAdd = customAgents.filter(agent => !this.knownCustomAgents.has(agent.id) || !ai_core_1.CustomAgentDescription.equals(this.knownCustomAgents.get(agent.id), agent));
|
|
42
|
-
const customAgentIdsToRemove = [...this.knownCustomAgents.values()].filter(agent => !customAgents.find(a => ai_core_1.CustomAgentDescription.equals(a, agent))).map(a => a.id);
|
|
43
|
-
// delete first so we don't have to deal with the case where we add and remove the same agentId
|
|
44
|
-
customAgentIdsToRemove.forEach(id => {
|
|
45
|
-
this.chatAgentService.unregisterChatAgent(id);
|
|
46
|
-
this.agentService.unregisterAgent(id);
|
|
47
|
-
this.knownCustomAgents.delete(id);
|
|
48
|
-
});
|
|
49
|
-
customAgentsToAdd
|
|
50
|
-
.forEach(agent => {
|
|
51
|
-
this.customAgentFactory(agent.id, agent.name, agent.description, agent.prompt, agent.defaultLLM);
|
|
52
|
-
this.knownCustomAgents.set(agent.id, agent);
|
|
53
|
-
});
|
|
54
|
-
}).catch(e => {
|
|
55
|
-
console.error('Failed to load custom agents', e);
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
onStop() {
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
exports.AICustomAgentsFrontendApplicationContribution = AICustomAgentsFrontendApplicationContribution;
|
|
63
|
-
tslib_1.__decorate([
|
|
64
|
-
(0, inversify_1.inject)(custom_agent_factory_1.CustomAgentFactory),
|
|
65
|
-
tslib_1.__metadata("design:type", Function)
|
|
66
|
-
], AICustomAgentsFrontendApplicationContribution.prototype, "customAgentFactory", void 0);
|
|
67
|
-
tslib_1.__decorate([
|
|
68
|
-
(0, inversify_1.inject)(ai_core_1.PromptFragmentCustomizationService),
|
|
69
|
-
(0, inversify_1.optional)(),
|
|
70
|
-
tslib_1.__metadata("design:type", Object)
|
|
71
|
-
], AICustomAgentsFrontendApplicationContribution.prototype, "customizationService", void 0);
|
|
72
|
-
tslib_1.__decorate([
|
|
73
|
-
(0, inversify_1.inject)(ai_core_1.AgentService),
|
|
74
|
-
tslib_1.__metadata("design:type", Object)
|
|
75
|
-
], AICustomAgentsFrontendApplicationContribution.prototype, "agentService", void 0);
|
|
76
|
-
tslib_1.__decorate([
|
|
77
|
-
(0, inversify_1.inject)(common_1.ChatAgentService),
|
|
78
|
-
tslib_1.__metadata("design:type", Object)
|
|
79
|
-
], AICustomAgentsFrontendApplicationContribution.prototype, "chatAgentService", void 0);
|
|
80
|
-
exports.AICustomAgentsFrontendApplicationContribution = AICustomAgentsFrontendApplicationContribution = tslib_1.__decorate([
|
|
81
|
-
(0, inversify_1.injectable)()
|
|
82
|
-
], AICustomAgentsFrontendApplicationContribution);
|
|
83
|
-
//# sourceMappingURL=custom-agent-frontend-application-contribution.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-agent-frontend-application-contribution.js","sourceRoot":"","sources":["../../src/browser/custom-agent-frontend-application-contribution.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;;;;AAEhF,4CAA0G;AAE1G,4DAA4E;AAC5E,sCAA6C;AAC7C,iEAA4D;AAGrD,IAAM,6CAA6C,GAAnD,MAAM,6CAA6C;IAAnD;QAaK,sBAAiB,GAAwC,IAAI,GAAG,EAAE,CAAC;IAoC/E,CAAC;IAnCG,OAAO;;QACH,MAAA,IAAI,CAAC,oBAAoB,0CAAE,eAAe,GAAG,IAAI,CAAC,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an Agent delegates a prompt to another agent.
|
|
4
|
-
* Contains agent id, delegated prompt, and the response.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DelegationResponseContent implements ChatResponseContent {
|
|
7
|
-
agentId: string;
|
|
8
|
-
prompt: string;
|
|
9
|
-
response: ChatRequestInvocation;
|
|
10
|
-
kind: string;
|
|
11
|
-
/**
|
|
12
|
-
* @param agentId The id of the agent to whom the task was delegated
|
|
13
|
-
* @param prompt The prompt that was delegated
|
|
14
|
-
* @param response The response from the delegated agent
|
|
15
|
-
*/
|
|
16
|
-
constructor(agentId: string, prompt: string, response: ChatRequestInvocation);
|
|
17
|
-
asString(): string | undefined;
|
|
18
|
-
}
|
|
19
|
-
export declare function isDelegationResponseContent(value: unknown): value is DelegationResponseContent;
|
|
20
|
-
//# sourceMappingURL=delegation-response-content.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delegation-response-content.d.ts","sourceRoot":"","sources":["../../src/browser/delegation-response-content.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEvE;;;GAGG;AACH,qBAAa,yBAA0B,YAAW,mBAAmB;IAStD,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,qBAAqB;IAV1C,IAAI,SAAqB;IAEzB;;;;OAIG;gBAEQ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,qBAAqB;IAG1C,QAAQ,IAAI,MAAM,GAAG,SAAS;CAIjC;AAED,wBAAgB,2BAA2B,CACvC,KAAK,EAAE,OAAO,GACf,KAAK,IAAI,yBAAyB,CAKpC"}
|