@theia/ai-huggingface 1.65.0-next.6 → 1.65.1
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/huggingface-frontend-application-contribution.d.ts +2 -1
- package/lib/browser/huggingface-frontend-application-contribution.d.ts.map +1 -1
- package/lib/browser/huggingface-frontend-application-contribution.js +3 -3
- package/lib/browser/huggingface-frontend-application-contribution.js.map +1 -1
- package/lib/browser/huggingface-frontend-module.d.ts.map +1 -1
- package/lib/browser/huggingface-frontend-module.js +3 -2
- package/lib/browser/huggingface-frontend-module.js.map +1 -1
- package/lib/{browser → common}/huggingface-preferences.d.ts +1 -1
- package/lib/common/huggingface-preferences.d.ts.map +1 -0
- package/lib/{browser → common}/huggingface-preferences.js +1 -2
- package/lib/common/huggingface-preferences.js.map +1 -0
- package/lib/node/huggingface-backend-module.d.ts.map +1 -1
- package/lib/node/huggingface-backend-module.js +2 -0
- package/lib/node/huggingface-backend-module.js.map +1 -1
- package/package.json +5 -5
- package/src/browser/huggingface-frontend-application-contribution.ts +5 -4
- package/src/browser/huggingface-frontend-module.ts +3 -2
- package/src/{browser → common}/huggingface-preferences.ts +2 -4
- package/src/node/huggingface-backend-module.ts +3 -1
- package/lib/browser/huggingface-preferences.d.ts.map +0 -1
- package/lib/browser/huggingface-preferences.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { FrontendApplicationContribution
|
|
1
|
+
import { FrontendApplicationContribution } from '@theia/core/lib/browser';
|
|
2
2
|
import { HuggingFaceLanguageModelsManager, HuggingFaceModelDescription } from '../common';
|
|
3
|
+
import { PreferenceService } from '@theia/core';
|
|
3
4
|
export declare class HuggingFaceFrontendApplicationContribution implements FrontendApplicationContribution {
|
|
4
5
|
protected preferenceService: PreferenceService;
|
|
5
6
|
protected manager: HuggingFaceLanguageModelsManager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"huggingface-frontend-application-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/huggingface-frontend-application-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,+BAA+B,EAAE,
|
|
1
|
+
{"version":3,"file":"huggingface-frontend-application-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/huggingface-frontend-application-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,OAAO,EAAE,gCAAgC,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AAE1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,qBACa,0CAA2C,YAAW,+BAA+B;IAG9F,SAAS,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAG/C,SAAS,CAAC,OAAO,EAAE,gCAAgC,CAAC;IAEpD,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,CAAM;IAEpC,OAAO,IAAI,IAAI;IAoBf,SAAS,CAAC,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI;IAYvD;;OAEG;IACH,SAAS,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAM9D,SAAS,CAAC,iCAAiC,CACvC,OAAO,EAAE,MAAM,GAChB,2BAA2B;CAOjC"}
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.HuggingFaceFrontendApplicationContribution = 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 huggingface_preferences_1 = require("
|
|
22
|
+
const huggingface_preferences_1 = require("../common/huggingface-preferences");
|
|
23
|
+
const core_1 = require("@theia/core");
|
|
24
24
|
const HUGGINGFACE_PROVIDER_ID = 'huggingface';
|
|
25
25
|
let HuggingFaceFrontendApplicationContribution = class HuggingFaceFrontendApplicationContribution {
|
|
26
26
|
constructor() {
|
|
@@ -71,7 +71,7 @@ let HuggingFaceFrontendApplicationContribution = class HuggingFaceFrontendApplic
|
|
|
71
71
|
};
|
|
72
72
|
exports.HuggingFaceFrontendApplicationContribution = HuggingFaceFrontendApplicationContribution;
|
|
73
73
|
tslib_1.__decorate([
|
|
74
|
-
(0, inversify_1.inject)(
|
|
74
|
+
(0, inversify_1.inject)(core_1.PreferenceService),
|
|
75
75
|
tslib_1.__metadata("design:type", Object)
|
|
76
76
|
], HuggingFaceFrontendApplicationContribution.prototype, "preferenceService", void 0);
|
|
77
77
|
tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"huggingface-frontend-application-contribution.js","sourceRoot":"","sources":["../../src/browser/huggingface-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":"huggingface-frontend-application-contribution.js","sourceRoot":"","sources":["../../src/browser/huggingface-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,sCAA0F;AAC1F,+EAA8E;AAC9E,sCAAgD;AAEhD,MAAM,uBAAuB,GAAG,aAAa,CAAC;AAEvC,IAAM,0CAA0C,GAAhD,MAAM,0CAA0C;IAAhD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AAC,yCAAgC,CAAC;;2EACW;qDAN3C,0CAA0C;IADtD,IAAA,sBAAU,GAAE;GACA,0CAA0C,CA4DtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"huggingface-frontend-module.d.ts","sourceRoot":"","sources":["../../src/browser/huggingface-frontend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;
|
|
1
|
+
{"version":3,"file":"huggingface-frontend-module.d.ts","sourceRoot":"","sources":["../../src/browser/huggingface-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 huggingface_preferences_1 = require("
|
|
19
|
+
const huggingface_preferences_1 = require("../common/huggingface-preferences");
|
|
20
20
|
const browser_1 = require("@theia/core/lib/browser");
|
|
21
21
|
const huggingface_frontend_application_contribution_1 = require("./huggingface-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: huggingface_preferences_1.HuggingFacePreferencesSchema });
|
|
25
26
|
bind(huggingface_frontend_application_contribution_1.HuggingFaceFrontendApplicationContribution).toSelf().inSingletonScope();
|
|
26
27
|
bind(browser_1.FrontendApplicationContribution).toService(huggingface_frontend_application_contribution_1.HuggingFaceFrontendApplicationContribution);
|
|
27
28
|
bind(common_1.HuggingFaceLanguageModelsManager).toDynamicValue(ctx => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"huggingface-frontend-module.js","sourceRoot":"","sources":["../../src/browser/huggingface-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":"huggingface-frontend-module.js","sourceRoot":"","sources":["../../src/browser/huggingface-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,+EAAiF;AACjF,qDAA+H;AAC/H,mHAA6G;AAC7G,sCAAuG;AACvG,sCAAqD;AAErD,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAI,CAAC,6BAAsB,CAAC,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,sDAA4B,EAAE,CAAC,CAAC;IACvF,IAAI,CAAC,0FAA0C,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC7E,IAAI,CAAC,yCAA+B,CAAC,CAAC,SAAS,CAAC,0FAA0C,CAAC,CAAC;IAC5F,IAAI,CAAC,yCAAgC,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;QACxD,MAAM,QAAQ,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAA4B,kCAAwB,CAAC,CAAC;QACxF,OAAO,QAAQ,CAAC,WAAW,CAAmC,iDAAwC,CAAC,CAAC;IAC5G,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.huggingFace.apiKey";
|
|
3
3
|
export declare const MODELS_PREF = "ai-features.huggingFace.models";
|
|
4
4
|
export declare const HuggingFacePreferencesSchema: PreferenceSchema;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"huggingface-preferences.d.ts","sourceRoot":"","sources":["../../src/common/huggingface-preferences.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAO,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,eAAO,MAAM,YAAY,mCAAmC,CAAC;AAC7D,eAAO,MAAM,WAAW,mCAAmC,CAAC;AAE5D,eAAO,MAAM,4BAA4B,EAAE,gBAmB1C,CAAC"}
|
|
@@ -16,12 +16,11 @@
|
|
|
16
16
|
// *****************************************************************************
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.HuggingFacePreferencesSchema = 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.huggingFace.apiKey';
|
|
22
22
|
exports.MODELS_PREF = 'ai-features.huggingFace.models';
|
|
23
23
|
exports.HuggingFacePreferencesSchema = {
|
|
24
|
-
type: 'object',
|
|
25
24
|
properties: {
|
|
26
25
|
[exports.API_KEY_PREF]: {
|
|
27
26
|
type: 'string',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"huggingface-preferences.js","sourceRoot":"","sources":["../../src/common/huggingface-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,sCAAoD;AAEvC,QAAA,YAAY,GAAG,gCAAgC,CAAC;AAChD,QAAA,WAAW,GAAG,gCAAgC,CAAC;AAE/C,QAAA,4BAA4B,GAAqB;IAC1D,UAAU,EAAE;QACR,CAAC,oBAAY,CAAC,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,mBAAmB,EAAE,UAAG,CAAC,QAAQ,CAAC,2CAA2C,EACzE;sHACsG,CAAC;YAC3G,KAAK,EAAE,+CAAyB;SACnC;QACD,CAAC,mBAAW,CAAC,EAAE;YACX,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,UAAG,CAAC,QAAQ,CAAC,yCAAyC,EAAE,4BAA4B,CAAC;YAClG,KAAK,EAAE,+CAAyB;YAChC,OAAO,EAAE,CAAC,mBAAmB,CAAC;YAC9B,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB;SACJ;KACJ;CACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"huggingface-backend-module.d.ts","sourceRoot":"","sources":["../../src/node/huggingface-backend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"huggingface-backend-module.d.ts","sourceRoot":"","sources":["../../src/node/huggingface-backend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAO/D,eAAO,MAAM,uBAAuB,eAAoC,CAAC;;AAWzE,wBAGG"}
|
|
@@ -21,6 +21,7 @@ const huggingface_language_models_manager_1 = require("../common/huggingface-lan
|
|
|
21
21
|
const core_1 = require("@theia/core");
|
|
22
22
|
const connection_container_module_1 = require("@theia/core/lib/node/messaging/connection-container-module");
|
|
23
23
|
const huggingface_language_models_manager_impl_1 = require("./huggingface-language-models-manager-impl");
|
|
24
|
+
const huggingface_preferences_1 = require("../common/huggingface-preferences");
|
|
24
25
|
exports.HuggingFaceModelFactory = Symbol('HuggingFaceModelFactory');
|
|
25
26
|
// We use a connection module to handle AI services separately for each frontend.
|
|
26
27
|
const huggingfaceConnectionModule = connection_container_module_1.ConnectionContainerModule.create(({ bind, bindBackendService, bindFrontendService }) => {
|
|
@@ -29,6 +30,7 @@ const huggingfaceConnectionModule = connection_container_module_1.ConnectionCont
|
|
|
29
30
|
bind(core_1.ConnectionHandler).toDynamicValue(ctx => new core_1.RpcConnectionHandler(huggingface_language_models_manager_1.HUGGINGFACE_LANGUAGE_MODELS_MANAGER_PATH, () => ctx.container.get(huggingface_language_models_manager_1.HuggingFaceLanguageModelsManager))).inSingletonScope();
|
|
30
31
|
});
|
|
31
32
|
exports.default = new inversify_1.ContainerModule(bind => {
|
|
33
|
+
bind(core_1.PreferenceContribution).toConstantValue({ schema: huggingface_preferences_1.HuggingFacePreferencesSchema });
|
|
32
34
|
bind(connection_container_module_1.ConnectionContainerModule).toConstantValue(huggingfaceConnectionModule);
|
|
33
35
|
});
|
|
34
36
|
//# sourceMappingURL=huggingface-backend-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"huggingface-backend-module.js","sourceRoot":"","sources":["../../src/node/huggingface-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,uGAA2I;AAC3I,
|
|
1
|
+
{"version":3,"file":"huggingface-backend-module.js","sour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
{
|
|
2
2
|
"name": "@theia/ai-huggingface",
|
|
3
|
-
"version": "1.65.
|
|
3
|
+
"version": "1.65.1",
|
|
4
4
|
"description": "Theia - Hugging Face Integration",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@huggingface/inference": "^2.0.0",
|
|
7
|
-
"@theia/ai-core": "1.65.
|
|
8
|
-
"@theia/core": "1.65.
|
|
7
|
+
"@theia/ai-core": "1.65.1",
|
|
8
|
+
"@theia/core": "1.65.1"
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"watch": "theiaext watch"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@theia/ext-scripts": "1.
|
|
44
|
+
"@theia/ext-scripts": "1.65.1"
|
|
45
45
|
},
|
|
46
46
|
"nyc": {
|
|
47
47
|
"extends": "../../configs/nyc.json"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "ed70d58fe5ef87606f903ea92fcb684e83f5354f"
|
|
50
50
|
}
|
|
@@ -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 { HuggingFaceLanguageModelsManager, HuggingFaceModelDescription } from '../common';
|
|
20
|
-
import { API_KEY_PREF, MODELS_PREF } from '
|
|
20
|
+
import { API_KEY_PREF, MODELS_PREF } from '../common/huggingface-preferences';
|
|
21
|
+
import { PreferenceService } from '@theia/core';
|
|
21
22
|
|
|
22
23
|
const HUGGINGFACE_PROVIDER_ID = 'huggingface';
|
|
23
24
|
@injectable()
|
|
@@ -42,8 +43,8 @@ export class HuggingFaceFrontendApplicationContribution implements FrontendAppli
|
|
|
42
43
|
|
|
43
44
|
this.preferenceService.onPreferenceChanged(event => {
|
|
44
45
|
if (event.preferenceName === API_KEY_PREF) {
|
|
45
|
-
this.manager.setApiKey(event.newValue);
|
|
46
|
-
this.handleKeyChange(event.newValue);
|
|
46
|
+
this.manager.setApiKey(event.newValue as string);
|
|
47
|
+
this.handleKeyChange(event.newValue as string);
|
|
47
48
|
} else if (event.preferenceName === MODELS_PREF) {
|
|
48
49
|
this.handleModelChanges(event.newValue as string[]);
|
|
49
50
|
}
|
|
@@ -15,10 +15,11 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
18
|
-
import { HuggingFacePreferencesSchema } from '
|
|
19
|
-
import { FrontendApplicationContribution,
|
|
18
|
+
import { HuggingFacePreferencesSchema } from '../common/huggingface-preferences';
|
|
19
|
+
import { FrontendApplicationContribution, RemoteConnectionProvider, ServiceConnectionProvider } from '@theia/core/lib/browser';
|
|
20
20
|
import { HuggingFaceFrontendApplicationContribution } from './huggingface-frontend-application-contribution';
|
|
21
21
|
import { HUGGINGFACE_LANGUAGE_MODELS_MANAGER_PATH, HuggingFaceLanguageModelsManager } from '../common';
|
|
22
|
+
import { PreferenceContribution } from '@theia/core';
|
|
22
23
|
|
|
23
24
|
export default new ContainerModule(bind => {
|
|
24
25
|
bind(PreferenceContribution).toConstantValue({ schema: HuggingFacePreferencesSchema });
|
|
@@ -14,15 +14,13 @@
|
|
|
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.huggingFace.apiKey';
|
|
22
21
|
export const MODELS_PREF = 'ai-features.huggingFace.models';
|
|
23
22
|
|
|
24
23
|
export const HuggingFacePreferencesSchema: PreferenceSchema = {
|
|
25
|
-
type: 'object',
|
|
26
24
|
properties: {
|
|
27
25
|
[API_KEY_PREF]: {
|
|
28
26
|
type: 'string',
|
|
@@ -16,9 +16,10 @@
|
|
|
16
16
|
|
|
17
17
|
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
18
18
|
import { HUGGINGFACE_LANGUAGE_MODELS_MANAGER_PATH, HuggingFaceLanguageModelsManager } from '../common/huggingface-language-models-manager';
|
|
19
|
-
import { ConnectionHandler, RpcConnectionHandler } from '@theia/core';
|
|
19
|
+
import { ConnectionHandler, PreferenceContribution, RpcConnectionHandler } from '@theia/core';
|
|
20
20
|
import { ConnectionContainerModule } from '@theia/core/lib/node/messaging/connection-container-module';
|
|
21
21
|
import { HuggingFaceLanguageModelsManagerImpl } from './huggingface-language-models-manager-impl';
|
|
22
|
+
import { HuggingFacePreferencesSchema } from '../common/huggingface-preferences';
|
|
22
23
|
|
|
23
24
|
export const HuggingFaceModelFactory = Symbol('HuggingFaceModelFactory');
|
|
24
25
|
|
|
@@ -32,5 +33,6 @@ const huggingfaceConnectionModule = ConnectionContainerModule.create(({ bind, bi
|
|
|
32
33
|
});
|
|
33
34
|
|
|
34
35
|
export default new ContainerModule(bind => {
|
|
36
|
+
bind(PreferenceContribution).toConstantValue({ schema: HuggingFacePreferencesSchema });
|
|
35
37
|
bind(ConnectionContainerModule).toConstantValue(huggingfaceConnectionModule);
|
|
36
38
|
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"huggingface-preferences.d.ts","sourceRoot":"","sources":["../../src/browser/huggingface-preferences.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6DAA6D,CAAC;AAI/F,eAAO,MAAM,YAAY,mCAAmC,CAAC;AAC7D,eAAO,MAAM,WAAW,mCAAmC,CAAC;AAE5D,eAAO,MAAM,4BAA4B,EAAE,gBAoB1C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"huggingface-preferences.js","sourceRoot":"","sources":["../../src/browser/huggingface-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,gCAAgC,CAAC;AAChD,QAAA,WAAW,GAAG,gCAAgC,CAAC;AAE/C,QAAA,4BAA4B,GAAqB;IAC1D,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,CAAC,oBAAY,CAAC,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,mBAAmB,EAAE,UAAG,CAAC,QAAQ,CAAC,2CAA2C,EACzE;sHACsG,CAAC;YAC3G,KAAK,EAAE,+CAAyB;SACnC;QACD,CAAC,mBAAW,CAAC,EAAE;YACX,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,UAAG,CAAC,QAAQ,CAAC,yCAAyC,EAAE,4BAA4B,CAAC;YAClG,KAAK,EAAE,+CAAyB;YAChC,OAAO,EAAE,CAAC,mBAAmB,CAAC;YAC9B,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB;SACJ;KACJ;CACJ,CAAC"}
|