0agent 1.0.72 → 1.0.74
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 +19 -1
- package/package.json +1 -1
package/dist/daemon.mjs
CHANGED
|
@@ -4777,7 +4777,8 @@ content = element.text if element else page.get_all_text()` : `content = page.ge
|
|
|
4777
4777
|
` "my birthday is X" \u2192 memory_write({label:"user_birthday", content:"X", type:"identity"})`,
|
|
4778
4778
|
` "we use React" \u2192 memory_write({label:"tech_stack", content:"React", type:"tech"})`,
|
|
4779
4779
|
`Also write: URLs, ports, paths, project names, preferences, decisions, task outcomes.`,
|
|
4780
|
-
`
|
|
4780
|
+
`Only call memory_write when the user shares something worth remembering long-term.`,
|
|
4781
|
+
`Do NOT call it for greetings, chitchat, or simple questions with no durable facts.`
|
|
4781
4782
|
);
|
|
4782
4783
|
}
|
|
4783
4784
|
if (hasGUI) {
|
|
@@ -6338,6 +6339,23 @@ var SessionManager = class {
|
|
|
6338
6339
|
const activeLLM = this.getFreshLLM();
|
|
6339
6340
|
if (activeLLM?.isConfigured) {
|
|
6340
6341
|
const userEntityId = enrichedReq.entity_id ?? this.identity?.entity_node_id;
|
|
6342
|
+
const isConversational = /^(hey|hi|hello|sup|yo|what'?s up|how are you|thanks|ok|cool|bye|good\s+(morning|evening|afternoon)|lol|nice)[!?.\s,]*$/i.test(enrichedReq.task.trim());
|
|
6343
|
+
if (isConversational) {
|
|
6344
|
+
const resp = await activeLLM.complete(
|
|
6345
|
+
[{ role: "user", content: enrichedReq.task }],
|
|
6346
|
+
"You are a helpful assistant."
|
|
6347
|
+
);
|
|
6348
|
+
this.emit({ type: "session.token", session_id: sessionId, token: resp.content });
|
|
6349
|
+
this.addStep(sessionId, `Done (${resp.tokens_used} tokens, 1 LLM turns)`);
|
|
6350
|
+
this.completeSession(sessionId, {
|
|
6351
|
+
output: resp.content,
|
|
6352
|
+
files_written: [],
|
|
6353
|
+
commands_run: [],
|
|
6354
|
+
tokens_used: resp.tokens_used,
|
|
6355
|
+
model: resp.model
|
|
6356
|
+
});
|
|
6357
|
+
return this.sessions.get(sessionId);
|
|
6358
|
+
}
|
|
6341
6359
|
const executor = new AgentExecutor(
|
|
6342
6360
|
activeLLM,
|
|
6343
6361
|
{ cwd: this.cwd, agent_root: this.agentRoot, graph: this.graph, onMemoryWrite: this.onMemoryWritten, entityNodeId: userEntityId },
|