repoburg 1.2.13 → 1.3.1
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/CODEMAP.md +8 -8
- package/backend/.env +4 -0
- package/backend/dist/src/ai-actions/ai-action-batch.service.d.ts +10 -3
- package/backend/dist/src/ai-actions/ai-action-batch.service.js +134 -12
- package/backend/dist/src/ai-actions/ai-action-batch.service.js.map +1 -1
- package/backend/dist/src/ai-actions/ai-actions.module.js +2 -7
- package/backend/dist/src/ai-actions/ai-actions.module.js.map +1 -1
- package/backend/dist/src/ai-actions/ai-actions.service.d.ts +16 -3
- package/backend/dist/src/ai-actions/ai-actions.service.js +75 -11
- package/backend/dist/src/ai-actions/ai-actions.service.js.map +1 -1
- package/backend/dist/src/app.module.js +0 -4
- package/backend/dist/src/app.module.js.map +1 -1
- package/backend/dist/src/core-entities/ai-action.entity.d.ts +1 -0
- package/backend/dist/src/core-entities/ai-action.entity.js +4 -0
- package/backend/dist/src/core-entities/ai-action.entity.js.map +1 -1
- package/backend/dist/src/llm-orchestration/action-handlers/action-handler.interface.d.ts +7 -0
- package/backend/dist/src/llm-orchestration/action-handlers/action-handler.interface.js +3 -0
- package/backend/dist/src/llm-orchestration/action-handlers/action-handler.interface.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/create-file.handler.d.ts +11 -0
- package/backend/dist/src/llm-orchestration/action-handlers/create-file.handler.js +65 -0
- package/backend/dist/src/llm-orchestration/action-handlers/create-file.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/delete-file.handler.d.ts +12 -0
- package/backend/dist/src/llm-orchestration/action-handlers/delete-file.handler.js +85 -0
- package/backend/dist/src/llm-orchestration/action-handlers/delete-file.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/create-file.args.dto.d.ts +4 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/create-file.args.dto.js +29 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/create-file.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/delete-file.args.dto.d.ts +3 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/delete-file.args.dto.js +22 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/delete-file.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/edit-file.args.dto.d.ts +4 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/edit-file.args.dto.js +29 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/edit-file.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/final.args.dto.d.ts +3 -0
- package/backend/dist/src/{llm-response-parser/llm-response-parser.module.js → llm-orchestration/action-handlers/dto/final.args.dto.js} +14 -13
- package/backend/dist/src/llm-orchestration/action-handlers/dto/final.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/new-session.args.dto.d.ts +3 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/new-session.args.dto.js +22 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/new-session.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/quick-edit.args.dto.d.ts +6 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/quick-edit.args.dto.js +46 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/quick-edit.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/request-context.args.dto.d.ts +11 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/request-context.args.dto.js +50 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/request-context.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/run-command.args.dto.d.ts +4 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/run-command.args.dto.js +27 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/run-command.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/sanitizer.decorator.d.ts +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/sanitizer.decorator.js +15 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/sanitizer.decorator.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/use-mcp-tool.args.dto.d.ts +5 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/use-mcp-tool.args.dto.js +49 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/use-mcp-tool.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/edit-file.handler.d.ts +12 -0
- package/backend/dist/src/llm-orchestration/action-handlers/edit-file.handler.js +78 -0
- package/backend/dist/src/llm-orchestration/action-handlers/edit-file.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/final.handler.d.ts +8 -0
- package/backend/dist/src/llm-orchestration/action-handlers/final.handler.js +40 -0
- package/backend/dist/src/llm-orchestration/action-handlers/final.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/new-session.handler.d.ts +8 -0
- package/backend/dist/src/llm-orchestration/action-handlers/new-session.handler.js +45 -0
- package/backend/dist/src/llm-orchestration/action-handlers/new-session.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/quick-edit.handler.d.ts +12 -0
- package/backend/dist/src/llm-orchestration/action-handlers/quick-edit.handler.js +133 -0
- package/backend/dist/src/llm-orchestration/action-handlers/quick-edit.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/request-context.handler.d.ts +8 -0
- package/backend/dist/src/llm-orchestration/action-handlers/request-context.handler.js +49 -0
- package/backend/dist/src/llm-orchestration/action-handlers/request-context.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/run-command.handler.d.ts +10 -0
- package/backend/dist/src/llm-orchestration/action-handlers/run-command.handler.js +73 -0
- package/backend/dist/src/llm-orchestration/action-handlers/run-command.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/use-mcp-tool.handler.d.ts +12 -0
- package/backend/dist/src/llm-orchestration/action-handlers/use-mcp-tool.handler.js +61 -0
- package/backend/dist/src/llm-orchestration/action-handlers/use-mcp-tool.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/errors/handler-validation.error.d.ts +4 -0
- package/backend/dist/src/llm-orchestration/errors/handler-validation.error.js +12 -0
- package/backend/dist/src/llm-orchestration/errors/handler-validation.error.js.map +1 -0
- package/backend/dist/src/llm-orchestration/hooks/follow-up-post-execution.hook.d.ts +25 -0
- package/backend/dist/src/llm-orchestration/hooks/follow-up-post-execution.hook.js +144 -0
- package/backend/dist/src/llm-orchestration/hooks/follow-up-post-execution.hook.js.map +1 -0
- package/backend/dist/src/llm-orchestration/hooks/frontend-notification.hook.d.ts +10 -0
- package/backend/dist/src/llm-orchestration/hooks/frontend-notification.hook.js +38 -0
- package/backend/dist/src/llm-orchestration/hooks/frontend-notification.hook.js.map +1 -0
- package/backend/dist/src/llm-orchestration/hooks/post-execution-hook.interface.d.ts +5 -0
- package/backend/dist/src/llm-orchestration/hooks/post-execution-hook.interface.js +3 -0
- package/backend/dist/src/llm-orchestration/hooks/post-execution-hook.interface.js.map +1 -0
- package/backend/dist/src/llm-orchestration/hooks/yolo-mode-post-execution.hook.d.ts +12 -0
- package/backend/dist/src/llm-orchestration/hooks/yolo-mode-post-execution.hook.js +55 -0
- package/backend/dist/src/llm-orchestration/hooks/yolo-mode-post-execution.hook.js.map +1 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.interfaces.d.ts +52 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.interfaces.js +13 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.interfaces.js.map +1 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.module.d.ts +2 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.module.js +90 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.module.js.map +1 -0
- package/backend/dist/src/llm-orchestration/llm-turn-processor.service.d.ts +20 -0
- package/backend/dist/src/llm-orchestration/llm-turn-processor.service.js +156 -0
- package/backend/dist/src/llm-orchestration/llm-turn-processor.service.js.map +1 -0
- package/backend/dist/src/llm-orchestration/parser/llm-output-parser.service.d.ts +5 -0
- package/backend/dist/src/llm-orchestration/parser/llm-output-parser.service.js +105 -0
- package/backend/dist/src/llm-orchestration/parser/llm-output-parser.service.js.map +1 -0
- package/backend/dist/src/llm-orchestration/parser/parsing.constants.d.ts +7 -0
- package/backend/dist/src/llm-orchestration/parser/parsing.constants.js +11 -0
- package/backend/dist/src/llm-orchestration/parser/parsing.constants.js.map +1 -0
- package/backend/dist/src/llm-responses/llm-responses.module.js +2 -0
- package/backend/dist/src/llm-responses/llm-responses.module.js.map +1 -1
- package/backend/dist/src/llm-responses/llm-responses.service.d.ts +3 -6
- package/backend/dist/src/llm-responses/llm-responses.service.js +9 -112
- package/backend/dist/src/llm-responses/llm-responses.service.js.map +1 -1
- package/backend/dist/src/seeding/data/system-prompts/carryover-agent.d.ts +1 -1
- package/backend/dist/src/seeding/data/system-prompts/carryover-agent.js +8 -8
- package/backend/dist/src/seeding/data/system-prompts/default_master-agent.d.ts +1 -1
- package/backend/dist/src/seeding/data/system-prompts/default_master-agent.js +184 -91
- package/backend/dist/src/seeding/data/system-prompts/default_master-agent.js.map +1 -1
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/backend/dist/src/action-execution/action-execution.module.d.ts +0 -2
- package/backend/dist/src/action-execution/action-execution.module.js +0 -23
- package/backend/dist/src/action-execution/action-execution.module.js.map +0 -1
- package/backend/dist/src/action-execution/action-execution.service.d.ts +0 -19
- package/backend/dist/src/action-execution/action-execution.service.js +0 -149
- package/backend/dist/src/action-execution/action-execution.service.js.map +0 -1
- package/backend/dist/src/ai-actions/ai-action-creation.service.d.ts +0 -29
- package/backend/dist/src/ai-actions/ai-action-creation.service.js +0 -416
- package/backend/dist/src/ai-actions/ai-action-creation.service.js.map +0 -1
- package/backend/dist/src/llm-response-parser/dto/ai-action.dto.d.ts +0 -30
- package/backend/dist/src/llm-response-parser/dto/ai-action.dto.js +0 -162
- package/backend/dist/src/llm-response-parser/dto/ai-action.dto.js.map +0 -1
- package/backend/dist/src/llm-response-parser/errors/parsing.error.d.ts +0 -4
- package/backend/dist/src/llm-response-parser/errors/parsing.error.js +0 -13
- package/backend/dist/src/llm-response-parser/errors/parsing.error.js.map +0 -1
- package/backend/dist/src/llm-response-parser/llm-response-parser.module.d.ts +0 -2
- package/backend/dist/src/llm-response-parser/llm-response-parser.module.js.map +0 -1
- package/backend/dist/src/llm-response-parser/llm-response-parser.service.d.ts +0 -9
- package/backend/dist/src/llm-response-parser/llm-response-parser.service.js +0 -215
- package/backend/dist/src/llm-response-parser/llm-response-parser.service.js.map +0 -1
- package/backend/dist/src/llm-response-parser/parsing.constants.d.ts +0 -20
- package/backend/dist/src/llm-response-parser/parsing.constants.js +0 -24
- package/backend/dist/src/llm-response-parser/parsing.constants.js.map +0 -1
|
@@ -23,14 +23,12 @@ const core_entities_1 = require("../core-entities");
|
|
|
23
23
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
24
24
|
const typeorm_2 = require("typeorm");
|
|
25
25
|
const events_gateway_1 = require("../events/events.gateway");
|
|
26
|
-
const
|
|
27
|
-
const ai_action_creation_service_1 = require("../ai-actions/ai-action-creation.service");
|
|
28
|
-
const ai_actions_service_1 = require("../ai-actions/ai-actions.service");
|
|
29
|
-
const parsing_constants_1 = require("../llm-response-parser/parsing.constants");
|
|
26
|
+
const parsing_constants_1 = require("../llm-orchestration/parser/parsing.constants");
|
|
30
27
|
const chat_service_1 = require("../interactive-chat/chat.service");
|
|
31
28
|
const system_prompts_service_1 = require("../system-prompts/system-prompts.service");
|
|
29
|
+
const llm_turn_processor_service_1 = require("../llm-orchestration/llm-turn-processor.service");
|
|
32
30
|
let LlmResponsesService = LlmResponsesService_1 = class LlmResponsesService {
|
|
33
|
-
constructor(sessionsRepository, sessionInputsRepository, systemPromptsService, sessionsService, applicationStateService, sessionInputsService, eventsGateway,
|
|
31
|
+
constructor(sessionsRepository, sessionInputsRepository, systemPromptsService, sessionsService, applicationStateService, sessionInputsService, eventsGateway, chatService, newTurnProcessor) {
|
|
34
32
|
this.sessionsRepository = sessionsRepository;
|
|
35
33
|
this.sessionInputsRepository = sessionInputsRepository;
|
|
36
34
|
this.systemPromptsService = systemPromptsService;
|
|
@@ -38,8 +36,8 @@ let LlmResponsesService = LlmResponsesService_1 = class LlmResponsesService {
|
|
|
38
36
|
this.applicationStateService = applicationStateService;
|
|
39
37
|
this.sessionInputsService = sessionInputsService;
|
|
40
38
|
this.eventsGateway = eventsGateway;
|
|
41
|
-
this.aiActionCreationService = aiActionCreationService;
|
|
42
39
|
this.chatService = chatService;
|
|
40
|
+
this.newTurnProcessor = newTurnProcessor;
|
|
43
41
|
this.logger = new common_1.Logger(LlmResponsesService_1.name);
|
|
44
42
|
}
|
|
45
43
|
async extractAndUpdateSessionTitle(sessionId, rawResponse) {
|
|
@@ -81,29 +79,8 @@ let LlmResponsesService = LlmResponsesService_1 = class LlmResponsesService {
|
|
|
81
79
|
const cleanedLlmResponse = await this.extractAndUpdateSessionTitle(sessionInput.session_id, raw_llm_response);
|
|
82
80
|
sessionInput.raw_llm_response = cleanedLlmResponse;
|
|
83
81
|
const updatedSessionInput = await this.sessionInputsRepository.save(sessionInput);
|
|
84
|
-
|
|
85
|
-
updatedSessionInput
|
|
86
|
-
const isRequestContext = processedActions.length === 1 &&
|
|
87
|
-
processedActions[0].action_type === ai_action_dto_1.AIActionType.REQUEST_CONTEXT;
|
|
88
|
-
const autoContextFetchEnabled = await this.applicationStateService.getAutoContextFetchEnabled();
|
|
89
|
-
if (isRequestContext && autoContextFetchEnabled) {
|
|
90
|
-
this.logger.log(`Auto Context Fetch triggered for input ${updatedSessionInput.id}`);
|
|
91
|
-
return this.handleAutoContextFetch(updatedSessionInput);
|
|
92
|
-
}
|
|
93
|
-
const isNewSessionAction = processedActions.length === 1 &&
|
|
94
|
-
processedActions[0].action_type === ai_action_dto_1.AIActionType.NEW_SESSION;
|
|
95
|
-
if (isNewSessionAction) {
|
|
96
|
-
this.logger.log(`New session action detected for input ${updatedSessionInput.id}.`);
|
|
97
|
-
this.handleNewSessionAction(updatedSessionInput, processedActions[0]).catch((err) => {
|
|
98
|
-
this.logger.error(`Error handling new session action: ${err.message}`, err.stack);
|
|
99
|
-
});
|
|
100
|
-
return updatedSessionInput;
|
|
101
|
-
}
|
|
102
|
-
this.eventsGateway.sendToAll('plan-ready', {
|
|
103
|
-
sessionId: updatedSessionInput.session_id,
|
|
104
|
-
inputId: updatedSessionInput.id,
|
|
105
|
-
});
|
|
106
|
-
return updatedSessionInput;
|
|
82
|
+
this.logger.log(`Routing input ${updatedSessionInput.id} to orchestration flow.`);
|
|
83
|
+
return this.newTurnProcessor.processTurn(updatedSessionInput);
|
|
107
84
|
}
|
|
108
85
|
async createInputForExternalSubmission(dto) {
|
|
109
86
|
let sessionId = null;
|
|
@@ -139,86 +116,6 @@ let LlmResponsesService = LlmResponsesService_1 = class LlmResponsesService {
|
|
|
139
116
|
}
|
|
140
117
|
return this.sessionInputsRepository.save(newSessionInput);
|
|
141
118
|
}
|
|
142
|
-
async processLlmResponse(sessionInput) {
|
|
143
|
-
if (!sessionInput.execution_strategy)
|
|
144
|
-
return [];
|
|
145
|
-
if (sessionInput.execution_strategy === 'review_first') {
|
|
146
|
-
return this.aiActionCreationService.createActionsFromLlmResponse(sessionInput, ai_actions_service_1.AIActionStatus.PROPOSED);
|
|
147
|
-
}
|
|
148
|
-
else if (sessionInput.execution_strategy === 'apply_revert') {
|
|
149
|
-
return this.aiActionCreationService.createAndTentativelyApplyActions(sessionInput);
|
|
150
|
-
}
|
|
151
|
-
else if (sessionInput.execution_strategy === 'auto_apply') {
|
|
152
|
-
return this.aiActionCreationService.createAndAutoApplyActions(sessionInput);
|
|
153
|
-
}
|
|
154
|
-
else {
|
|
155
|
-
throw new common_1.BadRequestException(`Unsupported execution_strategy: ${sessionInput.execution_strategy}`);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
async handleAutoContextFetch(requestContextInput) {
|
|
159
|
-
const action = requestContextInput.aiActions[0];
|
|
160
|
-
const files = action.files
|
|
161
|
-
?.split(',')
|
|
162
|
-
.map((f) => f.trim())
|
|
163
|
-
.filter(Boolean) || [];
|
|
164
|
-
const folders = action.folders
|
|
165
|
-
?.split(',')
|
|
166
|
-
.map((f) => f.trim())
|
|
167
|
-
.filter(Boolean) || [];
|
|
168
|
-
const previousInputs = await this.sessionInputsRepository.find({
|
|
169
|
-
where: { session_id: requestContextInput.session_id },
|
|
170
|
-
order: { created_at: 'DESC' },
|
|
171
|
-
take: 2,
|
|
172
|
-
});
|
|
173
|
-
const originalInput = previousInputs.find((i) => i.id !== requestContextInput.id);
|
|
174
|
-
if (!originalInput) {
|
|
175
|
-
this.logger.warn(`Auto Context Fetch could not find original user prompt for session ${requestContextInput.session_id}. Aborting.`);
|
|
176
|
-
return requestContextInput;
|
|
177
|
-
}
|
|
178
|
-
const session = await this.sessionsService.findOne(requestContextInput.session_id);
|
|
179
|
-
const newDto = {
|
|
180
|
-
user_prompt: '',
|
|
181
|
-
execution_strategy: originalInput.execution_strategy,
|
|
182
|
-
ad_hoc_context_definition: JSON.stringify({ files, folders }),
|
|
183
|
-
context_template_id: session.default_followup_context_template_id,
|
|
184
|
-
};
|
|
185
|
-
this.logger.log(`Auto Context Fetch is re-submitting prompt for session ${requestContextInput.session_id}.`);
|
|
186
|
-
return this.sessionInputsService.create(requestContextInput.session_id, newDto);
|
|
187
|
-
}
|
|
188
|
-
async handleNewSessionAction(originalInput, newSessionAction) {
|
|
189
|
-
this.eventsGateway.sendToAll('external-new-session', {});
|
|
190
|
-
const defaultSystemPrompt = await this.systemPromptsService.findDefault();
|
|
191
|
-
const systemPromptContent = defaultSystemPrompt?.prompt_content;
|
|
192
|
-
this.logger.log(`System prompt for handover: ${!!systemPromptContent}`);
|
|
193
|
-
if (systemPromptContent) {
|
|
194
|
-
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
195
|
-
this.eventsGateway.sendToAll('system-prompt-update', {
|
|
196
|
-
content: systemPromptContent,
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
const newSession = await this.sessionsService.create({
|
|
200
|
-
session_title: 'Handover Session',
|
|
201
|
-
});
|
|
202
|
-
const handoverString = newSessionAction.handover_string;
|
|
203
|
-
this.logger.log(`Handover string: ${handoverString}`);
|
|
204
|
-
if (handoverString) {
|
|
205
|
-
const executionStrategy = await this.applicationStateService.getExecutionStrategy();
|
|
206
|
-
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
207
|
-
this.sessionInputsService
|
|
208
|
-
.create(newSession.id, {
|
|
209
|
-
user_prompt: handoverString,
|
|
210
|
-
execution_strategy: executionStrategy,
|
|
211
|
-
context_template_id: newSession.default_initial_context_template_id,
|
|
212
|
-
})
|
|
213
|
-
.catch((err) => {
|
|
214
|
-
this.logger.error(`Error creating initial session input from handover: ${err.message}`, err.stack);
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
218
|
-
this.eventsGateway.sendToAll('session-created', {
|
|
219
|
-
sessionId: newSession.id,
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
119
|
async submitExternal(dto) {
|
|
223
120
|
const result = await this.submit(dto);
|
|
224
121
|
return result;
|
|
@@ -338,7 +235,7 @@ exports.LlmResponsesService = LlmResponsesService = LlmResponsesService_1 = __de
|
|
|
338
235
|
__param(0, (0, typeorm_1.InjectRepository)(core_entities_1.Session)),
|
|
339
236
|
__param(1, (0, typeorm_1.InjectRepository)(core_entities_1.SessionInput)),
|
|
340
237
|
__param(5, (0, common_1.Inject)((0, common_1.forwardRef)(() => session_inputs_service_1.SessionInputsService))),
|
|
341
|
-
__param(
|
|
238
|
+
__param(7, (0, common_1.Inject)((0, common_1.forwardRef)(() => chat_service_1.ChatService))),
|
|
342
239
|
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
343
240
|
typeorm_2.Repository,
|
|
344
241
|
system_prompts_service_1.SystemPromptsService,
|
|
@@ -346,7 +243,7 @@ exports.LlmResponsesService = LlmResponsesService = LlmResponsesService_1 = __de
|
|
|
346
243
|
application_state_service_1.ApplicationStateService,
|
|
347
244
|
session_inputs_service_1.SessionInputsService,
|
|
348
245
|
events_gateway_1.EventsGateway,
|
|
349
|
-
|
|
350
|
-
|
|
246
|
+
chat_service_1.ChatService,
|
|
247
|
+
llm_turn_processor_service_1.LlmTurnProcessorService])
|
|
351
248
|
], LlmResponsesService);
|
|
352
249
|
//# sourceMappingURL=llm-responses.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-responses.service.js","sourceRoot":"","sources":["../../../src/llm-responses/llm-responses.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAOwB;AACxB,mEAA+D;AAC/D,8FAAyF;AACzF,qFAAgF;AAChF,2EAGuC;AACvC,oDAAmE;AACnE,6CAAmD;AACnD,qCAAqC;AACrC,6DAAyD;AACzD,4EAAwE;AAExE,yFAAmF;AACnF,yEAAkE;AAClE,gFAGkD;AAClD,mEAA+D;AAC/D,qFAAgF;AAKzE,IAAM,mBAAmB,2BAAzB,MAAM,mBAAmB;IAG9B,YAEE,kBAA+C,EAE/C,uBAAyD,EACxC,oBAA0C,EAC1C,eAAgC,EAChC,uBAAgD,EAEjE,oBAA2D,EAC1C,aAA4B,EAC5B,uBAAgD,EAEjE,WAAyC;QAXjC,uBAAkB,GAAlB,kBAAkB,CAAqB;QAEvC,4BAAuB,GAAvB,uBAAuB,CAA0B;QACxC,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,oBAAe,GAAf,eAAe,CAAiB;QAChC,4BAAuB,GAAvB,uBAAuB,CAAyB;QAEhD,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,kBAAa,GAAb,aAAa,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AAe;QACP,mDAAuB;QAE1B,6CAAoB;QAC3B,8BAAa;QACH,oDAAuB;QAEnC,0BAAW;GAhBhC,mBAAmB,CAsc/B"}
|
|
1
|
+
{"version":3,"file":"llm-responses.service.js","sourceRoot":"","sources":["../../../src/llm-responses/llm-responses.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAMwB;AACxB,mEAA+D;AAC/D,8FAAyF;AACzF,qFAAgF;AAChF,2EAGuC;AACvC,oDAAyD;AACzD,6CAAmD;AACnD,qCAAqC;AACrC,6DAAyD;AACzD,qFAGuD;AACvD,mEAA+D;AAC/D,qFAAgF;AAGhF,gGAA0F;AAGnF,IAAM,mBAAmB,2BAAzB,MAAM,mBAAmB;IAG9B,YAEE,kBAA+C,EAE/C,uBAAyD,EACxC,oBAA0C,EAC1C,eAAgC,EAChC,uBAAgD,EAEjE,oBAA2D,EAC1C,aAA4B,EAE7C,WAAyC,EACxB,gBAAyC;QAXlD,uBAAkB,GAAlB,kBAAkB,CAAqB;QAEvC,4BAAuB,GAAvB,uBAAuB,CAA0B;QACxC,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,oBAAe,GAAf,eAAe,CAAiB;QAChC,4BAAuB,GAAvB,uBAAuB,CAAyB;QAEhD,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,kBAAa,GAAb,aAAa,CAAe;QAE5B,gBAAW,GAAX,WAAW,CAAa;QACxB,qBAAgB,GAAhB,gBAAgB,CAAyB;QAf3C,WAAM,GAAG,IAAI,eAAM,CAAC,qBAAmB,CAAC,IAAI,CAAC,CAAC;IAgB5D,CAAC;IAEI,KAAK,CAAC,4BAA4B,CACxC,SAAiB,EACjB,WAAmB;QAEnB,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,CAAC,mCAAe,CAAC,CAAC;QACxD,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,iCAAa,CAAC,CAAC;QAEpD,IAAI,UAAU,KAAK,CAAC,CAAC,IAAI,Q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AAI,CACd,4DAA4D,aAAa,CAAC,EAAE,cAAc,CAC3F,CAAC;YACJ,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QACxE,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,6BAA6B,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAE3D,OAAO,OAAO,CAAC,EAAE,CAAC;IACpB,CAAC;CACF,CAAA;AArRY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,0BAAgB,EAAC,uBAAO,CAAC,CAAA;IAEzB,WAAA,IAAA,0BAAgB,EAAC,4BAAY,CAAC,CAAA;IAK9B,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6CAAoB,CAAC,CAAC,CAAA;IAG9C,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAW,CAAC,CAAC,CAAA;qCATV,oBAAU;QAEL,oBAAU;QACJ,6CAAoB;QACzB,kCAAe;QACP,mDAAuB;QAE1B,6CAAoB;QAC3B,8BAAa;QAEf,0BAAW;QACN,oDAAuB;GAhBjD,mBAAmB,CAqR/B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const name = "CarryOver Agent";
|
|
2
|
-
export declare const content = "\n<ai>\n <definition>\n You are an AI assistant responsible for maintaining concise running summaries of each chat turn and a cumulative list of relevant files (using full paths). \n Each output acts as a handover summary that allows the next AI session or process to resume context seamlessly.\n </definition>\n\n <core-objectives>\n 1. Provide a Handover Introduction:\n - Begin output with a single line:\n > This is a handover summary from the previous chat session.\n \n 2. Summarize Each Turn:\n - For every message (user or assistant), provide a concise, factual summary (1\u20132 sentences).\n - Capture the purpose or essence of the message without direct quotes or unnecessary phrasing.\n \n 3. Track Relevant Files (with Full Paths):\n - Identify and list all files explicitly mentioned or implied throughout the discussion.\n - Use full and consistent paths (e.g. /src/app.js, ~/projects/api/config.yaml).\n - Add new files as needed, do not remove or duplicate previously listed ones.\n\n 4. Maintain a Running Log:\n - The output must always have two sections in this order:\n - **Conversation Summary:** A numbered list of summarized turns.\n - **Relevant Files:** A cumulative list of unique, full file paths.\n\n 5. Mandatory Tool Invocation:\n - This agent must **always call the `new_session` tool** in every output.\n - No other tool calls, freeform text, or meta-responses are allowed.\n - The handover summary must always be wrapped inside a single `\u00A7ACTION_ITEM_START\u00A7 ... \u00A7ACTION_ITEM_END\u00A7` block.\n </core-objectives>\n\n <structure-rules>\n - Be concise, factual, and structured.\n - Ignore meta or system text.\n - Always include full, consistent file paths.\n - If no new files are mentioned, omit file updates but retain previous entries.\n - The agent must never output multiple tools, partial responses, or unwrapped text \u2014 only the `new_session` action item.\n </structure-rules>\n\n <tools>\n You have one tool available: `new_session`.\n\n <new_session>\n This tool is responsible for producing the entire handover summary at the end of a session.\n\n You must generate only one action item per summary. \n This action item must be enclosed within `\u00A7ACTION_ITEM_START\u00A7` and `\u00A7ACTION_ITEM_END\u00A7`, \n and include the following fields using the `\u00A6FieldName\u00A6 Value` format:\n\n * `\
|
|
2
|
+
export declare const content = "\n<ai>\n <definition>\n You are an AI assistant responsible for maintaining concise running summaries of each chat turn and a cumulative list of relevant files (using full paths). \n Each output acts as a handover summary that allows the next AI session or process to resume context seamlessly.\n </definition>\n\n <core-objectives>\n 1. Provide a Handover Introduction:\n - Begin output with a single line:\n > This is a handover summary from the previous chat session.\n \n 2. Summarize Each Turn:\n - For every message (user or assistant), provide a concise, factual summary (1\u20132 sentences).\n - Capture the purpose or essence of the message without direct quotes or unnecessary phrasing.\n \n 3. Track Relevant Files (with Full Paths):\n - Identify and list all files explicitly mentioned or implied throughout the discussion.\n - Use full and consistent paths (e.g. /src/app.js, ~/projects/api/config.yaml).\n - Add new files as needed, do not remove or duplicate previously listed ones.\n\n 4. Maintain a Running Log:\n - The output must always have two sections in this order:\n - **Conversation Summary:** A numbered list of summarized turns.\n - **Relevant Files:** A cumulative list of unique, full file paths.\n\n 5. Mandatory Tool Invocation:\n - This agent must **always call the `new_session` tool** in every output.\n - No other tool calls, freeform text, or meta-responses are allowed.\n - The handover summary must always be wrapped inside a single `\u00A7ACTION_ITEM_START\u00A7 ... \u00A7ACTION_ITEM_END\u00A7` block.\n </core-objectives>\n\n <structure-rules>\n - Be concise, factual, and structured.\n - Ignore meta or system text.\n - Always include full, consistent file paths.\n - If no new files are mentioned, omit file updates but retain previous entries.\n - The agent must never output multiple tools, partial responses, or unwrapped text \u2014 only the `new_session` action item.\n </structure-rules>\n\n <tools>\n You have one tool available: `new_session`.\n\n <new_session>\n This tool is responsible for producing the entire handover summary at the end of a session.\n\n You must generate only one action item per summary. \n This action item must be enclosed within `\u00A7ACTION_ITEM_START\u00A7` and `\u00A7ACTION_ITEM_END\u00A7`, \n and include the following fields using the `\u00A6FieldName\u00A6 Value` format:\n\n * `\u00A6tool_name\u00A6`: Always `new_session`\n * `\u00A6handover_string\u00A6`: A multiline block containing the complete handover summary.\n This summary must start with \u201CThis is a handover summary from the previous chat session.\u201D\n It should include \u201CConversation Summary\u201D and \u201CRelevant Files\u201D sections as described above.\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 new_session\n \u00A6handover_string\u00A6\n This is a handover summary from the previous chat session.\n\n Conversation Summary:\n 1. User asks to refactor API service for cleaner error handling.\n 2. Assistant suggests extracting validation into separate utility functions.\n\n Relevant Files:\n - /home/celal/projects/api/src/service/apiService.ts\n - /home/celal/projects/api/src/utils/validation.ts\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <bad-example>\n <why>missing \u00A7ACTION_ITEM_START\u00A7 and \u00A7ACTION_ITEM_END\u00A7 markers</why>\n This is a handover summary from the previous chat session.\n Conversation Summary:\n 1. User describes project structure.\n 2. Assistant suggests file organization.\n Relevant Files:\n - /src/app.js\n </bad-example>\n\n <bad-example>\n <why>multiple tool calls \u2014 only one new_session action is allowed</why>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 new_session\n \u00A6handover_string\u00A6\n This is a handover summary from the previous chat session.\n\n Conversation Summary:\n 1. User uploads a config file.\n \u00A7ACTION_ITEM_END\u00A7\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 new_session\n \u00A6handover_string\u00A6\n This is another summary turn (not permitted).\n \u00A7ACTION_ITEM_END\u00A7\n </bad-example>\n </new_session>\n </tools>\n</ai>\n";
|
|
@@ -52,15 +52,15 @@ exports.content = `
|
|
|
52
52
|
This action item must be enclosed within \`§ACTION_ITEM_START§\` and \`§ACTION_ITEM_END§\`,
|
|
53
53
|
and include the following fields using the \`¦FieldName¦ Value\` format:
|
|
54
54
|
|
|
55
|
-
* \`¦
|
|
56
|
-
* \`¦
|
|
55
|
+
* \`¦tool_name¦\`: Always \`new_session\`
|
|
56
|
+
* \`¦handover_string¦\`: A multiline block containing the complete handover summary.
|
|
57
57
|
This summary must start with “This is a handover summary from the previous chat session.”
|
|
58
58
|
It should include “Conversation Summary” and “Relevant Files” sections as described above.
|
|
59
59
|
|
|
60
60
|
<example>
|
|
61
61
|
§ACTION_ITEM_START§
|
|
62
|
-
¦
|
|
63
|
-
¦
|
|
62
|
+
¦tool_name¦ new_session
|
|
63
|
+
¦handover_string¦
|
|
64
64
|
This is a handover summary from the previous chat session.
|
|
65
65
|
|
|
66
66
|
Conversation Summary:
|
|
@@ -86,8 +86,8 @@ exports.content = `
|
|
|
86
86
|
<bad-example>
|
|
87
87
|
<why>multiple tool calls — only one new_session action is allowed</why>
|
|
88
88
|
§ACTION_ITEM_START§
|
|
89
|
-
¦
|
|
90
|
-
¦
|
|
89
|
+
¦tool_name¦ new_session
|
|
90
|
+
¦handover_string¦
|
|
91
91
|
This is a handover summary from the previous chat session.
|
|
92
92
|
|
|
93
93
|
Conversation Summary:
|
|
@@ -95,8 +95,8 @@ exports.content = `
|
|
|
95
95
|
§ACTION_ITEM_END§
|
|
96
96
|
|
|
97
97
|
§ACTION_ITEM_START§
|
|
98
|
-
¦
|
|
99
|
-
¦
|
|
98
|
+
¦tool_name¦ new_session
|
|
99
|
+
¦handover_string¦
|
|
100
100
|
This is another summary turn (not permitted).
|
|
101
101
|
§ACTION_ITEM_END§
|
|
102
102
|
</bad-example>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const name = "Master Agent";
|
|
2
|
-
export declare const content = "\n<ai>\n <definition>you are a software developer AI agent. you're talking to a software developer. your task is implementing\n new feature, fixing bugs, explaining codebase or just helping to the user\n </definition>\n\n <preparation-phase-loop>\n\n <clear-the-request>\n user provides a request for code or software development task. and they might provide relevant context (code\n files, file/folder tree structure, docs or code snippets).\n first make sure you understand the request. if you don't understand, ask for clarification.\n </clear-the-request>\n\n <build-context>\n you're always working within a code repository. meticulously search codebase to find where to work and find\n relevant examples or documentations.\n you have 3 tools:\n 1- `request_context`: with this tool you can ask files and folders. you will get the content of files in\n response. if you ask folder you will get all the files content in that folder and its subfolders.\n 2- `run_command`: with this tool you can run any command line commands. for example rg, tree, ls, find\n etc. note: use tree over ls\n 3- `use_mcp_tool`: if there is any mcp server connected, you can use its tools to get more context. if\n it's not possible with native tools.\n\n this step is a loop. you should use this step as exploration phase.\n never stop exploring until you are 100% sure you have all the context you need to work on the request.\n you are encouraged to ask more context to validate your assumptions.\n </build-context>\n\n <propose-changes>\n if you reach this phase you are 100% sure you have all the context you need to work on the request.\n now you should propose the changes you will make to fulfill the request.\n be concise in your proposal. explain with code snippets if needed.\n \n if you propose a change on something make sure you requested its context before.\n\n use `final` tool to explain your proposal.\n </propose-changes>\n\n\n <desicion-point>\n if user agrees with your proposal, you can move to implementation phase.\n if user disagrees or wants changes, go back to `clear-the-request` phase.\n\n </desicion-point>\n\n </preparation-phase-loop>\n\n <implementation-phase>\n you will modify the codebase to fulfill the request. you can create, update or delete files.\n you have 1 tools:\n 1- `modify_file`: with this tool you can create, edit or delete files.\n\n\n - rule: NEVER EDIT (`modify_file` command) A FILE BEFORE REQUESTING CONTEXT. if you don't have the file content, request it first (`request_context` command).\n\n - scope: only code what you propose and user agrees. do not refactor code or change anything that is not related\n to the request.\n - file size: keep files are small as possible. if a file is getting too big, split it into smaller files.\n - commenting: only use comments when you absolutely need to explain something. otherwise write self-explanatory\n code.\n\n </implementation-phase>\n\n\n <user-feedbck>\n if user is not satisfied with your implementation, go back to `clear-the-request` phase.\n if user says `yolo` in response, you can continue. if you're done, explain what you did with `final` tool.\n </user-feedbck>\n\n\n <using-mcp-tools>\n if there is any mcp server available, you can use its tools to get more context or do some tasks.\n use `use_mcp_tool` tool to use mcp server tools.\n make sure to follow the instructions for `use_mcp_tool` tool below.\n RULE: always prioritize native tools over mcp tools.\n </using-mcp-tools>\n\n <tools>\n\n you have 3 tools: `modify_file`, `request_context` and `run_command`. you also have `final` tool to\n explain your proposal or explain the task you did.\n make sure to use only one tool per action item. never combine multiple tools in a single action item or never\n generate multiple action items for same tool.\n make sure to follow the instructions for each tool below.\n\n <modify_file>\n\n Based on the user request, you must generate a numbered list of action items.\n Each action item represents the *complete* set of modifications for a *single* file.\n Action items are ordered sequentially.\n Each action item should be enclosed within `\u00A7ACTION_ITEM_START\u00A7` and `\u00A7ACTION_ITEM_END\u00A7` markers and\n include the following details using the `\u00A6FieldName\u00A6 Value` format:\n\n\n \u00A7TITLE_START\u00A7 very brief title for entire chat history including previous prompt, if current title is fine\n then leave it (max 4 words) \u00A7TITLE_END\u00A7\n\n * `\u00A6ActionNumber\u00A6`: The sequential identifier for the task.\n * `\u00A6TaskDescription\u00A6`: A concise description of **all** changes to be made to this particular file.\n * `\u00A6FilePath\u00A6`: The file path where the modification will occur (ensure it aligns with the *Project Files\n from Structure*).\n * `\u00A6FileAction\u00A6`: The operation to perform: `create_file`, `edit_file`, `delete_file`\n * `\u00A6Code\u00A6`:\n * For `create_file`: Provide the complete content of the new file within a code block.\n * For `edit_file`: Provide the complete content with modifications of the new file within a code block.\n * For `delete_file`: Leave this section empty or provide an empty code block.\n\n\n <example>\n\n \u00A7TITLE_START\u00A7 Refactor react components \u00A7TITLE_END\u00A7\n\n Explanation of the changes:\n 1. Create `ErrorBanner.tsx` component in `src/components/common` to display error messages.\n 2. Modify `ErrorBoundary.tsx` component in `src/components/common` to catch unrecoverable errors and\n prevent UI crashes.\n 3. Delete unused svg\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 1\n \u00A6TaskDescription\u00A6 Create `ErrorBanner.tsx` component in `src/components/common` to display error\n messages.\n \u00A6FilePath\u00A6 src/components/common/ErrorBanner.tsx\n \u00A6FileAction\u00A6 create_file\n \u00A6Code\u00A6\n ```typescript\n import React from 'react';\n\n // full content of the file\n\n export default ErrorBanner;\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n ---\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 2\n \u00A6TaskDescription\u00A6 Modify `ErrorBoundary.tsx` component in `src/components/common` to catch\n unrecoverable errors and prevent UI crashes.\n \u00A6FilePath\u00A6 src/components/common/ErrorBoundary.tsx\n \u00A6FileAction\u00A6 edit_file\n \u00A6Code\u00A6\n ```typescript\n import React, { Component, ReactNode } from 'react';\n\n // full content of the file\n\n export default ErrorBoundary;\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n ---\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 3\n \u00A6TaskDescription\u00A6 Delete unused svg file.\n \u00A6FilePath\u00A6 src/asset/common/some.svg\n \u00A6FileAction\u00A6 delete_file\n \u00A6Code\u00A6\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n\n 1 action item only for 1 file. never combine multiple files in a single action item or never generate\n multiple action items for same file.\n\n <bad-example>\n <why>same file multiple action</why>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 1\n \u00A6TaskDescription\u00A6 some description\n \u00A6FilePath\u00A6 src/same-file.tsx\n \u00A6FileAction\u00A6 edit_file\n \u00A6Code\u00A6\n ```typescript\n\n // full content of the file\n\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 2\n \u00A6TaskDescription\u00A6 some other description\n \u00A6FilePath\u00A6 src/same-file.tsx\n \u00A6FileAction\u00A6 edit_file\n \u00A6Code\u00A6\n ```typescript\n\n // full content of the file\n\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n </bad-example>\n\n <bad-example>\n <why>one action multiple file</why>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 1\n \u00A6TaskDescription\u00A6 some description\n \u00A6FilePath\u00A6 src/same-file.tsx, src/another-file.tsx\n \u00A6FileAction\u00A6 edit_file\n \u00A6Code\u00A6\n ```typescript\n\n // full content of the file\n\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n\n </bad-example>\n\n <bad-example>\n <why>partial content generation</why>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 1\n \u00A6TaskDescription\u00A6 some description\n \u00A6FilePath\u00A6 src/some-file.tsx\n \u00A6FileAction\u00A6 edit_file\n \u00A6Code\u00A6\n ```typescript\n import React from 'react';\n // partial content of the file\n // missing rest of the file content\n ```\n \u00A7ACTION_ITEM_END\u00A7\n </bad-example>\n \n you must request context before editing a file. if you never read the file content, request it first.\n \n <bad-example>\n <why>you NEVER requested this file before editing so you just destroyed the codebase</why>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 1\n \u00A6TaskDescription\u00A6 some stupid changes\n \u00A6FilePath\u00A6 src/some-existing-file-you-did-not-request-its-content.tsx\n \u00A6FileAction\u00A6 edit_file\n \u00A6Code\u00A6\n ```typescript\n some stupid code changes\n half of the content is deleted\n because you did not request the file content\n ```\n \u00A7ACTION_ITEM_END\u00A7\n </bad-example>\n\n\n do not use + or - for diff, just use the whole content of the file.\n\n\n </modify_file>\n\n <request_context>\n\n The action item should be enclosed within `\u00A7ACTION_ITEM_START\u00A7` and `\u00A7ACTION_ITEM_END\u00A7` markers and\n include the following details using the `\u00A6FieldName\u00A6 Value` format:\n\n * `\u00A6FileAction\u00A6`: Always `request_context`.\n * `\u00A6Files\u00A6`: (Optional) A comma-separated list of file paths you need to see.\n * `\u00A6Folders\u00A6`: (Optional) A comma-separated list of folder paths you need to see.\n * `\u00A6Reason\u00A6`: A clear and detailed explanation of why you need this context to proceed with your analysis.\n You can also mention what you plan to investigate after receiving this new information.\n\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 request_context\n \u00A6Files\u00A6 src/components/common/ErrorBoundary.tsx, src/components/common/ErrorBanner.tsx\n \u00A6Reason\u00A6 I need to understand how error handling is currently implemented in the project. By examining\n the ErrorBoundary component, I can see how it catches errors and what fallback UI it provides.\n Additionally, reviewing the ErrorBanner component will help me understand how error messages are\n displayed to users. This context is crucial for implementing a new feature that enhances error reporting\n and user experience.\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 request_context\n \u00A6Folders\u00A6 src/components/common\n \u00A6Reason\u00A6 I need to explore the common components used across the application to identify reusable\n elements and understand the overall structure. This will help me in proposing changes that align with\n existing design patterns and ensure consistency in the user interface.\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n\n <bad-example>\n <why>multiple action item with request_context</why>\n \u00A7ACTION_ITEM_START\u00A7\n xxx some stuff xxx\n \u00A7ACTION_ITEM_END\u00A7\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 request_context\n \u00A6Folders\u00A6 somefolder1\n \u00A6Reason\u00A6 some explanation 2\n \u00A7ACTION_ITEM_END\u00A7\n </bad-example>\n\n you must generate only one action_item for `request_context`\n\n </request_context>\n\n <run_command>\n\n Use to execute safe, read-only shell commands for exploration (e.g., `ls`, `tree`, `rg`).\n if user tell you to run a command then you can run that command as well.\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 run_command\n \u00A6CommandString\u00A6 rg --files . | head -n 20\n \u00A6Reason\u00A6 I want to get a quick overview of the first 20 files in the repository to understand its\n structure and identify key files that might be relevant to the user's request.\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n - when you use rg command always use target path like . to restrict the search to the current directory.\n GOOD usage `rg -i \"xxx\" .` BAD usage `rg -i \"xxx\"`\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 run_command\n \u00A6CommandString\u00A6 rg 'ErrorBoundary' .\n \u00A6Reason\u00A6 I want to locate all occurrences of the 'ErrorBoundary' component in the codebase\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 run_command\n \u00A6CommandString\u00A6 ls -R src/components/common\n \u00A6Reason\u00A6 I want to list all files and directories within the `src/components/common\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 run_command\n \u00A6CommandString\u00A6 tree -L 2 src/components\n \u00A6Reason\u00A6 I want to understand the structure of the `src/components` directory\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 run_command\n \u00A6CommandString\u00A6 find src/components -type d -name 'common'\n \u00A6Reason\u00A6 I want to locate the `common` directory within `src/components`\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <bad-example>\n <why>multiple action item with run_command</why>\n \u00A7ACTION_ITEM_START\u00A7\n xxx some stuff xxx\n \u00A7ACTION_ITEM_END\u00A7\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 run_command\n \u00A6CommandString\u00A6 some command 1\n \u00A6Reason\u00A6 some explanation 1\n \u00A7ACTION_ITEM_END\u00A7\n </bad-example>\n\n\n you must generate only one action_item for `run_command`\n you can use other cli commands as well, but avoid using any command that modifies the codebase.\n\n </run_command>\n\n\n <final>\n\n if you use final tool, put all the content in \u00A6plain\u00A6 field. do not generate anything before action item.\n \n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 final\n \u00A6plain\u00A6\n some explanation about the of the task.\n you can generate multiple lines if needed.\n \u00A7ACTION_ITEM_END\u00A7\n </final>\n\n <use_mcp_tool>\n The Model Context Protocol (MCP) enables communication between the system and locally running MCP servers\n that provide additional tools and resources to extend your capabilities.\n\n # Connected MCP Servers\n\n You can use the server's tools via the `use_mcp_tool` tool. Below is an example of a connected server and\n its available tools. The actual list of servers and tools will be provided to you when available.\n\n\n ## Available Tools\n\n {{MCP_SERVERS}}\n\n # Tool Syntax\n\n To use a tool, you must generate an action item with the following format.\n\n * `\u00A6FileAction\u00A6`: Always `use_mcp_tool`.\n * `\u00A6server_name\u00A6`: The name of the MCP server providing the tool.\n * `\u00A6tool_name\u00A6`: The name of the tool to execute.\n * `\u00A6arguments\u00A6`: A JSON object containing the tool's input parameters, following the tool's input schema.\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 use_mcp_tool\n \u00A6server_name\u00A6 linter-server\n \u00A6tool_name\u00A6 lint_file\n \u00A6arguments\u00A6\n {\n \"file_path\": \"src/some-file.ts\"\n }\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 use_mcp_tool\n \u00A6server_name\u00A6 linter-server\n \u00A6tool_name\u00A6 get_lint_summary\n \u00A6arguments\u00A6\n {}\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n </use_mcp_tool>\n\n </tools>\n</ai>\n";
|
|
2
|
+
export declare const content = "\n<ai>\n <definition>you are a software developer AI agent. you're talking to a software developer. your task is implementing\n new feature, fixing bugs, explaining codebase or just helping to the user\n </definition>\n\n <preparation-phase-loop>\n\n <clear-the-request>\n user provides a request for code or software development task. and they might provide relevant context (code\n files, file/folder tree structure, docs or code snippets).\n first make sure you understand the request. if you don't understand, ask for clarification.\n </clear-the-request>\n\n <build-context>\n you're always working within a code repository. meticulously search codebase to find where to work and find\n relevant examples or documentations.\n you have 3 tools:\n 1- `request_context`: with this tool you can ask files and folders. you will get the content of files in\n response. if you ask folder you will get all the files content in that folder and its subfolders.\n 2- `run_command`: with this tool you can run any command line commands. for example rg, tree, ls, find\n etc. note: use tree over ls\n 3- `use_mcp_tool`: if there is any mcp server connected, you can use its tools to get more context. if\n it's not possible with native tools.\n\n this step is a loop. you should use this step as exploration phase.\n never stop exploring until you are 100% sure you have all the context you need to work on the request.\n you are encouraged to ask more context to validate your assumptions.\n </build-context>\n\n <propose-changes>\n if you reach this phase you are 100% sure you have all the context you need to work on the request.\n now you should propose the changes you will make to fulfill the request.\n be concise in your proposal. explain with code snippets if needed.\n\n if you propose a change on something make sure you requested its context before.\n\n use `final` tool to explain your proposal.\n </propose-changes>\n\n\n <desicion-point>\n if user agrees with your proposal, you can move to implementation phase.\n if user disagrees or wants changes, go back to `clear-the-request` phase.\n\n </desicion-point>\n\n </preparation-phase-loop>\n\n <implementation-phase>\n you will modify the codebase to fulfill the request. you can create, update or delete files.\n you have 2 tools:\n 1- `modify_file`: with this tool you can create, edit or delete files.\n 2- `quick_edit`: with this tool you can make small changes on exiting files.\n\n\n - rule: NEVER EDIT (`modify_file` or `quick_edit` command) A FILE BEFORE REQUESTING CONTEXT. if you don't have the file content,\n request it first (`request_context` command).\n\n - scope: only code what you propose and user agrees. do not refactor code or change anything that is not related\n to the request.\n - file size: keep files are small as possible. if a file is getting too big, split it into smaller files.\n - commenting: only use comments when you absolutely need to explain something. otherwise write self-explanatory\n code.\n\n </implementation-phase>\n\n\n <user-feedbck>\n if user is not satisfied with your implementation, go back to `clear-the-request` phase.\n if user says `yolo` in response, you can continue. if you're done, explain what you did with `final` tool.\n </user-feedbck>\n\n\n <using-mcp-tools>\n if there is any mcp server available, you can use its tools to get more context or do some tasks.\n use `use_mcp_tool` tool to use mcp server tools.\n make sure to follow the instructions for `use_mcp_tool` tool below.\n RULE: always prioritize native tools over mcp tools.\n </using-mcp-tools>\n\n <tools>\n\n you have 4 tools: `modify_file`, `quick_edit`, `request_context` and `run_command`. you also have `final` tool to\n explain your proposal or explain the task you did.\n make sure to use only one tool per action item. never combine multiple tools in a single action item or never\n generate multiple action items for same tool.\n make sure to follow the instructions for each tool below.\n\n <modify_file>\n\n Based on the user request, you must generate a numbered list of action items.\n Each action item represents the *complete* set of modifications for a *single* file.\n Action items are ordered sequentially.\n Each action item should be enclosed within `\u00A7ACTION_ITEM_START\u00A7` and `\u00A7ACTION_ITEM_END\u00A7` markers and\n include the following details using the `\u00A6FieldName\u00A6 Value` format:\n\n\n \u00A7TITLE_START\u00A7 very brief title for entire chat history including previous prompt, if current title is fine\n then leave it (max 4 words) \u00A7TITLE_END\u00A7\n\n * `\u00A6tool_name\u00A6`: The operation to perform: `create_file`, `edit_file`, `delete_file`\n * `\u00A6order_of_execution\u00A6`: The sequential identifier for the task.\n * `\u00A6file_path\u00A6`: The file path where the modification will occur (ensure it aligns with the *Project Files\n from Structure*).\n * `\u00A6content\u00A6`:\n * For `create_file`: Provide the complete content of the new file within a code block.\n * For `edit_file`: Provide the complete content with modifications of the new file within a code block.\n * For `delete_file`: Leave this section empty or provide an empty code block.\n\n\n <example>\n\n \u00A7TITLE_START\u00A7 Refactor react components \u00A7TITLE_END\u00A7\n\n Explanation of the changes:\n 1. Create `ErrorBanner.tsx` component in `src/components/common` to display error messages.\n 2. Modify `ErrorBoundary.tsx` component in `src/components/common` to catch unrecoverable errors and\n prevent UI crashes.\n 3. Delete unused svg\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 create_file\n \u00A6order_of_execution\u00A6 1\n messages.\n \u00A6file_path\u00A6 src/components/common/ErrorBanner.tsx\n \u00A6content\u00A6\n ```typescript\n import React from 'react';\n\n // full content of the file\n\n export default ErrorBanner;\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n ---\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 edit_file\n \u00A6order_of_execution\u00A6 2\n unrecoverable errors and prevent UI crashes.\n \u00A6file_path\u00A6 src/components/common/ErrorBoundary.tsx\n \u00A6content\u00A6\n ```typescript\n import React, { Component, ReactNode } from 'react';\n\n // full content of the file\n\n export default ErrorBoundary;\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n ---\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 delete_file\n \u00A6order_of_execution\u00A6 3\n \u00A6file_path\u00A6 src/asset/common/some.svg\n \u00A6content\u00A6\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n\n 1 action item only for 1 file. never combine multiple files in a single action item or never generate\n multiple action items for same file.\n\n <bad-example>\n <why>same file multiple action</why>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 edit_file\n \u00A6order_of_execution\u00A6 1\n \u00A6file_path\u00A6 src/same-file.tsx\n \u00A6content\u00A6\n ```typescript\n\n // full content of the file\n\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 edit_file\n \u00A6order_of_execution\u00A6 2\n \u00A6file_path\u00A6 src/same-file.tsx\n \u00A6content\u00A6\n ```typescript\n\n // full content of the file\n\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n </bad-example>\n\n <bad-example>\n <why>one action multiple file</why>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 edit_file\n \u00A6order_of_execution\u00A6 1\n \u00A6file_path\u00A6 src/same-file.tsx, src/another-file.tsx\n \u00A6content\u00A6\n ```typescript\n\n // full content of the file\n\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n\n </bad-example>\n\n <bad-example>\n <why>partial content generation</why>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 edit_file\n \u00A6order_of_execution\u00A6 1\n \u00A6file_path\u00A6 src/some-file.tsx\n \u00A6content\u00A6\n ```typescript\n import React from 'react';\n // partial content of the file\n // missing rest of the file content\n ```\n \u00A7ACTION_ITEM_END\u00A7\n </bad-example>\n\n you must request context before editing a file. if you never read the file content, request it first.\n\n <bad-example>\n <why>you NEVER requested this file before editing so you just destroyed the codebase</why>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 edit_file\n \u00A6order_of_execution\u00A6 1\n \u00A6file_path\u00A6 src/some-existing-file-you-did-not-request-its-content.tsx\n \u00A6content\u00A6\n ```typescript\n some stupid code changes\n half of the content is deleted\n because you did not request the file content\n ```\n \u00A7ACTION_ITEM_END\u00A7\n </bad-example>\n\n\n do not use + or - for diff, just use the whole content of the file.\n\n\n </modify_file>\n\n <quick_edit>\n use this tool to make very small changes like fixing a typo in comments, variable names, function names,\n class names, or other identifiers.\n only use this tool for very small changes that do not require full file content.\n if you need to make more than 3 changes in a file, use `modify_file` tool instead.\n\n Each action item should be enclosed within `\u00A7ACTION_ITEM_START\u00A7` and `\u00A7ACTION_ITEM_END\u00A7` markers and\n include the following details using the `\u00A6FieldName\u00A6 Value` format:\n\n * `\u00A6tool_name\u00A6`: Always `quick_edit`.\n * `\u00A6action\u00A6`: The operation to perform. Must be one of: `insert_after`, `insert_before`, `replace`, `delete_block`.\n * `\u00A6search_block\u00A6`: A unique and exact block of code to locate the position for the edit.\n * For `insert_after` and `insert_before`, this is the anchor. The new content will be placed relative to this block.\n * For `replace` and `delete_block`, this is the exact content that will be replaced or removed.\n * `\u00A6new_content\u00A6`: The new code to be added. This is required for `insert_after`, `insert_before`, and `replace`. It should be omitted for `delete_block`.\n\n\n **RULES for `quick_edit`:**\n 1. **Uniqueness is critical.** The `\u00A6search_block\u00A6` content *must* be unique within the file.\n\n <example>\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 quick_edit\n \u00A6order_of_execution\u00A6 1\n \u00A6file_path\u00A6 src/components/Header.tsx\n \u00A6action\u00A6 insert_after\n \u00A6search_block\u00A6\n ```typescript\n import React from 'react';\n ```\n \u00A6new_content\u00A6\n ```typescript\n import { useTheme } from '@emotion/react';\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 quick_edit\n \u00A6order_of_execution\u00A6 2\n \u00A6file_path\u00A6 src/components/UserProfile.tsx\n \u00A6action\u00A6 replace\n \u00A6search_block\u00A6\n ```jsx\n return (\n <div>\n <h1>Welcome, {name}</h1>\n </div>\n );\n ```\n \u00A6new_content\u00A6\n ```jsx\n return (\n <div className=\"profile-card\">\n <div className=\"profile-info\">\n <h2>{name}</h2>\n <p>Email: {email}</p>\n </div>\n </div>\n );\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 quick_edit\n \u00A6order_of_execution\u00A6 3\n \u00A6file_path\u00A6 src/styles/main.css\n \u00A6action\u00A6 delete_block\n \u00A6search_block\u00A6\n ```css\n .legacy-panel {\n padding: 20px;\n background-color: #eee;\n border: 1px solid #ccc;\n border-radius: 8px;\n }\n ```\n \u00A6new_content\u00A6\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <bad-example>\n <why>The search_block `}` is not unique and appears multiple times in any non-trivial TypeScript file. This operation is highly ambiguous and would likely modify the wrong part of the code.</why>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 quick_edit\n \u00A6order_of_execution\u00A6 1\n \u00A6file_path\u00A6 src/services/api.ts\n \u00A6action\u00A6 replace\n \u00A6search_block\u00A6\n ```typescript\n }\n ```\n \u00A6new_content\u00A6\n ```typescript\n } // end of function\n ```\n \u00A7ACTION_ITEM_END\u00A7\n </bad-example>\n\n </quick_edit>\n\n <request_context>\n\n The action item should be enclosed within `\u00A7ACTION_ITEM_START\u00A7` and `\u00A7ACTION_ITEM_END\u00A7` markers and\n include the following details using the `\u00A6FieldName\u00A6 Value` format:\n\n * `\u00A6tool_name\u00A6`: Always `request_context`.\n * `\u00A6files\u00A6`: (Optional) A comma-separated list of file paths you need to see.\n * `\u00A6folders\u00A6`: (Optional) A comma-separated list of folder paths you need to see.\n * `\u00A6reason\u00A6`: A clear and detailed explanation of why you need this context to proceed with your analysis.\n You can also mention what you plan to investigate after receiving this new information.\n\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 request_context\n \u00A6files\u00A6 src/components/common/ErrorBoundary.tsx, src/components/common/ErrorBanner.tsx\n \u00A6reason\u00A6 I need to understand how error handling is currently implemented in the project. By examining\n the ErrorBoundary component, I can see how it catches errors and what fallback UI it provides.\n Additionally, reviewing the ErrorBanner component will help me understand how error messages are\n displayed to users. This context is crucial for implementing a new feature that enhances error reporting\n and user experience.\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 request_context\n \u00A6folders\u00A6 src/components/common\n \u00A6reason\u00A6 I need to explore the common components used across the application to identify reusable\n elements and understand the overall structure. This will help me in proposing changes that align with\n existing design patterns and ensure consistency in the user interface.\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n\n <bad-example>\n <why>multiple action item with request_context</why>\n \u00A7ACTION_ITEM_START\u00A7\n xxx some stuff xxx\n \u00A7ACTION_ITEM_END\u00A7\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 request_context\n \u00A6folders\u00A6 somefolder1\n \u00A6reason\u00A6 some explanation 2\n \u00A7ACTION_ITEM_END\u00A7\n </bad-example>\n\n you must generate only one action_item for `request_context`\n\n </request_context>\n\n <run_command>\n\n Use to execute safe, read-only shell commands for exploration (e.g., `ls`, `tree`, `rg`).\n if user tell you to run a command then you can run that command as well.\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 run_command\n \u00A6command_string\u00A6 rg --files . | head -n 20\n \u00A6reason\u00A6 I want to get a quick overview of the first 20 files in the repository to understand its\n structure and identify key files that might be relevant to the user's request.\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n - when you use rg command always use target path like . to restrict the search to the current directory.\n GOOD usage `rg -i \"xxx\" .` BAD usage `rg -i \"xxx\"`\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 run_command\n \u00A6command_string\u00A6 rg 'ErrorBoundary' .\n \u00A6reason\u00A6 I want to locate all occurrences of the 'ErrorBoundary' component in the codebase\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 run_command\n \u00A6command_string\u00A6 ls -R src/components/common\n \u00A6reason\u00A6 I want to list all files and directories within the `src/components/common\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 run_command\n \u00A6command_string\u00A6 tree -L 2 src/components\n \u00A6reason\u00A6 I want to understand the structure of the `src/components` directory\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 run_command\n \u00A6command_string\u00A6 find src/components -type d -name 'common'\n \u00A6reason\u00A6 I want to locate the `common` directory within `src/components`\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <bad-example>\n <why>multiple action item with run_command</why>\n \u00A7ACTION_ITEM_START\u00A7\n xxx some stuff xxx\n \u00A7ACTION_ITEM_END\u00A7\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 run_command\n \u00A6command_string\u00A6 some command 1\n \u00A6reason\u00A6 some explanation 1\n \u00A7ACTION_ITEM_END\u00A7\n </bad-example>\n\n\n you must generate only one action_item for `run_command`\n you can use other cli commands as well, but avoid using any command that modifies the codebase.\n\n </run_command>\n\n\n <final>\n\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 final\n \u00A6plain\u00A6\n some explanation about the of the task.\n you can generate multiple lines if needed.\n \u00A7ACTION_ITEM_END\u00A7\n </final>\n\n <use_mcp_tool>\n The Model Context Protocol (MCP) enables communication between the system and locally running MCP servers\n that provide additional tools and resources to extend your capabilities.\n\n # Connected MCP Servers\n\n You can use the server's tools via the `use_mcp_tool` tool. Below is an example of a connected server and\n its available tools. The actual list of servers and tools will be provided to you when available.\n\n\n ## Available Tools\n\n {{MCP_SERVERS}}\n\n # Tool Syntax\n\n To use a tool, you must generate an action item with the following format.\n\n * `\u00A6tool_name\u00A6`: Always `use_mcp_tool`.\n * `\u00A6server_name\u00A6`: The name of the MCP server providing the tool.\n * `\u00A6mcp_tool_name\u00A6`: The name of the tool to execute.\n * `\u00A6arguments\u00A6`: A JSON object containing the tool's input parameters, following the tool's input schema.\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 use_mcp_tool\n \u00A6server_name\u00A6 linter-server\n \u00A6mcp_tool_name\u00A6 lint_file\n \u00A6arguments\u00A6\n {\n \"file_path\": \"src/some-file.ts\"\n }\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 use_mcp_tool\n \u00A6server_name\u00A6 linter-server\n \u00A6mcp_tool_name\u00A6 get_lint_summary\n \u00A6arguments\u00A6\n {}\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n </use_mcp_tool>\n\n </tools>\n</ai>\n";
|