@theia/ai-ide 1.63.0-next.24 → 1.63.0
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/agent-configuration-widget.d.ts.map +1 -1
- package/lib/browser/ai-configuration/agent-configuration-widget.js +7 -2
- package/lib/browser/ai-configuration/agent-configuration-widget.js.map +1 -1
- 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 +0 -1
- package/lib/browser/ai-configuration/ai-configuration-widget.d.ts.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-widget.js +0 -1
- package/lib/browser/ai-configuration/ai-configuration-widget.js.map +1 -1
- package/lib/browser/ai-configuration/mcp-configuration-widget.d.ts +4 -1
- package/lib/browser/ai-configuration/mcp-configuration-widget.d.ts.map +1 -1
- package/lib/browser/ai-configuration/mcp-configuration-widget.js +59 -11
- package/lib/browser/ai-configuration/mcp-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 +1 -4
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js.map +1 -1
- package/lib/browser/ai-configuration/template-settings-renderer.js +1 -1
- package/lib/browser/ai-configuration/template-settings-renderer.js.map +1 -1
- package/lib/browser/ai-configuration/tools-configuration-widget.d.ts +0 -1
- package/lib/browser/ai-configuration/tools-configuration-widget.d.ts.map +1 -1
- package/lib/browser/ai-configuration/tools-configuration-widget.js +6 -21
- package/lib/browser/ai-configuration/tools-configuration-widget.js.map +1 -1
- package/lib/browser/app-tester-chat-agent.d.ts +5 -3
- package/lib/browser/app-tester-chat-agent.d.ts.map +1 -1
- package/lib/browser/app-tester-chat-agent.js +41 -31
- package/lib/browser/app-tester-chat-agent.js.map +1 -1
- package/lib/browser/architect-agent.d.ts.map +1 -1
- package/lib/browser/architect-agent.js +6 -3
- package/lib/browser/architect-agent.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 +1 -0
- package/lib/browser/frontend-module.js.map +1 -1
- package/lib/browser/summarize-session-command-contribution.d.ts +8 -1
- package/lib/browser/summarize-session-command-contribution.d.ts.map +1 -1
- package/lib/browser/summarize-session-command-contribution.js +60 -6
- 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-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 +5 -1
- package/lib/browser/workspace-search-provider.d.ts.map +1 -1
- package/lib/browser/workspace-search-provider.js +57 -17
- 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 +4 -2
- package/lib/common/architect-prompt-template.d.ts.map +1 -1
- package/lib/common/architect-prompt-template.js +201 -35
- package/lib/common/architect-prompt-template.js.map +1 -1
- package/lib/common/coder-replace-prompt-template.d.ts +4 -4
- package/lib/common/coder-replace-prompt-template.d.ts.map +1 -1
- package/lib/common/coder-replace-prompt-template.js +8 -8
- package/lib/common/coder-replace-prompt-template.js.map +1 -1
- 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/universal-chat-agent.js +2 -2
- 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/agent-configuration-widget.tsx +7 -5
- package/src/browser/ai-configuration/ai-configuration-view-contribution.ts +1 -1
- package/src/browser/ai-configuration/ai-configuration-widget.tsx +0 -1
- package/src/browser/ai-configuration/mcp-configuration-widget.tsx +82 -14
- package/src/browser/ai-configuration/prompt-fragments-configuration-widget.tsx +1 -4
- package/src/browser/ai-configuration/template-settings-renderer.tsx +1 -1
- package/src/browser/ai-configuration/tools-configuration-widget.tsx +8 -23
- package/src/browser/app-tester-chat-agent.ts +43 -33
- package/src/browser/architect-agent.ts +8 -5
- package/src/browser/frontend-module.ts +2 -0
- package/src/browser/style/index.css +23 -28
- package/src/browser/summarize-session-command-contribution.ts +64 -8
- package/src/browser/task-context-file-storage-service.ts +20 -10
- 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 +62 -16
- package/src/common/architect-prompt-template.ts +201 -35
- package/src/common/coder-replace-prompt-template.ts +8 -8
- package/src/common/summarize-session-commands.ts +5 -0
- package/src/common/universal-chat-agent.ts +2 -2
- package/src/common/workspace-search-provider-util.ts +50 -0
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { PromptVariantSet } from '@theia/ai-core/lib/common';
|
|
2
|
-
export declare const ARCHITECT_TASK_SUMMARY_PROMPT_TEMPLATE_ID = "architect-
|
|
3
|
-
export declare const
|
|
2
|
+
export declare const ARCHITECT_TASK_SUMMARY_PROMPT_TEMPLATE_ID = "architect-tasksummary-create";
|
|
3
|
+
export declare const ARCHITECT_TASK_SUMMARY_UPDATE_PROMPT_TEMPLATE_ID = "architect-tasksummary-update";
|
|
4
|
+
export declare const architectSystemVariants: PromptVariantSet;
|
|
5
|
+
export declare const architectTaskSummaryVariants: PromptVariantSet;
|
|
4
6
|
//# sourceMappingURL=architect-prompt-template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"architect-prompt-template.d.ts","sourceRoot":"","sources":["../../src/common/architect-prompt-template.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAQ7D,eAAO,MAAM,yCAAyC,
|
|
1
|
+
{"version":3,"file":"architect-prompt-template.d.ts","sourceRoot":"","sources":["../../src/common/architect-prompt-template.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAQ7D,eAAO,MAAM,yCAAyC,iCAAiC,CAAC;AACxF,eAAO,MAAM,gDAAgD,iCAAiC,CAAC;AAE/F,eAAO,MAAM,uBAAuB,kBAqEnC,CAAC;AAEF,eAAO,MAAM,4BAA4B,kBAwLxC,CAAC"}
|
|
@@ -1,81 +1,87 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.architectTaskSummaryVariants = exports.architectSystemVariants = exports.ARCHITECT_TASK_SUMMARY_UPDATE_PROMPT_TEMPLATE_ID = exports.ARCHITECT_TASK_SUMMARY_PROMPT_TEMPLATE_ID = void 0;
|
|
4
4
|
const workspace_functions_1 = require("./workspace-functions");
|
|
5
5
|
const context_variables_1 = require("./context-variables");
|
|
6
6
|
const context_functions_1 = require("./context-functions");
|
|
7
|
-
exports.ARCHITECT_TASK_SUMMARY_PROMPT_TEMPLATE_ID = 'architect-
|
|
8
|
-
exports.
|
|
7
|
+
exports.ARCHITECT_TASK_SUMMARY_PROMPT_TEMPLATE_ID = 'architect-tasksummary-create';
|
|
8
|
+
exports.ARCHITECT_TASK_SUMMARY_UPDATE_PROMPT_TEMPLATE_ID = 'architect-tasksummary-update';
|
|
9
|
+
exports.architectSystemVariants = {
|
|
9
10
|
id: 'architect-system',
|
|
10
11
|
defaultVariant: {
|
|
11
12
|
id: 'architect-system-default',
|
|
12
13
|
template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
|
|
13
|
-
Made improvements or adaptations to this prompt template? We
|
|
14
|
+
Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
|
|
14
15
|
https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
|
|
15
16
|
# Instructions
|
|
16
17
|
|
|
17
|
-
You are an AI assistant integrated into Theia IDE, designed to assist software developers. You can
|
|
18
|
-
|
|
18
|
+
You are an AI assistant integrated into Theia IDE, designed to assist software developers. You can only change the files added to the context, but you can navigate and read the
|
|
19
|
+
users workspace using the provided functions.\
|
|
20
|
+
Therefore describe and explain the details or procedures necessary to achieve the desired outcome. If file changes are necessary to help the user, be \
|
|
19
21
|
aware that there is another agent called 'Coder' that can suggest file changes. In this case you can create a description on what to do and tell the user to ask '@Coder' to \
|
|
20
22
|
implement the change plan. If you refer to files, always mention the workspace-relative path.\
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- **~{${workspace_functions_1.
|
|
25
|
-
- **~{${workspace_functions_1.
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
## Context Retrieval
|
|
25
|
+
Use the following functions to interact with the workspace files if you require context:
|
|
26
|
+
- **~{${workspace_functions_1.GET_WORKSPACE_DIRECTORY_STRUCTURE_FUNCTION_ID}}**
|
|
27
|
+
- **~{${workspace_functions_1.GET_WORKSPACE_FILE_LIST_FUNCTION_ID}}**
|
|
28
|
+
- **~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}}**
|
|
29
|
+
- **~{${workspace_functions_1.SEARCH_IN_WORKSPACE_FUNCTION_ID}}**
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
3. **Navigate Step-by-Step**: Move into subdirectories only as needed, confirming each directory level.
|
|
31
|
+
Remember file locations that are relevant for completing your tasks using **~{${context_functions_1.UPDATE_CONTEXT_FILES_FUNCTION_ID}}**
|
|
32
|
+
Only add files that are really relevant to look at later. Only add files that are really relevant to look at later.
|
|
32
33
|
|
|
34
|
+
## File Validation
|
|
35
|
+
Use the following function to retrieve a list of problems in a file if the user requests fixes in a given file: **~{${workspace_functions_1.GET_FILE_DIAGNOSTICS_ID}}**
|
|
33
36
|
## Additional Context
|
|
34
37
|
The following files have been provided for additional context. Some of them may also be referred to by the user (e.g. "this file" or "the attachment"). \
|
|
35
38
|
Always look at the relevant files to understand your task using the function ~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}}
|
|
36
39
|
{{${context_variables_1.CONTEXT_FILES_VARIABLE_ID}}}
|
|
37
40
|
|
|
38
41
|
{{prompt:project-info}}
|
|
42
|
+
|
|
43
|
+
{{${context_variables_1.TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
|
|
39
44
|
`
|
|
40
45
|
},
|
|
41
46
|
variants: [
|
|
42
47
|
{
|
|
43
|
-
id: 'architect-system-
|
|
48
|
+
id: 'architect-system-simple',
|
|
44
49
|
template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
|
|
45
|
-
Made improvements or adaptations to this prompt template? We
|
|
50
|
+
Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
|
|
46
51
|
https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
|
|
47
52
|
# Instructions
|
|
48
|
-
|
|
53
|
+
|
|
49
54
|
You are an AI assistant integrated into Theia IDE, designed to assist software developers. You can't change any files, but you can navigate and read the users workspace using \
|
|
50
55
|
the provided functions. Therefore describe and explain the details or procedures necessary to achieve the desired outcome. If file changes are necessary to help the user, be \
|
|
51
56
|
aware that there is another agent called 'Coder' that can suggest file changes. In this case you can create a description on what to do and tell the user to ask '@Coder' to \
|
|
52
57
|
implement the change plan. If you refer to files, always mention the workspace-relative path.\
|
|
58
|
+
|
|
59
|
+
Use the following functions to interact with the workspace files as needed:
|
|
60
|
+
- **~{${workspace_functions_1.GET_WORKSPACE_DIRECTORY_STRUCTURE_FUNCTION_ID}}**: Returns the complete directory structure.
|
|
61
|
+
- **~{${workspace_functions_1.GET_WORKSPACE_FILE_LIST_FUNCTION_ID}}**: Lists files and directories in a specific directory.
|
|
62
|
+
- **~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}}**: Retrieves the content of a specific file.
|
|
63
|
+
|
|
64
|
+
### Workspace Navigation Guidelines
|
|
53
65
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
- **~{${workspace_functions_1.GET_WORKSPACE_FILE_LIST_FUNCTION_ID}}**
|
|
58
|
-
- **~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}}**
|
|
59
|
-
- **~{${workspace_functions_1.SEARCH_IN_WORKSPACE_FUNCTION_ID}}**
|
|
60
|
-
|
|
61
|
-
Remember file locations that are relevant for completing your tasks using **~{${context_functions_1.UPDATE_CONTEXT_FILES_FUNCTION_ID}}**
|
|
62
|
-
Only add files that are really relevant to look at later. Only add files that are really relevant to look at later.
|
|
66
|
+
1. **Start at the Root**: For general questions (e.g., "How to build the project"), check root-level documentation files or setup files before browsing subdirectories.
|
|
67
|
+
2. **Confirm Paths**: Always verify paths by listing directories or files as you navigate. Avoid assumptions based on user input alone.
|
|
68
|
+
3. **Navigate Step-by-Step**: Move into subdirectories only as needed, confirming each directory level.
|
|
63
69
|
|
|
64
|
-
## File Validation
|
|
65
|
-
Use the following function to retrieve a list of problems in a file if the user requests fixes in a given file: **~{${workspace_functions_1.GET_FILE_DIAGNOSTICS_ID}}**
|
|
66
70
|
## Additional Context
|
|
67
71
|
The following files have been provided for additional context. Some of them may also be referred to by the user (e.g. "this file" or "the attachment"). \
|
|
68
72
|
Always look at the relevant files to understand your task using the function ~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}}
|
|
69
73
|
{{${context_variables_1.CONTEXT_FILES_VARIABLE_ID}}}
|
|
70
74
|
|
|
71
75
|
{{prompt:project-info}}
|
|
72
|
-
|
|
73
|
-
{{${context_variables_1.TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
|
|
74
76
|
`
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
};
|
|
80
|
+
exports.architectTaskSummaryVariants = {
|
|
81
|
+
id: 'architect-tasksummary',
|
|
82
|
+
defaultVariant: {
|
|
83
|
+
id: exports.ARCHITECT_TASK_SUMMARY_PROMPT_TEMPLATE_ID,
|
|
84
|
+
template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
|
|
79
85
|
Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
|
|
80
86
|
https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
|
|
81
87
|
|
|
@@ -92,6 +98,166 @@ Skip irrelevant information, e.g. for discussions, only sum up the final result.
|
|
|
92
98
|
4. If any part of the task is ambiguous, note the ambiguity so that it can be clarified later.
|
|
93
99
|
|
|
94
100
|
Focus on providing actionable steps and implementation guidance. The coding agent needs practical help with this specific coding task.
|
|
101
|
+
|
|
102
|
+
Use the following format, but only include the sections that were discussed in the conversation:
|
|
103
|
+
|
|
104
|
+
# Task Context: [Title Here]
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 1. 📚 Task Definition
|
|
109
|
+
|
|
110
|
+
**Problem Statement / Goal:**
|
|
111
|
+
[Describe what needs to be achieved and why.]
|
|
112
|
+
|
|
113
|
+
**Scope:**
|
|
114
|
+
- **In Scope:**
|
|
115
|
+
[Features, components, or behaviors to be included.]
|
|
116
|
+
- **Out of Scope:**
|
|
117
|
+
[What explicitly won't be part of this task.]
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## 2. 🧠 Design and Implementation
|
|
122
|
+
|
|
123
|
+
**Design Overview:**
|
|
124
|
+
[Summary of architecture and major design decisions.]
|
|
125
|
+
|
|
126
|
+
**Implementation Plan:**
|
|
127
|
+
1. [First major step]
|
|
128
|
+
2. [Second major step]
|
|
129
|
+
3. [Third major step]
|
|
130
|
+
|
|
131
|
+
**Technology Choices:**
|
|
132
|
+
- [Frameworks, libraries, services, tools]
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## 3. 🧪 Testing
|
|
137
|
+
|
|
138
|
+
### 3.1 🛠️ Automated Testing (by Coder)
|
|
139
|
+
|
|
140
|
+
**Automated Test Strategy:**
|
|
141
|
+
[What should be covered by automated tests.]
|
|
142
|
+
|
|
143
|
+
**Test Cases Implemented:**
|
|
144
|
+
- [Unit test 1]
|
|
145
|
+
- [Integration test 1]
|
|
146
|
+
- [E2E test 1]
|
|
147
|
+
|
|
148
|
+
**Test Coverage Targets:**
|
|
149
|
+
[e.g., Minimum 80% code coverage, all workflows tested.]
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### 3.2 🎯 Manual Testing (by Tester)
|
|
154
|
+
|
|
155
|
+
**Manual Testing Strategy:**
|
|
156
|
+
[What manual tests will focus on (e.g., usability, edge cases, exploratory testing).]
|
|
157
|
+
|
|
158
|
+
**Test Setup Instructions:**
|
|
159
|
+
- [Environment setup steps, accounts needed, special configurations]
|
|
160
|
+
|
|
161
|
+
**Test Cases / Test Steps:**
|
|
162
|
+
1. [Action 1]
|
|
163
|
+
2. [Action 2]
|
|
164
|
+
3. [Action 3]
|
|
165
|
+
|
|
166
|
+
**Expected Results:**
|
|
167
|
+
- [Expected behavior at each step]
|
|
168
|
+
|
|
169
|
+
**Known Risks / Focus Areas:**
|
|
170
|
+
- [Potential weak spots, UX concerns, edge cases]
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## 4. 📦 Deliverables
|
|
175
|
+
|
|
176
|
+
**Expected Artifacts:**
|
|
177
|
+
- [Code modules]
|
|
178
|
+
- [Documentation]
|
|
179
|
+
- [Configuration files]
|
|
180
|
+
- [Test reports]
|
|
181
|
+
|
|
182
|
+
**PR Information:**
|
|
183
|
+
- **PR Title:** [Suggested title for the pull request]
|
|
184
|
+
- **PR Description:** [What was implemented, high-level changes, decisions]
|
|
185
|
+
- **Verification Steps:** [Instructions for verifying the PR manually or automatically]
|
|
186
|
+
|
|
187
|
+
**Additional Notes:**
|
|
188
|
+
- [Dependencies]
|
|
189
|
+
- [Migration steps if needed]
|
|
190
|
+
- [Special reviewer instructions]
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## 5. 🔄 Current Status
|
|
195
|
+
|
|
196
|
+
**Progress Summary:**
|
|
197
|
+
[Short free-text update about how far the task has progressed.]
|
|
198
|
+
|
|
199
|
+
**Completed Items:**
|
|
200
|
+
- [List of what has been fully implemented, tested, or merged.]
|
|
201
|
+
|
|
202
|
+
**Open Items:**
|
|
203
|
+
- [List of remaining tasks, missing parts.]
|
|
204
|
+
|
|
205
|
+
**Current Issues / Risks:**
|
|
206
|
+
- [Open problems, bugs found during testing, architectural blockers.]
|
|
207
|
+
|
|
208
|
+
**Next Steps:**
|
|
209
|
+
- [Immediate action items, who should act next.]
|
|
210
|
+
`
|
|
211
|
+
},
|
|
212
|
+
variants: [
|
|
213
|
+
{
|
|
214
|
+
id: exports.ARCHITECT_TASK_SUMMARY_UPDATE_PROMPT_TEMPLATE_ID,
|
|
215
|
+
template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
|
|
216
|
+
Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
|
|
217
|
+
https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
|
|
218
|
+
You are an AI assistant integrated into Theia IDE, designed to update task context files. You can interact provided task context file and propose changes.
|
|
219
|
+
|
|
220
|
+
# Task Document Update Instructions
|
|
221
|
+
|
|
222
|
+
You are an AI agent tasked with updating a technical document based on the current discussion. Your job is to provide the COMPLETE UPDATED DOCUMENT as your response, not\
|
|
223
|
+
commentary about the document.
|
|
224
|
+
|
|
225
|
+
## Analysis Requirements
|
|
226
|
+
|
|
227
|
+
1. **Review the Current Discussion**:
|
|
228
|
+
- Analyze the entire conversation
|
|
229
|
+
- Identify new information, decisions, and changes
|
|
230
|
+
|
|
231
|
+
2. **Examine the Existing Document**:
|
|
232
|
+
- Understand its structure and purpose
|
|
233
|
+
- Identify sections that need updates
|
|
234
|
+
|
|
235
|
+
3. **Update the Document**:
|
|
236
|
+
- Maintain the original structure and formatting
|
|
237
|
+
- Add new information from the discussion
|
|
238
|
+
- Update existing information
|
|
239
|
+
- Remove outdated information if necessary
|
|
240
|
+
- Ensure coherence and organization
|
|
241
|
+
|
|
242
|
+
## IMPORTANT: Response Format
|
|
243
|
+
|
|
244
|
+
YOUR ENTIRE RESPONSE MUST BE THE UPDATED DOCUMENT ONLY. Do not include:
|
|
245
|
+
- Any commentary about what you changed
|
|
246
|
+
- Introduction or explanation text
|
|
247
|
+
- Markdown fences or syntax indicators
|
|
248
|
+
- Clarifying questions
|
|
249
|
+
|
|
250
|
+
Simply output the complete updated document as plain text, which will directly replace the existing document.
|
|
251
|
+
|
|
252
|
+
## Guidelines
|
|
253
|
+
|
|
254
|
+
- Be thorough in capturing all relevant information
|
|
255
|
+
- Maintain the original document's style and tone
|
|
256
|
+
- Use clear, concise language
|
|
257
|
+
- Preserve all formatting from the original document
|
|
258
|
+
- Ensure technical accuracy in all updates
|
|
259
|
+
|
|
260
|
+
{{${context_variables_1.TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
|
|
95
261
|
`
|
|
96
262
|
}
|
|
97
263
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"architect-prompt-template.js","sourceRoot":"","sources":["../../src/common/architect-prompt-template.ts"],"names":[],"mappings":";;;AAWA,+DAG+B;AAC/B,2DAAkG;AAClG,2DAAuE;AAE1D,QAAA,yCAAyC,GAAG,
|
|
1
|
+
{"version":3,"file":"architect-prompt-template.js","sourceRoot":"","sources":["../../src/common/architect-prompt-template.ts"],"names":[],"mappings":";;;AAWA,+DAG+B;AAC/B,2DAAkG;AAClG,2DAAuE;AAE1D,QAAA,yCAAyC,GAAG,8BAA8B,CAAC;AAC3E,QAAA,gDAAgD,GAAG,8BAA8B,CAAC;AAElF,QAAA,uBAAuB,GAAqB;IACrD,EAAE,EAAE,kBAAkB;IACtB,cAAc,EAAE;QACZ,EAAE,EAAE,0BAA0B;QAC9B,QAAQ,EAAE;;;;;;;;;;;;;QAaV,mEAA6C;QAC7C,yDAAmC;QACnC,8CAAwB;QACxB,qDAA+B;;gFAEyC,oDAAgC;;;;sHAIM,6CAAuB;;;iFAG5D,8CAAwB;IACrG,6CAAyB;;;;IAIzB,oDAAgC;CACnC;KACI;IACD,QAAQ,EAAE;QACN;YACI,EAAE,EAAE,yBAAyB;YAC7B,QAAQ,EAAE;;;;;;;;;;;QAWd,mEAA6C;QAC7C,yDAAmC;QACnC,8CAAwB;;;;;;;;;;iFAUiD,8CAAwB;IACrG,6CAAyB;;;CAG5B;SACQ;KAAC;CACT,CAAC;AAEW,QAAA,4BAA4B,GAAqB;IAC1D,EAAE,EAAE,uBAAuB;IAC3B,cAAc,EAAE;QACZ,EAAE,EAAE,iDAAyC;QAC7C,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8HjB;KACI;IACD,QAAQ,EAAE;QAEN;YACI,EAAE,EAAE,wDAAgD;YACpD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6ClB,oDAAgC;CACnC;SAAE;KACE;CACJ,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BasePromptFragment } from '@theia/ai-core/lib/common';
|
|
2
|
-
export declare const CODER_SYSTEM_PROMPT_ID = "coder-
|
|
3
|
-
export declare const CODER_SIMPLE_EDIT_TEMPLATE_ID = "coder-simple-edit";
|
|
4
|
-
export declare const CODER_EDIT_TEMPLATE_ID = "coder-edit";
|
|
5
|
-
export declare const CODER_AGENT_MODE_TEMPLATE_ID = "coder-agent-mode";
|
|
2
|
+
export declare const CODER_SYSTEM_PROMPT_ID = "coder-system";
|
|
3
|
+
export declare const CODER_SIMPLE_EDIT_TEMPLATE_ID = "coder-system-simple-edit";
|
|
4
|
+
export declare const CODER_EDIT_TEMPLATE_ID = "coder-system-edit";
|
|
5
|
+
export declare const CODER_AGENT_MODE_TEMPLATE_ID = "coder-system-agent-mode";
|
|
6
6
|
export declare function getCoderAgentModePromptTemplate(): BasePromptFragment;
|
|
7
7
|
export declare function getCoderPromptTemplateEdit(): BasePromptFragment;
|
|
8
8
|
export declare function getCoderPromptTemplateSimpleEdit(): BasePromptFragment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coder-replace-prompt-template.d.ts","sourceRoot":"","sources":["../../src/common/coder-replace-prompt-template.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAsB/D,eAAO,MAAM,sBAAsB,iBAAiB,CAAC;AAErD,eAAO,MAAM,6BAA6B,
|
|
1
|
+
{"version":3,"file":"coder-replace-prompt-template.d.ts","sourceRoot":"","sources":["../../src/common/coder-replace-prompt-template.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAsB/D,eAAO,MAAM,sBAAsB,iBAAiB,CAAC;AAErD,eAAO,MAAM,6BAA6B,6BAA6B,CAAC;AACxE,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAC1D,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AAEtE,wBAAgB,+BAA+B,IAAI,kBAAkB,CAsHpE;AAED,wBAAgB,0BAA0B,IAAI,kBAAkB,CAmE/D;AAED,wBAAgB,gCAAgC,IAAI,kBAAkB,CA0DrE"}
|
|
@@ -16,10 +16,10 @@ const workspace_functions_1 = require("./workspace-functions");
|
|
|
16
16
|
const context_variables_1 = require("./context-variables");
|
|
17
17
|
const context_functions_1 = require("./context-functions");
|
|
18
18
|
const file_changeset_function_ids_1 = require("./file-changeset-function-ids");
|
|
19
|
-
exports.CODER_SYSTEM_PROMPT_ID = 'coder-
|
|
20
|
-
exports.CODER_SIMPLE_EDIT_TEMPLATE_ID = 'coder-simple-edit';
|
|
21
|
-
exports.CODER_EDIT_TEMPLATE_ID = 'coder-edit';
|
|
22
|
-
exports.CODER_AGENT_MODE_TEMPLATE_ID = 'coder-agent-mode';
|
|
19
|
+
exports.CODER_SYSTEM_PROMPT_ID = 'coder-system';
|
|
20
|
+
exports.CODER_SIMPLE_EDIT_TEMPLATE_ID = 'coder-system-simple-edit';
|
|
21
|
+
exports.CODER_EDIT_TEMPLATE_ID = 'coder-system-edit';
|
|
22
|
+
exports.CODER_AGENT_MODE_TEMPLATE_ID = 'coder-system-agent-mode';
|
|
23
23
|
function getCoderAgentModePromptTemplate() {
|
|
24
24
|
return {
|
|
25
25
|
id: exports.CODER_AGENT_MODE_TEMPLATE_ID,
|
|
@@ -68,9 +68,9 @@ search for files you already know the path for)
|
|
|
68
68
|
- Use:
|
|
69
69
|
- ~{${file_changeset_function_ids_1.WRITE_FILE_REPLACEMENTS_ID}} — to immediately apply targeted code changes (no user review)
|
|
70
70
|
- ~{${file_changeset_function_ids_1.WRITE_FILE_CONTENT_ID}} — to immediately overwrite a file with new content (no user review)
|
|
71
|
-
|
|
71
|
+
|
|
72
72
|
- For incremental changes, use multiple ~{${file_changeset_function_ids_1.WRITE_FILE_REPLACEMENTS_ID}} calls
|
|
73
|
-
-
|
|
73
|
+
- If ~{${file_changeset_function_ids_1.WRITE_FILE_REPLACEMENTS_ID}} continuously fails use ~{${file_changeset_function_ids_1.WRITE_FILE_CONTENT_ID}}.
|
|
74
74
|
|
|
75
75
|
### Validation
|
|
76
76
|
- ~{${workspace_functions_1.GET_FILE_DIAGNOSTICS_ID}} — detect syntax, lint, or type errors
|
|
@@ -202,7 +202,7 @@ You have previously proposed changes for the following files. Some suggestions m
|
|
|
202
202
|
{{${context_variables_1.TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
|
|
203
203
|
|
|
204
204
|
## Final Instruction
|
|
205
|
-
- Your task is to propose changes to be reviewed by the user
|
|
205
|
+
- Your task is to propose changes to be reviewed by the user. Always do so using the functions described above.
|
|
206
206
|
- Tasks such as building or liniting run on the workspace state, the user has to accept the changes beforehand
|
|
207
207
|
- Do not run a build or any error checking before the users asks you to
|
|
208
208
|
- Focus on the task that the user described
|
|
@@ -261,7 +261,7 @@ You have previously proposed changes for the following files. Some suggestions m
|
|
|
261
261
|
{{${context_variables_1.TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
|
|
262
262
|
|
|
263
263
|
## Final Instruction
|
|
264
|
-
- Your task is to propose changes to be reviewed by the user
|
|
264
|
+
- Your task is to propose changes to be reviewed by the user. Always do so using the functions described above.
|
|
265
265
|
- Tasks such as building or liniting run on the workspace state, the user has to accept the changes beforehand
|
|
266
266
|
- Do not run a build or any error checking before the users asks you to
|
|
267
267
|
- Focus on the task that the user described
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coder-replace-prompt-template.js","sourceRoot":"","sources":["../../src/common/coder-replace-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;;;AAGhF,4CAAgE;AAChE,+DAQ+B;AAC/B,2DAAkG;AAClG,2DAAuE;AACvE,+EAOuC;AAE1B,QAAA,sBAAsB,GAAG,cAAc,CAAC;AAExC,QAAA,6BAA6B,GAAG,
|
|
1
|
+
{"version":3,"file":"coder-replace-prompt-template.js","sourceRoot":"","sources":["../../src/common/coder-replace-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;;;AAGhF,4CAAgE;AAChE,+DAQ+B;AAC/B,2DAAkG;AAClG,2DAAuE;AACvE,+EAOuC;AAE1B,QAAA,sBAAsB,GAAG,cAAc,CAAC;AAExC,QAAA,6BAA6B,GAAG,0BAA0B,CAAC;AAC3D,QAAA,sBAAsB,GAAG,mBAAmB,CAAC;AAC7C,QAAA,4BAA4B,GAAG,yBAAyB,CAAC;AAEtE,SAAgB,+BAA+B;IAC3C,OAAO;QACH,EAAE,EAAE,oCAA4B;QAChC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAiCZ,mEAA6C;MAC7C,yDAAmC;MACnC,8CAAwB;MACxB,qDAA+B;;MAE/B,oDAAgC;;;;;QAK9B,wDAA0B;QAC1B,mDAAqB;;4CAEe,wDAA0B;SAC7D,wDAA0B,8BAA8B,mDAAqB;;;MAGhF,6CAAuB;;;UAGnB,4CAAsB;UACtB,0CAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iFAsCmD,8CAAwB;IACrG,6CAAyB;;;;;;;;;;IAUzB,oDAAgC;;;;;;;;;CASnC;QACO,GAAG,CAAC,EAAE,SAAS,EAAE,8BAAsB,EAAE,CAAC;KAC7C,CAAC;AACN,CAAC;AAtHD,0EAsHC;AAED,SAAgB,0BAA0B;IACtC,OAAO;QACH,EAAE,EAAE,8BAAsB;QAC1B,QAAQ,EAAE;;;;;;;;QAQV,mEAA6C;QAC7C,yDAAmC;QACnC,8CAAwB;QACxB,qDAA+B;;;gFAGyC,oDAAgC;;;;;;;;;oCAS5E,qDAAuB;;QAEnD,0DAA4B;QAC5B,qDAAuB;WACpB,0DAA4B,8BAA8B,qDAAuB;QACpF,mDAAqB;;;;;;;2EAO8C,4CAAsB,8BAA8B,0CAAoB;;;;;;sHAM7B,6CAAuB;;;;;;iFAM5D,8CAAwB;IACrG,6CAAyB;;;;IAIzB,wCAA8B;;;;IAI9B,oDAAgC;;;;;;;CAOnC;KAAC,CAAC;AACH,CAAC;AAnED,gEAmEC;AAED,SAAgB,gCAAgC;IAC5C,OAAO;QACH,EAAE,EAAE,qCAA6B;QACjC,QAAQ,EAAE;;;;;;;;QAQV,mEAA6C;QAC7C,yDAAmC;QACnC,8CAAwB;QACxB,qDAA+B;;;gFAGyC,oDAAgC;;;;;;;;;oCAS5E,qDAAuB;;QAEnD,0DAA4B;QAC5B,qDAAuB;WACpB,0DAA4B,8BAA8B,qDAAuB;QACpF,mDAAqB;;;;;;;;iFAQoD,8CAAwB;IACrG,6CAAyB;;;;IAIzB,wCAA8B;;;;IAI9B,oDAAgC;;;;;;;CAOnC;QACO,GAAG,CAAC,EAAE,SAAS,EAAE,8BAAsB,EAAE,CAAC;KAC7C,CAAC;AACN,CAAC;AA1DD,4EA0DC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summarize-session-commands.d.ts","sourceRoot":"","sources":["../../src/common/summarize-session-commands.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,eAAO,MAAM,sCAAsC,SAGjD,CAAC"}
|
|
1
|
+
{"version":3,"file":"summarize-session-commands.d.ts","sourceRoot":"","sources":["../../src/common/summarize-session-commands.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,eAAO,MAAM,sCAAsC,SAGjD,CAAC;AAEH,eAAO,MAAM,8BAA8B,SAGzC,CAAC"}
|
|
@@ -15,10 +15,14 @@
|
|
|
15
15
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
16
|
// *****************************************************************************
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.AI_SUMMARIZE_SESSION_AS_TASK_FOR_CODER = void 0;
|
|
18
|
+
exports.AI_UPDATE_TASK_CONTEXT_COMMAND = exports.AI_SUMMARIZE_SESSION_AS_TASK_FOR_CODER = void 0;
|
|
19
19
|
const core_1 = require("@theia/core");
|
|
20
20
|
exports.AI_SUMMARIZE_SESSION_AS_TASK_FOR_CODER = core_1.Command.toLocalizedCommand({
|
|
21
21
|
id: 'ai-chat:summarize-session-as-task-for-coder',
|
|
22
22
|
label: 'Summarize Session as Task for Coder'
|
|
23
23
|
});
|
|
24
|
+
exports.AI_UPDATE_TASK_CONTEXT_COMMAND = core_1.Command.toLocalizedCommand({
|
|
25
|
+
id: 'ai.updateTaskContext',
|
|
26
|
+
label: 'Update Current Task Context'
|
|
27
|
+
});
|
|
24
28
|
//# sourceMappingURL=summarize-session-commands.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summarize-session-commands.js","sourceRoot":"","sources":["../../src/common/summarize-session-commands.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,sCAAsC;AAEzB,QAAA,sCAAsC,GAAG,cAAO,CAAC,kBAAkB,CAAC;IAC7E,EAAE,EAAE,6CAA6C;IACjD,KAAK,EAAE,qCAAqC;CAC/C,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"summarize-session-commands.js","sourceRoot":"","sources":["../../src/common/summarize-session-commands.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,sCAAsC;AAEzB,QAAA,sCAAsC,GAAG,cAAO,CAAC,kBAAkB,CAAC;IAC7E,EAAE,EAAE,6CAA6C;IACjD,KAAK,EAAE,qCAAqC;CAC/C,CAAC,CAAC;AAEU,QAAA,8BAA8B,GAAG,cAAO,CAAC,kBAAkB,CAAC;IACrE,EAAE,EAAE,sBAAsB;IAC1B,KAAK,EAAE,6BAA6B;CACvC,CAAC,CAAC"}
|
|
@@ -36,8 +36,8 @@ let UniversalChatAgent = class UniversalChatAgent extends chat_agents_1.Abstract
|
|
|
36
36
|
+ 'answers to general programming and software development questions. It is also the fall-back for any generic '
|
|
37
37
|
+ 'questions the user might ask. The universal agent currently does not have any context by default, i.e. it cannot '
|
|
38
38
|
+ 'access the current user context or the workspace.');
|
|
39
|
-
this.prompts = [{ id: 'universal-
|
|
40
|
-
this.systemPromptId = 'universal-
|
|
39
|
+
this.prompts = [{ id: 'universal-system', defaultVariant: universal_prompt_template_1.universalTemplate, variants: [universal_prompt_template_1.universalTemplateVariant] }];
|
|
40
|
+
this.systemPromptId = 'universal-system';
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
exports.UniversalChatAgent = UniversalChatAgent;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SearchInWorkspaceResult } from '@theia/search-in-workspace/lib/common/search-in-workspace-interface';
|
|
2
|
+
import { URI } from '@theia/core';
|
|
3
|
+
/**
|
|
4
|
+
* Optimizes search results for token efficiency while preserving all information.
|
|
5
|
+
* - Groups matches by file to reduce repetition
|
|
6
|
+
* - Trims leading/trailing whitespace from line text
|
|
7
|
+
* - Uses relative file paths
|
|
8
|
+
* - Preserves all line numbers and content
|
|
9
|
+
*/
|
|
10
|
+
export declare function optimizeSearchResults(results: SearchInWorkspaceResult[], workspaceRoot: URI): Array<{
|
|
11
|
+
file: string;
|
|
12
|
+
matches: Array<{
|
|
13
|
+
line: number;
|
|
14
|
+
text: string;
|
|
15
|
+
}>;
|
|
16
|
+
}>;
|
|
17
|
+
//# sourceMappingURL=workspace-search-provider-util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-search-provider-util.d.ts","sourceRoot":"","sources":["../../src/common/workspace-search-provider-util.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAe,uBAAuB,EAAE,MAAM,qEAAqE,CAAC;AAC3H,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,uBAAuB,EAAE,EAAE,aAAa,EAAE,GAAG,GAAG,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAuBrK"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2025 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.optimizeSearchResults = void 0;
|
|
19
|
+
const core_1 = require("@theia/core");
|
|
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
|
+
function optimizeSearchResults(results, workspaceRoot) {
|
|
28
|
+
return results.map(result => {
|
|
29
|
+
const fileUri = new core_1.URI(result.fileUri);
|
|
30
|
+
const relativePath = workspaceRoot.relative(fileUri);
|
|
31
|
+
return {
|
|
32
|
+
file: relativePath ? relativePath.toString() : result.fileUri,
|
|
33
|
+
matches: result.matches.map(match => {
|
|
34
|
+
let lineText;
|
|
35
|
+
if (typeof match.lineText === 'string') {
|
|
36
|
+
lineText = match.lineText;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
const linePreview = match.lineText;
|
|
40
|
+
lineText = linePreview.text || '';
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
line: match.line,
|
|
44
|
+
text: lineText.trim()
|
|
45
|
+
};
|
|
46
|
+
})
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
exports.optimizeSearchResults = optimizeSearchResults;
|
|
51
|
+
//# sourceMappingURL=workspace-search-provider-util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-search-provider-util.js","sourceRoot":"","sources":["../../src/common/workspace-search-provider-util.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;;;AAGhF,sCAAkC;AAElC;;;;;;GAMG;AACH,SAAgB,qBAAqB,CAAC,OAAkC,EAAE,aAAkB;IACxF,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;QACxB,MAAM,OAAO,GAAG,IAAI,UAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACxC,MAAM,YAAY,GAAG,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAErD,OAAO;YACH,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO;YAC7D,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;gBAChC,IAAI,QAAgB,CAAC;gBACrB,IAAI,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;oBACrC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;gBAC9B,CAAC;qBAAM,CAAC;oBACJ,MAAM,WAAW,GAAG,KAAK,CAAC,QAAuB,CAAC;oBAClD,QAAQ,GAAG,WAAW,CAAC,IAAI,IAAI,EAAE,CAAC;gBACtC,CAAC;gBAED,OAAO;oBACH,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE;iBACxB,CAAC;YACN,CAAC,CAAC;SACL,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC;AAvBD,sDAuBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/ai-ide",
|
|
3
|
-
"version": "1.63.0
|
|
3
|
+
"version": "1.63.0",
|
|
4
4
|
"description": "AI IDE Agents Extension",
|
|
5
5
|
"license": "EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -15,19 +15,19 @@
|
|
|
15
15
|
"theia-extension"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@theia/ai-chat": "1.63.0
|
|
19
|
-
"@theia/ai-chat-ui": "1.63.0
|
|
20
|
-
"@theia/ai-core": "1.63.0
|
|
21
|
-
"@theia/ai-mcp": "1.63.0
|
|
22
|
-
"@theia/core": "1.63.0
|
|
23
|
-
"@theia/filesystem": "1.63.0
|
|
24
|
-
"@theia/markers": "1.63.0
|
|
25
|
-
"@theia/monaco": "1.63.0
|
|
26
|
-
"@theia/navigator": "1.63.0
|
|
27
|
-
"@theia/search-in-workspace": "1.63.0
|
|
28
|
-
"@theia/task": "1.63.0
|
|
29
|
-
"@theia/terminal": "1.63.0
|
|
30
|
-
"@theia/workspace": "1.63.0
|
|
18
|
+
"@theia/ai-chat": "1.63.0",
|
|
19
|
+
"@theia/ai-chat-ui": "1.63.0",
|
|
20
|
+
"@theia/ai-core": "1.63.0",
|
|
21
|
+
"@theia/ai-mcp": "1.63.0",
|
|
22
|
+
"@theia/core": "1.63.0",
|
|
23
|
+
"@theia/filesystem": "1.63.0",
|
|
24
|
+
"@theia/markers": "1.63.0",
|
|
25
|
+
"@theia/monaco": "1.63.0",
|
|
26
|
+
"@theia/navigator": "1.63.0",
|
|
27
|
+
"@theia/search-in-workspace": "1.63.0",
|
|
28
|
+
"@theia/task": "1.63.0",
|
|
29
|
+
"@theia/terminal": "1.63.0",
|
|
30
|
+
"@theia/workspace": "1.63.0",
|
|
31
31
|
"date-fns": "^4.1.0",
|
|
32
32
|
"ignore": "^6.0.0",
|
|
33
33
|
"js-yaml": "^4.1.0",
|
|
@@ -37,12 +37,13 @@
|
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@theia/cli": "1.63.0
|
|
41
|
-
"@theia/test": "1.63.0
|
|
40
|
+
"@theia/cli": "1.63.0",
|
|
41
|
+
"@theia/test": "1.63.0"
|
|
42
42
|
},
|
|
43
43
|
"theiaExtensions": [
|
|
44
44
|
{
|
|
45
|
-
"frontend": "lib/browser/frontend-module"
|
|
45
|
+
"frontend": "lib/browser/frontend-module",
|
|
46
|
+
"secondaryWindow": "lib/browser/frontend-module"
|
|
46
47
|
}
|
|
47
48
|
],
|
|
48
49
|
"files": [
|
|
@@ -60,5 +61,5 @@
|
|
|
60
61
|
"nyc": {
|
|
61
62
|
"extends": "../../configs/nyc.json"
|
|
62
63
|
},
|
|
63
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "facf442522991134333495a0b90cf56a56990280"
|
|
64
65
|
}
|
|
@@ -99,13 +99,15 @@ export class AIAgentConfigurationWidget extends ReactWidget {
|
|
|
99
99
|
|
|
100
100
|
protected render(): React.ReactNode {
|
|
101
101
|
return <div className='ai-agent-configuration-main'>
|
|
102
|
-
<div className='configuration-agents-list
|
|
102
|
+
<div className='configuration-agents-list theia-Tree theia-TreeContainer' style={{ width: '25%' }}>
|
|
103
103
|
<ul>
|
|
104
|
-
{this.agentService.getAllAgents().map(agent =>
|
|
105
|
-
|
|
104
|
+
{this.agentService.getAllAgents().map(agent => {
|
|
105
|
+
const isActive = this.aiConfigurationSelectionService.getActiveAgent()?.id === agent.id;
|
|
106
|
+
const className = `theia-TreeNode theia-CompositeTreeNode theia-ExpandableTreeNode${isActive ? ' theia-mod-selected' : ''}`;
|
|
107
|
+
return <li key={agent.id} className={className} onClick={() => this.setActiveAgent(agent)}>
|
|
106
108
|
{this.renderAgentName(agent)}
|
|
107
|
-
</li
|
|
108
|
-
)}
|
|
109
|
+
</li>;
|
|
110
|
+
})}
|
|
109
111
|
</ul>
|
|
110
112
|
<div className='configuration-agents-add'>
|
|
111
113
|
<button
|
|
@@ -60,7 +60,7 @@ export class AIAgentConfigurationViewContribution extends AIViewContribution<AIC
|
|
|
60
60
|
tooltip: nls.localize('theia/ai-ide/open-agent-settings-tooltip', 'Open Agent settings...'),
|
|
61
61
|
group: 'ai-settings',
|
|
62
62
|
priority: 2,
|
|
63
|
-
isVisible: widget => widget instanceof ChatViewWidget
|
|
63
|
+
isVisible: widget => this.activationService.isActive && widget instanceof ChatViewWidget
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
import { BaseWidget, BoxLayout, codicon, DockPanel, WidgetManager } from '@theia/core/lib/browser';
|
|
18
18
|
import { TheiaDockPanel } from '@theia/core/lib/browser/shell/theia-dock-panel';
|
|
19
19
|
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
|
|
20
|
-
import '../../../src/browser/style/index.css';
|
|
21
20
|
import { AIAgentConfigurationWidget } from './agent-configuration-widget';
|
|
22
21
|
import { AIVariableConfigurationWidget } from './variable-configuration-widget';
|
|
23
22
|
import { AIToolsConfigurationWidget } from './tools-configuration-widget';
|