opencode-avatar 0.3.18 → 0.3.20

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. 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 || output.sessionID || currentAgentName || "unknown-session";
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 || input.sessionId || currentAgentName || "unknown-session";
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.sessionID || event.sessionId || currentAgentName || "unknown-session";
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
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-avatar",
3
- "version": "0.3.18",
3
+ "version": "0.3.20",
4
4
  "description": "Dynamic desktop avatar plugin for OpenCode that reacts to your coding activities",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",