@theia/ai-core 1.67.0-next.13 → 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/data/prompttemplate.tmLanguage.json +3 -0
- package/package.json +9 -9
- package/src/browser/frontend-language-model-alias-registry.ts +11 -11
- package/src/common/agent-service.ts +6 -6
- package/src/common/prompt-service.ts +6 -2
- package/lib/browser/agent-completion-notification-service.d.ts +0 -69
- package/lib/browser/agent-completion-notification-service.d.ts.map +0 -1
- package/lib/browser/agent-completion-notification-service.js +0 -187
- package/lib/browser/agent-completion-notification-service.js.map +0 -1
- package/lib/browser/ai-activation-service.d.ts +0 -31
- package/lib/browser/ai-activation-service.d.ts.map +0 -1
- package/lib/browser/ai-activation-service.js +0 -56
- package/lib/browser/ai-activation-service.js.map +0 -1
- package/lib/browser/ai-command-handler-factory.d.ts +0 -4
- package/lib/browser/ai-command-handler-factory.d.ts.map +0 -1
- package/lib/browser/ai-command-handler-factory.js +0 -20
- package/lib/browser/ai-command-handler-factory.js.map +0 -1
- package/lib/browser/ai-core-command-contribution.d.ts +0 -8
- package/lib/browser/ai-core-command-contribution.d.ts.map +0 -1
- package/lib/browser/ai-core-command-contribution.js +0 -44
- package/lib/browser/ai-core-command-contribution.js.map +0 -1
- package/lib/browser/ai-core-frontend-application-contribution.d.ts +0 -10
- package/lib/browser/ai-core-frontend-application-contribution.d.ts.map +0 -1
- package/lib/browser/ai-core-frontend-application-contribution.js +0 -46
- package/lib/browser/ai-core-frontend-application-contribution.js.map +0 -1
- package/lib/browser/ai-core-frontend-module.d.ts +0 -4
- package/lib/browser/ai-core-frontend-module.d.ts.map +0 -1
- package/lib/browser/ai-core-frontend-module.js +0 -137
- package/lib/browser/ai-core-frontend-module.js.map +0 -1
- package/lib/browser/ai-settings-service.d.ts +0 -16
- package/lib/browser/ai-settings-service.d.ts.map +0 -1
- package/lib/browser/ai-settings-service.js +0 -78
- package/lib/browser/ai-settings-service.js.map +0 -1
- package/lib/browser/ai-variable-uri-label-provider.d.ts +0 -17
- package/lib/browser/ai-variable-uri-label-provider.d.ts.map +0 -1
- package/lib/browser/ai-variable-uri-label-provider.js +0 -85
- package/lib/browser/ai-variable-uri-label-provider.js.map +0 -1
- package/lib/browser/ai-view-contribution.d.ts +0 -14
- package/lib/browser/ai-view-contribution.d.ts.map +0 -1
- package/lib/browser/ai-view-contribution.js +0 -87
- package/lib/browser/ai-view-contribution.js.map +0 -1
- package/lib/browser/file-variable-contribution.d.ts +0 -23
- package/lib/browser/file-variable-contribution.d.ts.map +0 -1
- package/lib/browser/file-variable-contribution.js +0 -114
- package/lib/browser/file-variable-contribution.js.map +0 -1
- package/lib/browser/frontend-language-model-alias-registry.d.ts +0 -31
- package/lib/browser/frontend-language-model-alias-registry.d.ts.map +0 -1
- package/lib/browser/frontend-language-model-alias-registry.js +0 -170
- package/lib/browser/frontend-language-model-alias-registry.js.map +0 -1
- package/lib/browser/frontend-language-model-registry.d.ts +0 -49
- package/lib/browser/frontend-language-model-registry.d.ts.map +0 -1
- package/lib/browser/frontend-language-model-registry.js +0 -387
- package/lib/browser/frontend-language-model-registry.js.map +0 -1
- package/lib/browser/frontend-language-model-registry.spec.d.ts +0 -2
- package/lib/browser/frontend-language-model-registry.spec.d.ts.map +0 -1
- package/lib/browser/frontend-language-model-registry.spec.js +0 -248
- package/lib/browser/frontend-language-model-registry.spec.js.map +0 -1
- package/lib/browser/frontend-language-model-service.d.ts +0 -10
- package/lib/browser/frontend-language-model-service.d.ts.map +0 -1
- package/lib/browser/frontend-language-model-service.js +0 -66
- package/lib/browser/frontend-language-model-service.js.map +0 -1
- package/lib/browser/frontend-prompt-customization-service.d.ts +0 -271
- package/lib/browser/frontend-prompt-customization-service.d.ts.map +0 -1
- package/lib/browser/frontend-prompt-customization-service.js +0 -869
- package/lib/browser/frontend-prompt-customization-service.js.map +0 -1
- package/lib/browser/frontend-prompt-customization-service.spec.d.ts +0 -2
- package/lib/browser/frontend-prompt-customization-service.spec.d.ts.map +0 -1
- package/lib/browser/frontend-prompt-customization-service.spec.js +0 -127
- package/lib/browser/frontend-prompt-customization-service.spec.js.map +0 -1
- package/lib/browser/frontend-variable-service.d.ts +0 -61
- package/lib/browser/frontend-variable-service.d.ts.map +0 -1
- package/lib/browser/frontend-variable-service.js +0 -165
- package/lib/browser/frontend-variable-service.js.map +0 -1
- package/lib/browser/index.d.ts +0 -20
- package/lib/browser/index.d.ts.map +0 -1
- package/lib/browser/index.js +0 -38
- package/lib/browser/index.js.map +0 -1
- package/lib/browser/open-editors-variable-contribution.d.ts +0 -17
- package/lib/browser/open-editors-variable-contribution.d.ts.map +0 -1
- package/lib/browser/open-editors-variable-contribution.js +0 -84
- package/lib/browser/open-editors-variable-contribution.js.map +0 -1
- package/lib/browser/os-notification-service.d.ts +0 -96
- package/lib/browser/os-notification-service.d.ts.map +0 -1
- package/lib/browser/os-notification-service.js +0 -222
- package/lib/browser/os-notification-service.js.map +0 -1
- package/lib/browser/prompttemplate-contribution.d.ts +0 -29
- package/lib/browser/prompttemplate-contribution.d.ts.map +0 -1
- package/lib/browser/prompttemplate-contribution.js +0 -243
- package/lib/browser/prompttemplate-contribution.js.map +0 -1
- package/lib/browser/prompttemplate-parser.d.ts +0 -36
- package/lib/browser/prompttemplate-parser.d.ts.map +0 -1
- package/lib/browser/prompttemplate-parser.js +0 -94
- package/lib/browser/prompttemplate-parser.js.map +0 -1
- package/lib/browser/theia-variable-contribution.d.ts +0 -26
- package/lib/browser/theia-variable-contribution.d.ts.map +0 -1
- package/lib/browser/theia-variable-contribution.js +0 -146
- package/lib/browser/theia-variable-contribution.js.map +0 -1
- package/lib/browser/token-usage-frontend-service-impl.d.ts +0 -25
- package/lib/browser/token-usage-frontend-service-impl.d.ts.map +0 -1
- package/lib/browser/token-usage-frontend-service-impl.js +0 -138
- package/lib/browser/token-usage-frontend-service-impl.js.map +0 -1
- package/lib/browser/token-usage-frontend-service.d.ts +0 -33
- package/lib/browser/token-usage-frontend-service.d.ts.map +0 -1
- package/lib/browser/token-usage-frontend-service.js +0 -23
- package/lib/browser/token-usage-frontend-service.js.map +0 -1
- package/lib/browser/window-blink-service.d.ts +0 -41
- package/lib/browser/window-blink-service.d.ts.map +0 -1
- package/lib/browser/window-blink-service.js +0 -174
- package/lib/browser/window-blink-service.js.map +0 -1
- package/lib/common/agent-preferences.d.ts +0 -4
- package/lib/common/agent-preferences.d.ts.map +0 -1
- package/lib/common/agent-preferences.js +0 -84
- package/lib/common/agent-preferences.js.map +0 -1
- package/lib/common/agent-service.d.ts +0 -66
- package/lib/common/agent-service.d.ts.map +0 -1
- package/lib/common/agent-service.js +0 -104
- package/lib/common/agent-service.js.map +0 -1
- package/lib/common/agent.d.ts +0 -72
- package/lib/common/agent.d.ts.map +0 -1
- package/lib/common/agent.js +0 -20
- package/lib/common/agent.js.map +0 -1
- package/lib/common/agents-variable-contribution.d.ts +0 -19
- package/lib/common/agents-variable-contribution.d.ts.map +0 -1
- package/lib/common/agents-variable-contribution.js +0 -57
- package/lib/common/agents-variable-contribution.js.map +0 -1
- package/lib/common/ai-core-preferences.d.ts +0 -48
- package/lib/common/ai-core-preferences.d.ts.map +0 -1
- package/lib/common/ai-core-preferences.js +0 -204
- package/lib/common/ai-core-preferences.js.map +0 -1
- package/lib/common/ai-variable-resource.d.ts +0 -18
- package/lib/common/ai-variable-resource.d.ts.map +0 -1
- package/lib/common/ai-variable-resource.js +0 -103
- package/lib/common/ai-variable-resource.js.map +0 -1
- package/lib/common/configurable-in-memory-resources.d.ts +0 -47
- package/lib/common/configurable-in-memory-resources.d.ts.map +0 -1
- package/lib/common/configurable-in-memory-resources.js +0 -154
- package/lib/common/configurable-in-memory-resources.js.map +0 -1
- package/lib/common/index.d.ts +0 -22
- package/lib/common/index.d.ts.map +0 -1
- package/lib/common/index.js +0 -40
- package/lib/common/index.js.map +0 -1
- package/lib/common/language-model-alias.d.ts +0 -58
- package/lib/common/language-model-alias.d.ts.map +0 -1
- package/lib/common/language-model-alias.js +0 -20
- package/lib/common/language-model-alias.js.map +0 -1
- package/lib/common/language-model-delegate.d.ts +0 -25
- package/lib/common/language-model-delegate.d.ts.map +0 -1
- package/lib/common/language-model-delegate.js +0 -26
- package/lib/common/language-model-delegate.js.map +0 -1
- package/lib/common/language-model-interaction-model.d.ts +0 -74
- package/lib/common/language-model-interaction-model.d.ts.map +0 -1
- package/lib/common/language-model-interaction-model.js +0 -3
- package/lib/common/language-model-interaction-model.js.map +0 -1
- package/lib/common/language-model-service.d.ts +0 -38
- package/lib/common/language-model-service.d.ts.map +0 -1
- package/lib/common/language-model-service.js +0 -128
- package/lib/common/language-model-service.js.map +0 -1
- package/lib/common/language-model-util.d.ts +0 -17
- package/lib/common/language-model-util.d.ts.map +0 -1
- package/lib/common/language-model-util.js +0 -82
- package/lib/common/language-model-util.js.map +0 -1
- package/lib/common/language-model.d.ts +0 -285
- package/lib/common/language-model.d.ts.map +0 -1
- package/lib/common/language-model.js +0 -248
- package/lib/common/language-model.js.map +0 -1
- package/lib/common/language-model.spec.d.ts +0 -2
- package/lib/common/language-model.spec.d.ts.map +0 -1
- package/lib/common/language-model.spec.js +0 -62
- package/lib/common/language-model.spec.js.map +0 -1
- package/lib/common/notification-types.d.ts +0 -7
- package/lib/common/notification-types.d.ts.map +0 -1
- package/lib/common/notification-types.js +0 -29
- package/lib/common/notification-types.js.map +0 -1
- package/lib/common/prompt-service-util.d.ts +0 -8
- package/lib/common/prompt-service-util.d.ts.map +0 -1
- package/lib/common/prompt-service-util.js +0 -34
- package/lib/common/prompt-service-util.js.map +0 -1
- package/lib/common/prompt-service.d.ts +0 -466
- package/lib/common/prompt-service.d.ts.map +0 -1
- package/lib/common/prompt-service.js +0 -653
- package/lib/common/prompt-service.js.map +0 -1
- package/lib/common/prompt-service.spec.d.ts +0 -2
- package/lib/common/prompt-service.spec.d.ts.map +0 -1
- package/lib/common/prompt-service.spec.js +0 -431
- package/lib/common/prompt-service.spec.js.map +0 -1
- package/lib/common/prompt-text.d.ts +0 -8
- package/lib/common/prompt-text.d.ts.map +0 -1
- package/lib/common/prompt-text.js +0 -27
- package/lib/common/prompt-text.js.map +0 -1
- package/lib/common/prompt-variable-contribution.d.ts +0 -18
- package/lib/common/prompt-variable-contribution.d.ts.map +0 -1
- package/lib/common/prompt-variable-contribution.js +0 -207
- package/lib/common/prompt-variable-contribution.js.map +0 -1
- package/lib/common/prompt-variable-contribution.spec.d.ts +0 -2
- package/lib/common/prompt-variable-contribution.spec.d.ts.map +0 -1
- package/lib/common/prompt-variable-contribution.spec.js +0 -163
- package/lib/common/prompt-variable-contribution.spec.js.map +0 -1
- package/lib/common/protocol.d.ts +0 -25
- package/lib/common/protocol.d.ts.map +0 -1
- package/lib/common/protocol.js +0 -22
- package/lib/common/protocol.js.map +0 -1
- package/lib/common/settings-service.d.ts +0 -29
- package/lib/common/settings-service.d.ts.map +0 -1
- package/lib/common/settings-service.js +0 -5
- package/lib/common/settings-service.js.map +0 -1
- package/lib/common/today-variable-contribution.d.ts +0 -17
- package/lib/common/today-variable-contribution.d.ts.map +0 -1
- package/lib/common/today-variable-contribution.js +0 -68
- package/lib/common/today-variable-contribution.js.map +0 -1
- package/lib/common/token-usage-service.d.ts +0 -43
- package/lib/common/token-usage-service.d.ts.map +0 -1
- package/lib/common/token-usage-service.js +0 -20
- package/lib/common/token-usage-service.js.map +0 -1
- package/lib/common/tool-invocation-registry.d.ts +0 -66
- package/lib/common/tool-invocation-registry.d.ts.map +0 -1
- package/lib/common/tool-invocation-registry.js +0 -101
- package/lib/common/tool-invocation-registry.js.map +0 -1
- package/lib/common/variable-service.d.ts +0 -172
- package/lib/common/variable-service.d.ts.map +0 -1
- package/lib/common/variable-service.js +0 -287
- package/lib/common/variable-service.js.map +0 -1
- package/lib/common/variable-service.spec.d.ts +0 -2
- package/lib/common/variable-service.spec.d.ts.map +0 -1
- package/lib/common/variable-service.spec.js +0 -237
- package/lib/common/variable-service.spec.js.map +0 -1
- package/lib/node/ai-core-backend-module.d.ts +0 -4
- package/lib/node/ai-core-backend-module.d.ts.map +0 -1
- package/lib/node/ai-core-backend-module.js +0 -65
- package/lib/node/ai-core-backend-module.js.map +0 -1
- package/lib/node/backend-language-model-registry.d.ts +0 -13
- package/lib/node/backend-language-model-registry.d.ts.map +0 -1
- package/lib/node/backend-language-model-registry.js +0 -68
- package/lib/node/backend-language-model-registry.js.map +0 -1
- package/lib/node/language-model-frontend-delegate.d.ts +0 -18
- package/lib/node/language-model-frontend-delegate.d.ts.map +0 -1
- package/lib/node/language-model-frontend-delegate.js +0 -109
- package/lib/node/language-model-frontend-delegate.js.map +0 -1
- package/lib/node/token-usage-service-impl.d.ts +0 -23
- package/lib/node/token-usage-service-impl.d.ts.map +0 -1
- package/lib/node/token-usage-service-impl.js +0 -78
- package/lib/node/token-usage-service-impl.js.map +0 -1
- package/lib/node/tool-request-parameters.spec.d.ts +0 -2
- package/lib/node/tool-request-parameters.spec.d.ts.map +0 -1
- package/lib/node/tool-request-parameters.spec.js +0 -116
- package/lib/node/tool-request-parameters.spec.js.map +0 -1
|
@@ -1,138 +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.TokenUsageFrontendServiceImpl = exports.TokenUsageServiceClientImpl = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
-
const core_1 = require("@theia/core");
|
|
22
|
-
const token_usage_service_1 = require("../common/token-usage-service");
|
|
23
|
-
const protocol_1 = require("../common/protocol");
|
|
24
|
-
let TokenUsageServiceClientImpl = class TokenUsageServiceClientImpl {
|
|
25
|
-
constructor() {
|
|
26
|
-
this._onTokenUsageUpdated = new core_1.Emitter();
|
|
27
|
-
this.onTokenUsageUpdated = this._onTokenUsageUpdated.event;
|
|
28
|
-
}
|
|
29
|
-
notifyTokenUsage(usage) {
|
|
30
|
-
this._onTokenUsageUpdated.fire(usage);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
exports.TokenUsageServiceClientImpl = TokenUsageServiceClientImpl;
|
|
34
|
-
exports.TokenUsageServiceClientImpl = TokenUsageServiceClientImpl = tslib_1.__decorate([
|
|
35
|
-
(0, inversify_1.injectable)()
|
|
36
|
-
], TokenUsageServiceClientImpl);
|
|
37
|
-
let TokenUsageFrontendServiceImpl = class TokenUsageFrontendServiceImpl {
|
|
38
|
-
constructor() {
|
|
39
|
-
this._onTokenUsageUpdated = new core_1.Emitter();
|
|
40
|
-
this.onTokenUsageUpdated = this._onTokenUsageUpdated.event;
|
|
41
|
-
this.cachedUsageData = [];
|
|
42
|
-
}
|
|
43
|
-
init() {
|
|
44
|
-
this.tokenUsageServiceClient.onTokenUsageUpdated(() => {
|
|
45
|
-
this.getTokenUsageData().then(data => {
|
|
46
|
-
this._onTokenUsageUpdated.fire(data);
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Gets the current token usage data for all models
|
|
52
|
-
*/
|
|
53
|
-
async getTokenUsageData() {
|
|
54
|
-
try {
|
|
55
|
-
const usages = await this.tokenUsageService.getTokenUsages();
|
|
56
|
-
this.cachedUsageData = this.aggregateTokenUsages(usages);
|
|
57
|
-
return this.cachedUsageData;
|
|
58
|
-
}
|
|
59
|
-
catch (error) {
|
|
60
|
-
console.error('Failed to get token usage data:', error);
|
|
61
|
-
return [];
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Aggregates token usages by model
|
|
66
|
-
*/
|
|
67
|
-
aggregateTokenUsages(usages) {
|
|
68
|
-
// Group by model
|
|
69
|
-
const modelMap = new Map();
|
|
70
|
-
// Process each usage record
|
|
71
|
-
for (const usage of usages) {
|
|
72
|
-
const existing = modelMap.get(usage.model);
|
|
73
|
-
if (existing) {
|
|
74
|
-
existing.inputTokens += usage.inputTokens;
|
|
75
|
-
existing.outputTokens += usage.outputTokens;
|
|
76
|
-
// Add cached tokens if they exist
|
|
77
|
-
if (usage.cachedInputTokens !== undefined) {
|
|
78
|
-
existing.cachedInputTokens += usage.cachedInputTokens;
|
|
79
|
-
}
|
|
80
|
-
// Add read cached tokens if they exist
|
|
81
|
-
if (usage.readCachedInputTokens !== undefined) {
|
|
82
|
-
existing.readCachedInputTokens += usage.readCachedInputTokens;
|
|
83
|
-
}
|
|
84
|
-
// Update last used if this usage is more recent
|
|
85
|
-
if (!existing.lastUsed || (usage.timestamp && usage.timestamp > existing.lastUsed)) {
|
|
86
|
-
existing.lastUsed = usage.timestamp;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
modelMap.set(usage.model, {
|
|
91
|
-
inputTokens: usage.inputTokens,
|
|
92
|
-
outputTokens: usage.outputTokens,
|
|
93
|
-
cachedInputTokens: usage.cachedInputTokens || 0,
|
|
94
|
-
readCachedInputTokens: usage.readCachedInputTokens || 0,
|
|
95
|
-
lastUsed: usage.timestamp
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
// Convert map to array of model usage data
|
|
100
|
-
const result = [];
|
|
101
|
-
for (const [modelId, data] of modelMap.entries()) {
|
|
102
|
-
const modelData = {
|
|
103
|
-
modelId,
|
|
104
|
-
inputTokens: data.inputTokens,
|
|
105
|
-
outputTokens: data.outputTokens,
|
|
106
|
-
lastUsed: data.lastUsed
|
|
107
|
-
};
|
|
108
|
-
// Only include cache-related fields if they have non-zero values
|
|
109
|
-
if (data.cachedInputTokens > 0) {
|
|
110
|
-
modelData.cachedInputTokens = data.cachedInputTokens;
|
|
111
|
-
}
|
|
112
|
-
if (data.readCachedInputTokens > 0) {
|
|
113
|
-
modelData.readCachedInputTokens = data.readCachedInputTokens;
|
|
114
|
-
}
|
|
115
|
-
result.push(modelData);
|
|
116
|
-
}
|
|
117
|
-
return result;
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
exports.TokenUsageFrontendServiceImpl = TokenUsageFrontendServiceImpl;
|
|
121
|
-
tslib_1.__decorate([
|
|
122
|
-
(0, inversify_1.inject)(protocol_1.TokenUsageServiceClient),
|
|
123
|
-
tslib_1.__metadata("design:type", Object)
|
|
124
|
-
], TokenUsageFrontendServiceImpl.prototype, "tokenUsageServiceClient", void 0);
|
|
125
|
-
tslib_1.__decorate([
|
|
126
|
-
(0, inversify_1.inject)(token_usage_service_1.TokenUsageService),
|
|
127
|
-
tslib_1.__metadata("design:type", Object)
|
|
128
|
-
], TokenUsageFrontendServiceImpl.prototype, "tokenUsageService", void 0);
|
|
129
|
-
tslib_1.__decorate([
|
|
130
|
-
(0, inversify_1.postConstruct)(),
|
|
131
|
-
tslib_1.__metadata("design:type", Function),
|
|
132
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
133
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
134
|
-
], TokenUsageFrontendServiceImpl.prototype, "init", null);
|
|
135
|
-
exports.TokenUsageFrontendServiceImpl = TokenUsageFrontendServiceImpl = tslib_1.__decorate([
|
|
136
|
-
(0, inversify_1.injectable)()
|
|
137
|
-
], TokenUsageFrontendServiceImpl);
|
|
138
|
-
//# sourceMappingURL=token-usage-frontend-service-impl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token-usage-frontend-service-impl.js","sourceRoot":"","sources":["../../src/browser/token-usage-frontend-service-impl.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,4DAAiF;AACjF,sCAAsC;AAEtC,uEAA8E;AAC9E,iDAA6D;AAGtD,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IAAjC;QACc,yBAAoB,GAAG,IAAI,cAAO,EAAc,CAAC;QACzD,wBAAmB,GAAG,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC;IAMnE,CAAC;IAJG,gBAAgB,CAAC,KAAiB;QAC9B,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;CAEJ,CAAA;AARY,kEAA2B;sCAA3B,2BAA2B;IADvC,IAAA,sBAAU,GAAE;GACA,2BAA2B,CAQvC;AAGM,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAAnC;QAQc,yBAAoB,GAAG,IAAI,cAAO,EAAyB,CAAC;QACpE,wBAAmB,GAAG,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC;QAEvD,oBAAe,GAA0B,EAAE,CAAC;IAgGxD,CAAC;IA7Fa,IAAI;QACV,IAAI,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,GAAG,EAAE;YAClD,IAAI,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;gBACjC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACzC,CAAC,CAAC,CAA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,IAAA,kBAAM,EAAC,uCAAiB,CAAC;;wEAC8B;AAQ9C;IADT,IAAA,yBAAa,GAAE;;;;yDAOf;wCApBQ,6BAA6B;IADzC,IAAA,sBAAU,GAAE;GACA,6BAA6B,CA2GzC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Event } from '@theia/core';
|
|
2
|
-
/**
|
|
3
|
-
* Data structure for token usage data specific to a model.
|
|
4
|
-
*/
|
|
5
|
-
export interface ModelTokenUsageData {
|
|
6
|
-
/** The model identifier */
|
|
7
|
-
modelId: string;
|
|
8
|
-
/** Number of input tokens used */
|
|
9
|
-
inputTokens: number;
|
|
10
|
-
/** Number of output tokens used */
|
|
11
|
-
outputTokens: number;
|
|
12
|
-
/** Number of input tokens written to cache */
|
|
13
|
-
cachedInputTokens?: number;
|
|
14
|
-
/** Number of input tokens read from cache */
|
|
15
|
-
readCachedInputTokens?: number;
|
|
16
|
-
/** Date when the model was last used */
|
|
17
|
-
lastUsed?: Date;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Service for managing token usage data on the frontend.
|
|
21
|
-
*/
|
|
22
|
-
export declare const TokenUsageFrontendService: unique symbol;
|
|
23
|
-
export interface TokenUsageFrontendService {
|
|
24
|
-
/**
|
|
25
|
-
* Event emitted when token usage data is updated
|
|
26
|
-
*/
|
|
27
|
-
readonly onTokenUsageUpdated: Event<ModelTokenUsageData[]>;
|
|
28
|
-
/**
|
|
29
|
-
* Gets the current token usage data for all models
|
|
30
|
-
*/
|
|
31
|
-
getTokenUsageData(): Promise<ModelTokenUsageData[]>;
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=token-usage-frontend-service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token-usage-frontend-service.d.ts","sourceRoot":"","sources":["../../src/browser/token-usage-frontend-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,6CAA6C;IAC7C,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,wCAAwC;IACxC,QAAQ,CAAC,EAAE,IAAI,CAAC;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,eAAsC,CAAC;AAC7E,MAAM,WAAW,yBAAyB;IACtC;;OAEG;IACH,QAAQ,CAAC,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAE3D;;OAEG;IACH,iBAAiB,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;CACvD"}
|
|
@@ -1,23 +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.TokenUsageFrontendService = void 0;
|
|
19
|
-
/**
|
|
20
|
-
* Service for managing token usage data on the frontend.
|
|
21
|
-
*/
|
|
22
|
-
exports.TokenUsageFrontendService = Symbol('TokenUsageFrontendService');
|
|
23
|
-
//# sourceMappingURL=token-usage-frontend-service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token-usage-frontend-service.js","sourceRoot":"","sources":["../../src/browser/token-usage-frontend-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;;;AAsBhF;;GAEG;AACU,QAAA,yBAAyB,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Result of a window blink attempt
|
|
3
|
-
*/
|
|
4
|
-
export interface WindowBlinkResult {
|
|
5
|
-
/** Whether the window blink was successful */
|
|
6
|
-
success: boolean;
|
|
7
|
-
/** Error message if the blink failed */
|
|
8
|
-
error?: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Service for blinking/flashing the application window to get user attention.
|
|
12
|
-
*/
|
|
13
|
-
export declare class WindowBlinkService {
|
|
14
|
-
private isElectron;
|
|
15
|
-
constructor();
|
|
16
|
-
/**
|
|
17
|
-
* Blink/flash the window to get user attention.
|
|
18
|
-
* The implementation varies depending on the platform and environment.
|
|
19
|
-
*
|
|
20
|
-
* @param agentName Optional name of the agent to include in the blink notification
|
|
21
|
-
*/
|
|
22
|
-
blinkWindow(agentName?: string): Promise<WindowBlinkResult>;
|
|
23
|
-
private blinkElectronWindow;
|
|
24
|
-
private blinkBrowserWindow;
|
|
25
|
-
private blinkDocumentTitle;
|
|
26
|
-
private blinkWithVisibilityAPI;
|
|
27
|
-
private focusWindow;
|
|
28
|
-
/**
|
|
29
|
-
* Check if window blinking is supported in the current environment.
|
|
30
|
-
*/
|
|
31
|
-
isBlinkSupported(): boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Get information about the blinking capabilities.
|
|
34
|
-
*/
|
|
35
|
-
getBlinkCapabilities(): {
|
|
36
|
-
supported: boolean;
|
|
37
|
-
method: 'electron' | 'browser' | 'none';
|
|
38
|
-
features: string[];
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=window-blink-service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"window-blink-service.d.ts","sourceRoot":"","sources":["../../src/browser/window-blink-service.ts"],"names":[],"mappings":"AAmBA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,qBACa,kBAAkB;IAE3B,OAAO,CAAC,UAAU,CAAU;;IAM5B;;;;;OAKG;IACG,WAAW,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;YAwBnD,mBAAmB;YAiBnB,kBAAkB;YAQlB,kBAAkB;IAqBhC,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,WAAW;IAiBnB;;OAEG;IACH,gBAAgB,IAAI,OAAO;IAU3B;;OAEG;IACH,oBAAoB,IAAI;QACpB,SAAS,EAAE,OAAO,CAAC;QACnB,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;QACxC,QAAQ,EAAE,MAAM,EAAE,CAAC;KACtB;CA6BJ"}
|
|
@@ -1,174 +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.WindowBlinkService = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
-
const core_1 = require("@theia/core");
|
|
22
|
-
/**
|
|
23
|
-
* Service for blinking/flashing the application window to get user attention.
|
|
24
|
-
*/
|
|
25
|
-
let WindowBlinkService = class WindowBlinkService {
|
|
26
|
-
constructor() {
|
|
27
|
-
this.isElectron = core_1.environment.electron.is();
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Blink/flash the window to get user attention.
|
|
31
|
-
* The implementation varies depending on the platform and environment.
|
|
32
|
-
*
|
|
33
|
-
* @param agentName Optional name of the agent to include in the blink notification
|
|
34
|
-
*/
|
|
35
|
-
async blinkWindow(agentName) {
|
|
36
|
-
try {
|
|
37
|
-
if (this.isElectron) {
|
|
38
|
-
await this.blinkElectronWindow(agentName);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
await this.blinkBrowserWindow(agentName);
|
|
42
|
-
}
|
|
43
|
-
return { success: true };
|
|
44
|
-
}
|
|
45
|
-
catch (error) {
|
|
46
|
-
console.warn('Failed to blink window:', error);
|
|
47
|
-
try {
|
|
48
|
-
if (document.hidden) {
|
|
49
|
-
this.focusWindow();
|
|
50
|
-
}
|
|
51
|
-
return { success: true };
|
|
52
|
-
}
|
|
53
|
-
catch (fallbackError) {
|
|
54
|
-
return {
|
|
55
|
-
success: false,
|
|
56
|
-
error: error instanceof Error ? error.message : 'Failed to blink window'
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
async blinkElectronWindow(agentName) {
|
|
62
|
-
await this.blinkDocumentTitle(agentName);
|
|
63
|
-
if (document.hidden) {
|
|
64
|
-
try {
|
|
65
|
-
const theiaCoreAPI = window.electronTheiaCore;
|
|
66
|
-
if (theiaCoreAPI === null || theiaCoreAPI === void 0 ? void 0 : theiaCoreAPI.focusWindow) {
|
|
67
|
-
theiaCoreAPI.focusWindow();
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
window.focus();
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
catch (error) {
|
|
74
|
-
console.debug('Could not focus hidden window:', error);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
async blinkBrowserWindow(agentName) {
|
|
79
|
-
await this.blinkDocumentTitle(agentName);
|
|
80
|
-
this.blinkWithVisibilityAPI();
|
|
81
|
-
if (document.hidden) {
|
|
82
|
-
this.focusWindow();
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
async blinkDocumentTitle(agentName) {
|
|
86
|
-
const originalTitle = document.title;
|
|
87
|
-
const alertTitle = '🔔 ' + (agentName
|
|
88
|
-
? core_1.nls.localize('theia/ai/core/blinkTitle/namedAgentCompleted', 'Theia - Agent "{0}" Completed', agentName)
|
|
89
|
-
: core_1.nls.localize('theia/ai/core/blinkTitle/agentCompleted', 'Theia - Agent Completed'));
|
|
90
|
-
let blinkCount = 0;
|
|
91
|
-
const maxBlinks = 6;
|
|
92
|
-
const blinkInterval = setInterval(() => {
|
|
93
|
-
if (blinkCount >= maxBlinks) {
|
|
94
|
-
clearInterval(blinkInterval);
|
|
95
|
-
document.title = originalTitle;
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
document.title = blinkCount % 2 === 0 ? alertTitle : originalTitle;
|
|
99
|
-
blinkCount++;
|
|
100
|
-
}, 500);
|
|
101
|
-
}
|
|
102
|
-
blinkWithVisibilityAPI() {
|
|
103
|
-
// This method provides visual attention-getting behavior without creating notifications
|
|
104
|
-
// as notifications are handled by the OSNotificationService to avoid duplicates
|
|
105
|
-
if (!this.isElectron && typeof document.hidden !== 'undefined') {
|
|
106
|
-
// Focus the window if it's hidden to get user attention
|
|
107
|
-
if (document.hidden) {
|
|
108
|
-
this.focusWindow();
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
focusWindow() {
|
|
113
|
-
try {
|
|
114
|
-
window.focus();
|
|
115
|
-
// Try to scroll to top to create some visual movement
|
|
116
|
-
if (document.body.scrollTop > 0 || document.documentElement.scrollTop > 0) {
|
|
117
|
-
const currentScroll = document.documentElement.scrollTop || document.body.scrollTop;
|
|
118
|
-
window.scrollTo(0, 0);
|
|
119
|
-
setTimeout(() => {
|
|
120
|
-
window.scrollTo(0, currentScroll);
|
|
121
|
-
}, 100);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
catch (error) {
|
|
125
|
-
console.debug('Could not focus window:', error);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Check if window blinking is supported in the current environment.
|
|
130
|
-
*/
|
|
131
|
-
isBlinkSupported() {
|
|
132
|
-
if (this.isElectron) {
|
|
133
|
-
const theiaCoreAPI = window.electronTheiaCore;
|
|
134
|
-
return !!(theiaCoreAPI === null || theiaCoreAPI === void 0 ? void 0 : theiaCoreAPI.focusWindow);
|
|
135
|
-
}
|
|
136
|
-
// In browser, we can always provide some form of attention-getting behavior
|
|
137
|
-
return true;
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Get information about the blinking capabilities.
|
|
141
|
-
*/
|
|
142
|
-
getBlinkCapabilities() {
|
|
143
|
-
const features = [];
|
|
144
|
-
let method = 'none';
|
|
145
|
-
if (this.isElectron) {
|
|
146
|
-
method = 'electron';
|
|
147
|
-
const theiaCoreAPI = window.electronTheiaCore;
|
|
148
|
-
if (theiaCoreAPI === null || theiaCoreAPI === void 0 ? void 0 : theiaCoreAPI.focusWindow) {
|
|
149
|
-
features.push('electronTheiaCore.focusWindow');
|
|
150
|
-
features.push('document.title blinking');
|
|
151
|
-
features.push('window.focus');
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
else {
|
|
155
|
-
method = 'browser';
|
|
156
|
-
features.push('document.title');
|
|
157
|
-
features.push('window.focus');
|
|
158
|
-
if (typeof document.hidden !== 'undefined') {
|
|
159
|
-
features.push('Page Visibility API');
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
return {
|
|
163
|
-
supported: features.length > 0,
|
|
164
|
-
method,
|
|
165
|
-
features
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
exports.WindowBlinkService = WindowBlinkService;
|
|
170
|
-
exports.WindowBlinkService = WindowBlinkService = tslib_1.__decorate([
|
|
171
|
-
(0, inversify_1.injectable)(),
|
|
172
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
173
|
-
], WindowBlinkService);
|
|
174
|
-
//# sourceMappingURL=window-blink-service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"window-blink-service.js","sourceRoot":"","sources":["../../src/browser/window-blink-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;;;;AAEhF,4DAA0D;AAC1D,sCAA+C;AAY/C;;GAEG;AAEI,IAAM,kBAAkB,GAAxB,MAAM,kBA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C,MAAM,CAAC;QAErD,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YAClB,MAAM,GAAG,UAAU,CAAC;YACpB,MAAM,YAAY,GAAI,MAA0E,CAAC,iBAAiB,CAAC;YAEnH,IAAI,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,WAAW,EAAE,CAAC;gBAC5B,QAAQ,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;gBAC/C,QAAQ,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;gBACzC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YAClC,CAAC;QACL,CAAC;aAAM,CAAC;YACJ,MAAM,GAAG,SAAS,CAAC;YACnB,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YAChC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YAE9B,IAAI,OAAO,QAAQ,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;gBACzC,QAAQ,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;YACzC,CAAC;QACL,CAAC;QAED,OAAO;YACH,SAAS,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC;YAC9B,MAAM;YACN,QAAQ;SACX,CAAC;IACN,CAAC;CACJ,CAAA;AAjKY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,sBAAU,GAAE;;GACA,kBAAkB,CAiK9B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-preferences.d.ts","sourceRoot":"","sources":["../../src/common/agent-preferences.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAO,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAKpD,eAAO,MAAM,mBAAmB,8BAA8B,CAAC;AAE/D,eAAO,MAAM,6BAA6B,EAAE,gBAgE3C,CAAC"}
|
|
@@ -1,84 +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.AgentSettingsPreferenceSchema = exports.AGENT_SETTINGS_PREF = void 0;
|
|
19
|
-
const core_1 = require("@theia/core");
|
|
20
|
-
const notification_types_1 = require("./notification-types");
|
|
21
|
-
exports.AGENT_SETTINGS_PREF = 'ai-features.agentSettings';
|
|
22
|
-
exports.AgentSettingsPreferenceSchema = {
|
|
23
|
-
properties: {
|
|
24
|
-
[exports.AGENT_SETTINGS_PREF]: {
|
|
25
|
-
type: 'object',
|
|
26
|
-
title: core_1.nls.localize('theia/ai/agents/title', 'Agent Settings'),
|
|
27
|
-
hidden: true,
|
|
28
|
-
markdownDescription: core_1.nls.localize('theia/ai/agents/mdDescription', 'Configure agent settings such as enabling or disabling specific agents, configuring prompts and \
|
|
29
|
-
selecting LLMs.'),
|
|
30
|
-
additionalProperties: {
|
|
31
|
-
type: 'object',
|
|
32
|
-
properties: {
|
|
33
|
-
enable: {
|
|
34
|
-
type: 'boolean',
|
|
35
|
-
title: core_1.nls.localize('theia/ai/agents/enable/title', 'Enable Agent'),
|
|
36
|
-
markdownDescription: core_1.nls.localize('theia/ai/agents/enable/mdDescription', 'Specifies whether the agent should be enabled (true) or disabled (false).'),
|
|
37
|
-
default: true
|
|
38
|
-
},
|
|
39
|
-
languageModelRequirements: {
|
|
40
|
-
type: 'array',
|
|
41
|
-
title: core_1.nls.localize('theia/ai/agents/languageModelRequirements/title', 'Language Model Requirements'),
|
|
42
|
-
markdownDescription: core_1.nls.localize('theia/ai/agents/languageModelRequirements/mdDescription', 'Specifies the used language models for this agent.'),
|
|
43
|
-
items: {
|
|
44
|
-
type: 'object',
|
|
45
|
-
properties: {
|
|
46
|
-
purpose: {
|
|
47
|
-
type: 'string',
|
|
48
|
-
title: core_1.nls.localize('theia/ai/agents/languageModelRequirements/purpose/title', 'Purpose'),
|
|
49
|
-
markdownDescription: core_1.nls.localize('theia/ai/agents/languageModelRequirements/purpose/mdDescription', 'The purpose for which this language model is used.')
|
|
50
|
-
},
|
|
51
|
-
identifier: {
|
|
52
|
-
type: 'string',
|
|
53
|
-
title: core_1.nls.localize('theia/ai/agents/languageModelRequirements/identifier/title', 'Identifier'),
|
|
54
|
-
markdownDescription: core_1.nls.localize('theia/ai/agents/languageModelRequirements/identifier/mdDescription', 'The identifier of the language model to be used.')
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
required: ['purpose', 'identifier']
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
selectedVariants: {
|
|
61
|
-
type: 'object',
|
|
62
|
-
title: core_1.nls.localize('theia/ai/agents/selectedVariants/title', 'Selected Variants'),
|
|
63
|
-
markdownDescription: core_1.nls.localize('theia/ai/agents/selectedVariants/mdDescription', 'Specifies the currently selected prompt variants for this agent.'),
|
|
64
|
-
additionalProperties: {
|
|
65
|
-
type: 'string'
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
completionNotification: {
|
|
69
|
-
type: 'string',
|
|
70
|
-
enum: [...notification_types_1.NOTIFICATION_TYPES],
|
|
71
|
-
title: core_1.nls.localize('theia/ai/agents/completionNotification/title', 'Completion Notification'),
|
|
72
|
-
markdownDescription: core_1.nls.localize('theia/ai/agents/completionNotification/mdDescription', 'Notification behavior when this agent completes a task. If not set, the global default notification setting will be used.\n\
|
|
73
|
-
- `os-notification`: Show OS/system notifications\n\
|
|
74
|
-
- `message`: Show notifications in the status bar/message area\n\
|
|
75
|
-
- `blink`: Blink or highlight the UI\n\
|
|
76
|
-
- `off`: Disable notifications for this agent')
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
required: ['languageModelRequirements']
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
//# sourceMappingURL=agent-preferences.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-preferences.js","sourceRoot":"","sources":["../../src/common/agent-preferences.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,sCAAoD;AACpD,6DAE8B;AAEjB,QAAA,mBAAmB,GAAG,2BAA2B,CAAC;AAElD,QAAA,6BAA6B,GAAqB;IAC3D,UAAU,EAAE;QACR,CAAC,2BAAmB,CAAC,EAAE;YACnB,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,UAAG,CAAC,QAAQ,CAAC,uBAAuB,EAAE,gBAAgB,CAAC;YAC9D,MAAM,EAAE,IAAI;YACZ,mBAAmB,EAAE,UAAG,CAAC,QAAQ,CAAC,+BAA+B,EAAE;wBACvD,CAAC;YACb,oBAAoB,EAAE;gBAClB,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACR,MAAM,EAAE;wBACJ,IAAI,EAAE,SAAS;wBACf,KAAK,EAAE,UAAG,CAAC,QAAQ,CAAC,8BAA8B,EAAE,cAAc,CAAC;wBACnE,mBAAmB,EAAE,UAAG,CAAC,QAAQ,CAAC,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E,UAAG,CAAC,QAAQ,CAAC,sDAAsD,EACpF;;;;8DAIkC,CAAC;qBAC1C;iBACJ;gBACD,QAAQ,EAAE,CAAC,2BAA2B,CAAC;aAC1C;SACJ;KACJ;CACJ,CAAC"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { Event } from '@theia/core';
|
|
2
|
-
import { Agent } from './agent';
|
|
3
|
-
import { AISettingsService } from './settings-service';
|
|
4
|
-
import { PromptService } from './prompt-service';
|
|
5
|
-
export declare const AgentService: unique symbol;
|
|
6
|
-
/**
|
|
7
|
-
* Service to access the list of known Agents.
|
|
8
|
-
*/
|
|
9
|
-
export interface AgentService {
|
|
10
|
-
/**
|
|
11
|
-
* Retrieves a list of all available agents, i.e. agents which are not disabled
|
|
12
|
-
*/
|
|
13
|
-
getAgents(): Agent[];
|
|
14
|
-
/**
|
|
15
|
-
* Retrieves a list of all agents, including disabled ones.
|
|
16
|
-
*/
|
|
17
|
-
getAllAgents(): Agent[];
|
|
18
|
-
/**
|
|
19
|
-
* Enable the agent with the specified id.
|
|
20
|
-
* @param agentId the agent id.
|
|
21
|
-
*/
|
|
22
|
-
enableAgent(agentId: string): void;
|
|
23
|
-
/**
|
|
24
|
-
* disable the agent with the specified id.
|
|
25
|
-
* @param agentId the agent id.
|
|
26
|
-
*/
|
|
27
|
-
disableAgent(agentId: string): void;
|
|
28
|
-
/**
|
|
29
|
-
* query whether this agent is currently enabled or disabled.
|
|
30
|
-
* @param agentId the agent id.
|
|
31
|
-
* @return true if the agent is enabled, false otherwise.
|
|
32
|
-
*/
|
|
33
|
-
isEnabled(agentId: string): boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Allows to register an agent programmatically.
|
|
36
|
-
* @param agent the agent to register
|
|
37
|
-
*/
|
|
38
|
-
registerAgent(agent: Agent): void;
|
|
39
|
-
/**
|
|
40
|
-
* Allows to unregister an agent programmatically.
|
|
41
|
-
* @param agentId the agent id to unregister
|
|
42
|
-
*/
|
|
43
|
-
unregisterAgent(agentId: string): void;
|
|
44
|
-
/**
|
|
45
|
-
* Emitted when the list of agents changes.
|
|
46
|
-
* This can be used to update the UI when agents are added or removed.
|
|
47
|
-
*/
|
|
48
|
-
onDidChangeAgents: Event<void>;
|
|
49
|
-
}
|
|
50
|
-
export declare class AgentServiceImpl implements AgentService {
|
|
51
|
-
protected readonly aiSettingsService: AISettingsService | undefined;
|
|
52
|
-
protected readonly promptService: PromptService;
|
|
53
|
-
protected disabledAgents: Set<string>;
|
|
54
|
-
protected _agents: Agent[];
|
|
55
|
-
private readonly onDidChangeAgentsEmitter;
|
|
56
|
-
readonly onDidChangeAgents: Event<void>;
|
|
57
|
-
protected init(): void;
|
|
58
|
-
registerAgent(agent: Agent): void;
|
|
59
|
-
unregisterAgent(agentId: string): void;
|
|
60
|
-
getAgents(): Agent[];
|
|
61
|
-
getAllAgents(): Agent[];
|
|
62
|
-
enableAgent(agentId: string): void;
|
|
63
|
-
disableAgent(agentId: string): void;
|
|
64
|
-
isEnabled(agentId: string): boolean;
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=agent-service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-service.d.ts","sourceRoot":"","sources":["../../src/common/agent-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAW,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,eAAO,MAAM,YAAY,eAAyB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;OAEG;IACH,SAAS,IAAI,KAAK,EAAE,CAAC;IACrB;;OAEG;IACH,YAAY,IAAI,KAAK,EAAE,CAAC;IACxB;;;OAGG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAA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