orquesta-cli 0.2.62 → 0.2.64
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.
|
@@ -39,6 +39,9 @@ function buildSystemPrompt() {
|
|
|
39
39
|
const appended = appendedSystemPrompt ? `\n\n${appendedSystemPrompt}` : '';
|
|
40
40
|
return base + buildEnvironmentContext() + projectContext + getMemoryPrompt() + getGitContextPrompt() + appended;
|
|
41
41
|
}
|
|
42
|
+
function buildLightSystemPrompt() {
|
|
43
|
+
return `You are Orquesta, an AI coding assistant. Respond concisely and naturally. Match the user's language.` + getMemoryPrompt();
|
|
44
|
+
}
|
|
42
45
|
export class PlanExecutor {
|
|
43
46
|
currentLLMClient = null;
|
|
44
47
|
cachedSystemPrompt = null;
|
|
@@ -92,6 +95,8 @@ export class PlanExecutor {
|
|
|
92
95
|
let currentMessages = messages;
|
|
93
96
|
const isSimpleTask = userMessage.length < 500 &&
|
|
94
97
|
!/\b(and then|after that|first.*then|step \d|multiple|several|refactor.*entire|migrate|rewrite.*all)\b/i.test(userMessage);
|
|
98
|
+
const isConversational = userMessage.length < 100 &&
|
|
99
|
+
/^(ping|hi|hello|hola|hey|thanks|ok|si|yes|no|que|how|what|why|when|who)\b/i.test(userMessage);
|
|
95
100
|
if (isSimpleTask) {
|
|
96
101
|
logger.flow('Simple task detected — skipping planner, executor will handle directly');
|
|
97
102
|
streamLogger?.logPlanningEnd(0, [], false, 0);
|
|
@@ -167,12 +172,25 @@ export class PlanExecutor {
|
|
|
167
172
|
currentTodos = updated;
|
|
168
173
|
});
|
|
169
174
|
callbacks.setExecutionPhase('executing');
|
|
170
|
-
const
|
|
175
|
+
const allTools = toolRegistry.getLLMToolDefinitions();
|
|
176
|
+
let tools;
|
|
177
|
+
if (isConversational) {
|
|
178
|
+
tools = [];
|
|
179
|
+
}
|
|
180
|
+
else if (currentTodos.length === 0) {
|
|
181
|
+
const coreTools = new Set(['read_file', 'create_file', 'edit_file', 'list_files', 'find_files', 'search_content', 'bash', 'tell_to_user']);
|
|
182
|
+
tools = allTools.filter((t) => coreTools.has(t.function?.name));
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
tools = allTools;
|
|
186
|
+
}
|
|
171
187
|
const hasSystemMessage = currentMessages.some(m => m.role === 'system');
|
|
172
188
|
if (!hasSystemMessage) {
|
|
173
|
-
const
|
|
189
|
+
const systemContent = isConversational
|
|
190
|
+
? buildLightSystemPrompt()
|
|
191
|
+
: this.getSystemPrompt() + getRelevantContext(userMessage);
|
|
174
192
|
currentMessages = [
|
|
175
|
-
{ role: 'system', content:
|
|
193
|
+
{ role: 'system', content: systemContent },
|
|
176
194
|
...currentMessages
|
|
177
195
|
];
|
|
178
196
|
}
|