@supanadit/morse-web 0.4.1 → 0.6.0

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/server.mjs CHANGED
@@ -2336,9 +2336,7 @@ ${detail}` : message
2336
2336
  if (output !== void 0) {
2337
2337
  item.output = output;
2338
2338
  }
2339
- if (durationMs !== void 0) {
2340
- item.durationMs = durationMs;
2341
- }
2339
+ item.durationMs = durationMs ?? Math.max(0, this.now() - item.at);
2342
2340
  this.updateItem(item);
2343
2341
  this.toolIndexes.delete(toolCallId);
2344
2342
  }