@theia/ai-chat-ui 1.71.0-next.8 → 1.71.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.
Files changed (106) hide show
  1. package/lib/browser/ai-chat-ui-contribution.d.ts.map +1 -1
  2. package/lib/browser/ai-chat-ui-contribution.js +10 -9
  3. package/lib/browser/ai-chat-ui-contribution.js.map +1 -1
  4. package/lib/browser/ai-chat-ui-frontend-module.d.ts +1 -0
  5. package/lib/browser/ai-chat-ui-frontend-module.d.ts.map +1 -1
  6. package/lib/browser/ai-chat-ui-frontend-module.js +3 -0
  7. package/lib/browser/ai-chat-ui-frontend-module.js.map +1 -1
  8. package/lib/browser/chat-input-mode-contribution.js +1 -1
  9. package/lib/browser/chat-input-mode-contribution.js.map +1 -1
  10. package/lib/browser/chat-input-widget.d.ts +57 -3
  11. package/lib/browser/chat-input-widget.d.ts.map +1 -1
  12. package/lib/browser/chat-input-widget.js +382 -21
  13. package/lib/browser/chat-input-widget.js.map +1 -1
  14. package/lib/browser/chat-response-part-renderer.d.ts +6 -0
  15. package/lib/browser/chat-response-part-renderer.d.ts.map +1 -1
  16. package/lib/browser/chat-response-renderer/delegation-tool-renderer.d.ts +2 -0
  17. package/lib/browser/chat-response-renderer/delegation-tool-renderer.d.ts.map +1 -1
  18. package/lib/browser/chat-response-renderer/delegation-tool-renderer.js +76 -5
  19. package/lib/browser/chat-response-renderer/delegation-tool-renderer.js.map +1 -1
  20. package/lib/browser/chat-response-renderer/index.d.ts +1 -0
  21. package/lib/browser/chat-response-renderer/index.d.ts.map +1 -1
  22. package/lib/browser/chat-response-renderer/index.js +1 -0
  23. package/lib/browser/chat-response-renderer/index.js.map +1 -1
  24. package/lib/browser/chat-response-renderer/question-part-renderer.d.ts +3 -0
  25. package/lib/browser/chat-response-renderer/question-part-renderer.d.ts.map +1 -1
  26. package/lib/browser/chat-response-renderer/question-part-renderer.js +19 -6
  27. package/lib/browser/chat-response-renderer/question-part-renderer.js.map +1 -1
  28. package/lib/browser/chat-response-renderer/tool-call-rendering.d.ts +21 -0
  29. package/lib/browser/chat-response-renderer/tool-call-rendering.d.ts.map +1 -0
  30. package/lib/browser/chat-response-renderer/tool-call-rendering.js +53 -0
  31. package/lib/browser/chat-response-renderer/tool-call-rendering.js.map +1 -0
  32. package/lib/browser/chat-response-renderer/tool-confirmation.d.ts +4 -0
  33. package/lib/browser/chat-response-renderer/tool-confirmation.d.ts.map +1 -1
  34. package/lib/browser/chat-response-renderer/tool-confirmation.js +22 -0
  35. package/lib/browser/chat-response-renderer/tool-confirmation.js.map +1 -1
  36. package/lib/browser/chat-response-renderer/toolcall-part-renderer.d.ts +1 -0
  37. package/lib/browser/chat-response-renderer/toolcall-part-renderer.d.ts.map +1 -1
  38. package/lib/browser/chat-response-renderer/toolcall-part-renderer.js +7 -18
  39. package/lib/browser/chat-response-renderer/toolcall-part-renderer.js.map +1 -1
  40. package/lib/browser/chat-response-renderer/toolcall-utils.d.ts +1 -0
  41. package/lib/browser/chat-response-renderer/toolcall-utils.d.ts.map +1 -1
  42. package/lib/browser/chat-response-renderer/toolcall-utils.js +3 -0
  43. package/lib/browser/chat-response-renderer/toolcall-utils.js.map +1 -1
  44. package/lib/browser/chat-token-usage-indicator-util.d.ts +35 -0
  45. package/lib/browser/chat-token-usage-indicator-util.d.ts.map +1 -0
  46. package/lib/browser/chat-token-usage-indicator-util.js +138 -0
  47. package/lib/browser/chat-token-usage-indicator-util.js.map +1 -0
  48. package/lib/browser/chat-token-usage-indicator-util.spec.d.ts +2 -0
  49. package/lib/browser/chat-token-usage-indicator-util.spec.d.ts.map +1 -0
  50. package/lib/browser/chat-token-usage-indicator-util.spec.js +226 -0
  51. package/lib/browser/chat-token-usage-indicator-util.spec.js.map +1 -0
  52. package/lib/browser/chat-tree-view/chat-view-tree-input-widget.d.ts +6 -1
  53. package/lib/browser/chat-tree-view/chat-view-tree-input-widget.d.ts.map +1 -1
  54. package/lib/browser/chat-tree-view/chat-view-tree-input-widget.js +7 -0
  55. package/lib/browser/chat-tree-view/chat-view-tree-input-widget.js.map +1 -1
  56. package/lib/browser/chat-tree-view/chat-view-tree-widget.d.ts.map +1 -1
  57. package/lib/browser/chat-tree-view/chat-view-tree-widget.js +20 -3
  58. package/lib/browser/chat-tree-view/chat-view-tree-widget.js.map +1 -1
  59. package/lib/browser/chat-view-preferences.d.ts +18 -0
  60. package/lib/browser/chat-view-preferences.d.ts.map +1 -0
  61. package/lib/browser/chat-view-preferences.js +69 -0
  62. package/lib/browser/chat-view-preferences.js.map +1 -0
  63. package/lib/browser/chat-view-widget-toolbar-contribution.d.ts.map +1 -1
  64. package/lib/browser/chat-view-widget-toolbar-contribution.js +3 -2
  65. package/lib/browser/chat-view-widget-toolbar-contribution.js.map +1 -1
  66. package/lib/browser/chat-view-widget.d.ts +1 -2
  67. package/lib/browser/chat-view-widget.d.ts.map +1 -1
  68. package/lib/browser/chat-view-widget.js +3 -7
  69. package/lib/browser/chat-view-widget.js.map +1 -1
  70. package/lib/browser/session-settings-dialog.d.ts +2 -5
  71. package/lib/browser/session-settings-dialog.d.ts.map +1 -1
  72. package/lib/browser/session-settings-dialog.js +15 -33
  73. package/lib/browser/session-settings-dialog.js.map +1 -1
  74. package/lib/common/toolcall-utils.d.ts +6 -0
  75. package/lib/common/toolcall-utils.d.ts.map +1 -0
  76. package/lib/common/toolcall-utils.js +40 -0
  77. package/lib/common/toolcall-utils.js.map +1 -0
  78. package/lib/common/toolcall-utils.spec.d.ts +2 -0
  79. package/lib/common/toolcall-utils.spec.d.ts.map +1 -0
  80. package/lib/common/toolcall-utils.spec.js +102 -0
  81. package/lib/common/toolcall-utils.spec.js.map +1 -0
  82. package/package.json +12 -12
  83. package/src/browser/ai-chat-ui-contribution.ts +10 -9
  84. package/src/browser/ai-chat-ui-frontend-module.ts +4 -0
  85. package/src/browser/chat-input-mode-contribution.ts +1 -1
  86. package/src/browser/chat-input-widget.tsx +481 -14
  87. package/src/browser/chat-response-part-renderer.ts +6 -0
  88. package/src/browser/chat-response-renderer/delegation-tool-renderer.tsx +105 -7
  89. package/src/browser/chat-response-renderer/index.ts +1 -0
  90. package/src/browser/chat-response-renderer/question-part-renderer.tsx +24 -8
  91. package/src/browser/chat-response-renderer/tool-call-rendering.tsx +89 -0
  92. package/src/browser/chat-response-renderer/tool-confirmation.tsx +26 -0
  93. package/src/browser/chat-response-renderer/toolcall-part-renderer.tsx +21 -18
  94. package/src/browser/chat-response-renderer/toolcall-utils.ts +2 -0
  95. package/src/browser/chat-token-usage-indicator-util.spec.ts +262 -0
  96. package/src/browser/chat-token-usage-indicator-util.ts +151 -0
  97. package/src/browser/chat-tree-view/chat-view-tree-input-widget.tsx +9 -1
  98. package/src/browser/chat-tree-view/chat-view-tree-widget.tsx +22 -3
  99. package/src/browser/chat-view-preferences.ts +87 -0
  100. package/src/browser/chat-view-widget-toolbar-contribution.tsx +3 -2
  101. package/src/browser/chat-view-widget.tsx +4 -7
  102. package/src/browser/session-settings-dialog.tsx +15 -97
  103. package/src/browser/style/index.css +164 -54
  104. package/src/browser/style/tool-call-rendering.css +327 -0
  105. package/src/common/toolcall-utils.spec.ts +118 -0
  106. package/src/common/toolcall-utils.ts +36 -0
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2026 EclipseSource GmbH.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.extractJsonStringField = extractJsonStringField;
19
+ /**
20
+ * Extracts a string field value from potentially incomplete JSON.
21
+ * Tries JSON.parse first, then falls back to regex extraction for streaming scenarios.
22
+ */
23
+ function extractJsonStringField(json, fieldName) {
24
+ if (!json) {
25
+ return undefined;
26
+ }
27
+ try {
28
+ const parsed = JSON.parse(json);
29
+ if (parsed && typeof parsed === 'object' && fieldName in parsed && typeof parsed[fieldName] === 'string') {
30
+ return parsed[fieldName];
31
+ }
32
+ }
33
+ catch {
34
+ const regex = new RegExp('"' + fieldName + '"\\s*:\\s*"([^"]*)"?');
35
+ const match = regex.exec(json);
36
+ return match?.[1];
37
+ }
38
+ return undefined;
39
+ }
40
+ //# sourceMappingURL=toolcall-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolcall-utils.js","sourceRoot":"","sources":["../../src/common/toolcall-utils.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;;AAMhF,wDAeC;AAnBD;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,IAAwB,EAAE,SAAiB;IAC9E,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,IAAI,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,SAAS,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,QAAQ,EAAE,CAAC;YACvG,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACL,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,sBAAsB,CAAC,CAAC;QACnE,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/B,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;IACtB,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=toolcall-utils.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolcall-utils.spec.d.ts","sourceRoot":"","sources":["../../src/common/toolcall-utils.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2026 EclipseSource GmbH.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const chai_1 = require("chai");
19
+ const toolcall_utils_1 = require("./toolcall-utils");
20
+ describe('extractJsonStringField', () => {
21
+ describe('complete JSON', () => {
22
+ it('should extract a string field from valid JSON', () => {
23
+ const result = (0, toolcall_utils_1.extractJsonStringField)('{"path": "src/index.ts", "content": "hello"}', 'path');
24
+ (0, chai_1.expect)(result).to.equal('src/index.ts');
25
+ });
26
+ it('should extract a different field from valid JSON', () => {
27
+ const result = (0, toolcall_utils_1.extractJsonStringField)('{"agentId": "coder", "prompt": "fix the bug"}', 'prompt');
28
+ (0, chai_1.expect)(result).to.equal('fix the bug');
29
+ });
30
+ it('should return undefined when field is not present in valid JSON', () => {
31
+ const result = (0, toolcall_utils_1.extractJsonStringField)('{"name": "test"}', 'path');
32
+ (0, chai_1.expect)(result).to.be.undefined;
33
+ });
34
+ it('should return undefined when field value is not a string', () => {
35
+ const result = (0, toolcall_utils_1.extractJsonStringField)('{"count": 42}', 'count');
36
+ (0, chai_1.expect)(result).to.be.undefined;
37
+ });
38
+ });
39
+ describe('incomplete JSON (streaming)', () => {
40
+ it('should extract field from JSON missing closing brace', () => {
41
+ const result = (0, toolcall_utils_1.extractJsonStringField)('{"path": "src/index.ts"', 'path');
42
+ (0, chai_1.expect)(result).to.equal('src/index.ts');
43
+ });
44
+ it('should extract field from JSON with missing closing quote on value', () => {
45
+ const result = (0, toolcall_utils_1.extractJsonStringField)('{"path": "src/index.ts', 'path');
46
+ (0, chai_1.expect)(result).to.equal('src/index.ts');
47
+ });
48
+ it('should extract partial value mid-stream', () => {
49
+ const result = (0, toolcall_utils_1.extractJsonStringField)('{"command": "git st', 'command');
50
+ (0, chai_1.expect)(result).to.equal('git st');
51
+ });
52
+ it('should return empty string when only the key and opening quote are present', () => {
53
+ const result = (0, toolcall_utils_1.extractJsonStringField)('{"path": "', 'path');
54
+ (0, chai_1.expect)(result).to.equal('');
55
+ });
56
+ it('should handle JSON without spaces around colon', () => {
57
+ const result = (0, toolcall_utils_1.extractJsonStringField)('{"path":"src/utils.ts', 'path');
58
+ (0, chai_1.expect)(result).to.equal('src/utils.ts');
59
+ });
60
+ it('should extract first field when additional fields follow incomplete', () => {
61
+ const result = (0, toolcall_utils_1.extractJsonStringField)('{"path": "src/index.ts", "content": "hel', 'path');
62
+ (0, chai_1.expect)(result).to.equal('src/index.ts');
63
+ });
64
+ it('should extract the second field from partial JSON', () => {
65
+ const result = (0, toolcall_utils_1.extractJsonStringField)('{"agentId": "coder", "prompt": "fix the b', 'prompt');
66
+ (0, chai_1.expect)(result).to.equal('fix the b');
67
+ });
68
+ });
69
+ describe('edge cases', () => {
70
+ it('should return undefined for undefined input', () => {
71
+ const result = (0, toolcall_utils_1.extractJsonStringField)(undefined, 'path');
72
+ (0, chai_1.expect)(result).to.be.undefined;
73
+ });
74
+ it('should return undefined for empty string input', () => {
75
+ const result = (0, toolcall_utils_1.extractJsonStringField)('', 'path');
76
+ (0, chai_1.expect)(result).to.be.undefined;
77
+ });
78
+ it('should return undefined when field is not present in partial JSON', () => {
79
+ const result = (0, toolcall_utils_1.extractJsonStringField)('{"other": "value', 'path');
80
+ (0, chai_1.expect)(result).to.be.undefined;
81
+ });
82
+ it('should return undefined for completely malformed input', () => {
83
+ const result = (0, toolcall_utils_1.extractJsonStringField)('{path: value}', 'path');
84
+ (0, chai_1.expect)(result).to.be.undefined;
85
+ });
86
+ it('should return undefined for partial key only', () => {
87
+ const result = (0, toolcall_utils_1.extractJsonStringField)('{"pat', 'path');
88
+ (0, chai_1.expect)(result).to.be.undefined;
89
+ });
90
+ it('should handle escaped quotes - regex stops at first unescaped quote', () => {
91
+ // With complete JSON, JSON.parse handles escapes correctly
92
+ const result = (0, toolcall_utils_1.extractJsonStringField)('{"cmd": "echo \\"hello\\""}', 'cmd');
93
+ (0, chai_1.expect)(result).to.equal('echo "hello"');
94
+ });
95
+ it('should handle escaped quotes in partial JSON - regex captures up to first quote', () => {
96
+ // With incomplete JSON, regex stops at the first unescaped quote character
97
+ const result = (0, toolcall_utils_1.extractJsonStringField)('{"cmd": "echo \\"hello', 'cmd');
98
+ (0, chai_1.expect)(result).to.equal('echo \\');
99
+ });
100
+ });
101
+ });
102
+ //# sourceMappingURL=toolcall-utils.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolcall-utils.spec.js","sourceRoot":"","sources":["../../src/common/toolcall-utils.spec.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;A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C,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;YACpD,MAAM,MAAM,GAAG,IAAA,uCAAsB,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YACvD,IAAA,aAAM,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,qEAAqE,EAAE,GAAG,EAAE;YAC3E,2DAA2D;YAC3D,MAAM,MAAM,GAAG,IAAA,uCAAsB,EAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;YAC5E,IAAA,aAAM,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,iFAAiF,EAAE,GAAG,EAAE;YACvF,2EAA2E;YAC3E,MAAM,MAAM,GAAG,IAAA,uCAAsB,EAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;YACvE,IAAA,aAAM,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@theia/ai-chat-ui",
3
- "version": "1.71.0-next.8+8ec70800c",
3
+ "version": "1.71.1",
4
4
  "description": "Theia - AI Chat UI Extension",
5
5
  "dependencies": {
6
- "@theia/ai-chat": "1.71.0-next.8+8ec70800c",
7
- "@theia/ai-core": "1.71.0-next.8+8ec70800c",
8
- "@theia/core": "1.71.0-next.8+8ec70800c",
9
- "@theia/editor": "1.71.0-next.8+8ec70800c",
10
- "@theia/editor-preview": "1.71.0-next.8+8ec70800c",
11
- "@theia/filesystem": "1.71.0-next.8+8ec70800c",
12
- "@theia/monaco": "1.71.0-next.8+8ec70800c",
6
+ "@theia/ai-chat": "1.71.1",
7
+ "@theia/ai-core": "1.71.1",
8
+ "@theia/core": "1.71.1",
9
+ "@theia/editor": "1.71.1",
10
+ "@theia/editor-preview": "1.71.1",
11
+ "@theia/filesystem": "1.71.1",
12
+ "@theia/monaco": "1.71.1",
13
13
  "@theia/monaco-editor-core": "1.108.201",
14
- "@theia/preferences": "1.71.0-next.8+8ec70800c",
15
- "@theia/workspace": "1.71.0-next.8+8ec70800c",
14
+ "@theia/preferences": "1.71.1",
15
+ "@theia/workspace": "1.71.1",
16
16
  "date-fns": "^4.1.0",
17
17
  "tslib": "^2.6.2",
18
18
  "uuid": "^9.0.1"
@@ -51,10 +51,10 @@
51
51
  "watch": "theiaext watch"
52
52
  },
53
53
  "devDependencies": {
54
- "@theia/ext-scripts": "1.70.0"
54
+ "@theia/ext-scripts": "1.71.1"
55
55
  },
56
56
  "nyc": {
57
57
  "extends": "../../configs/nyc.json"
58
58
  },
59
- "gitHead": "8ec70800c488b9fc44915e8896636628b7cb8636"
59
+ "gitHead": "4d2486fa6f9a99b259ffa8c451754a34c6ad586c"
60
60
  }
@@ -73,7 +73,7 @@ export class AIChatContribution extends AbstractViewContribution<ChatViewWidget>
73
73
 
74
74
  protected static readonly RENAME_CHAT_BUTTON: QuickInputButton = {
75
75
  iconClass: 'codicon-edit',
76
- tooltip: nls.localize('theia/ai/chat-ui/renameChat', 'Rename Chat'),
76
+ tooltip: nls.localizeByDefault('Rename Chat'),
77
77
  };
78
78
  protected static readonly REMOVE_CHAT_BUTTON: QuickInputButton = {
79
79
  iconClass: 'codicon-remove-close',
@@ -158,7 +158,7 @@ export class AIChatContribution extends AbstractViewContribution<ChatViewWidget>
158
158
  registry.registerCommand(AI_CHAT_NEW_CHAT_WINDOW_COMMAND, {
159
159
  execute: () => this.openView().then(() => this.chatService.createSession(ChatAgentLocation.Panel, { focus: true })),
160
160
  isVisible: widget => this.activationService.isActive,
161
- isEnabled: widget => this.activationService.isActive,
161
+ isEnabled: widget => this.activationService.canRun,
162
162
  });
163
163
  registry.registerCommand(ChatCommands.AI_CHAT_NEW_WITH_TASK_CONTEXT, {
164
164
  execute: async () => {
@@ -181,7 +181,7 @@ export class AIChatContribution extends AbstractViewContribution<ChatViewWidget>
181
181
  && !this.taskContextService.hasSummary(activeSession);
182
182
  },
183
183
  isEnabled: widget => {
184
- if (!this.activationService.isActive) { return false; }
184
+ if (!this.activationService.canRun) { return false; }
185
185
  if (widget && !this.withWidget(widget)) { return false; }
186
186
  const activeSession = this.chatService.getActiveSession();
187
187
  return activeSession?.model.location === ChatAgentLocation.Panel
@@ -202,7 +202,7 @@ export class AIChatContribution extends AbstractViewContribution<ChatViewWidget>
202
202
  return !!activeSession && this.taskContextService.hasSummary(activeSession);
203
203
  },
204
204
  isEnabled: widget => {
205
- if (!this.activationService.isActive) { return false; }
205
+ if (!this.activationService.canRun) { return false; }
206
206
  return this.withWidget(widget, () => true);
207
207
  }
208
208
  });
@@ -216,7 +216,7 @@ export class AIChatContribution extends AbstractViewContribution<ChatViewWidget>
216
216
  newSession.model.context.addVariables({ variable: TASK_CONTEXT_VARIABLE, arg: selectedContextId });
217
217
  },
218
218
  isVisible: () => this.activationService.isActive,
219
- isEnabled: () => this.activationService.isActive
219
+ isEnabled: () => this.activationService.canRun
220
220
  });
221
221
  registry.registerCommand(AI_CHAT_SHOW_CHATS_COMMAND, {
222
222
  execute: async () => {
@@ -224,7 +224,7 @@ export class AIChatContribution extends AbstractViewContribution<ChatViewWidget>
224
224
  return this.selectChat();
225
225
  },
226
226
  isEnabled: () => {
227
- if (!this.activationService.isActive) {
227
+ if (!this.activationService.canRun) {
228
228
  return false;
229
229
  }
230
230
  // Enable if there are active sessions with titles OR persisted sessions
@@ -235,13 +235,13 @@ export class AIChatContribution extends AbstractViewContribution<ChatViewWidget>
235
235
  registry.registerCommand(ChatCommands.AI_CHAT_RENAME_SESSION, {
236
236
  execute: (session: ChatSessionMetadata | string) => this.renameSession(typeof session === 'string' ? session : session.sessionId),
237
237
  isVisible: () => this.activationService.isActive,
238
- isEnabled: () => this.activationService.isActive
238
+ isEnabled: () => this.activationService.canRun
239
239
  });
240
240
  registry.registerCommand(ChatCommands.AI_CHAT_DELETE_SESSION, {
241
241
  execute: (session: ChatSessionMetadata | string, confirm?: boolean) =>
242
242
  this.deleteSession(typeof session === 'string' ? session : session.sessionId, typeof session === 'string' ? confirm : true),
243
243
  isVisible: () => this.activationService.isActive,
244
- isEnabled: () => this.activationService.isActive
244
+ isEnabled: () => this.activationService.canRun
245
245
  });
246
246
  registry.registerCommand(ChatCommands.AI_CHAT_NAVIGATE_BACK, {
247
247
  execute: () => this.navigationService.back(),
@@ -335,7 +335,7 @@ export class AIChatContribution extends AbstractViewContribution<ChatViewWidget>
335
335
  command: AI_SHOW_SETTINGS_COMMAND.id,
336
336
  group: 'ai-settings',
337
337
  priority: 3,
338
- tooltip: nls.localize('theia/ai-chat-ui/open-settings-tooltip', 'Open AI settings...'),
338
+ tooltip: nls.localize('theia/ai-chat-ui/open-settings-tooltip', 'Open AI Settings'),
339
339
  isVisible: widget => this.activationService.isActive && this.withWidget(widget),
340
340
  when: ENABLE_AI_CONTEXT_KEY
341
341
  });
@@ -343,6 +343,7 @@ export class AIChatContribution extends AbstractViewContribution<ChatViewWidget>
343
343
  this.taskContextService.onDidChange(() => sessionSummarizibilityChangedEmitter.fire());
344
344
  this.chatService.onSessionEvent(event => event.type === 'activeChange' && sessionSummarizibilityChangedEmitter.fire());
345
345
  this.activationService.onDidChangeActiveStatus(() => sessionSummarizibilityChangedEmitter.fire());
346
+ this.activationService.onDidChangeCanRun(() => sessionSummarizibilityChangedEmitter.fire());
346
347
  registry.registerItem({
347
348
  id: 'chat-view.' + ChatCommands.AI_CHAT_SUMMARIZE_CURRENT_SESSION.id,
348
349
  command: ChatCommands.AI_CHAT_SUMMARIZE_CURRENT_SESSION.id,
@@ -15,6 +15,7 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import '../../src/browser/style/index.css';
18
+ import '../../src/browser/style/tool-call-rendering.css';
18
19
  import { bindRootContributionProvider, CommandContribution, MenuContribution } from '@theia/core';
19
20
  import { bindViewContribution, FrontendApplicationContribution, WidgetFactory, KeybindingContribution } from '@theia/core/lib/browser';
20
21
  import { TabBarToolbarContribution } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
@@ -52,6 +53,7 @@ import { createChatViewTreeWidget, ChatWelcomeMessageProvider } from './chat-tre
52
53
  import { ChatViewTreeWidget } from './chat-tree-view/chat-view-tree-widget';
53
54
  import { ChatViewMenuContribution } from './chat-view-contribution';
54
55
  import { ChatViewLanguageContribution } from './chat-view-language-contribution';
56
+ import { bindChatViewPreferences } from './chat-view-preferences';
55
57
  import { ChatViewWidget } from './chat-view-widget';
56
58
  import { ChatViewWidgetToolbarContribution } from './chat-view-widget-toolbar-contribution';
57
59
  import { ContextVariablePicker } from './context-variable-picker';
@@ -70,6 +72,8 @@ import { ChatInputCapabilitiesContribution } from './chat-input-capabilities-con
70
72
  import { GenericCapabilitiesContribution, GenericCapabilitiesService, GenericCapabilitiesServiceImpl } from './generic-capabilities-service';
71
73
 
72
74
  export default new ContainerModule((bind, _unbind, _isBound, rebind) => {
75
+ bindChatViewPreferences(bind);
76
+
73
77
  bind(AIChatNavigationService).toSelf().inSingletonScope();
74
78
 
75
79
  bindViewContribution(bind, AIChatContribution);
@@ -41,7 +41,7 @@ export class ChatInputModeContribution implements CommandContribution, Keybindin
41
41
  registerKeybindings(keybindings: KeybindingRegistry): void {
42
42
  keybindings.registerKeybinding({
43
43
  command: CHAT_INPUT_CYCLE_MODE_COMMAND.id,
44
- keybinding: 'shift+tab',
44
+ keybinding: 'ctrl+m',
45
45
  when: 'chatInputFocus && chatInputHasModes && !suggestWidgetVisible'
46
46
  });
47
47
  }