opencode-auto-resume 1.0.8 → 1.0.10

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 +15 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -220,8 +220,14 @@ var AutoResumePlugin = async (ctx, options) => {
220
220
  const role = msg.role ?? msg.info?.role;
221
221
  if (role === "user") {
222
222
  const rawAgent = msg.agent;
223
- if (typeof rawAgent === "string")
223
+ if (typeof rawAgent === "string") {
224
224
  agent2 = rawAgent;
225
+ } else {
226
+ const fallbackAgent = msg.info?.agent;
227
+ if (typeof fallbackAgent === "string") {
228
+ agent2 = fallbackAgent;
229
+ }
230
+ }
225
231
  let rawModel = msg.model;
226
232
  if (!rawModel) {
227
233
  rawModel = msg.info?.model;
@@ -710,12 +716,14 @@ var AutoResumePlugin = async (ctx, options) => {
710
716
  },
711
717
  config: async () => {
712
718
  log("info", `opencode-auto-resume config OK`);
713
- ctx.ui.toast({
714
- title: "Auto-Resume Plugin",
715
- message: `Loaded with ${chunkTimeoutMs}ms timeout, ${loopMaxContinues} loop attempts`,
716
- variant: "success",
717
- duration: 5000
718
- });
719
+ if (ctx.ui && typeof ctx.ui.toast === "function") {
720
+ ctx.ui.toast({
721
+ title: "Auto-Resume Plugin",
722
+ message: `Loaded with ${chunkTimeoutMs}ms timeout, ${loopMaxContinues} loop attempts`,
723
+ variant: "success",
724
+ duration: 5000
725
+ });
726
+ }
719
727
  }
720
728
  };
721
729
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-auto-resume",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "OpenCode plugin that automatically resumes stalled LLM sessions when thinking/streaming freezes mid-generation.",
5
5
  "keywords": [
6
6
  "opencode",