@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.
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.js +1 -1
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-widget.d.ts +2 -1
- package/lib/browser/ai-configuration/ai-configuration-widget.d.ts.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-widget.js +6 -1
- package/lib/browser/ai-configuration/ai-configuration-widget.js.map +1 -1
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts +0 -1
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts.map +1 -1
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js +0 -1
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js.map +1 -1
- package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts +1 -0
- package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts.map +1 -1
- package/lib/browser/ai-configuration/token-usage-configuration-widget.js +25 -3
- package/lib/browser/ai-configuration/token-usage-configuration-widget.js.map +1 -1
- package/lib/browser/ai-configuration/tools-configuration-widget.d.ts +28 -0
- package/lib/browser/ai-configuration/tools-configuration-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/tools-configuration-widget.js +148 -0
- package/lib/browser/ai-configuration/tools-configuration-widget.js.map +1 -0
- package/lib/browser/app-tester-chat-agent.d.ts +36 -0
- package/lib/browser/app-tester-chat-agent.d.ts.map +1 -0
- package/lib/browser/app-tester-chat-agent.js +172 -0
- package/lib/browser/app-tester-chat-agent.js.map +1 -0
- package/lib/browser/architect-agent.d.ts.map +1 -1
- package/lib/browser/architect-agent.js +4 -1
- package/lib/browser/architect-agent.js.map +1 -1
- package/lib/browser/coder-agent.d.ts.map +1 -1
- package/lib/browser/coder-agent.js +3 -3
- package/lib/browser/coder-agent.js.map +1 -1
- package/lib/browser/file-changeset-functions.d.ts +25 -6
- package/lib/browser/file-changeset-functions.d.ts.map +1 -1
- package/lib/browser/file-changeset-functions.js +248 -106
- package/lib/browser/file-changeset-functions.js.map +1 -1
- package/lib/browser/frontend-module.d.ts +1 -0
- package/lib/browser/frontend-module.d.ts.map +1 -1
- package/lib/browser/frontend-module.js +21 -5
- package/lib/browser/frontend-module.js.map +1 -1
- package/lib/browser/summarize-session-command-contribution.d.ts +6 -1
- package/lib/browser/summarize-session-command-contribution.d.ts.map +1 -1
- package/lib/browser/summarize-session-command-contribution.js +53 -4
- package/lib/browser/summarize-session-command-contribution.js.map +1 -1
- package/lib/browser/task-context-file-storage-service.d.ts +4 -2
- package/lib/browser/task-context-file-storage-service.d.ts.map +1 -1
- package/lib/browser/task-context-file-storage-service.js +19 -9
- package/lib/browser/task-context-file-storage-service.js.map +1 -1
- package/lib/browser/workspace-functions.d.ts.map +1 -1
- package/lib/browser/workspace-functions.js +6 -10
- package/lib/browser/workspace-functions.js.map +1 -1
- package/lib/browser/workspace-preferences.d.ts +1 -0
- package/lib/browser/workspace-preferences.d.ts.map +1 -1
- package/lib/browser/workspace-preferences.js +9 -1
- package/lib/browser/workspace-preferences.js.map +1 -1
- package/lib/browser/workspace-search-provider.d.ts +7 -1
- package/lib/browser/workspace-search-provider.d.ts.map +1 -1
- package/lib/browser/workspace-search-provider.js +73 -11
- package/lib/browser/workspace-search-provider.js.map +1 -1
- package/lib/browser/workspace-search-provider.spec.d.ts +2 -0
- package/lib/browser/workspace-search-provider.spec.d.ts.map +1 -0
- package/lib/browser/workspace-search-provider.spec.js +227 -0
- package/lib/browser/workspace-search-provider.spec.js.map +1 -0
- package/lib/common/architect-prompt-template.d.ts +1 -0
- package/lib/common/architect-prompt-template.d.ts.map +1 -1
- package/lib/common/architect-prompt-template.js +166 -5
- package/lib/common/architect-prompt-template.js.map +1 -1
- package/lib/common/coder-replace-prompt-template.d.ts +4 -5
- package/lib/common/coder-replace-prompt-template.d.ts.map +1 -1
- package/lib/common/coder-replace-prompt-template.js +95 -67
- package/lib/common/coder-replace-prompt-template.js.map +1 -1
- package/lib/common/file-changeset-function-ids.d.ts +7 -0
- package/lib/common/file-changeset-function-ids.d.ts.map +1 -0
- package/lib/common/file-changeset-function-ids.js +25 -0
- package/lib/common/file-changeset-function-ids.js.map +1 -0
- package/lib/common/summarize-session-commands.d.ts +1 -0
- package/lib/common/summarize-session-commands.d.ts.map +1 -1
- package/lib/common/summarize-session-commands.js +5 -1
- package/lib/common/summarize-session-commands.js.map +1 -1
- package/lib/common/workspace-search-provider-util.d.ts +17 -0
- package/lib/common/workspace-search-provider-util.d.ts.map +1 -0
- package/lib/common/workspace-search-provider-util.js +51 -0
- package/lib/common/workspace-search-provider-util.js.map +1 -0
- package/package.json +19 -18
- package/src/browser/ai-configuration/ai-configuration-view-contribution.ts +1 -1
- package/src/browser/ai-configuration/ai-configuration-widget.tsx +6 -1
- package/src/browser/ai-configuration/prompt-fragments-configuration-widget.tsx +0 -1
- package/src/browser/ai-configuration/token-usage-configuration-widget.tsx +63 -4
- package/src/browser/ai-configuration/tools-configuration-widget.tsx +178 -0
- package/src/browser/app-tester-chat-agent.ts +178 -0
- package/src/browser/architect-agent.ts +5 -2
- package/src/browser/coder-agent.ts +5 -5
- package/src/browser/file-changeset-functions.ts +236 -89
- package/src/browser/frontend-module.ts +33 -10
- package/src/browser/style/index.css +84 -11
- package/src/browser/summarize-session-command-contribution.ts +58 -6
- package/src/browser/task-context-file-storage-service.ts +20 -10
- package/src/browser/workspace-functions.ts +7 -11
- package/src/browser/workspace-preferences.ts +9 -0
- package/src/browser/workspace-search-provider.spec.ts +255 -0
- package/src/browser/workspace-search-provider.ts +78 -11
- package/src/common/architect-prompt-template.ts +165 -5
- package/src/common/coder-replace-prompt-template.ts +101 -65
- package/src/common/file-changeset-function-ids.ts +22 -0
- package/src/common/summarize-session-commands.ts +5 -0
- 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
|
+
}
|