opencode-avatar 0.3.18 → 0.3.19
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/index.js +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13067,7 +13067,7 @@ var AvatarPlugin = async ({ client }) => {
|
|
|
13067
13067
|
if (userMessage?.text && !isThinking) {
|
|
13068
13068
|
idleTriggered = false;
|
|
13069
13069
|
isThinking = true;
|
|
13070
|
-
const sessionId = input.sessionID ||
|
|
13070
|
+
const sessionId = input.sessionID || currentAgentName || "unknown-session";
|
|
13071
13071
|
updateToolUsage(client, sessionId, sessionId, "thinking").catch((err) => {
|
|
13072
13072
|
console.error(`[Avatar] Failed to update thinking state:`, err);
|
|
13073
13073
|
});
|
|
@@ -13078,7 +13078,7 @@ var AvatarPlugin = async ({ client }) => {
|
|
|
13078
13078
|
},
|
|
13079
13079
|
"tool.execute.before": async (input) => {
|
|
13080
13080
|
const toolName = input.tool;
|
|
13081
|
-
const sessionId = input.sessionID ||
|
|
13081
|
+
const sessionId = input.sessionID || currentAgentName || "unknown-session";
|
|
13082
13082
|
updateToolUsage(client, sessionId, sessionId, toolName).catch((err) => {
|
|
13083
13083
|
console.error(`[Avatar] Failed to update tool usage:`, err);
|
|
13084
13084
|
});
|
|
@@ -13110,7 +13110,7 @@ var AvatarPlugin = async ({ client }) => {
|
|
|
13110
13110
|
isThinking = false;
|
|
13111
13111
|
isToolActive = false;
|
|
13112
13112
|
currentRequestId = null;
|
|
13113
|
-
const sessionId = event.
|
|
13113
|
+
const sessionId = event.properties?.sessionId || currentAgentName || "unknown-session";
|
|
13114
13114
|
updateToolUsage(client, sessionId, sessionId, "idle").catch((err) => {
|
|
13115
13115
|
console.error(`[Avatar] Failed to update idle state:`, err);
|
|
13116
13116
|
});
|