@theia/ai-ide 1.63.0-next.0 → 1.63.0-next.52

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 (102) hide show
  1. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js +1 -1
  2. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js.map +1 -1
  3. package/lib/browser/ai-configuration/ai-configuration-widget.d.ts +2 -1
  4. package/lib/browser/ai-configuration/ai-configuration-widget.d.ts.map +1 -1
  5. package/lib/browser/ai-configuration/ai-configuration-widget.js +6 -1
  6. package/lib/browser/ai-configuration/ai-configuration-widget.js.map +1 -1
  7. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts +0 -1
  8. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts.map +1 -1
  9. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js +0 -1
  10. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js.map +1 -1
  11. package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts +1 -0
  12. package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts.map +1 -1
  13. package/lib/browser/ai-configuration/token-usage-configuration-widget.js +25 -3
  14. package/lib/browser/ai-configuration/token-usage-configuration-widget.js.map +1 -1
  15. package/lib/browser/ai-configuration/tools-configuration-widget.d.ts +28 -0
  16. package/lib/browser/ai-configuration/tools-configuration-widget.d.ts.map +1 -0
  17. package/lib/browser/ai-configuration/tools-configuration-widget.js +148 -0
  18. package/lib/browser/ai-configuration/tools-configuration-widget.js.map +1 -0
  19. package/lib/browser/app-tester-chat-agent.d.ts +36 -0
  20. package/lib/browser/app-tester-chat-agent.d.ts.map +1 -0
  21. package/lib/browser/app-tester-chat-agent.js +172 -0
  22. package/lib/browser/app-tester-chat-agent.js.map +1 -0
  23. package/lib/browser/architect-agent.d.ts.map +1 -1
  24. package/lib/browser/architect-agent.js +4 -1
  25. package/lib/browser/architect-agent.js.map +1 -1
  26. package/lib/browser/coder-agent.d.ts.map +1 -1
  27. package/lib/browser/coder-agent.js +3 -3
  28. package/lib/browser/coder-agent.js.map +1 -1
  29. package/lib/browser/file-changeset-functions.d.ts +25 -6
  30. package/lib/browser/file-changeset-functions.d.ts.map +1 -1
  31. package/lib/browser/file-changeset-functions.js +248 -106
  32. package/lib/browser/file-changeset-functions.js.map +1 -1
  33. package/lib/browser/frontend-module.d.ts +1 -0
  34. package/lib/browser/frontend-module.d.ts.map +1 -1
  35. package/lib/browser/frontend-module.js +21 -5
  36. package/lib/browser/frontend-module.js.map +1 -1
  37. package/lib/browser/summarize-session-command-contribution.d.ts +6 -1
  38. package/lib/browser/summarize-session-command-contribution.d.ts.map +1 -1
  39. package/lib/browser/summarize-session-command-contribution.js +53 -4
  40. package/lib/browser/summarize-session-command-contribution.js.map +1 -1
  41. package/lib/browser/task-context-file-storage-service.d.ts +4 -2
  42. package/lib/browser/task-context-file-storage-service.d.ts.map +1 -1
  43. package/lib/browser/task-context-file-storage-service.js +19 -9
  44. package/lib/browser/task-context-file-storage-service.js.map +1 -1
  45. package/lib/browser/workspace-functions.d.ts.map +1 -1
  46. package/lib/browser/workspace-functions.js +6 -10
  47. package/lib/browser/workspace-functions.js.map +1 -1
  48. package/lib/browser/workspace-preferences.d.ts +1 -0
  49. package/lib/browser/workspace-preferences.d.ts.map +1 -1
  50. package/lib/browser/workspace-preferences.js +9 -1
  51. package/lib/browser/workspace-preferences.js.map +1 -1
  52. package/lib/browser/workspace-search-provider.d.ts +7 -1
  53. package/lib/browser/workspace-search-provider.d.ts.map +1 -1
  54. package/lib/browser/workspace-search-provider.js +73 -11
  55. package/lib/browser/workspace-search-provider.js.map +1 -1
  56. package/lib/browser/workspace-search-provider.spec.d.ts +2 -0
  57. package/lib/browser/workspace-search-provider.spec.d.ts.map +1 -0
  58. package/lib/browser/workspace-search-provider.spec.js +227 -0
  59. package/lib/browser/workspace-search-provider.spec.js.map +1 -0
  60. package/lib/common/architect-prompt-template.d.ts +1 -0
  61. package/lib/common/architect-prompt-template.d.ts.map +1 -1
  62. package/lib/common/architect-prompt-template.js +166 -5
  63. package/lib/common/architect-prompt-template.js.map +1 -1
  64. package/lib/common/coder-replace-prompt-template.d.ts +4 -5
  65. package/lib/common/coder-replace-prompt-template.d.ts.map +1 -1
  66. package/lib/common/coder-replace-prompt-template.js +95 -67
  67. package/lib/common/coder-replace-prompt-template.js.map +1 -1
  68. package/lib/common/file-changeset-function-ids.d.ts +7 -0
  69. package/lib/common/file-changeset-function-ids.d.ts.map +1 -0
  70. package/lib/common/file-changeset-function-ids.js +25 -0
  71. package/lib/common/file-changeset-function-ids.js.map +1 -0
  72. package/lib/common/summarize-session-commands.d.ts +1 -0
  73. package/lib/common/summarize-session-commands.d.ts.map +1 -1
  74. package/lib/common/summarize-session-commands.js +5 -1
  75. package/lib/common/summarize-session-commands.js.map +1 -1
  76. package/lib/common/workspace-search-provider-util.d.ts +17 -0
  77. package/lib/common/workspace-search-provider-util.d.ts.map +1 -0
  78. package/lib/common/workspace-search-provider-util.js +51 -0
  79. package/lib/common/workspace-search-provider-util.js.map +1 -0
  80. package/package.json +19 -18
  81. package/src/browser/ai-configuration/ai-configuration-view-contribution.ts +1 -1
  82. package/src/browser/ai-configuration/ai-configuration-widget.tsx +6 -1
  83. package/src/browser/ai-configuration/prompt-fragments-configuration-widget.tsx +0 -1
  84. package/src/browser/ai-configuration/token-usage-configuration-widget.tsx +63 -4
  85. package/src/browser/ai-configuration/tools-configuration-widget.tsx +178 -0
  86. package/src/browser/app-tester-chat-agent.ts +178 -0
  87. package/src/browser/architect-agent.ts +5 -2
  88. package/src/browser/coder-agent.ts +5 -5
  89. package/src/browser/file-changeset-functions.ts +236 -89
  90. package/src/browser/frontend-module.ts +33 -10
  91. package/src/browser/style/index.css +84 -11
  92. package/src/browser/summarize-session-command-contribution.ts +58 -6
  93. package/src/browser/task-context-file-storage-service.ts +20 -10
  94. package/src/browser/workspace-functions.ts +7 -11
  95. package/src/browser/workspace-preferences.ts +9 -0
  96. package/src/browser/workspace-search-provider.spec.ts +255 -0
  97. package/src/browser/workspace-search-provider.ts +78 -11
  98. package/src/common/architect-prompt-template.ts +165 -5
  99. package/src/common/coder-replace-prompt-template.ts +101 -65
  100. package/src/common/file-changeset-function-ids.ts +22 -0
  101. package/src/common/summarize-session-commands.ts +5 -0
  102. package/src/common/workspace-search-provider-util.ts +50 -0
@@ -0,0 +1,22 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2025 EclipseSource GmbH.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ export const SUGGEST_FILE_CONTENT_ID = 'suggestFileContent';
18
+ export const WRITE_FILE_CONTENT_ID = 'writeFileContent';
19
+ export const SUGGEST_FILE_REPLACEMENTS_ID = 'suggestFileReplacements';
20
+ export const WRITE_FILE_REPLACEMENTS_ID = 'writeFileReplacements';
21
+ export const CLEAR_FILE_CHANGES_ID = 'clearFileChanges';
22
+ export const GET_PROPOSED_CHANGES_ID = 'getProposedFileState';
@@ -20,3 +20,8 @@ export const AI_SUMMARIZE_SESSION_AS_TASK_FOR_CODER = Command.toLocalizedCommand
20
20
  id: 'ai-chat:summarize-session-as-task-for-coder',
21
21
  label: 'Summarize Session as Task for Coder'
22
22
  });
23
+
24
+ export const AI_UPDATE_TASK_CONTEXT_COMMAND = Command.toLocalizedCommand({
25
+ id: 'ai.updateTaskContext',
26
+ label: 'Update Current Task Context'
27
+ });
@@ -0,0 +1,50 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2025 EclipseSource GmbH.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { LinePreview, SearchInWorkspaceResult } from '@theia/search-in-workspace/lib/common/search-in-workspace-interface';
18
+ import { URI } from '@theia/core';
19
+
20
+ /**
21
+ * Optimizes search results for token efficiency while preserving all information.
22
+ * - Groups matches by file to reduce repetition
23
+ * - Trims leading/trailing whitespace from line text
24
+ * - Uses relative file paths
25
+ * - Preserves all line numbers and content
26
+ */
27
+ export function optimizeSearchResults(results: SearchInWorkspaceResult[], workspaceRoot: URI): Array<{ file: string; matches: Array<{ line: number; text: string }> }> {
28
+ return results.map(result => {
29
+ const fileUri = new URI(result.fileUri);
30
+ const relativePath = workspaceRoot.relative(fileUri);
31
+
32
+ return {
33
+ file: relativePath ? relativePath.toString() : result.fileUri,
34
+ matches: result.matches.map(match => {
35
+ let lineText: string;
36
+ if (typeof match.lineText === 'string') {
37
+ lineText = match.lineText;
38
+ } else {
39
+ const linePreview = match.lineText as LinePreview;
40
+ lineText = linePreview.text || '';
41
+ }
42
+
43
+ return {
44
+ line: match.line,
45
+ text: lineText.trim()
46
+ };
47
+ })
48
+ };
49
+ });
50
+ }