@theia/ai-google 1.65.0-next.19 → 1.65.0-next.28
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/lib/browser/google-frontend-application-contribution.d.ts +2 -1
- package/lib/browser/google-frontend-application-contribution.d.ts.map +1 -1
- package/lib/browser/google-frontend-application-contribution.js +3 -3
- package/lib/browser/google-frontend-application-contribution.js.map +1 -1
- package/lib/browser/google-frontend-module.d.ts.map +1 -1
- package/lib/browser/google-frontend-module.js +3 -2
- package/lib/browser/google-frontend-module.js.map +1 -1
- package/lib/{browser → common}/google-preferences.d.ts +1 -1
- package/lib/common/google-preferences.d.ts.map +1 -0
- package/lib/{browser → common}/google-preferences.js +1 -2
- package/lib/common/google-preferences.js.map +1 -0
- package/lib/node/google-backend-module.d.ts.map +1 -1
- package/lib/node/google-backend-module.js +2 -0
- package/lib/node/google-backend-module.js.map +1 -1
- package/package.json +4 -4
- package/src/browser/google-frontend-application-contribution.ts +8 -7
- package/src/browser/google-frontend-module.ts +3 -2
- package/src/{browser → common}/google-preferences.ts +2 -4
- package/src/node/google-backend-module.ts +3 -1
- package/lib/browser/google-preferences.d.ts.map +0 -1
- package/lib/browser/google-preferences.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { FrontendApplicationContribution
|
|
1
|
+
import { FrontendApplicationContribution } from '@theia/core/lib/browser';
|
|
2
2
|
import { GoogleLanguageModelsManager, GoogleModelDescription } from '../common';
|
|
3
|
+
import { PreferenceService } from '@theia/core';
|
|
3
4
|
export declare class GoogleFrontendApplicationContribution implements FrontendApplicationContribution {
|
|
4
5
|
protected preferenceService: PreferenceService;
|
|
5
6
|
protected manager: GoogleLanguageModelsManager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-frontend-application-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/google-frontend-application-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,+BAA+B,EAAE,
|
|
1
|
+
{"version":3,"file":"google-frontend-application-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/google-frontend-application-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,OAAO,EAAE,2BAA2B,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAEhF,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIhD,qBACa,qCAAsC,YAAW,+BAA+B;IAGzF,SAAS,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAG/C,SAAS,CAAC,OAAO,EAAE,2BAA2B,CAAC;IAE/C,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,CAAM;IAEpC,OAAO,IAAI,IAAI;IA8Bf;;OAEG;IACH,SAAS,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAM9D,SAAS,CAAC,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI;IAYvD,SAAS,CAAC,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,sBAAsB;CAYlF"}
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.GoogleFrontendApplicationContribution = void 0;
|
|
19
19
|
const tslib_1 = require("tslib");
|
|
20
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
21
20
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
21
|
const common_1 = require("../common");
|
|
23
|
-
const google_preferences_1 = require("
|
|
22
|
+
const google_preferences_1 = require("../common/google-preferences");
|
|
23
|
+
const core_1 = require("@theia/core");
|
|
24
24
|
const GOOGLE_PROVIDER_ID = 'google';
|
|
25
25
|
let GoogleFrontendApplicationContribution = class GoogleFrontendApplicationContribution {
|
|
26
26
|
constructor() {
|
|
@@ -86,7 +86,7 @@ let GoogleFrontendApplicationContribution = class GoogleFrontendApplicationContr
|
|
|
86
86
|
};
|
|
87
87
|
exports.GoogleFrontendApplicationContribution = GoogleFrontendApplicationContribution;
|
|
88
88
|
tslib_1.__decorate([
|
|
89
|
-
(0, inversify_1.inject)(
|
|
89
|
+
(0, inversify_1.inject)(core_1.PreferenceService),
|
|
90
90
|
tslib_1.__metadata("design:type", Object)
|
|
91
91
|
], GoogleFrontendApplicationContribution.prototype, "preferenceService", void 0);
|
|
92
92
|
tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-frontend-application-contribution.js","sourceRoot":"","sources":["../../src/browser/google-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;;;;
|
|
1
|
+
{"version":3,"file":"google-frontend-application-contribution.js","sourceRoot":"","sources":["../../src/browser/google-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;;;;AAGhF,4DAAkE;AAClE,sCAAgF;AAChF,qEAAwI;AACxI,sCAAgD;AAEhD,MAAM,kBAAkB,GAAG,QAAQ,CAAC;AAG7B,IAAM,qCAAqC,GAA3C,MAAM,qCAAqC;IAA3C;QAQO,eAAU,GAAa,EAAE,CAAC;IAiExC,CAAC;IA/DG,OAAO;QACH,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;YACnC,MAAM,MAAM,GAAG,IAAI,CA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AK,CAAC,CAAC,CAAC;QAE9E,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,GAAG,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,kBAAkB,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC;QACpG,IAAI,CAAC,OAAO,CAAC,4BAA4B,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACrH,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAChC,CAAC;IAES,4BAA4B,CAAC,OAAe;QAClD,MAAM,EAAE,GAAG,GAAG,kBAAkB,IAAI,OAAO,EAAE,CAAC;QAE9C,MAAM,WAAW,GAA2B;YACxC,EAAE,EAAE,EAAE;YACN,KAAK,EAAE,OAAO;YACd,MAAM,EAAE,IAAI;YACZ,eAAe,EAAE,IAAI;SACxB,CAAC;QAEF,OAAO,WAAW,CAAC;IACvB,CAAC;CACJ,CAAA;AAzEY,sFAAqC;AAGpC;IADT,IAAA,kBAAM,EAAC,wBAAiB,CAAC;;gFACqB;AAGrC;IADT,IAAA,kBAAM,EAAC,oCAA2B,CAAC;;sEACW;gDANtC,qCAAqC;IADjD,IAAA,sBAAU,GAAE;GACA,qCAAqC,CAyEjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-frontend-module.d.ts","sourceRoot":"","sources":["../../src/browser/google-frontend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;
|
|
1
|
+
{"version":3,"file":"google-frontend-module.d.ts","sourceRoot":"","sources":["../../src/browser/google-frontend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;AAO/D,wBAQG"}
|
|
@@ -16,12 +16,13 @@
|
|
|
16
16
|
// *****************************************************************************
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
19
|
-
const google_preferences_1 = require("
|
|
19
|
+
const google_preferences_1 = require("../common/google-preferences");
|
|
20
20
|
const browser_1 = require("@theia/core/lib/browser");
|
|
21
21
|
const google_frontend_application_contribution_1 = require("./google-frontend-application-contribution");
|
|
22
22
|
const common_1 = require("../common");
|
|
23
|
+
const core_1 = require("@theia/core");
|
|
23
24
|
exports.default = new inversify_1.ContainerModule(bind => {
|
|
24
|
-
bind(
|
|
25
|
+
bind(core_1.PreferenceContribution).toConstantValue({ schema: google_preferences_1.GooglePreferencesSchema });
|
|
25
26
|
bind(google_frontend_application_contribution_1.GoogleFrontendApplicationContribution).toSelf().inSingletonScope();
|
|
26
27
|
bind(browser_1.FrontendApplicationContribution).toService(google_frontend_application_contribution_1.GoogleFrontendApplicationContribution);
|
|
27
28
|
bind(common_1.GoogleLanguageModelsManager).toDynamicValue(ctx => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-frontend-module.js","sourceRoot":"","sources":["../../src/browser/google-frontend-module.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,4DAA+D;AAC/D,
|
|
1
|
+
{"version":3,"file":"google-frontend-module.js","sourceRoot":"","sources":["../../src/browser/google-frontend-module.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,4DAA+D;AAC/D,qEAAuE;AACvE,qDAA+H;AAC/H,yGAAmG;AACnG,sCAA6F;AAC7F,sCAAqD;AAErD,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAI,CAAC,6BAAsB,CAAC,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,4CAAuB,EAAE,CAAC,CAAC;IAClF,IAAI,CAAC,gFAAqC,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACxE,IAAI,CAAC,yCAA+B,CAAC,CAAC,SAAS,CAAC,gFAAqC,CAAC,CAAC;IACvF,IAAI,CAAC,oCAA2B,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;QACnD,MAAM,QAAQ,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAA4B,kCAAwB,CAAC,CAAC;QACxF,OAAO,QAAQ,CAAC,WAAW,CAA8B,4CAAmC,CAAC,CAAC;IAClG,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC;AAC1B,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PreferenceSchema } from '@theia/core
|
|
1
|
+
import { PreferenceSchema } from '@theia/core';
|
|
2
2
|
export declare const API_KEY_PREF = "ai-features.google.apiKey";
|
|
3
3
|
export declare const MODELS_PREF = "ai-features.google.models";
|
|
4
4
|
export declare const MAX_RETRIES = "ai-features.google.maxRetriesOnErrors";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-preferences.d.ts","sourceRoot":"","sources":["../../src/common/google-preferences.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAO,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,eAAO,MAAM,YAAY,8BAA8B,CAAC;AACxD,eAAO,MAAM,WAAW,8BAA8B,CAAC;AACvD,eAAO,MAAM,WAAW,0CAA0C,CAAC;AACnE,eAAO,MAAM,sBAAsB,kDAAkD,CAAC;AACtF,eAAO,MAAM,wBAAwB,+CAA+C,CAAC;AAErF,eAAO,MAAM,uBAAuB,EAAE,gBA6CrC,CAAC"}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
// *****************************************************************************
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.GooglePreferencesSchema = exports.RETRY_DELAY_OTHER_ERRORS = exports.RETRY_DELAY_RATE_LIMIT = exports.MAX_RETRIES = exports.MODELS_PREF = exports.API_KEY_PREF = void 0;
|
|
19
|
-
const ai_core_preferences_1 = require("@theia/ai-core/lib/
|
|
19
|
+
const ai_core_preferences_1 = require("@theia/ai-core/lib/common/ai-core-preferences");
|
|
20
20
|
const core_1 = require("@theia/core");
|
|
21
21
|
exports.API_KEY_PREF = 'ai-features.google.apiKey';
|
|
22
22
|
exports.MODELS_PREF = 'ai-features.google.models';
|
|
@@ -24,7 +24,6 @@ exports.MAX_RETRIES = 'ai-features.google.maxRetriesOnErrors';
|
|
|
24
24
|
exports.RETRY_DELAY_RATE_LIMIT = 'ai-features.google.retryDelayOnRateLimitError';
|
|
25
25
|
exports.RETRY_DELAY_OTHER_ERRORS = 'ai-features.google.retryDelayOnOtherErrors';
|
|
26
26
|
exports.GooglePreferencesSchema = {
|
|
27
|
-
type: 'object',
|
|
28
27
|
properties: {
|
|
29
28
|
[exports.API_KEY_PREF]: {
|
|
30
29
|
type: 'string',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-preferences.js","sourceRoot":"","sources":["../../src/common/google-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,uFAA0F;AAC1F,sCAAo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AC,qDAAqD,EAC3E;;qEAEqD,CAAC;YAC1D,KAAK,EAAE,+CAAyB;YAChC,OAAO,EAAE,CAAC,CAAC;YACX,OAAO,EAAE,CAAC,CAAC;SACd;KACJ;CACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-backend-module.d.ts","sourceRoot":"","sources":["../../src/node/google-backend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;
|
|
1
|
+
{"version":3,"file":"google-backend-module.d.ts","sourceRoot":"","sources":["../../src/node/google-backend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;AAgB/D,wBAGG"}
|
|
@@ -20,6 +20,7 @@ const google_language_models_manager_1 = require("../common/google-language-mode
|
|
|
20
20
|
const core_1 = require("@theia/core");
|
|
21
21
|
const google_language_models_manager_impl_1 = require("./google-language-models-manager-impl");
|
|
22
22
|
const connection_container_module_1 = require("@theia/core/lib/node/messaging/connection-container-module");
|
|
23
|
+
const google_preferences_1 = require("../common/google-preferences");
|
|
23
24
|
// We use a connection module to handle AI services separately for each frontend.
|
|
24
25
|
const geminiConnectionModule = connection_container_module_1.ConnectionContainerModule.create(({ bind, bindBackendService, bindFrontendService }) => {
|
|
25
26
|
bind(google_language_models_manager_impl_1.GoogleLanguageModelsManagerImpl).toSelf().inSingletonScope();
|
|
@@ -27,6 +28,7 @@ const geminiConnectionModule = connection_container_module_1.ConnectionContainer
|
|
|
27
28
|
bind(core_1.ConnectionHandler).toDynamicValue(ctx => new core_1.RpcConnectionHandler(google_language_models_manager_1.GOOGLE_LANGUAGE_MODELS_MANAGER_PATH, () => ctx.container.get(google_language_models_manager_1.GoogleLanguageModelsManager))).inSingletonScope();
|
|
28
29
|
});
|
|
29
30
|
exports.default = new inversify_1.ContainerModule(bind => {
|
|
31
|
+
bind(core_1.PreferenceContribution).toConstantValue({ schema: google_preferences_1.GooglePreferencesSchema });
|
|
30
32
|
bind(connection_container_module_1.ConnectionContainerModule).toConstantValue(geminiConnectionModule);
|
|
31
33
|
});
|
|
32
34
|
//# sourceMappingURL=google-backend-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-backend-module.js","sourceRoot":"","sources":["../../src/node/google-backend-module.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,4DAA+D;AAC/D,6FAA4H;AAC5H,
|
|
1
|
+
{"version":3,"file":"google-backend-module.js","sourceRoot":"","sources":["../../src/node/google-backend-module.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,4DAA+D;AAC/D,6FAA4H;AAC5H,sCAA8F;AAC9F,+FAAwF;AACxF,4GAAuG;AACvG,qEAAuE;AAEvE,iFAAiF;AACjF,MAAM,sBAAsB,GAAG,uDAAyB,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,EAAE,EAAE;IAClH,IAAI,CAAC,qEAA+B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAClE,IAAI,CAAC,4DAA2B,CAAC,CAAC,SAAS,CAAC,qEAA+B,CAAC,CAAC;IAC7E,IAAI,CAAC,wBAAiB,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CACzC,IAAI,2BAAoB,CAAC,oEAAmC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,4DAA2B,CAAC,CAAC,CACtH,CAAC,gBAAgB,EAAE,CAAC;AACzB,CAAC,CAAC,CAAC;AAEH,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAI,CAAC,6BAAsB,CAAC,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,4CAAuB,EAAE,CAAC,CAAC;IAClF,IAAI,CAAC,uDAAyB,CAAC,CAAC,eAAe,CAAC,sBAAsB,CAAC,CAAC;AAC5E,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/ai-google",
|
|
3
|
-
"version": "1.65.0-next.
|
|
3
|
+
"version": "1.65.0-next.28+7c6aec352",
|
|
4
4
|
"description": "Theia - Google AI Integration",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@google/genai": "^1.3.0",
|
|
7
|
-
"@theia/ai-core": "1.65.0-next.
|
|
8
|
-
"@theia/core": "1.65.0-next.
|
|
7
|
+
"@theia/ai-core": "1.65.0-next.28+7c6aec352",
|
|
8
|
+
"@theia/core": "1.65.0-next.28+7c6aec352"
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"nyc": {
|
|
50
50
|
"extends": "../../configs/nyc.json"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "7c6aec3525bb27b346e55cd46899d6b82145f6bd"
|
|
53
53
|
}
|
|
@@ -14,10 +14,11 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import { FrontendApplicationContribution
|
|
17
|
+
import { FrontendApplicationContribution } from '@theia/core/lib/browser';
|
|
18
18
|
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
19
19
|
import { GoogleLanguageModelsManager, GoogleModelDescription } from '../common';
|
|
20
|
-
import { API_KEY_PREF, MODELS_PREF, MAX_RETRIES, RETRY_DELAY_OTHER_ERRORS, RETRY_DELAY_RATE_LIMIT } from '
|
|
20
|
+
import { API_KEY_PREF, MODELS_PREF, MAX_RETRIES, RETRY_DELAY_OTHER_ERRORS, RETRY_DELAY_RATE_LIMIT } from '../common/google-preferences';
|
|
21
|
+
import { PreferenceService } from '@theia/core';
|
|
21
22
|
|
|
22
23
|
const GOOGLE_PROVIDER_ID = 'google';
|
|
23
24
|
|
|
@@ -47,14 +48,14 @@ export class GoogleFrontendApplicationContribution implements FrontendApplicatio
|
|
|
47
48
|
|
|
48
49
|
this.preferenceService.onPreferenceChanged(event => {
|
|
49
50
|
if (event.preferenceName === API_KEY_PREF) {
|
|
50
|
-
this.manager.setApiKey(event.newValue);
|
|
51
|
-
this.handleKeyChange(event.newValue);
|
|
51
|
+
this.manager.setApiKey(event.newValue as string);
|
|
52
|
+
this.handleKeyChange(event.newValue as string);
|
|
52
53
|
} else if (event.preferenceName === MAX_RETRIES) {
|
|
53
|
-
this.manager.setMaxRetriesOnErrors(event.newValue);
|
|
54
|
+
this.manager.setMaxRetriesOnErrors(event.newValue as number);
|
|
54
55
|
} else if (event.preferenceName === RETRY_DELAY_RATE_LIMIT) {
|
|
55
|
-
this.manager.setRetryDelayOnRateLimitError(event.newValue);
|
|
56
|
+
this.manager.setRetryDelayOnRateLimitError(event.newValue as number);
|
|
56
57
|
} else if (event.preferenceName === RETRY_DELAY_OTHER_ERRORS) {
|
|
57
|
-
this.manager.setRetryDelayOnOtherErrors(event.newValue);
|
|
58
|
+
this.manager.setRetryDelayOnOtherErrors(event.newValue as number);
|
|
58
59
|
} else if (event.preferenceName === MODELS_PREF) {
|
|
59
60
|
this.handleModelChanges(event.newValue as string[]);
|
|
60
61
|
}
|
|
@@ -15,10 +15,11 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
18
|
-
import { GooglePreferencesSchema } from '
|
|
19
|
-
import { FrontendApplicationContribution,
|
|
18
|
+
import { GooglePreferencesSchema } from '../common/google-preferences';
|
|
19
|
+
import { FrontendApplicationContribution, RemoteConnectionProvider, ServiceConnectionProvider } from '@theia/core/lib/browser';
|
|
20
20
|
import { GoogleFrontendApplicationContribution } from './google-frontend-application-contribution';
|
|
21
21
|
import { GOOGLE_LANGUAGE_MODELS_MANAGER_PATH, GoogleLanguageModelsManager } from '../common';
|
|
22
|
+
import { PreferenceContribution } from '@theia/core';
|
|
22
23
|
|
|
23
24
|
export default new ContainerModule(bind => {
|
|
24
25
|
bind(PreferenceContribution).toConstantValue({ schema: GooglePreferencesSchema });
|
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { nls } from '@theia/core';
|
|
17
|
+
import { AI_CORE_PREFERENCES_TITLE } from '@theia/ai-core/lib/common/ai-core-preferences';
|
|
18
|
+
import { nls, PreferenceSchema } from '@theia/core';
|
|
20
19
|
|
|
21
20
|
export const API_KEY_PREF = 'ai-features.google.apiKey';
|
|
22
21
|
export const MODELS_PREF = 'ai-features.google.models';
|
|
@@ -25,7 +24,6 @@ export const RETRY_DELAY_RATE_LIMIT = 'ai-features.google.retryDelayOnRateLimitE
|
|
|
25
24
|
export const RETRY_DELAY_OTHER_ERRORS = 'ai-features.google.retryDelayOnOtherErrors';
|
|
26
25
|
|
|
27
26
|
export const GooglePreferencesSchema: PreferenceSchema = {
|
|
28
|
-
type: 'object',
|
|
29
27
|
properties: {
|
|
30
28
|
[API_KEY_PREF]: {
|
|
31
29
|
type: 'string',
|
|
@@ -16,9 +16,10 @@
|
|
|
16
16
|
|
|
17
17
|
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
18
18
|
import { GOOGLE_LANGUAGE_MODELS_MANAGER_PATH, GoogleLanguageModelsManager } from '../common/google-language-models-manager';
|
|
19
|
-
import { ConnectionHandler, RpcConnectionHandler } from '@theia/core';
|
|
19
|
+
import { ConnectionHandler, PreferenceContribution, RpcConnectionHandler } from '@theia/core';
|
|
20
20
|
import { GoogleLanguageModelsManagerImpl } from './google-language-models-manager-impl';
|
|
21
21
|
import { ConnectionContainerModule } from '@theia/core/lib/node/messaging/connection-container-module';
|
|
22
|
+
import { GooglePreferencesSchema } from '../common/google-preferences';
|
|
22
23
|
|
|
23
24
|
// We use a connection module to handle AI services separately for each frontend.
|
|
24
25
|
const geminiConnectionModule = ConnectionContainerModule.create(({ bind, bindBackendService, bindFrontendService }) => {
|
|
@@ -30,5 +31,6 @@ const geminiConnectionModule = ConnectionContainerModule.create(({ bind, bindBac
|
|
|
30
31
|
});
|
|
31
32
|
|
|
32
33
|
export default new ContainerModule(bind => {
|
|
34
|
+
bind(PreferenceContribution).toConstantValue({ schema: GooglePreferencesSchema });
|
|
33
35
|
bind(ConnectionContainerModule).toConstantValue(geminiConnectionModule);
|
|
34
36
|
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"google-preferences.d.ts","sourceRoot":"","sources":["../../src/browser/google-preferences.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6DAA6D,CAAC;AAI/F,eAAO,MAAM,YAAY,8BAA8B,CAAC;AACxD,eAAO,MAAM,WAAW,8BAA8B,CAAC;AACvD,eAAO,MAAM,WAAW,0CAA0C,CAAC;AACnE,eAAO,MAAM,sBAAsB,kDAAkD,CAAC;AACtF,eAAO,MAAM,wBAAwB,+CAA+C,CAAC;AAErF,eAAO,MAAM,uBAAuB,EAAE,gBA8CrC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"google-preferences.js","sourceRoot":"","sources":["../../src/browser/google-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;;;AAGhF,wFAA2F;AAC3F,sCAAkC;AAErB,QAAA,YAAY,GAAG,2BAA2B,CAAC;AAC3C,QAAA,WAAW,GAAG,2BAA2B,CAAC;AAC1C,QAAA,WAAW,GAAG,uCAAuC,CAAC;AACtD,QAAA,sBAAsB,GAAG,+CAA+C,CAAC;AACzE,QAAA,wBAAwB,GAAG,4CAA4C,CAAC;AAExE,QAAA,uBAAuB,GAAqB;IACrD,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,CAAC,oBAAY,CAAC,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,mBAAmB,EAAE,UAAG,CAAC,QAAQ,CAAC,oCAAoC,EAClE;iHACiG,CAAC;YACtG,KAAK,EAAE,+CAAyB;SACnC;QACD,CAAC,mBAAW,CAAC,EAAE;YACX,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,UAAG,CAAC,QAAQ,CAAC,oCAAoC,EAAE,sCAAsC,CAAC;YACvG,KAAK,EAAE,+CAAyB;YAChC,OAAO,EAAE,CAAC,kBAAkB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,gCAAgC,EAAE,8BAA8B,CAAC;YAC9J,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB;SACJ;QACD,CAAC,mBAAW,CAAC,EAAE;YACX,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,UAAG,CAAC,QAAQ,CAAC,gDAAgD,EACtE,kGAAkG,CAAC;YACvG,KAAK,EAAE,+CAAyB;YAChC,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