0agent 1.0.89 → 1.0.90
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/daemon.mjs +18 -14
- package/package.json +1 -1
package/dist/daemon.mjs
CHANGED
|
@@ -8313,20 +8313,24 @@ var SessionManager = class {
|
|
|
8313
8313
|
const provider = activeLLM["config"]?.provider ?? "anthropic";
|
|
8314
8314
|
const fastModel = getFastModelId(provider);
|
|
8315
8315
|
const llmToUse = fastModel ? activeLLM.withModel(fastModel) : activeLLM;
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
|
|
8327
|
-
|
|
8328
|
-
|
|
8329
|
-
|
|
8316
|
+
try {
|
|
8317
|
+
const resp = await llmToUse.complete(
|
|
8318
|
+
[{ role: "user", content: enrichedReq.task }],
|
|
8319
|
+
this.identity ? `You are 0agent, a helpful AI assistant. You are talking to ${this.identity.name}. Be concise and friendly.` : "You are 0agent, a helpful AI assistant. Be concise and friendly."
|
|
8320
|
+
);
|
|
8321
|
+
const output = resp.content || "Hey! How can I help?";
|
|
8322
|
+
this.emit({ type: "session.token", session_id: sessionId, token: output });
|
|
8323
|
+
this.addStep(sessionId, `Done (${resp.tokens_used} tokens, fast model)`);
|
|
8324
|
+
this.completeSession(sessionId, {
|
|
8325
|
+
output,
|
|
8326
|
+
files_written: [],
|
|
8327
|
+
commands_run: [],
|
|
8328
|
+
tokens_used: resp.tokens_used,
|
|
8329
|
+
model: resp.model
|
|
8330
|
+
});
|
|
8331
|
+
return this.sessions.get(sessionId);
|
|
8332
|
+
} catch {
|
|
8333
|
+
}
|
|
8330
8334
|
}
|
|
8331
8335
|
const executor = new AgentExecutor(
|
|
8332
8336
|
activeLLM,
|