@theia/ai-ide 1.66.0-next.0 โ†’ 1.66.0-next.27

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 (31) hide show
  1. package/lib/browser/architect-agent.d.ts.map +1 -1
  2. package/lib/browser/architect-agent.js +1 -1
  3. package/lib/browser/architect-agent.js.map +1 -1
  4. package/lib/browser/frontend-module.d.ts.map +1 -1
  5. package/lib/browser/frontend-module.js +3 -0
  6. package/lib/browser/frontend-module.js.map +1 -1
  7. package/lib/browser/summarize-session-command-contribution.js +4 -4
  8. package/lib/browser/summarize-session-command-contribution.js.map +1 -1
  9. package/lib/browser/task-context-agent.d.ts +13 -0
  10. package/lib/browser/task-context-agent.d.ts.map +1 -0
  11. package/lib/browser/task-context-agent.js +45 -0
  12. package/lib/browser/task-context-agent.js.map +1 -0
  13. package/lib/common/architect-prompt-template.d.ts +0 -3
  14. package/lib/common/architect-prompt-template.d.ts.map +1 -1
  15. package/lib/common/architect-prompt-template.js +1 -199
  16. package/lib/common/architect-prompt-template.js.map +1 -1
  17. package/lib/common/coder-replace-prompt-template.d.ts.map +1 -1
  18. package/lib/common/coder-replace-prompt-template.js +8 -2
  19. package/lib/common/coder-replace-prompt-template.js.map +1 -1
  20. package/lib/common/task-context-prompt-template.d.ts +8 -0
  21. package/lib/common/task-context-prompt-template.d.ts.map +1 -0
  22. package/lib/common/task-context-prompt-template.js +217 -0
  23. package/lib/common/task-context-prompt-template.js.map +1 -0
  24. package/package.json +18 -18
  25. package/src/browser/architect-agent.ts +2 -2
  26. package/src/browser/frontend-module.ts +4 -0
  27. package/src/browser/summarize-session-command-contribution.ts +4 -4
  28. package/src/browser/task-context-agent.ts +40 -0
  29. package/src/common/architect-prompt-template.ts +11 -206
  30. package/src/common/coder-replace-prompt-template.ts +8 -2
  31. package/src/common/task-context-prompt-template.ts +229 -0
@@ -0,0 +1,229 @@
1
+ /* eslint-disable @typescript-eslint/tslint/config */
2
+ // *****************************************************************************
3
+ // Copyright (C) 2025 EclipseSource GmbH and others.
4
+ //
5
+ // This file is licensed under the MIT License.
6
+ // See LICENSE-MIT.txt in the project root for license information.
7
+ // https://opensource.org/license/mit.
8
+ //
9
+ // SPDX-License-Identifier: MIT
10
+ // *****************************************************************************
11
+ import { PromptVariantSet } from '@theia/ai-core/lib/common';
12
+ import { TASK_CONTEXT_SUMMARY_VARIABLE_ID } from './context-variables';
13
+
14
+ export const TASK_CONTEXT_CREATE_PROMPT_ID = 'task-context-create';
15
+ export const TASK_CONTEXT_TEMPLATE_PROMPT_ID = 'task-context-template';
16
+ export const TASK_CONTEXT_UPDATE_PROMPT_ID = 'task-context-update';
17
+
18
+ export const taskContextSystemVariants = <PromptVariantSet>{
19
+ id: TASK_CONTEXT_CREATE_PROMPT_ID,
20
+ defaultVariant: {
21
+ id: 'task-context-create-default',
22
+ template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
23
+ Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
24
+ https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
25
+
26
+ Your task is to analyze the current chat session and summarize it to prepare to complete the coding task.
27
+ Your instructions should be complete. They are used by a coding agent.
28
+ Include all necessary information.
29
+ Use unique identifiers such as file paths or URIs to artifacts.
30
+ Skip irrelevant information, e.g. for discussions, only sum up the final result.
31
+
32
+ ## Instructions
33
+ 1. Analyze the conversation carefully.
34
+ 2. Identify the main coding objective and requirements.
35
+ 3. Propose a clear approach to implement the requested functionality in task steps.
36
+ 4. If any part of the task is ambiguous, note the ambiguity so that it can be clarified later.
37
+ 5. If there are any relevant examples on how to implement something correctly, add them
38
+
39
+ Focus on providing actionable steps and implementation guidance. The coding agent needs practical help with this specific coding task.
40
+
41
+ Use the following template format:
42
+
43
+ {{prompt:${TASK_CONTEXT_TEMPLATE_PROMPT_ID}}}
44
+ `
45
+ }
46
+ };
47
+
48
+ export const taskContextTemplateVariants = <PromptVariantSet>{
49
+ id: TASK_CONTEXT_TEMPLATE_PROMPT_ID,
50
+ defaultVariant: {
51
+ id: 'task-context-template-default',
52
+ template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
53
+ Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
54
+ https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
55
+
56
+ # Task Context: [Title Here]
57
+
58
+ ---
59
+
60
+ ## 1. ๐Ÿ“š Task Definition
61
+
62
+ **Problem Statement / Goal:**
63
+ [Describe what needs to be achieved and why.]
64
+
65
+ **Scope:**
66
+ - **In Scope:**
67
+ [Features, components, or behaviors to be included.]
68
+ - **Out of Scope:**
69
+ [What explicitly won't be part of this task.]
70
+
71
+ ---
72
+
73
+ ## 2. ๐Ÿง  Design and Implementation
74
+
75
+ **Design Overview:**
76
+ [Summary of architecture and major design decisions.]
77
+
78
+ **Implementation Plan:**
79
+ 1. [First major step]
80
+ 2. [Second major step]
81
+ 3. [Third major step]
82
+
83
+ **Technology Choices:**
84
+ - [Frameworks, libraries, services, tools]
85
+
86
+ **Files expected to be changed**
87
+ List all files that are expected to be changed (using relative file path) and quickly explain what is expected to be changed in this file.
88
+
89
+ ### Examples
90
+
91
+ List all examples of existing code that are useful to understand the design and do the implementation.
92
+ These examples are not the files supposed to be changed, but code that shows how to implement specific things.
93
+ Prefer to mention files instead of adding their content.
94
+ Explain the purpose of every example.
95
+
96
+ ---
97
+
98
+ ## 3. ๐Ÿงช Testing
99
+
100
+ ### 3.1 ๐Ÿ› ๏ธ Automated Testing (by Coder)
101
+
102
+ **Automated Test Strategy:**
103
+ [What should be covered by automated tests.]
104
+
105
+ **Test Cases Implemented:**
106
+ - [Unit test 1]
107
+ - [Integration test 1]
108
+ - [E2E test 1]
109
+
110
+ **Test Coverage Targets:**
111
+ [e.g., Minimum 80% code coverage, all workflows tested.]
112
+
113
+ ---
114
+
115
+ ### 3.2 ๐ŸŽฏ Manual Testing (by Tester)
116
+
117
+ **Manual Testing Strategy:**
118
+ [What manual tests will focus on (e.g., usability, edge cases, exploratory testing).]
119
+
120
+ **Test Setup Instructions:**
121
+ - [Environment setup steps, accounts needed, special configurations]
122
+
123
+ **Test Cases / Test Steps:**
124
+ 1. [Action 1]
125
+ 2. [Action 2]
126
+ 3. [Action 3]
127
+
128
+ **Expected Results:**
129
+ - [Expected behavior at each step]
130
+
131
+ **Known Risks / Focus Areas:**
132
+ - [Potential weak spots, UX concerns, edge cases]
133
+
134
+ ---
135
+
136
+ ## 4. ๐Ÿ“ฆ Deliverables
137
+
138
+ **Expected Artifacts:**
139
+ - [Code modules]
140
+ - [Documentation]
141
+ - [Configuration files]
142
+ - [Test reports]
143
+
144
+ **PR Information:**
145
+ - **PR Title:** [Suggested title for the pull request]
146
+ - **PR Description:** [What was implemented, high-level changes, decisions]
147
+ - **Verification Steps:** [Instructions for verifying the PR manually or automatically]
148
+
149
+ **Additional Notes:**
150
+ - [Dependencies]
151
+ - [Migration steps if needed]
152
+ - [Special reviewer instructions]
153
+
154
+ ---
155
+
156
+ ## 5. ๐Ÿ”„ Current Status
157
+
158
+ **Progress Summary:**
159
+ [Short free-text update about how far the task has progressed.]
160
+
161
+ **Completed Items:**
162
+ - [List of what has been fully implemented, tested, or merged.]
163
+
164
+ **Open Items:**
165
+ - [List of remaining tasks, missing parts.]
166
+
167
+ **Current Issues / Risks:**
168
+ - [Open problems, bugs found during testing, architectural blockers.]
169
+
170
+ **Next Steps:**
171
+ - [Immediate action items, who should act next.]
172
+ `
173
+ }
174
+ };
175
+
176
+ export const taskContextUpdateVariants = <PromptVariantSet>{
177
+ id: TASK_CONTEXT_UPDATE_PROMPT_ID,
178
+ defaultVariant: {
179
+ id: 'task-context-update-default',
180
+ template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
181
+ Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
182
+ https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
183
+ 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.
184
+
185
+ # Task Document Update Instructions
186
+
187
+ You are an AI agent tasked with updating a technical document based on the current discussion.
188
+ Your job is to provide the COMPLETE UPDATED DOCUMENT as your response, not commentary about the document.
189
+
190
+ ## Analysis Requirements
191
+
192
+ 1. **Review the Current Discussion**:
193
+ - Analyze the entire conversation
194
+ - Identify new information, decisions, and changes
195
+
196
+ 2. **Examine the Existing Document**:
197
+ - Understand its structure and purpose
198
+ - Identify sections that need updates
199
+
200
+ 3. **Update the Document**:
201
+ - Maintain the original structure and formatting
202
+ - Add new information from the discussion
203
+ - Update existing information
204
+ - Remove outdated information if necessary
205
+ - Ensure coherence and organization
206
+
207
+ ## IMPORTANT: Response Format
208
+
209
+ YOUR ENTIRE RESPONSE MUST BE THE UPDATED DOCUMENT ONLY. Do not include:
210
+ - Any commentary about what you changed
211
+ - Introduction or explanation text
212
+ - Markdown fences or syntax indicators
213
+ - Clarifying questions
214
+
215
+ Simply output the complete updated document as plain text, which will directly replace the existing document.
216
+
217
+ ## Guidelines
218
+
219
+ - Be thorough in capturing all relevant information
220
+ - Maintain the original document's style and tone
221
+ - Use clear, concise language
222
+ - Preserve all formatting from the original document
223
+ - Ensure technical accuracy in all updates
224
+
225
+ {{${TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
226
+ `
227
+ }
228
+ };
229
+