orquesta-cli 0.2.67 → 0.2.69
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.
|
@@ -93,13 +93,17 @@ export class PlanExecutor {
|
|
|
93
93
|
throw new Error('INTERRUPTED');
|
|
94
94
|
}
|
|
95
95
|
let currentMessages = messages;
|
|
96
|
-
const
|
|
97
|
-
|
|
96
|
+
const COMPLEX_PATTERNS = /\b(and then|after that|first.*then|step \d|multiple|several|refactor.*entire|migrate|rewrite.*all|crea.*app|create.*app|build.*app|construye|implement|set up|setup|scaffold|initialize|init.*project)\b/i;
|
|
97
|
+
const isSimpleTask = userMessage.length < 200 && !COMPLEX_PATTERNS.test(userMessage);
|
|
98
98
|
const isConversational = userMessage.length < 100 &&
|
|
99
99
|
/^(ping|hi|hello|hola|hey|thanks|ok|si|yes|no|que|how|what|why|when|who)\b/i.test(userMessage);
|
|
100
100
|
if (isSimpleTask) {
|
|
101
101
|
logger.flow('Simple task detected — skipping planner, executor will handle directly');
|
|
102
102
|
streamLogger?.logPlanningEnd(0, [], false, 0);
|
|
103
|
+
const lastMsg = currentMessages[currentMessages.length - 1];
|
|
104
|
+
if (!(lastMsg?.role === 'user' && lastMsg?.content === userMessage)) {
|
|
105
|
+
currentMessages = [...currentMessages, { role: 'user', content: userMessage }];
|
|
106
|
+
}
|
|
103
107
|
}
|
|
104
108
|
else {
|
|
105
109
|
callbacks.setCurrentActivity('Thinking');
|