@theia/ai-llamafile 1.73.0-next.9 → 1.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/llamafile-command-contribution.d.ts +2 -1
- package/lib/browser/llamafile-command-contribution.d.ts.map +1 -1
- package/lib/browser/llamafile-command-contribution.js +7 -2
- package/lib/browser/llamafile-command-contribution.js.map +1 -1
- package/package.json +6 -6
- package/src/browser/llamafile-command-contribution.ts +7 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AICommandHandlerFactory } from '@theia/ai-core/lib/browser/ai-command-handler-factory';
|
|
2
|
-
import { CommandContribution, CommandRegistry, MessageService, PreferenceService } from '@theia/core';
|
|
2
|
+
import { CommandContribution, CommandRegistry, MessageService, PreferenceService, ILogger } from '@theia/core';
|
|
3
3
|
import { QuickInputService } from '@theia/core/lib/browser';
|
|
4
4
|
import { LlamafileManager } from '../common/llamafile-manager';
|
|
5
5
|
export declare const StartLlamafileCommand: {
|
|
@@ -16,6 +16,7 @@ export declare class LlamafileCommandContribution implements CommandContribution
|
|
|
16
16
|
protected preferenceService: PreferenceService;
|
|
17
17
|
protected messageService: MessageService;
|
|
18
18
|
protected llamafileManager: LlamafileManager;
|
|
19
|
+
protected readonly logger: ILogger;
|
|
19
20
|
registerCommands(commandRegistry: CommandRegistry): void;
|
|
20
21
|
}
|
|
21
22
|
//# sourceMappingURL=llamafile-command-contribution.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llamafile-command-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/llamafile-command-contribution.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAO,iBAAiB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"llamafile-command-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/llamafile-command-contribution.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAO,iBAAiB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACpH,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAI/D,eAAO,MAAM,qBAAqB;;;CAGjC,CAAC;AACF,eAAO,MAAM,oBAAoB;;;CAGhC,CAAC;AAEF,qBACa,4BAA6B,YAAW,mBAAmB;IAGpE,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAGxD,SAAS,CAAC,QAAQ,CAAC,qBAAqB,EAAE,uBAAuB,CAAC;IAGlE,SAAS,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAG/C,SAAS,CAAC,cAAc,EAAE,cAAc,CAAC;IAGzC,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAG7C,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAEnC,gBAAgB,CAAC,eAAe,EAAE,eAAe,GAAG,IAAI;CAoD3D"}
|
|
@@ -49,7 +49,7 @@ let LlamafileCommandContribution = class LlamafileCommandContribution {
|
|
|
49
49
|
this.llamafileManager.startServer(result.label);
|
|
50
50
|
}
|
|
51
51
|
catch (error) {
|
|
52
|
-
|
|
52
|
+
this.logger.error('Something went wrong during the llamafile start.', error);
|
|
53
53
|
this.messageService.error(core_1.nls.localize('theia/ai/llamafile/error/startFailed', 'Something went wrong during the llamafile start: {0}.\nFor more information, see the console.', error.message));
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -70,7 +70,7 @@ let LlamafileCommandContribution = class LlamafileCommandContribution {
|
|
|
70
70
|
this.llamafileManager.stopServer(result.label);
|
|
71
71
|
}
|
|
72
72
|
catch (error) {
|
|
73
|
-
|
|
73
|
+
this.logger.error('Something went wrong during the llamafile stop.', error);
|
|
74
74
|
this.messageService.error(core_1.nls.localize('theia/ai/llamafile/error/stopFailed', 'Something went wrong during the llamafile stop: {0}.\nFor more information, see the console.', error.message));
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -98,6 +98,11 @@ tslib_1.__decorate([
|
|
|
98
98
|
(0, inversify_1.inject)(llamafile_manager_1.LlamafileManager),
|
|
99
99
|
tslib_1.__metadata("design:type", Object)
|
|
100
100
|
], LlamafileCommandContribution.prototype, "llamafileManager", void 0);
|
|
101
|
+
tslib_1.__decorate([
|
|
102
|
+
(0, inversify_1.inject)(core_1.ILogger),
|
|
103
|
+
(0, inversify_1.named)('ai-llamafile:LlamafileCommandContribution'),
|
|
104
|
+
tslib_1.__metadata("design:type", Object)
|
|
105
|
+
], LlamafileCommandContribution.prototype, "logger", void 0);
|
|
101
106
|
exports.LlamafileCommandContribution = LlamafileCommandContribution = tslib_1.__decorate([
|
|
102
107
|
(0, inversify_1.injectable)()
|
|
103
108
|
], LlamafileCommandContribution);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llamafile-command-contribution.js","sourceRoot":"","sources":["../../src/browser/llamafile-command-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;AAChF,sGAAgG;AAChG,
|
|
1
|
+
{"version":3,"file":"llamafile-command-contribution.js","sourceRoot":"","sources":["../../src/browser/llamafile-command-contribution.ts"],"names":[],"mappings":";;;;AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;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AAC;oBACb,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,iDAAiD,EAAE,KAAK,CAAC,CAAC;oBAC5E,IAAI,CAAC,cAAc,CAAC,KAAK,CACrB,UAAG,CAAC,QAAQ,CACR,qCAAqC,EACrC,8FAA8F,EAC9F,KAAK,CAAC,OAAO,CAChB,CAAC,CAAC;gBACX,CAAC;YACL,CAAC;SACJ,CAAC,CAAC,CAAC;IACR,CAAC;CACJ,CAAA;AAxEY,oEAA4B;AAGlB;IADlB,IAAA,kBAAM,EAAC,2BAAiB,CAAC;;uEAC8B;AAGrC;IADlB,IAAA,kBAAM,EAAC,oDAAuB,CAAC;;2EACkC;AAGxD;IADT,IAAA,kBAAM,EAAC,wBAAiB,CAAC;;uEACqB;AAGrC;IADT,IAAA,kBAAM,EAAC,qBAAc,CAAC;sCACG,qBAAc;oEAAC;AAG/B;IADT,IAAA,kBAAM,EAAC,oCAAgB,CAAC;;sEACoB;AAG1B;IADlB,IAAA,kBAAM,EAAC,cAAO,CAAC;IAAE,IAAA,iBAAK,EAAC,2CAA2C,CAAC;;4DACjC;uCAlB1B,4BAA4B;IADxC,IAAA,sBAAU,GAAE;GACA,4BAA4B,CAwExC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/ai-llamafile",
|
|
3
|
-
"version": "1.73.0
|
|
3
|
+
"version": "1.73.0",
|
|
4
4
|
"description": "Theia - Llamafile Integration",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/ai-core": "1.73.0
|
|
7
|
-
"@theia/core": "1.73.0
|
|
8
|
-
"@theia/output": "1.73.0
|
|
6
|
+
"@theia/ai-core": "1.73.0",
|
|
7
|
+
"@theia/core": "1.73.0",
|
|
8
|
+
"@theia/output": "1.73.0",
|
|
9
9
|
"tslib": "^2.8.1"
|
|
10
10
|
},
|
|
11
11
|
"publishConfig": {
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"watch": "theiaext watch"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@theia/ext-scripts": "1.
|
|
45
|
+
"@theia/ext-scripts": "1.73.0"
|
|
46
46
|
},
|
|
47
47
|
"nyc": {
|
|
48
48
|
"extends": "../../configs/nyc.json"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "25e1b7fdf4c39ecea7066e1c8be3af1cc02e4d2e"
|
|
51
51
|
}
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
import { AICommandHandlerFactory } from '@theia/ai-core/lib/browser/ai-command-handler-factory';
|
|
17
|
-
import { CommandContribution, CommandRegistry, MessageService, nls, PreferenceService } from '@theia/core';
|
|
17
|
+
import { CommandContribution, CommandRegistry, MessageService, nls, PreferenceService, ILogger } from '@theia/core';
|
|
18
18
|
import { QuickInputService } from '@theia/core/lib/browser';
|
|
19
|
-
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
19
|
+
import { inject, injectable, named } from '@theia/core/shared/inversify';
|
|
20
20
|
import { LlamafileManager } from '../common/llamafile-manager';
|
|
21
21
|
import { PREFERENCE_LLAMAFILE } from '../common/llamafile-preferences';
|
|
22
22
|
import { LlamafileEntry } from './llamafile-frontend-application-contribution';
|
|
@@ -48,6 +48,9 @@ export class LlamafileCommandContribution implements CommandContribution {
|
|
|
48
48
|
@inject(LlamafileManager)
|
|
49
49
|
protected llamafileManager: LlamafileManager;
|
|
50
50
|
|
|
51
|
+
@inject(ILogger) @named('ai-llamafile:LlamafileCommandContribution')
|
|
52
|
+
protected readonly logger: ILogger;
|
|
53
|
+
|
|
51
54
|
registerCommands(commandRegistry: CommandRegistry): void {
|
|
52
55
|
commandRegistry.registerCommand(StartLlamafileCommand, this.commandHandlerFactory({
|
|
53
56
|
execute: async () => {
|
|
@@ -64,7 +67,7 @@ export class LlamafileCommandContribution implements CommandContribution {
|
|
|
64
67
|
}
|
|
65
68
|
this.llamafileManager.startServer(result.label);
|
|
66
69
|
} catch (error) {
|
|
67
|
-
|
|
70
|
+
this.logger.error('Something went wrong during the llamafile start.', error);
|
|
68
71
|
this.messageService.error(
|
|
69
72
|
nls.localize(
|
|
70
73
|
'theia/ai/llamafile/error/startFailed',
|
|
@@ -89,7 +92,7 @@ export class LlamafileCommandContribution implements CommandContribution {
|
|
|
89
92
|
}
|
|
90
93
|
this.llamafileManager.stopServer(result.label);
|
|
91
94
|
} catch (error) {
|
|
92
|
-
|
|
95
|
+
this.logger.error('Something went wrong during the llamafile stop.', error);
|
|
93
96
|
this.messageService.error(
|
|
94
97
|
nls.localize(
|
|
95
98
|
'theia/ai/llamafile/error/stopFailed',
|