@theia/ai-chat 1.64.0-next.28 → 1.64.0-next.35

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.
@@ -0,0 +1,3 @@
1
+ import { PromptVariantSet } from '@theia/ai-core';
2
+ export declare const CHAT_SESSION_NAMING_PROMPT: PromptVariantSet;
3
+ //# sourceMappingURL=chat-session-naming-prompt-template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-session-naming-prompt-template.d.ts","sourceRoot":"","sources":["../../src/common/chat-session-naming-prompt-template.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,eAAO,MAAM,0BAA0B,EAAE,gBAgBxC,CAAC"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /* eslint-disable @typescript-eslint/tslint/config */
3
+ // *****************************************************************************
4
+ // Copyright (C) 2025 EclipseSource GmbH and others.
5
+ //
6
+ // This file is licensed under the MIT License.
7
+ // See LICENSE-MIT.txt in the project root for license information.
8
+ // https://opensource.org/license/mit.
9
+ //
10
+ // SPDX-License-Identifier: MIT
11
+ // *****************************************************************************
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.CHAT_SESSION_NAMING_PROMPT = void 0;
14
+ exports.CHAT_SESSION_NAMING_PROMPT = {
15
+ id: 'chat-session-naming-system',
16
+ defaultVariant: {
17
+ id: 'chat-session-naming-system-default',
18
+ template: '{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).\n' +
19
+ 'Made improvements or adaptations to this prompt template? We\'d love for you to share it with the community! Contribute back here: ' +
20
+ 'https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}\n\n' +
21
+ 'Provide a short and descriptive name for the given AI chat conversation of an AI-powered tool based on the conversation below.\n\n' +
22
+ 'The purpose of the name is for users to recognize the chat conversation easily in a list of conversations. ' +
23
+ 'Use the same language for the chat conversation name as used in the provided conversation, if in doubt default to English. ' +
24
+ 'Start the chat conversation name with an upper-case letter. ' +
25
+ 'Below we also provide the already existing other conversation names, make sure your suggestion for a name is unique with respect to the existing ones.\n\n' +
26
+ 'IMPORTANT: Your answer MUST ONLY CONTAIN THE PROPOSED NAME and must not be preceded or followed by any other text.' +
27
+ '\n\nOther session names:\n{{listOfSessionNames}}' +
28
+ '\n\nConversation:\n{{conversation}}',
29
+ }
30
+ };
31
+ //# sourceMappingURL=chat-session-naming-prompt-template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-session-naming-prompt-template.js","sourceRoot":"","sources":["../../src/common/chat-session-naming-prompt-template.ts"],"names":[],"mappings":";AAAA,qDAAqD;AACrD,gFAAgF;AAChF,oDAAoD;AACpD,EAAE;AACF,+CAA+C;AAC/C,mEAAmE;AACnE,sCAAsC;AACtC,EAAE;AACF,+BAA+B;AAC/B,gFAAgF;;;AAInE,QAAA,0BAA0B,GAAqB;IACxD,EAAE,EAAE,4BAA4B;IAChC,cAAc,EAAE;QACZ,EAAE,EAAE,oCAAoC;QACxC,QAAQ,EAAE,6FAA6F;YACnG,qIAAqI;YACrI,uGAAuG;YACvG,oIAAoI;YACpI,6GAA6G;YAC7G,6HAA6H;YAC7H,8DAA8D;YAC9D,4JAA4J;YAC5J,oHAAoH;YACpH,kDAAkD;YAClD,qCAAqC;KAC5C;CACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Agent, AgentService, LanguageModelRegistry, LanguageModelRequirement, LanguageModelService, PromptService, PromptVariantSet } from '@theia/ai-core';
1
+ import { Agent, AgentService, LanguageModelRegistry, LanguageModelRequirement, LanguageModelService, PromptService } from '@theia/ai-core';
2
2
  import { ChatSession } from './chat-service';
3
3
  export declare class ChatSessionNamingService {
4
4
  protected agentService: AgentService;
@@ -10,7 +10,7 @@ export declare class ChatSessionNamingAgent implements Agent {
10
10
  name: string;
11
11
  description: string;
12
12
  variables: never[];
13
- prompts: PromptVariantSet[];
13
+ prompts: import("@theia/ai-core").PromptVariantSet[];
14
14
  languageModelRequirements: LanguageModelRequirement[];
15
15
  agentSpecificVariables: {
16
16
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"chat-session-naming-service.d.ts","sourceRoot":"","sources":["../../src/common/chat-session-naming-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EACH,KAAK,EACL,YAAY,EAEZ,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAEnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAoB7C,qBACa,wBAAwB;IACX,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IACrD,uBAAuB,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAO7G;AAED,qBACa,sBAAuB,YAAW,KAAK;IAChD,MAAM,CAAC,EAAE,SAAyB;IAClC,EAAE,SAA6B;IAC/B,IAAI,SAA6B;IACjC,WAAW,SAA6C;IACxD,SAAS,UAAM;IACf,OAAO,qBAAgC;IACvC,yBAAyB,EAAE,wBAAwB,EAAE,CAGlD;IACH,sBAAsB;;;;QAGpB;IACF,SAAS,UAAM;IAGf,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,qBAAqB,CAAC;IAGrD,SAAS,CAAC,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAG9D,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IAEjC,uBAAuB,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;CAsCjG"}
1
+ {"version":3,"file":"chat-session-naming-service.d.ts","sourceRoot":"","sources":["../../src/common/chat-session-naming-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EACH,KAAK,EACL,YAAY,EAEZ,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,aAAa,EAEhB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,qBACa,wBAAwB;IACX,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IACrD,uBAAuB,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAO7G;AAED,qBACa,sBAAuB,YAAW,KAAK;IAChD,MAAM,CAAC,EAAE,SAAyB;IAClC,EAAE,SAA6B;IAC/B,IAAI,SAA6B;IACjC,WAAW,SAA6C;IACxD,SAAS,UAAM;IACf,OAAO,8CAAgC;IACvC,yBAAyB,EAAE,wBAAwB,EAAE,CAGlD;IACH,sBAAsB;;;;QAGpB;IACF,SAAS,UAAM;IAGf,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,qBAAqB,CAAC;IAGrD,SAAS,CAAC,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAG9D,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IAEjC,uBAAuB,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;CAsCjG"}
@@ -21,22 +21,7 @@ const tslib_1 = require("tslib");
21
21
  const ai_core_1 = require("@theia/ai-core");
22
22
  const inversify_1 = require("@theia/core/shared/inversify");
23
23
  const core_1 = require("@theia/core");
24
- const CHAT_SESSION_NAMING_PROMPT = {
25
- id: 'chat-session-naming-system',
26
- defaultVariant: {
27
- id: 'chat-session-naming-system-default',
28
- template: '{{!-- Made improvements or adaptations to this prompt template? We\'d love for you to share it with the community! Contribute back here: ' +
29
- 'https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}\n\n' +
30
- 'Provide a short and descriptive name for the given AI chat conversation of an AI-powered tool based on the conversation below.\n\n' +
31
- 'The purpose of the name is for users to recognize the chat conversation easily in a list of conversations. ' +
32
- 'Use the same language for the chat conversation name as used in the provided conversation, if in doubt default to English. ' +
33
- 'Start the chat conversation name with an upper-case letter. ' +
34
- 'Below we also provide the already existing other conversation names, make sure your suggestion for a name is unique with respect to the existing ones.\n\n' +
35
- 'IMPORTANT: Your answer MUST ONLY CONTAIN THE PROPOSED NAME and must not be preceded or followed by any other text.' +
36
- '\n\nOther session names:\n{{listOfSessionNames}}' +
37
- '\n\nConversation:\n{{conversation}}',
38
- }
39
- };
24
+ const chat_session_naming_prompt_template_1 = require("./chat-session-naming-prompt-template");
40
25
  let ChatSessionNamingService = class ChatSessionNamingService {
41
26
  async generateChatSessionName(chatSession, otherNames) {
42
27
  const chatSessionNamingAgent = this.agentService.getAgents().find(agent => ChatSessionNamingAgent.ID === agent.id);
@@ -60,7 +45,7 @@ let ChatSessionNamingAgent = ChatSessionNamingAgent_1 = class ChatSessionNamingA
60
45
  this.name = ChatSessionNamingAgent_1.ID;
61
46
  this.description = 'Agent for generating chat session names';
62
47
  this.variables = [];
63
- this.prompts = [CHAT_SESSION_NAMING_PROMPT];
48
+ this.prompts = [chat_session_naming_prompt_template_1.CHAT_SESSION_NAMING_PROMPT];
64
49
  this.languageModelRequirements = [{
65
50
  purpose: 'chat-session-naming',
66
51
  identifier: 'openai/gpt-4o-mini',
@@ -84,7 +69,7 @@ let ChatSessionNamingAgent = ChatSessionNamingAgent_1 = class ChatSessionNamingA
84
69
  (req.response.response ? `<assistant>${req.response.response.asString()}</assistant>` : ''))
85
70
  .join('\n\n');
86
71
  const listOfSessionNames = otherNames.map(name => name).join(', ');
87
- const prompt = await this.promptService.getResolvedPromptFragment(CHAT_SESSION_NAMING_PROMPT.id, { conversation, listOfSessionNames });
72
+ const prompt = await this.promptService.getResolvedPromptFragment(chat_session_naming_prompt_template_1.CHAT_SESSION_NAMING_PROMPT.id, { conversation, listOfSessionNames });
88
73
  const message = prompt === null || prompt === void 0 ? void 0 : prompt.text;
89
74
  if (!message) {
90
75
  throw new Error('Unable to create prompt message for generating chat session name');
@@ -1 +1 @@
1
- {"version":3,"file":"chat-session-naming-service.js","sourceRoot":"","sources":["../../src/common/chat-session-naming-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,4CAUwB;AACxB,4DAAkE;AAElE,sCAA2C;AAE3C,MAAM,0BAA0B,GAAqB;IACjD,EAAE,EAAE,4BAA4B;IAChC,cAAc,EAAE;QACZ,EAAE,EAAE,oCAAoC;QACxC,QAAQ,EAAE,2IAA2I;YACjJ,uGAAuG;YACvG,oIAAoI;YACpI,6GAA6G;YAC7G,6HAA6H;YAC7H,8DAA8D;YAC9D,4JAA4J;YAC5J,oHAAoH;YACpH,kDAAkD;YAClD,qCAAqC;KAC5C;CACJ,CAAC;AAGK,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAEjC,KAAK,CAAC,uBAAuB,CAAC,WAAwB,EAAE,UAAoB;QACxE,MAAM,sBAAsB,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,CAAC,CAAC;QACnH,IAAI,CAAC,CAAC,sBAAsB,YAAY,sBAAsB,CAAC,EAAE,CAAC;YAC9D,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,OAAO,sBAAsB,CAAC,uBAAuB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IACnF,CAAC;CACJ,CAAA;AATY,4DAAwB;AACD;IAA/B,IAAA,kBAAM,EAAC,sBAAY,CAAC;;8DAAsC;mCADlD,wBAAwB;IADpC,IAAA,sBAAU,GAAE;GACA,wBAAwB,CASpC;AAGM,IAAM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,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3D,CAAC;;AA/DQ,wDAAsB;AACxB,yBAAE,GAAG,qBAAqB,AAAxB,CAAyB;AAiBf;IADlB,IAAA,kBAAM,EAAC,+BAAqB,CAAC;;0DACuB;AAGlC;IADlB,IAAA,kBAAM,EAAC,8BAAoB,CAAC;;oEACiC;AAGpD;IADT,IAAA,kBAAM,EAAC,uBAAa,CAAC;;6DACiB;iCAxB9B,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CAgElC"}
1
+ {"version":3,"file":"chat-session-naming-service.js","sourceRoot":"","sources":["../../src/common/chat-session-naming-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,4CASwB;AACxB,4DAAkE;AAElE,sCAA2C;AAE3C,+FAAmF;AAG5E,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAEjC,KAAK,CAAC,uBAAuB,CAAC,WAAwB,EAAE,UAAoB;QACxE,MAAM,sBAAsB,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,CAAC,CAAC;QACnH,IAAI,CAAC,CAAC,sBAAsB,YAAY,sBAAsB,CAAC,EAAE,CAAC;YAC9D,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,OAAO,sBAAsB,CAAC,uBAAuB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IACnF,CAAC;CACJ,CAAA;AATY,4DAAwB;AACD;IAA/B,IAAA,kBAAM,EAAC,sBAAY,CAAC;;8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AAC,MAAM,CAAC,CAAC;QAEjD,OAAO,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3D,CAAC;;AA/DQ,wDAAsB;AACxB,yBAAE,GAAG,qBAAqB,AAAxB,CAAyB;AAiBf;IADlB,IAAA,kBAAM,EAAC,+BAAqB,CAAC;;0DACuB;AAGlC;IADlB,IAAA,kBAAM,EAAC,8BAAoB,CAAC;;oEACiC;AAGpD;IADT,IAAA,kBAAM,EAAC,uBAAa,CAAC;;6DACiB;iCAxB9B,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CAgElC"}
@@ -32,7 +32,7 @@ let ChatSessionSummaryAgent = ChatSessionSummaryAgent_1 = class ChatSessionSumma
32
32
  this.defaultLanguageModelPurpose = 'chat-session-summary';
33
33
  this.languageModelRequirements = [{
34
34
  purpose: 'chat-session-summary',
35
- identifier: 'openai/gpt-4o-mini',
35
+ identifier: 'openai/gpt-4o',
36
36
  }];
37
37
  this.agentSpecificVariables = [];
38
38
  this.functions = [];
@@ -1 +1 @@
1
- {"version":3,"file":"chat-session-summary-agent.js","sourceRoot":"","sources":["../../src/common/chat-session-summary-agent.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oDAAoD;AACpD,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;;;;;AAMhF,4DAA0D;AAC1D,+CAA0E;AAC1E,2FAAkF;AAG3E,IAAM,uBAAuB,+BAA7B,MAAM,uBAAwB,SAAQ,4CAA8B;IAApE;;QAEH,OAAE,GAAG,yBAAuB,CAAC,EAAE,CAAC;QAChC,SAAI,GAAG,sBAAsB,CAAC;QACrB,gBAAW,GAAG,8CAA8C,CAAC;QAC7D,cAAS,GAAG,EAAE,CAAC;QACf,YAAO,GAAuB,CAAC,+DAA2B,CAAC,CAAC;QAClD,gCAA2B,GAAG,sBAAsB,CAAC;QACxE,8BAAyB,GAA+B,CAAC;gBACrD,OAAO,EAAE,sBAAsB;gBAC/B,UAAU,EAAE,oBAAoB;aACnC,CAAC,CAAC;QACM,2BAAsB,GAAG,EAAE,CAAC;QAC5B,cAAS,GAAG,EAAE,CAAC;QACf,cAAS,GAAG,EAAE,CAAC;QACf,SAAI,GAAG,EAAE,CAAC;IACvB,CAAC;;AAhBY,0DAAuB;AACzB,0BAAE,GAAG,4BAA4B,AAA/B,CAAgC;kCADhC,uBAAuB;IADnC,IAAA,sBAAU,GAAE;GACA,uBAAuB,CAgBnC"}
1
+ {"version":3,"file":"chat-session-summary-agent.js","sourceRoot":"","sources":["../../src/common/chat-session-summary-agent.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oDAAoD;AACpD,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;;;;;AAMhF,4DAA0D;AAC1D,+CAA0E;AAC1E,2FAAkF;AAG3E,IAAM,uBAAuB,+BAA7B,MAAM,uBAAwB,SAAQ,4CAA8B;IAApE;;QAEH,OAAE,GAAG,yBAAuB,CAAC,EAAE,CAAC;QAChC,SAAI,GAAG,sBAAsB,CAAC;QACrB,gBAAW,GAAG,8CAA8C,CAAC;QAC7D,cAAS,GAAG,EAAE,CAAC;QACf,YAAO,GAAuB,CAAC,+DAA2B,CAAC,CAAC;QAClD,gCAA2B,GAAG,sBAAsB,CAAC;QACxE,8BAAyB,GAA+B,CAAC;gBACrD,OAAO,EAAE,sBAAsB;gBAC/B,UAAU,EAAE,eAAe;aAC9B,CAAC,CAAC;QACM,2BAAsB,GAAG,EAAE,CAAC;QAC5B,cAAS,GAAG,EAAE,CAAC;QACf,cAAS,GAAG,EAAE,CAAC;QACf,SAAI,GAAG,EAAE,CAAC;IACvB,CAAC;;AAhBY,0DAAuB;AACzB,0BAAE,GAAG,4BAA4B,AAA/B,CAAgC;kCADhC,uBAAuB;IADnC,IAAA,sBAAU,GAAE;GACA,uBAAuB,CAgBnC"}
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@theia/ai-chat",
3
- "version": "1.64.0-next.28+c0fda4c47",
3
+ "version": "1.64.0-next.35+c964c3040",
4
4
  "description": "Theia - AI Chat Extension",
5
5
  "dependencies": {
6
- "@theia/ai-core": "1.64.0-next.28+c0fda4c47",
7
- "@theia/core": "1.64.0-next.28+c0fda4c47",
8
- "@theia/editor": "1.64.0-next.28+c0fda4c47",
9
- "@theia/file-search": "1.64.0-next.28+c0fda4c47",
10
- "@theia/filesystem": "1.64.0-next.28+c0fda4c47",
11
- "@theia/monaco": "1.64.0-next.28+c0fda4c47",
6
+ "@theia/ai-core": "1.64.0-next.35+c964c3040",
7
+ "@theia/core": "1.64.0-next.35+c964c3040",
8
+ "@theia/editor": "1.64.0-next.35+c964c3040",
9
+ "@theia/file-search": "1.64.0-next.35+c964c3040",
10
+ "@theia/filesystem": "1.64.0-next.35+c964c3040",
11
+ "@theia/monaco": "1.64.0-next.35+c964c3040",
12
12
  "@theia/monaco-editor-core": "1.96.302",
13
- "@theia/workspace": "1.64.0-next.28+c0fda4c47",
13
+ "@theia/workspace": "1.64.0-next.35+c964c3040",
14
14
  "js-yaml": "^4.1.0",
15
15
  "minimatch": "^5.1.0",
16
16
  "tslib": "^2.6.2"
@@ -54,5 +54,5 @@
54
54
  "nyc": {
55
55
  "extends": "../../configs/nyc.json"
56
56
  },
57
- "gitHead": "c0fda4c4706fcd4ec1616c8e2f24673352a707d1"
57
+ "gitHead": "c964c30402a92d5ba662fcafa839af99d8760f53"
58
58
  }
@@ -0,0 +1,30 @@
1
+ /* eslint-disable @typescript-eslint/tslint/config */
2
+ // *****************************************************************************
3
+ // Copyright (C) 2025 EclipseSource GmbH and others.
4
+ //
5
+ // This file is licensed under the MIT License.
6
+ // See LICENSE-MIT.txt in the project root for license information.
7
+ // https://opensource.org/license/mit.
8
+ //
9
+ // SPDX-License-Identifier: MIT
10
+ // *****************************************************************************
11
+
12
+ import { PromptVariantSet } from '@theia/ai-core';
13
+
14
+ export const CHAT_SESSION_NAMING_PROMPT: PromptVariantSet = {
15
+ id: 'chat-session-naming-system',
16
+ defaultVariant: {
17
+ id: 'chat-session-naming-system-default',
18
+ template: '{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).\n' +
19
+ 'Made improvements or adaptations to this prompt template? We\'d love for you to share it with the community! Contribute back here: ' +
20
+ 'https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}\n\n' +
21
+ 'Provide a short and descriptive name for the given AI chat conversation of an AI-powered tool based on the conversation below.\n\n' +
22
+ 'The purpose of the name is for users to recognize the chat conversation easily in a list of conversations. ' +
23
+ 'Use the same language for the chat conversation name as used in the provided conversation, if in doubt default to English. ' +
24
+ 'Start the chat conversation name with an upper-case letter. ' +
25
+ 'Below we also provide the already existing other conversation names, make sure your suggestion for a name is unique with respect to the existing ones.\n\n' +
26
+ 'IMPORTANT: Your answer MUST ONLY CONTAIN THE PROPOSED NAME and must not be preceded or followed by any other text.' +
27
+ '\n\nOther session names:\n{{listOfSessionNames}}' +
28
+ '\n\nConversation:\n{{conversation}}',
29
+ }
30
+ };
@@ -22,29 +22,13 @@ import {
22
22
  LanguageModelRequirement,
23
23
  LanguageModelService,
24
24
  PromptService,
25
- PromptVariantSet,
26
25
  UserRequest
27
26
  } from '@theia/ai-core';
28
27
  import { inject, injectable } from '@theia/core/shared/inversify';
29
28
  import { ChatSession } from './chat-service';
30
29
  import { generateUuid } from '@theia/core';
31
30
 
32
- const CHAT_SESSION_NAMING_PROMPT: PromptVariantSet = {
33
- id: 'chat-session-naming-system',
34
- defaultVariant: {
35
- id: 'chat-session-naming-system-default',
36
- template: '{{!-- Made improvements or adaptations to this prompt template? We\'d love for you to share it with the community! Contribute back here: ' +
37
- 'https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}\n\n' +
38
- 'Provide a short and descriptive name for the given AI chat conversation of an AI-powered tool based on the conversation below.\n\n' +
39
- 'The purpose of the name is for users to recognize the chat conversation easily in a list of conversations. ' +
40
- 'Use the same language for the chat conversation name as used in the provided conversation, if in doubt default to English. ' +
41
- 'Start the chat conversation name with an upper-case letter. ' +
42
- 'Below we also provide the already existing other conversation names, make sure your suggestion for a name is unique with respect to the existing ones.\n\n' +
43
- 'IMPORTANT: Your answer MUST ONLY CONTAIN THE PROPOSED NAME and must not be preceded or followed by any other text.' +
44
- '\n\nOther session names:\n{{listOfSessionNames}}' +
45
- '\n\nConversation:\n{{conversation}}',
46
- }
47
- };
31
+ import { CHAT_SESSION_NAMING_PROMPT } from './chat-session-naming-prompt-template';
48
32
 
49
33
  @injectable()
50
34
  export class ChatSessionNamingService {
@@ -33,7 +33,7 @@ export class ChatSessionSummaryAgent extends AbstractStreamParsingChatAgent impl
33
33
  protected readonly defaultLanguageModelPurpose = 'chat-session-summary';
34
34
  languageModelRequirements: LanguageModelRequirement[] = [{
35
35
  purpose: 'chat-session-summary',
36
- identifier: 'openai/gpt-4o-mini',
36
+ identifier: 'openai/gpt-4o',
37
37
  }];
38
38
  override agentSpecificVariables = [];
39
39
  override functions = [];