@theia/ai-llamafile 1.58.3 → 1.59.0-next.72

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.
@@ -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,EAAE,MAAM,aAAa,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE/E,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;IAE7C,gBAAgB,CAAC,eAAe,EAAE,eAAe,GAAG,IAAI;CA0C3D"}
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,MAAM,aAAa,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE/E,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;IAE7C,gBAAgB,CAAC,eAAe,EAAE,eAAe,GAAG,IAAI;CAoD3D"}
@@ -25,11 +25,11 @@ const llamafile_manager_1 = require("../common/llamafile-manager");
25
25
  const llamafile_preferences_1 = require("./llamafile-preferences");
26
26
  exports.StartLlamafileCommand = {
27
27
  id: 'llamafile.start',
28
- label: 'Start Llamafile',
28
+ label: core_1.nls.localize('theia/ai/llamaFile/start', 'Start Llamafile'),
29
29
  };
30
30
  exports.StopLlamafileCommand = {
31
31
  id: 'llamafile.stop',
32
- label: 'Stop Llamafile',
32
+ label: core_1.nls.localize('theia/ai/llamaFile/stop', 'Stop Llamafile'),
33
33
  };
34
34
  let LlamafileCommandContribution = class LlamafileCommandContribution {
35
35
  registerCommands(commandRegistry) {
@@ -38,7 +38,7 @@ let LlamafileCommandContribution = class LlamafileCommandContribution {
38
38
  try {
39
39
  const llamaFiles = this.preferenceService.get(llamafile_preferences_1.PREFERENCE_LLAMAFILE);
40
40
  if (llamaFiles === undefined || llamaFiles.length === 0) {
41
- this.messageService.error('No Llamafiles configured.');
41
+ this.messageService.error(core_1.nls.localize('theia/ai/llamafile/error/noConfigured', 'No Llamafiles configured.'));
42
42
  return;
43
43
  }
44
44
  const options = llamaFiles.map(llamaFile => ({ label: llamaFile.name }));
@@ -50,7 +50,7 @@ let LlamafileCommandContribution = class LlamafileCommandContribution {
50
50
  }
51
51
  catch (error) {
52
52
  console.error('Something went wrong during the llamafile start.', error);
53
- this.messageService.error(`Something went wrong during the llamafile start: ${error.message}.\nFor more information, see the console.`);
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
  }
56
56
  }));
@@ -59,7 +59,7 @@ let LlamafileCommandContribution = class LlamafileCommandContribution {
59
59
  try {
60
60
  const llamaFiles = await this.llamafileManager.getStartedLlamafiles();
61
61
  if (llamaFiles === undefined || llamaFiles.length === 0) {
62
- this.messageService.error('No Llamafiles running.');
62
+ this.messageService.error(core_1.nls.localize('theia/ai/llamafile/error/noRunning', 'No Llamafiles running.'));
63
63
  return;
64
64
  }
65
65
  const options = llamaFiles.map(llamaFile => ({ label: llamaFile }));
@@ -71,7 +71,7 @@ let LlamafileCommandContribution = class LlamafileCommandContribution {
71
71
  }
72
72
  catch (error) {
73
73
  console.error('Something went wrong during the llamafile stop.', error);
74
- this.messageService.error(`Something went wrong during the llamafile stop: ${error.message}.\nFor more information, see the console.`);
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
  }
77
77
  }));
@@ -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,sCAAmF;AACnF,qDAA+E;AAC/E,4DAAkE;AAClE,mEAA+D;AAC/D,mEAA+D;A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C,qBAAc,CAAC;sCACG,qBAAc;oEAAC;AAG/B;IADT,IAAA,kBAAM,EAAC,oCAAgB,CAAC;;sEACoB;uCAfpC,4BAA4B;IADxC,IAAA,sBAAU,GAAE;GACA,4BAA4B,CA2DxC"}
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,sCAAwF;AACxF,qDAA+E;AAC/E,4DAAkE;AAClE,mEAA+D;AAC/D,mEAA+D;AAGlD,QAAA,qBAAqB,GAAG;IACjC,EAAE,EAAE,iBAAiB;IACrB,KAAK,EAAE,UAAG,CAAC,QAAQ,CAAC,0BAA0B,EAAE,iBAAiB,CAAC;CACrE,CAAC;AACW,QAAA,oBAAoB,GAAG;IAChC,EAAE,EAAE,gBAAgB;IACpB,KAAK,EAAE,UAAG,CAAC,QAAQ,CAAC,yBAAyB,EAAE,gBAAgB,CAAC;CACnE,CAAC;AAGK,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAiBrC,gBAAgB,CAAC,eAAgC;QAC7C,eAAe,CAAC,eAAe,CAAC,6BAAqB,EAAE,IAAI,CAAC,qBAAqB,CAAC;YAC9E,OAAO,EAAE,KAAK,IAAI,EAAE;gBAChB,IAAI,CAAC;oBACD,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAmB,4CAAoB,CAAC,CAAC;oBACtF,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;wBACtD,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,UA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CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;oBACpE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;oBACnE,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;wBACvB,OAAO;oBACX,CAAC;oBACD,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBACnD,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACb,OAAO,CAAC,KAAK,CAAC,iDAAiD,EAAE,KAAK,CAAC,CAAC;oBACxE,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;AArEY,oEAA4B;AAGlB;IADlB,IAAA,kBAAM,EAAC,2BAAiB,CAAC;;uEAC8B;AAGrC;IADlB,IAAA,kBAAM,EAAC,oDAAuB,CAAC;;2EACkC;AAGxD;IADT,IAAA,kBAAM,EAAC,2BAAiB,CAAC;;uEACqB;AAGrC;IADT,IAAA,kBAAM,EAAC,qBAAc,CAAC;sCACG,qBAAc;oEAAC;AAG/B;IADT,IAAA,kBAAM,EAAC,oCAAgB,CAAC;;sEACoB;uCAfpC,4BAA4B;IADxC,IAAA,sBAAU,GAAE;GACA,4BAA4B,CAqExC"}
@@ -1,6 +1,6 @@
1
1
  import { PreferenceSchema } from '@theia/core/lib/browser';
2
2
  import { interfaces } from '@theia/core/shared/inversify';
3
- export declare const AI_LLAMAFILE_PREFERENCES_TITLE = "\u2728 AI LlamaFile";
3
+ export declare const AI_LLAMAFILE_PREFERENCES_TITLE: string;
4
4
  export declare const PREFERENCE_LLAMAFILE = "ai-features.llamafile.llamafiles";
5
5
  export declare const aiLlamafilePreferencesSchema: PreferenceSchema;
6
6
  export declare function bindAILlamafilePreferences(bind: interfaces.Bind): void;
@@ -1 +1 @@
1
- {"version":3,"file":"llamafile-preferences.d.ts","sourceRoot":"","sources":["../../src/browser/llamafile-preferences.ts"],"names":[],"mappings":"AAgBA,OAAO,EAA0B,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,eAAO,MAAM,8BAA8B,wBAAmB,CAAC;AAC/D,eAAO,MAAM,oBAAoB,qCAAqC,CAAC;AAEvE,eAAO,MAAM,4BAA4B,EAAE,gBAmC1C,CAAC;AAEF,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CAEtE"}
1
+ {"version":3,"file":"llamafile-preferences.d.ts","sourceRoot":"","sources":["../../src/browser/llamafile-preferences.ts"],"names":[],"mappings":"AAiBA,OAAO,EAA0B,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,eAAO,MAAM,8BAA8B,QAAmE,CAAC;AAC/G,eAAO,MAAM,oBAAoB,qCAAqC,CAAC;AAEvE,eAAO,MAAM,4BAA4B,EAAE,gBAmC1C,CAAC;AAEF,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CAEtE"}
@@ -16,15 +16,16 @@
16
16
  // *****************************************************************************
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.bindAILlamafilePreferences = exports.aiLlamafilePreferencesSchema = exports.PREFERENCE_LLAMAFILE = exports.AI_LLAMAFILE_PREFERENCES_TITLE = void 0;
19
+ const core_1 = require("@theia/core");
19
20
  const browser_1 = require("@theia/core/lib/browser");
20
- exports.AI_LLAMAFILE_PREFERENCES_TITLE = '✨ AI LlamaFile';
21
+ exports.AI_LLAMAFILE_PREFERENCES_TITLE = core_1.nls.localize('theia/ai/llamaFile/prefs/title', '✨ AI LlamaFile');
21
22
  exports.PREFERENCE_LLAMAFILE = 'ai-features.llamafile.llamafiles';
22
23
  exports.aiLlamafilePreferencesSchema = {
23
24
  type: 'object',
24
25
  properties: {
25
26
  [exports.PREFERENCE_LLAMAFILE]: {
26
27
  title: exports.AI_LLAMAFILE_PREFERENCES_TITLE,
27
- markdownDescription: 'This setting allows you to configure and manage LlamaFile models in Theia IDE.\
28
+ markdownDescription: core_1.nls.localize('theia/ai/llamaFile/prefs/mdDescription', 'This setting allows you to configure and manage LlamaFile models in Theia IDE.\
28
29
  \n\
29
30
  Each entry requires a user-friendly `name`, the file `uri` pointing to your LlamaFile, and the `port` on which it will run.\
30
31
  \n\
@@ -32,7 +33,7 @@ exports.aiLlamafilePreferencesSchema = {
32
33
  \n\
33
34
  If you edit an entry (e.g., change the port), any running instance will stop, and you will need to manually start it again.\
34
35
  \n\
35
- [Learn more about configuring and managing LlamaFiles in the Theia IDE documentation](https://theia-ide.org/docs/user_ai/#llamafile-models).',
36
+ [Learn more about configuring and managing LlamaFiles in the Theia IDE documentation](https://theia-ide.org/docs/user_ai/#llamafile-models).'),
36
37
  type: 'array',
37
38
  default: [],
38
39
  items: {
@@ -40,15 +41,15 @@ exports.aiLlamafilePreferencesSchema = {
40
41
  properties: {
41
42
  name: {
42
43
  type: 'string',
43
- description: 'The model name to use for this Llamafile.'
44
+ description: core_1.nls.localize('theia/ai/llamaFile/prefs/name/description', 'The model name to use for this Llamafile.')
44
45
  },
45
46
  uri: {
46
47
  type: 'string',
47
- description: 'The file uri to the Llamafile.'
48
+ description: core_1.nls.localize('theia/ai/llamaFile/prefs/uri/description', 'The file uri to the Llamafile.')
48
49
  },
49
50
  port: {
50
51
  type: 'number',
51
- description: 'The port to use to start the server.'
52
+ description: core_1.nls.localize('theia/ai/llamaFile/prefs/port/description', 'The port to use to start the server.')
52
53
  }
53
54
  }
54
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"llamafile-preferences.js","sourceRoot":"","sources":["../../src/browser/llamafile-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,qDAAmF;AAGtE,QAAA,8BAA8B,GAAG,gBAAgB,CAAC;AAClD,QAAA,oBAAoB,GAAG,kCAAkC,CAAC;AAE1D,QAAA,4BAA4B,GAAqB;IAC1D,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,CAAC,4BAAoB,CAAC,EAAE;YACpB,KAAK,EAAE,sCAA8B;YACrC,mBAAmB,EAAE;;;;;;;;yJAQwH;YAC7I,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,EAAE;YACX,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACR,IAAI,EAAE;wBACF,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,2CAA2C;qBAC3D;oBACD,GAAG,EAAE;wBACD,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,gCAAgC;qBAChD;oBACD,IAAI,EAAE;wBACF,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,sCAAsC;qBACtD;iBACJ;aACJ;SACJ;KACJ;CACJ,CAAC;AAEF,SAAgB,0BAA0B,CAAC,IAAqB;IAC5D,IAAI,CAAC,gCAAsB,CAAC,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,oCAA4B,EAAE,CAAC,CAAC;AAC3F,CAAC;AAFD,gEAEC"}
1
+ {"version":3,"file":"llamafile-preferences.js","sourceRoot":"","sources":["../../src/browser/llamafile-preferences.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE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"name": "@theia/ai-llamafile",
3
- "version": "1.58.3",
3
+ "version": "1.59.0-next.72+f41d8efcd",
4
4
  "description": "Theia - Llamafile Integration",
5
5
  "dependencies": {
6
- "@theia/ai-core": "1.58.3",
7
- "@theia/core": "1.58.3",
8
- "@theia/output": "1.58.3",
6
+ "@theia/ai-core": "1.59.0-next.72+f41d8efcd",
7
+ "@theia/core": "1.59.0-next.72+f41d8efcd",
8
+ "@theia/output": "1.59.0-next.72+f41d8efcd",
9
9
  "tslib": "^2.6.2"
10
10
  },
11
11
  "publishConfig": {
@@ -42,10 +42,10 @@
42
42
  "watch": "theiaext watch"
43
43
  },
44
44
  "devDependencies": {
45
- "@theia/ext-scripts": "1.58.3"
45
+ "@theia/ext-scripts": "1.58.0"
46
46
  },
47
47
  "nyc": {
48
48
  "extends": "../../configs/nyc.json"
49
49
  },
50
- "gitHead": "ca70c15332f91e0f61b12cd147b5ff8326e2e6d2"
50
+ "gitHead": "f41d8efcd4abb79167b74bf476eafc7857e97306"
51
51
  }
@@ -14,7 +14,7 @@
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 } from '@theia/core';
17
+ import { CommandContribution, CommandRegistry, MessageService, nls } from '@theia/core';
18
18
  import { PreferenceService, QuickInputService } from '@theia/core/lib/browser';
19
19
  import { inject, injectable } from '@theia/core/shared/inversify';
20
20
  import { LlamafileManager } from '../common/llamafile-manager';
@@ -23,11 +23,11 @@ import { LlamafileEntry } from './llamafile-frontend-application-contribution';
23
23
 
24
24
  export const StartLlamafileCommand = {
25
25
  id: 'llamafile.start',
26
- label: 'Start Llamafile',
26
+ label: nls.localize('theia/ai/llamaFile/start', 'Start Llamafile'),
27
27
  };
28
28
  export const StopLlamafileCommand = {
29
29
  id: 'llamafile.stop',
30
- label: 'Stop Llamafile',
30
+ label: nls.localize('theia/ai/llamaFile/stop', 'Stop Llamafile'),
31
31
  };
32
32
 
33
33
  @injectable()
@@ -54,7 +54,7 @@ export class LlamafileCommandContribution implements CommandContribution {
54
54
  try {
55
55
  const llamaFiles = this.preferenceService.get<LlamafileEntry[]>(PREFERENCE_LLAMAFILE);
56
56
  if (llamaFiles === undefined || llamaFiles.length === 0) {
57
- this.messageService.error('No Llamafiles configured.');
57
+ this.messageService.error(nls.localize('theia/ai/llamafile/error/noConfigured', 'No Llamafiles configured.'));
58
58
  return;
59
59
  }
60
60
  const options = llamaFiles.map(llamaFile => ({ label: llamaFile.name }));
@@ -65,7 +65,12 @@ export class LlamafileCommandContribution implements CommandContribution {
65
65
  this.llamafileManager.startServer(result.label);
66
66
  } catch (error) {
67
67
  console.error('Something went wrong during the llamafile start.', error);
68
- this.messageService.error(`Something went wrong during the llamafile start: ${error.message}.\nFor more information, see the console.`);
68
+ this.messageService.error(
69
+ nls.localize(
70
+ 'theia/ai/llamafile/error/startFailed',
71
+ 'Something went wrong during the llamafile start: {0}.\nFor more information, see the console.',
72
+ error.message
73
+ ));
69
74
  }
70
75
  }
71
76
  }));
@@ -74,7 +79,7 @@ export class LlamafileCommandContribution implements CommandContribution {
74
79
  try {
75
80
  const llamaFiles = await this.llamafileManager.getStartedLlamafiles();
76
81
  if (llamaFiles === undefined || llamaFiles.length === 0) {
77
- this.messageService.error('No Llamafiles running.');
82
+ this.messageService.error(nls.localize('theia/ai/llamafile/error/noRunning', 'No Llamafiles running.'));
78
83
  return;
79
84
  }
80
85
  const options = llamaFiles.map(llamaFile => ({ label: llamaFile }));
@@ -85,7 +90,12 @@ export class LlamafileCommandContribution implements CommandContribution {
85
90
  this.llamafileManager.stopServer(result.label);
86
91
  } catch (error) {
87
92
  console.error('Something went wrong during the llamafile stop.', error);
88
- this.messageService.error(`Something went wrong during the llamafile stop: ${error.message}.\nFor more information, see the console.`);
93
+ this.messageService.error(
94
+ nls.localize(
95
+ 'theia/ai/llamafile/error/stopFailed',
96
+ 'Something went wrong during the llamafile stop: {0}.\nFor more information, see the console.',
97
+ error.message
98
+ ));
89
99
  }
90
100
  }
91
101
  }));
@@ -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 { nls } from '@theia/core';
17
18
  import { PreferenceContribution, PreferenceSchema } from '@theia/core/lib/browser';
18
19
  import { interfaces } from '@theia/core/shared/inversify';
19
20
 
20
- export const AI_LLAMAFILE_PREFERENCES_TITLE = '✨ AI LlamaFile';
21
+ export const AI_LLAMAFILE_PREFERENCES_TITLE = nls.localize('theia/ai/llamaFile/prefs/title', '✨ AI LlamaFile');
21
22
  export const PREFERENCE_LLAMAFILE = 'ai-features.llamafile.llamafiles';
22
23
 
23
24
  export const aiLlamafilePreferencesSchema: PreferenceSchema = {
@@ -25,7 +26,7 @@ export const aiLlamafilePreferencesSchema: PreferenceSchema = {
25
26
  properties: {
26
27
  [PREFERENCE_LLAMAFILE]: {
27
28
  title: AI_LLAMAFILE_PREFERENCES_TITLE,
28
- markdownDescription: 'This setting allows you to configure and manage LlamaFile models in Theia IDE.\
29
+ markdownDescription: nls.localize('theia/ai/llamaFile/prefs/mdDescription', 'This setting allows you to configure and manage LlamaFile models in Theia IDE.\
29
30
  \n\
30
31
  Each entry requires a user-friendly `name`, the file `uri` pointing to your LlamaFile, and the `port` on which it will run.\
31
32
  \n\
@@ -33,7 +34,7 @@ export const aiLlamafilePreferencesSchema: PreferenceSchema = {
33
34
  \n\
34
35
  If you edit an entry (e.g., change the port), any running instance will stop, and you will need to manually start it again.\
35
36
  \n\
36
- [Learn more about configuring and managing LlamaFiles in the Theia IDE documentation](https://theia-ide.org/docs/user_ai/#llamafile-models).',
37
+ [Learn more about configuring and managing LlamaFiles in the Theia IDE documentation](https://theia-ide.org/docs/user_ai/#llamafile-models).'),
37
38
  type: 'array',
38
39
  default: [],
39
40
  items: {
@@ -41,15 +42,15 @@ export const aiLlamafilePreferencesSchema: PreferenceSchema = {
41
42
  properties: {
42
43
  name: {
43
44
  type: 'string',
44
- description: 'The model name to use for this Llamafile.'
45
+ description: nls.localize('theia/ai/llamaFile/prefs/name/description', 'The model name to use for this Llamafile.')
45
46
  },
46
47
  uri: {
47
48
  type: 'string',
48
- description: 'The file uri to the Llamafile.'
49
+ description: nls.localize('theia/ai/llamaFile/prefs/uri/description', 'The file uri to the Llamafile.')
49
50
  },
50
51
  port: {
51
52
  type: 'number',
52
- description: 'The port to use to start the server.'
53
+ description: nls.localize('theia/ai/llamaFile/prefs/port/description', 'The port to use to start the server.')
53
54
  }
54
55
  }
55
56
  }