@theia/ai-ide 1.71.0-next.8 → 1.71.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.
Files changed (212) hide show
  1. package/lib/browser/agent-mode-confirmation-service.d.ts.map +1 -1
  2. package/lib/browser/agent-mode-confirmation-service.js +15 -15
  3. package/lib/browser/agent-mode-confirmation-service.js.map +1 -1
  4. package/lib/browser/ai-configuration/agent-configuration-widget.js +2 -2
  5. package/lib/browser/ai-configuration/agent-configuration-widget.js.map +1 -1
  6. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js +1 -1
  7. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js.map +1 -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 +2 -1
  10. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js.map +1 -1
  11. package/lib/browser/ai-configuration/skills-configuration-widget.d.ts.map +1 -1
  12. package/lib/browser/ai-configuration/skills-configuration-widget.js +2 -1
  13. package/lib/browser/ai-configuration/skills-configuration-widget.js.map +1 -1
  14. package/lib/browser/ai-ide-activation-service.d.ts +10 -1
  15. package/lib/browser/ai-ide-activation-service.d.ts.map +1 -1
  16. package/lib/browser/ai-ide-activation-service.js +41 -1
  17. package/lib/browser/ai-ide-activation-service.js.map +1 -1
  18. package/lib/browser/ai-workspace-restriction-contribution.d.ts +7 -0
  19. package/lib/browser/ai-workspace-restriction-contribution.d.ts.map +1 -0
  20. package/lib/browser/ai-workspace-restriction-contribution.js +42 -0
  21. package/lib/browser/ai-workspace-restriction-contribution.js.map +1 -0
  22. package/lib/browser/app-tester-prompt-template.js +1 -1
  23. package/lib/browser/architect-agent.d.ts +1 -0
  24. package/lib/browser/architect-agent.d.ts.map +1 -1
  25. package/lib/browser/architect-agent.js +5 -3
  26. package/lib/browser/architect-agent.js.map +1 -1
  27. package/lib/browser/architect-prompt-template.js +3 -3
  28. package/lib/browser/chat-session-card-action-contribution.js +1 -1
  29. package/lib/browser/chat-session-card-action-contribution.js.map +1 -1
  30. package/lib/browser/chat-sessions-welcome-message-provider.d.ts +1 -0
  31. package/lib/browser/chat-sessions-welcome-message-provider.d.ts.map +1 -1
  32. package/lib/browser/chat-sessions-welcome-message-provider.js +7 -1
  33. package/lib/browser/chat-sessions-welcome-message-provider.js.map +1 -1
  34. package/lib/browser/code-reviewer-agent.d.ts +1 -0
  35. package/lib/browser/code-reviewer-agent.d.ts.map +1 -1
  36. package/lib/browser/code-reviewer-agent.js +1 -0
  37. package/lib/browser/code-reviewer-agent.js.map +1 -1
  38. package/lib/browser/coder-agent.d.ts +4 -0
  39. package/lib/browser/coder-agent.d.ts.map +1 -1
  40. package/lib/browser/coder-agent.js +28 -4
  41. package/lib/browser/coder-agent.js.map +1 -1
  42. package/lib/browser/create-skill-agent.d.ts +1 -0
  43. package/lib/browser/create-skill-agent.d.ts.map +1 -1
  44. package/lib/browser/create-skill-agent.js +1 -0
  45. package/lib/browser/create-skill-agent.js.map +1 -1
  46. package/lib/browser/explore-agent.d.ts +1 -0
  47. package/lib/browser/explore-agent.d.ts.map +1 -1
  48. package/lib/browser/explore-agent.js +1 -0
  49. package/lib/browser/explore-agent.js.map +1 -1
  50. package/lib/browser/file-changeset-functions.d.ts.map +1 -1
  51. package/lib/browser/file-changeset-functions.js +17 -9
  52. package/lib/browser/file-changeset-functions.js.map +1 -1
  53. package/lib/browser/frontend-module.d.ts.map +1 -1
  54. package/lib/browser/frontend-module.js +12 -10
  55. package/lib/browser/frontend-module.js.map +1 -1
  56. package/lib/browser/github-capability-contribution.js +1 -1
  57. package/lib/browser/github-capability-contribution.js.map +1 -1
  58. package/lib/browser/github-prompt-template.js +1 -1
  59. package/lib/browser/ide-chat-welcome-message-provider.d.ts +4 -0
  60. package/lib/browser/ide-chat-welcome-message-provider.d.ts.map +1 -1
  61. package/lib/browser/ide-chat-welcome-message-provider.js +34 -0
  62. package/lib/browser/ide-chat-welcome-message-provider.js.map +1 -1
  63. package/lib/browser/project-info-agent.d.ts +1 -0
  64. package/lib/browser/project-info-agent.d.ts.map +1 -1
  65. package/lib/browser/project-info-agent.js +1 -0
  66. package/lib/browser/project-info-agent.js.map +1 -1
  67. package/lib/browser/{junior-agent.d.ts → review/pr-review-agent.d.ts} +7 -5
  68. package/lib/browser/review/pr-review-agent.d.ts.map +1 -0
  69. package/lib/browser/{junior-agent.js → review/pr-review-agent.js} +17 -15
  70. package/lib/browser/review/pr-review-agent.js.map +1 -0
  71. package/lib/browser/review/pr-review-prompt-template.d.ts +4 -0
  72. package/lib/browser/review/pr-review-prompt-template.d.ts.map +1 -0
  73. package/lib/browser/review/pr-review-prompt-template.js +437 -0
  74. package/lib/browser/review/pr-review-prompt-template.js.map +1 -0
  75. package/lib/browser/template-preference-contribution.d.ts +2 -0
  76. package/lib/browser/template-preference-contribution.d.ts.map +1 -1
  77. package/lib/browser/template-preference-contribution.js +43 -14
  78. package/lib/browser/template-preference-contribution.js.map +1 -1
  79. package/lib/browser/todo-tool-renderer.d.ts +1 -1
  80. package/lib/browser/todo-tool-renderer.d.ts.map +1 -1
  81. package/lib/browser/todo-tool-renderer.js +1 -1
  82. package/lib/browser/todo-tool-renderer.js.map +1 -1
  83. package/lib/browser/todo-tool.d.ts +0 -1
  84. package/lib/browser/todo-tool.d.ts.map +1 -1
  85. package/lib/browser/todo-tool.js +36 -16
  86. package/lib/browser/todo-tool.js.map +1 -1
  87. package/lib/browser/todo-tool.spec.d.ts +2 -0
  88. package/lib/browser/todo-tool.spec.d.ts.map +1 -0
  89. package/lib/browser/todo-tool.spec.js +44 -0
  90. package/lib/browser/todo-tool.spec.js.map +1 -0
  91. package/lib/browser/user-interaction-tool-renderer.d.ts +18 -0
  92. package/lib/browser/user-interaction-tool-renderer.d.ts.map +1 -0
  93. package/lib/browser/user-interaction-tool-renderer.js +330 -0
  94. package/lib/browser/user-interaction-tool-renderer.js.map +1 -0
  95. package/lib/browser/user-interaction-tool.d.ts +47 -0
  96. package/lib/browser/user-interaction-tool.d.ts.map +1 -0
  97. package/lib/browser/user-interaction-tool.js +397 -0
  98. package/lib/browser/user-interaction-tool.js.map +1 -0
  99. package/lib/browser/user-interaction-tool.spec.d.ts +2 -0
  100. package/lib/browser/user-interaction-tool.spec.d.ts.map +1 -0
  101. package/lib/browser/user-interaction-tool.spec.js +336 -0
  102. package/lib/browser/user-interaction-tool.spec.js.map +1 -0
  103. package/lib/browser/workspace-functions.d.ts.map +1 -1
  104. package/lib/browser/workspace-functions.js +9 -2
  105. package/lib/browser/workspace-functions.js.map +1 -1
  106. package/lib/browser/workspace-launch-provider.d.ts.map +1 -1
  107. package/lib/browser/workspace-launch-provider.js +9 -4
  108. package/lib/browser/workspace-launch-provider.js.map +1 -1
  109. package/lib/browser/workspace-launch-provider.spec.js +4 -4
  110. package/lib/browser/workspace-launch-provider.spec.js.map +1 -1
  111. package/lib/browser/workspace-task-provider.d.ts.map +1 -1
  112. package/lib/browser/workspace-task-provider.js +4 -1
  113. package/lib/browser/workspace-task-provider.js.map +1 -1
  114. package/lib/browser/workspace-task-provider.spec.js +90 -1
  115. package/lib/browser/workspace-task-provider.spec.js.map +1 -1
  116. package/lib/common/ai-ide-preferences.d.ts +1 -1
  117. package/lib/common/ai-ide-preferences.d.ts.map +1 -1
  118. package/lib/common/ai-ide-preferences.js +6 -6
  119. package/lib/common/ai-ide-preferences.js.map +1 -1
  120. package/lib/common/coder-replace-prompt-template.d.ts.map +1 -1
  121. package/lib/common/coder-replace-prompt-template.js +133 -17
  122. package/lib/common/coder-replace-prompt-template.js.map +1 -1
  123. package/lib/common/command-chat-agents.d.ts +1 -0
  124. package/lib/common/command-chat-agents.d.ts.map +1 -1
  125. package/lib/common/command-chat-agents.js +1 -0
  126. package/lib/common/command-chat-agents.js.map +1 -1
  127. package/lib/common/command-prompt-template.js +1 -1
  128. package/lib/common/orchestrator-chat-agent.d.ts.map +1 -1
  129. package/lib/common/orchestrator-chat-agent.js +2 -2
  130. package/lib/common/orchestrator-chat-agent.js.map +1 -1
  131. package/lib/common/universal-chat-agent.d.ts +1 -0
  132. package/lib/common/universal-chat-agent.d.ts.map +1 -1
  133. package/lib/common/universal-chat-agent.js +1 -0
  134. package/lib/common/universal-chat-agent.js.map +1 -1
  135. package/lib/common/universal-prompt-template.js +1 -1
  136. package/lib/common/user-interaction-tool.d.ts +53 -0
  137. package/lib/common/user-interaction-tool.d.ts.map +1 -0
  138. package/lib/common/user-interaction-tool.js +176 -0
  139. package/lib/common/user-interaction-tool.js.map +1 -0
  140. package/lib/common/user-interaction-tool.spec.d.ts +2 -0
  141. package/lib/common/user-interaction-tool.spec.d.ts.map +1 -0
  142. package/lib/common/user-interaction-tool.spec.js +216 -0
  143. package/lib/common/user-interaction-tool.spec.js.map +1 -0
  144. package/package.json +27 -27
  145. package/src/browser/agent-mode-confirmation-service.ts +19 -18
  146. package/src/browser/ai-configuration/agent-configuration-widget.tsx +2 -2
  147. package/src/browser/ai-configuration/ai-configuration-view-contribution.ts +1 -1
  148. package/src/browser/ai-configuration/prompt-fragments-configuration-widget.tsx +2 -1
  149. package/src/browser/ai-configuration/skills-configuration-widget.tsx +2 -1
  150. package/src/browser/ai-ide-activation-service.ts +43 -3
  151. package/src/browser/ai-workspace-restriction-contribution.ts +39 -0
  152. package/src/browser/app-tester-prompt-template.ts +1 -1
  153. package/src/browser/architect-agent.ts +6 -3
  154. package/src/browser/architect-prompt-template.ts +3 -3
  155. package/src/browser/chat-session-card-action-contribution.ts +1 -1
  156. package/src/browser/chat-sessions-welcome-message-provider.tsx +11 -2
  157. package/src/browser/code-reviewer-agent.ts +1 -0
  158. package/src/browser/coder-agent.ts +31 -4
  159. package/src/browser/create-skill-agent.ts +1 -0
  160. package/src/browser/explore-agent.ts +1 -0
  161. package/src/browser/file-changeset-functions.ts +17 -8
  162. package/src/browser/frontend-module.ts +14 -12
  163. package/src/browser/github-capability-contribution.ts +1 -1
  164. package/src/browser/github-prompt-template.ts +1 -1
  165. package/src/browser/ide-chat-welcome-message-provider.tsx +53 -0
  166. package/src/browser/project-info-agent.ts +1 -1
  167. package/src/browser/{context-reviewer-agent.ts → review/pr-review-agent.ts} +13 -11
  168. package/src/browser/review/pr-review-prompt-template.ts +449 -0
  169. package/src/browser/style/index.css +299 -0
  170. package/src/browser/template-preference-contribution.ts +40 -14
  171. package/src/browser/todo-tool-renderer.tsx +1 -1
  172. package/src/browser/todo-tool.spec.ts +49 -0
  173. package/src/browser/todo-tool.ts +35 -14
  174. package/src/browser/user-interaction-tool-renderer.tsx +531 -0
  175. package/src/browser/user-interaction-tool.spec.ts +396 -0
  176. package/src/browser/user-interaction-tool.ts +423 -0
  177. package/src/browser/workspace-functions.ts +10 -3
  178. package/src/browser/workspace-launch-provider.spec.ts +4 -4
  179. package/src/browser/workspace-launch-provider.ts +10 -6
  180. package/src/browser/workspace-task-provider.spec.ts +119 -1
  181. package/src/browser/workspace-task-provider.ts +4 -1
  182. package/src/common/ai-ide-preferences.ts +7 -7
  183. package/src/common/coder-replace-prompt-template.ts +133 -17
  184. package/src/common/command-chat-agents.ts +1 -0
  185. package/src/common/command-prompt-template.ts +1 -1
  186. package/src/common/orchestrator-chat-agent.ts +2 -2
  187. package/src/common/universal-chat-agent.ts +1 -0
  188. package/src/common/universal-prompt-template.ts +1 -1
  189. package/src/common/user-interaction-tool.spec.ts +241 -0
  190. package/src/common/user-interaction-tool.ts +237 -0
  191. package/lib/browser/context-reviewer-agent.d.ts +0 -17
  192. package/lib/browser/context-reviewer-agent.d.ts.map +0 -1
  193. package/lib/browser/context-reviewer-agent.js +0 -45
  194. package/lib/browser/context-reviewer-agent.js.map +0 -1
  195. package/lib/browser/context-reviewer-prompt-template.d.ts +0 -4
  196. package/lib/browser/context-reviewer-prompt-template.d.ts.map +0 -1
  197. package/lib/browser/context-reviewer-prompt-template.js +0 -160
  198. package/lib/browser/context-reviewer-prompt-template.js.map +0 -1
  199. package/lib/browser/junior-agent.d.ts.map +0 -1
  200. package/lib/browser/junior-agent.js.map +0 -1
  201. package/lib/browser/junior-plan-capability-contribution.d.ts +0 -8
  202. package/lib/browser/junior-plan-capability-contribution.d.ts.map +0 -1
  203. package/lib/browser/junior-plan-capability-contribution.js +0 -131
  204. package/lib/browser/junior-plan-capability-contribution.js.map +0 -1
  205. package/lib/browser/junior-prompt-template.d.ts +0 -4
  206. package/lib/browser/junior-prompt-template.d.ts.map +0 -1
  207. package/lib/browser/junior-prompt-template.js +0 -149
  208. package/lib/browser/junior-prompt-template.js.map +0 -1
  209. package/src/browser/context-reviewer-prompt-template.ts +0 -160
  210. package/src/browser/junior-agent.ts +0 -40
  211. package/src/browser/junior-plan-capability-contribution.ts +0 -129
  212. package/src/browser/junior-prompt-template.ts +0 -149
@@ -0,0 +1,237 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2026 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 { nls } from '@theia/core/lib/common/nls';
18
+
19
+ export const USER_INTERACTION_FUNCTION_ID = 'userInteraction';
20
+
21
+ export interface EmptyContentRef {
22
+ empty: true;
23
+ label?: string;
24
+ }
25
+
26
+ export interface PathContentRef {
27
+ path: string;
28
+ gitRef?: string;
29
+ line?: number;
30
+ }
31
+
32
+ export type ContentRef = string | PathContentRef | EmptyContentRef;
33
+
34
+ export function isEmptyContentRef(ref: ContentRef): ref is EmptyContentRef {
35
+ return typeof ref === 'object' && 'empty' in ref && ref.empty === true;
36
+ }
37
+
38
+ export interface UserInteractionLink {
39
+ ref: ContentRef;
40
+ rightRef?: ContentRef;
41
+ label?: string;
42
+ autoOpen?: boolean;
43
+ }
44
+
45
+ export function resolveContentRef(ref: ContentRef): PathContentRef | EmptyContentRef {
46
+ if (typeof ref === 'string') {
47
+ return { path: ref };
48
+ }
49
+ return ref;
50
+ }
51
+
52
+ const SHA_PREFIX_LENGTH = 7;
53
+
54
+ function workingCopyLabel(): string {
55
+ return nls.localize('theia/ai-ide/userInteractionWorkingCopy', 'Working Copy');
56
+ }
57
+
58
+ function emptyLabel(): string {
59
+ return nls.localize('theia/ai-ide/userInteractionEmpty', 'Empty');
60
+ }
61
+
62
+ function gitRefTag(ref: PathContentRef): string {
63
+ return ref.gitRef ? ref.gitRef.substring(0, SHA_PREFIX_LENGTH) : workingCopyLabel();
64
+ }
65
+
66
+ export function buildDiffLabel(
67
+ left: PathContentRef | EmptyContentRef,
68
+ right: PathContentRef | EmptyContentRef
69
+ ): string {
70
+ const leftIsEmpty = isEmptyContentRef(left);
71
+ const rightIsEmpty = isEmptyContentRef(right);
72
+ if (leftIsEmpty && rightIsEmpty) {
73
+ return `${left.label || emptyLabel()} ⟷ ${right.label || emptyLabel()}`;
74
+ }
75
+ if (leftIsEmpty) {
76
+ return `${(right as PathContentRef).path} (${left.label || emptyLabel()} ⟷ ${gitRefTag(right as PathContentRef)})`;
77
+ }
78
+ if (rightIsEmpty) {
79
+ return `${(left as PathContentRef).path} (${gitRefTag(left as PathContentRef)} ⟷ ${right.label || emptyLabel()})`;
80
+ }
81
+ const leftPath = left as PathContentRef;
82
+ const rightPath = right as PathContentRef;
83
+ if (leftPath.path === rightPath.path) {
84
+ return `${leftPath.path} (${gitRefTag(leftPath)} ⟷ ${gitRefTag(rightPath)})`;
85
+ }
86
+ return `${leftPath.path} ⟷ ${rightPath.path}`;
87
+ }
88
+
89
+ export interface UserInteractionOption {
90
+ text: string;
91
+ value: string;
92
+ description?: string;
93
+ buttonLabel?: string;
94
+ }
95
+
96
+ export interface UserInteractionStep {
97
+ title: string;
98
+ message: string;
99
+ options?: UserInteractionOption[];
100
+ links?: UserInteractionLink[];
101
+ }
102
+
103
+ export interface UserInteractionStepResult {
104
+ title: string;
105
+ value?: string;
106
+ comments?: string[];
107
+ skipped?: boolean;
108
+ }
109
+
110
+ export interface UserInteractionResult {
111
+ completed: boolean;
112
+ steps: UserInteractionStepResult[];
113
+ }
114
+
115
+ export interface UserInteractionArgs {
116
+ interactions: UserInteractionStep[];
117
+ }
118
+
119
+ export interface UserInteractionInput {
120
+ title: string;
121
+ stepCount: number;
122
+ }
123
+
124
+ export function parseUserInteractionInput(args: string | undefined): UserInteractionInput {
125
+ if (!args) {
126
+ return { title: '', stepCount: 0 };
127
+ }
128
+ try {
129
+ const parsed = JSON.parse(args);
130
+ const interactions = Array.isArray(parsed.interactions) ? parsed.interactions : [];
131
+ const firstTitle = typeof interactions[0]?.title === 'string' ? interactions[0].title : '';
132
+ return { title: firstTitle, stepCount: interactions.length };
133
+ } catch {
134
+ const match = /"title"\s*:\s*"([^"]*)"?/.exec(args);
135
+ return { title: match?.[1] ?? '', stepCount: 0 };
136
+ }
137
+ }
138
+
139
+ export function parseUserInteractionResult(raw: unknown): UserInteractionResult | undefined {
140
+ let candidate: unknown = raw;
141
+ if (typeof raw === 'string') {
142
+ try {
143
+ candidate = JSON.parse(raw);
144
+ } catch {
145
+ return undefined;
146
+ }
147
+ }
148
+ if (!candidate || typeof candidate !== 'object') {
149
+ return undefined;
150
+ }
151
+ const obj = candidate as Record<string, unknown>;
152
+ if (typeof obj.completed !== 'boolean' || !Array.isArray(obj.steps)) {
153
+ return undefined;
154
+ }
155
+ return obj as unknown as UserInteractionResult;
156
+ }
157
+
158
+ export function parseUserInteractionArgs(args: string | undefined): UserInteractionArgs | undefined {
159
+ if (!args) {
160
+ return undefined;
161
+ }
162
+ try {
163
+ const parsed = JSON.parse(args);
164
+ if (!Array.isArray(parsed.interactions)) {
165
+ return undefined;
166
+ }
167
+ const validSteps = parsed.interactions
168
+ .map(parseStep)
169
+ .filter((step: UserInteractionStep | undefined): step is UserInteractionStep => step !== undefined);
170
+ if (validSteps.length === 0) {
171
+ return undefined;
172
+ }
173
+ return { interactions: validSteps };
174
+ } catch {
175
+ return undefined;
176
+ }
177
+ }
178
+
179
+ function parseStep(raw: unknown): UserInteractionStep | undefined {
180
+ if (!raw || typeof raw !== 'object') {
181
+ return undefined;
182
+ }
183
+ const obj = raw as Record<string, unknown>;
184
+ if (typeof obj.title !== 'string' || typeof obj.message !== 'string') {
185
+ return undefined;
186
+ }
187
+ let options: UserInteractionOption[] | undefined;
188
+ if (Array.isArray(obj.options)) {
189
+ const validOptions = obj.options.filter(
190
+ (opt: unknown) => !!opt && typeof opt === 'object'
191
+ && typeof (opt as Record<string, unknown>).text === 'string'
192
+ && typeof (opt as Record<string, unknown>).value === 'string'
193
+ ) as UserInteractionOption[];
194
+ options = validOptions.length > 0 ? validOptions : undefined;
195
+ }
196
+ let links: UserInteractionLink[] | undefined;
197
+ if (Array.isArray(obj.links)) {
198
+ const filtered = obj.links.filter(isValidLink) as UserInteractionLink[];
199
+ links = filtered.length > 0 ? filtered : undefined;
200
+ } else if (isValidLink(obj.link)) {
201
+ links = [obj.link as UserInteractionLink];
202
+ }
203
+ return {
204
+ title: obj.title,
205
+ message: obj.message,
206
+ options,
207
+ links
208
+ };
209
+ }
210
+
211
+ function isValidContentRef(ref: unknown): ref is ContentRef {
212
+ if (typeof ref === 'string') {
213
+ return ref.length > 0;
214
+ }
215
+ if (ref && typeof ref === 'object') {
216
+ const obj = ref as Record<string, unknown>;
217
+ if (obj.empty === true) {
218
+ return true;
219
+ }
220
+ return typeof obj.path === 'string' && obj.path.length > 0;
221
+ }
222
+ return false;
223
+ }
224
+
225
+ function isValidLink(link: unknown): link is UserInteractionLink {
226
+ if (!link || typeof link !== 'object') {
227
+ return false;
228
+ }
229
+ const obj = link as Record<string, unknown>;
230
+ if (!isValidContentRef(obj.ref)) {
231
+ return false;
232
+ }
233
+ if (obj.rightRef !== undefined && !isValidContentRef(obj.rightRef)) {
234
+ return false;
235
+ }
236
+ return true;
237
+ }
@@ -1,17 +0,0 @@
1
- import { AbstractStreamParsingChatAgent } from '@theia/ai-chat/lib/common/chat-agents';
2
- import { LanguageModelRequirement } from '@theia/ai-core/lib/common';
3
- export declare const ContextReviewerAgentId = "context-reviewer";
4
- export declare class ContextReviewerAgent extends AbstractStreamParsingChatAgent {
5
- name: string;
6
- id: string;
7
- languageModelRequirements: LanguageModelRequirement[];
8
- protected defaultLanguageModelPurpose: string;
9
- description: string;
10
- prompts: {
11
- id: string;
12
- defaultVariant: import("@theia/ai-core/lib/common").BasePromptFragment;
13
- variants: never[];
14
- }[];
15
- protected systemPromptId: string;
16
- }
17
- //# sourceMappingURL=context-reviewer-agent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context-reviewer-agent.d.ts","sourceRoot":"","sources":["../../src/browser/context-reviewer-agent.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,8BAA8B,EAAE,MAAM,uCAAuC,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAKrE,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AAEzD,qBACa,oBAAqB,SAAQ,8BAA8B;IACpE,IAAI,SAAsB;IAC1B,EAAE,SAA0B;IAC5B,yBAAyB,EAAE,wBAAwB,EAAE,CAGlD;IACH,SAAS,CAAC,2BAA2B,EAAE,MAAM,CAAU;IAC9C,WAAW,SAE2F;IAEtG,OAAO;;;;QAA0G;IAC1H,UAAmB,cAAc,EAAE,MAAM,CAAqC;CACjF"}
@@ -1,45 +0,0 @@
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.ContextReviewerAgent = exports.ContextReviewerAgentId = void 0;
19
- const tslib_1 = require("tslib");
20
- const chat_agents_1 = require("@theia/ai-chat/lib/common/chat-agents");
21
- const core_1 = require("@theia/core");
22
- const inversify_1 = require("@theia/core/shared/inversify");
23
- const context_reviewer_prompt_template_1 = require("./context-reviewer-prompt-template");
24
- exports.ContextReviewerAgentId = 'context-reviewer';
25
- let ContextReviewerAgent = class ContextReviewerAgent extends chat_agents_1.AbstractStreamParsingChatAgent {
26
- constructor() {
27
- super(...arguments);
28
- this.name = 'Context Reviewer';
29
- this.id = exports.ContextReviewerAgentId;
30
- this.languageModelRequirements = [{
31
- purpose: 'chat',
32
- identifier: 'default/code',
33
- }];
34
- this.defaultLanguageModelPurpose = 'chat';
35
- this.description = core_1.nls.localize('theia/ai/ide/contextReviewerAgent/description', 'A senior solution architect that reviews Task Context documents. \
36
- Determines if the implementing agent has enough information to implement the planned solution correctly.');
37
- this.prompts = [{ id: context_reviewer_prompt_template_1.CONTEXT_REVIEWER_SYSTEM_PROMPT_ID, defaultVariant: context_reviewer_prompt_template_1.contextReviewerSystemPrompt, variants: [] }];
38
- this.systemPromptId = context_reviewer_prompt_template_1.CONTEXT_REVIEWER_SYSTEM_PROMPT_ID;
39
- }
40
- };
41
- exports.ContextReviewerAgent = ContextReviewerAgent;
42
- exports.ContextReviewerAgent = ContextReviewerAgent = tslib_1.__decorate([
43
- (0, inversify_1.injectable)()
44
- ], ContextReviewerAgent);
45
- //# sourceMappingURL=context-reviewer-agent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context-reviewer-agent.js","sourceRoot":"","sources":["../../src/browser/context-reviewer-agent.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,uEAAuF;AAEvF,sCAAkC;AAClC,4DAA0D;AAC1D,yFAAoH;AAEvG,QAAA,sBAAsB,GAAG,kBAAkB,CAAC;AAGlD,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,4CAA8B;IAAjE;;QACH,SAAI,GAAG,kBAAkB,CAAC;QAC1B,OAAE,GAAG,8BAAsB,CAAC;QAC5B,8BAAyB,GAA+B,CAAC;gBACrD,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,cAAc;aAC7B,CAAC,CAAC;QACO,gCAA2B,GAAW,MAAM,CAAC;QAC9C,gBAAW,GAAG,UAAG,CAAC,QAAQ,CAAC,+CAA+C,EAC/E;iHACyG,CAAC,CAAC;QAEtG,YAAO,GAAG,CAAC,EAAE,EAAE,EAAE,oEAAiC,EAAE,cAAc,EAAE,8DAA2B,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;QACvG,mBAAc,GAAW,oEAAiC,CAAC;IAClF,CAAC;CAAA,CAAA;AAdY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CAchC"}
@@ -1,4 +0,0 @@
1
- import { BasePromptFragment } from '@theia/ai-core/lib/common';
2
- export declare const CONTEXT_REVIEWER_SYSTEM_PROMPT_ID = "context-reviewer-system";
3
- export declare const contextReviewerSystemPrompt: BasePromptFragment;
4
- //# sourceMappingURL=context-reviewer-prompt-template.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context-reviewer-prompt-template.d.ts","sourceRoot":"","sources":["../../src/browser/context-reviewer-prompt-template.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,eAAO,MAAM,iCAAiC,4BAA4B,CAAC;AAE3E,eAAO,MAAM,2BAA2B,EAAE,kBA2IzC,CAAC"}
@@ -1,160 +0,0 @@
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.contextReviewerSystemPrompt = exports.CONTEXT_REVIEWER_SYSTEM_PROMPT_ID = void 0;
19
- exports.CONTEXT_REVIEWER_SYSTEM_PROMPT_ID = 'context-reviewer-system';
20
- exports.contextReviewerSystemPrompt = {
21
- id: exports.CONTEXT_REVIEWER_SYSTEM_PROMPT_ID,
22
- template: `# Role
23
-
24
- You are a **senior solution architect** reviewing Task Context documents.
25
-
26
- # What You're Reviewing
27
-
28
- A **Task Context** is a planning document that describes:
29
- - **Future work** to be implemented by a coding agent (a senior developer agent)
30
- - **Design intent** \u2014 not current system behavior
31
- - **A roadmap** for implementation \u2014 not a specification
32
-
33
- **Your job:** Determine if the implementing agent has enough information to implement the planned solution correctly.
34
-
35
- **Not your job:** Verify the document matches current code (it describes **changes** to that code).
36
-
37
- # Document Audience
38
-
39
- **The implementing agent** is a senior developer agent who:
40
- - Has full codebase access and can read any file
41
- - Understands the codebase architecture, patterns, and conventions
42
- - Can infer implementation details from design intent
43
- - Will ask clarifying questions if truly blocked
44
-
45
- **A good Task Context is:** A 1-2 page roadmap, not a specification — clear on **what** and **why**, flexible on **how**.
46
-
47
- # Inputs
48
-
49
- You receive:
50
- - **Task context path:** Path to the Task Context document
51
- - **Key implementation files:** 2-3 files for context on current state
52
- - **Brief description:** What the task modifies
53
-
54
- # Tools
55
-
56
- - ~{getTaskContext}
57
- - ~{getFileContent}
58
-
59
- # Review Criteria
60
-
61
- ## 🔴 High Severity — Must fix
62
-
63
- | Issue | Example |
64
- |-------|---------|
65
- | Broken design — won't work or breaks existing behavior | "Add global state" when architecture requires immutability |
66
- | Missing critical decision (state location, lifecycle owner, service layer) | "Update user data" without specifying data store |
67
- | Contradictions between sections | Scope says "no UI changes", steps include "Update UI component" |
68
- | Scope/Criteria mismatch | Scope: "Add button", Criteria: "Entire form works" |
69
- | Vague/unverifiable criteria | "Feature works correctly", "Good performance" |
70
- | Missing validation requirements (when code changes exist) | Criteria lack build/lint/test + diagnostics expectations |
71
- | Missing UI verification (when UI in scope) | Scope includes UI, no UI test steps |
72
- | Circular dependencies in steps | Step 2: "Use config from step 4" |
73
- | Unverified critical assumption with no fallback | "Assumes API supports X" (unverified, no Plan B) |
74
-
75
- ## 🟡 Medium Severity — Consider fixing
76
-
77
- | Issue | Example |
78
- |-------|---------|
79
- | Unnecessary complexity with obvious simpler alternative | Creating abstraction layer for one-time operation |
80
- | Misleading ambiguity causing wrong implementation | "Update the service" (which service? which method?) |
81
- | Implicit dependencies between ordered steps | Step 2 depends on step 1 output but not mentioned |
82
-
83
- ## Do NOT flag
84
-
85
- - Inferable details
86
- - Missing rationale
87
- - Unspecified edge cases
88
- - Wording/formatting
89
- - Doc vs. code differences (doc describes future state)
90
- - Standard patterns the implementing agent knows
91
- - Test patterns or boilerplate
92
-
93
- # Workflow
94
-
95
- **Scale depth to complexity:** 2-step bugfix → sanity check. Major feature → full review.
96
-
97
- **Step 0:** Read entire Task Context using ~{getTaskContext}. Understand full plan before evaluating.
98
-
99
- **Step 1:** Validate structure
100
- - Completion Criteria exist? No → 🔴 High
101
- - Criteria consistent with Scope? No → 🔴 High
102
-
103
- **Step 2:** Understand intent — What problem? What change? Why this approach?
104
-
105
- **Step 3:** Read relevant source files using ~{getFileContent} (files mentioned in plan + 2-3 key files that will be modified)
106
-
107
- **Step 4:** Evaluate feasibility — Will approach work? Anything critical missing?
108
-
109
- **Step 5:** Check step ordering — Does step N depend on step M that comes later? → 🔴 High
110
-
111
- **Step 6:** Test criteria verifiability — "Could I unambiguously verify this? Write a test?" No → 🔴 High
112
- - ❌ Vague: "Feature works correctly"
113
- - ✅ Clear: "Login button shows spinner during authentication"
114
-
115
- **Step 7:** Assess impact — Would senior dev be blocked? Yes → Flag. Just inconvenienced? → Don't flag.
116
-
117
- **Step 8:** Format findings — One-sentence fixes only. Don't rewrite sections.
118
-
119
- **Final Reflective Pass:**
120
- 1. "Would I confidently approve this as the architect?"
121
- 2. "What assumption, if wrong, invalidates the approach?"
122
- 3. "What could cause failure that's not on my checklist?"
123
- 4. "Will these steps satisfy every Completion Criterion?"
124
-
125
- Concrete concern → Add as issue. Vague unease → Let it go.
126
-
127
- # Output Format (MANDATORY)
128
-
129
- **Summary**
130
- [1-2 sentences: Ready for implementation? Bias toward approval if design is sound.]
131
-
132
- **Issues Found**
133
- [If none: "None — ready for implementation."]
134
- [If issues exist:]
135
-
136
- | # | Section | Severity | Issue | Current Doc Content | Suggested Fix |
137
- |---|---------|----------|-------|---------------------|---------------|
138
- | 1 | [section] | 🔴 High | [problem] | [quote or "not addressed"] | [one-sentence fix] |
139
-
140
- # Constraints
141
-
142
- - **Bias toward approval** — If design is sound and the implementing agent can proceed → approve
143
- - **Remember:** Document describes future work, not current state
144
- - **Do not:** Suggest alternative designs (unless fundamentally broken), request additional documentation, flag doc vs. code mismatches, suggest style improvements
145
- - **Maximum 3-5 issues** — blocking or near-blocking only
146
-
147
- # Review Checklist
148
-
149
- - ☐ Read entire Task Context before evaluating
150
- - ☐ Read relevant source files for current state
151
- - ☐ Verified Completion Criteria exist and are verifiable
152
- - ☐ Checked Scope matches Criteria
153
- - ☐ Evaluated step ordering
154
- - ☐ Assessed if design will work
155
- - ☐ Performed reflective pass
156
- - ☐ Limited to blocking issues (max 5)
157
- - ☐ One-sentence fixes only
158
- `
159
- };
160
- //# sourceMappingURL=context-reviewer-prompt-template.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context-reviewer-prompt-template.js","sourceRoot":"","sources":["../../src/browser/context-reviewer-prompt-template.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;;;AAInE,QAAA,iCAAiC,GAAG,yBAAyB,CAAC;AAE9D,QAAA,2BAA2B,GAAuB;IAC3D,EAAE,EAAE,yCAAiC;IACrC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwIb;CACA,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"junior-agent.d.ts","sourceRoot":"","sources":["../../src/browser/junior-agent.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,8BAA8B,EAAE,MAAM,uCAAuC,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAKrE,eAAO,MAAM,aAAa,WAAW,CAAC;AAEtC,qBACa,WAAY,SAAQ,8BAA8B;IAC3D,IAAI,SAAY;IAChB,EAAE,SAAiB;IACnB,yBAAyB,EAAE,wBAAwB,EAAE,CAGlD;IACH,SAAS,CAAC,2BAA2B,EAAE,MAAM,CAAU;IAC9C,WAAW,SAE0F;IAErG,OAAO;;;;QAAuF;IACvG,UAAmB,cAAc,EAAE,MAAM,CAA2B;CACvE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"junior-agent.js","sourceRoot":"","sources":["../../src/browser/junior-agent.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,uEAAuF;AAEvF,sCAAkC;AAClC,4DAA0D;AAC1D,qEAAuF;AAE1E,QAAA,aAAa,GAAG,QAAQ,CAAC;AAG/B,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,4CAA8B;IAAxD;;QACH,SAAI,GAAG,QAAQ,CAAC;QAChB,OAAE,GAAG,qBAAa,CAAC;QACnB,8BAAyB,GAA+B,CAAC;gBACrD,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,cAAc;aAC7B,CAAC,CAAC;QACO,gCAA2B,GAAW,MAAM,CAAC;QAC9C,gBAAW,GAAG,UAAG,CAAC,QAAQ,CAAC,sCAAsC,EACtE;gHACwG,CAAC,CAAC;QAErG,YAAO,GAAG,CAAC,EAAE,EAAE,EAAE,gDAAuB,EAAE,cAAc,EAAE,2CAAkB,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;QACpF,mBAAc,GAAW,gDAAuB,CAAC;IACxE,CAAC;CAAA,CAAA;AAdY,kCAAW;sBAAX,WAAW;IADvB,IAAA,sBAAU,GAAE;GACA,WAAW,CAcvB"}
@@ -1,8 +0,0 @@
1
- import { FrontendApplicationContribution } from '@theia/core/lib/browser';
2
- import { PromptService } from '@theia/ai-core';
3
- export declare class JuniorPlanCapabilityContribution implements FrontendApplicationContribution {
4
- protected readonly promptService: PromptService;
5
- onStart(): void;
6
- protected buildTemplate(): string;
7
- }
8
- //# sourceMappingURL=junior-plan-capability-contribution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"junior-plan-capability-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/junior-plan-capability-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAK/C,qBACa,gCAAiC,YAAW,+BAA+B;IAGpF,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAEhD,OAAO,IAAI,IAAI;IAOf,SAAS,CAAC,aAAa,IAAI,MAAM;CA4FpC"}
@@ -1,131 +0,0 @@
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.JuniorPlanCapabilityContribution = void 0;
19
- const tslib_1 = require("tslib");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const ai_core_1 = require("@theia/ai-core");
22
- const core_1 = require("@theia/core");
23
- const architect_agent_1 = require("./architect-agent");
24
- const context_reviewer_agent_1 = require("./context-reviewer-agent");
25
- let JuniorPlanCapabilityContribution = class JuniorPlanCapabilityContribution {
26
- onStart() {
27
- this.promptService.addBuiltInPromptFragment({
28
- id: 'plan-mode',
29
- template: this.buildTemplate()
30
- });
31
- }
32
- buildTemplate() {
33
- const name = core_1.nls.localize('theia/ai-ide/juniorPlan/name', 'Plan');
34
- const description = core_1.nls.localize('theia/ai-ide/juniorPlan/description', 'Creates Task Context documents to track requirements, implementation steps, and completion criteria across all workflow phases.');
35
- return `---
36
- name: ${name}
37
- description: ${description}
38
- ---
39
-
40
- ## Plan
41
-
42
- **Planning is ENABLED.** Use Task Context documents for coordination across all workflow phases.
43
-
44
- Use structured planning, requirements analysis, and task tracking through Task Context documents managed via task context functions.
45
-
46
- ### Critical Constraints
47
-
48
- - **NEVER explore files yourself** — delegate ALL exploration to '${architect_agent_1.ArchitectAgentId}'
49
- - **NEVER read code files** before delegating — ${architect_agent_1.ArchitectAgentId} handles investigation
50
- - **NEVER analyze implementation details** — that's ${architect_agent_1.ArchitectAgentId}'s responsibility
51
- - Delegate plan creation to '${architect_agent_1.ArchitectAgentId}' immediately
52
- - Track progress through Open Items → Completed Items
53
- - All architectural decisions require user approval
54
-
55
- ### Workflow
56
-
57
- Follow this multi-step delegation flow:
58
- 1. Delegate plan creation to '${architect_agent_1.ArchitectAgentId}'
59
- 2. Delegate review of that plan to '${context_reviewer_agent_1.ContextReviewerAgentId}'
60
- 3. Store the task context path for use in subsequent phases
61
-
62
- #### Task Context Creation
63
-
64
- Use ~{delegateToAgent} to delegate to the following agent:
65
-
66
- **Agent:** '${architect_agent_1.ArchitectAgentId}'
67
- **When:** Creating the implementation plan
68
-
69
- **Provide:**
70
- - User requirements
71
- - Findings from exploration (if any)
72
- - Constraints and assumptions
73
-
74
- **Expected output:** Task context path + overall risk level (High/Low)
75
-
76
- **Post-delegation:** Run Task Context Verification. If ${architect_agent_1.ArchitectAgentId} did not return a task context path, check ~{listTaskContexts} and log a debug entry.
77
-
78
- #### Document Review
79
-
80
- Use ~{delegateToAgent} to delegate to the following agent:
81
-
82
- **Agent:** '${context_reviewer_agent_1.ContextReviewerAgentId}'
83
- **When:** After architect creates or updates Task Context
84
-
85
- **Provide:**
86
- - Task context path (from architect)
87
- - List of 2-3 key implementation files for context
88
- - Brief description of what task modifies
89
-
90
- **Expected output:** Feedback with severity (🔴 High / 🟡 Medium / 🟢 Low)
91
-
92
- **Post-delegation:** Run Task Context Verification before proceeding.
93
-
94
- **Handle feedback:**
95
- - 🔴 High: Must fix before proceeding — **delegate back to '${architect_agent_1.ArchitectAgentId}'** with the feedback. **Do NOT fix the plan yourself.**
96
- - 🟡 Medium: **Delegate back to '${architect_agent_1.ArchitectAgentId}'** to fix or document rationale
97
- - 🟢 Low: Optional — proceed without fixing
98
-
99
- **Critical:** Plan fixes are always delegated to '${architect_agent_1.ArchitectAgentId}'.
100
-
101
- If 🔴 issues persist after 2 cycles → escalate to user.
102
-
103
- #### Approval Gate
104
-
105
- **When:** High-risk tasks (any risk factor is High)
106
- **Skip when:** All risk factors are Low
107
-
108
- Present task summary with problem, scope, and criteria. Wait for "approve" or feedback.
109
-
110
- On feedback: Delegate updates to '${architect_agent_1.ArchitectAgentId}', return to Document Review.
111
-
112
- ### Output
113
-
114
- Task Context created with:
115
- - Clear requirements and scope
116
- - Risk assessment with overall rating
117
- - Measurable completion criteria
118
- - Implementation plan with tracked items
119
-
120
- Store the task context path for distribution to other agents in subsequent phases.`;
121
- }
122
- };
123
- exports.JuniorPlanCapabilityContribution = JuniorPlanCapabilityContribution;
124
- tslib_1.__decorate([
125
- (0, inversify_1.inject)(ai_core_1.PromptService),
126
- tslib_1.__metadata("design:type", Object)
127
- ], JuniorPlanCapabilityContribution.prototype, "promptService", void 0);
128
- exports.JuniorPlanCapabilityContribution = JuniorPlanCapabilityContribution = tslib_1.__decorate([
129
- (0, inversify_1.injectable)()
130
- ], JuniorPlanCapabilityContribution);
131
- //# sourceMappingURL=junior-plan-capability-contribution.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"junior-plan-capability-contribution.js","sourceRoot":"","sources":["../../src/browser/junior-plan-capability-contribution.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,4DAAkE;AAClE,4CAA+C;AAC/C,sCAAkC;AAClC,uDAAqD;AACrD,qEAAkE;AAG3D,IAAM,gCAAgC,GAAtC,MAAM,gCAAgC;IAKzC,OAAO;QACH,IAAI,CAAC,aAAa,CAAC,wBAAwB,CAAC;YACxC,EAAE,EAAE,WAAW;YACf,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE;SACjC,CAAC,CAAC;IACP,CAAC;IAES,aAAa;QACnB,MAAM,IAAI,GAAG,UAAG,CAAC,QAAQ,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;QAClE,MAAM,WAAW,GAAG,UAAG,CAAC,QAAQ,CAAC,qCAAqC,EAClE,iIAAiI,CAAC,CAAC;QAEvI,OAAO;QACP,IAAI;eACG,WAAW;;;;;;;;;;;oEAW0C,kCAAgB;kDAClC,kCAAgB;sDACZ,kCAAgB;+BACvC,kCAAgB;;;;;;;gCAOf,kCAAgB;sCACV,+CAAsB;;;;;;;cAO9C,kCAAgB;;;;;;;;;;yDAU2B,kCAAgB;;;;;;cAM3D,+CAAsB;;;;;;;;;;;;;8DAa0B,kCAAgB;mCAC3C,kCAAgB;;;oDAGC,kCAAgB;;;;;;;;;;;oCAWhC,kCAAgB;;;;;;;;;;mFAU+B,CAAC;IAChF,CAAC;CACJ,CAAA;AAxGY,4EAAgC;AAGtB;IADlB,IAAA,kBAAM,EAAC,uBAAa,CAAC;;uEAC0B;2CAHvC,gCAAgC;IAD5C,IAAA,sBAAU,GAAE;GACA,gCAAgC,CAwG5C"}
@@ -1,4 +0,0 @@
1
- import { BasePromptFragment } from '@theia/ai-core/lib/common';
2
- export declare const JUNIOR_SYSTEM_PROMPT_ID = "junior-system";
3
- export declare const juniorSystemPrompt: BasePromptFragment;
4
- //# sourceMappingURL=junior-prompt-template.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"junior-prompt-template.d.ts","sourceRoot":"","sources":["../../src/browser/junior-prompt-template.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAG/D,eAAO,MAAM,uBAAuB,kBAAkB,CAAC;AAEvD,eAAO,MAAM,kBAAkB,EAAE,kBA+HhC,CAAC"}