praisonai 1.0.5 → 1.0.6
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/dist/agent/types.js +8 -0
- package/package.json +1 -1
package/dist/agent/types.js
CHANGED
|
@@ -136,9 +136,11 @@ class PraisonAIAgents {
|
|
|
136
136
|
return results;
|
|
137
137
|
}
|
|
138
138
|
async executeHierarchical() {
|
|
139
|
+
const startTime = process.env.LOGLEVEL === 'debug' ? Date.now() : 0;
|
|
139
140
|
logger_1.Logger.debug('Starting hierarchical execution');
|
|
140
141
|
const results = [];
|
|
141
142
|
for (const task of this.tasks) {
|
|
143
|
+
const taskStartTime = process.env.LOGLEVEL === 'debug' ? Date.now() : 0;
|
|
142
144
|
if (!task.agent)
|
|
143
145
|
throw new Error(`No agent assigned to task: ${task.name}`);
|
|
144
146
|
logger_1.Logger.debug(`Executing task: ${task.name}`, {
|
|
@@ -149,8 +151,14 @@ class PraisonAIAgents {
|
|
|
149
151
|
const result = await task.agent.execute(task, depResults);
|
|
150
152
|
results.push(result);
|
|
151
153
|
task.result = result;
|
|
154
|
+
if (process.env.LOGLEVEL === 'debug') {
|
|
155
|
+
logger_1.Logger.debug(`Task execution time for ${task.name}: ${Date.now() - taskStartTime}ms`);
|
|
156
|
+
}
|
|
152
157
|
logger_1.Logger.debug(`Completed task: ${task.name}`, { result });
|
|
153
158
|
}
|
|
159
|
+
if (process.env.LOGLEVEL === 'debug') {
|
|
160
|
+
logger_1.Logger.debug(`Total hierarchical execution time: ${Date.now() - startTime}ms`);
|
|
161
|
+
}
|
|
154
162
|
return results;
|
|
155
163
|
}
|
|
156
164
|
}
|