opencode-plugin-mimic 0.1.8 → 0.1.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.
package/dist/index.js CHANGED
@@ -2294,7 +2294,7 @@ var ObservationLog = class {
2294
2294
  // src/modules/observation/observer.ts
2295
2295
  var MAX_INSTINCTS_PER_RUN = 5;
2296
2296
  var OBSERVER_COOLDOWN_MS = 10 * 60 * 1e3;
2297
- var DEFAULT_OBSERVER_MODEL = "glm-4.7";
2297
+ var DEFAULT_OBSERVER_MODEL = "opencode/glm-4.7";
2298
2298
  var DEFAULT_OBSERVER_PROVIDER = "opencode";
2299
2299
  function buildObserverPrompt(input) {
2300
2300
  const patternsSummary = input.patterns.slice(0, 20).map((p) => `- [${p.type}] ${p.description} (${p.count}x, surfaced: ${p.surfaced})`).join("\n");
@@ -2478,8 +2478,11 @@ async function analyzePatternsWithLLM(ctx, input, config) {
2478
2478
  return analyzePatterns(input);
2479
2479
  }
2480
2480
  const observerConfig = "observer" in config ? config.observer : void 0;
2481
- const modelId = observerConfig?.model || DEFAULT_OBSERVER_MODEL;
2482
- const providerId = observerConfig?.provider || modelId.split("/")[0] || DEFAULT_OBSERVER_PROVIDER;
2481
+ const rawModelId = observerConfig?.model || DEFAULT_OBSERVER_MODEL;
2482
+ const hasSlash = rawModelId.includes("/");
2483
+ const extractedProvider = hasSlash ? rawModelId.split("/")[0] : void 0;
2484
+ const modelId = hasSlash ? rawModelId.split("/").slice(1).join("/") : rawModelId;
2485
+ const providerId = observerConfig?.provider || extractedProvider || DEFAULT_OBSERVER_PROVIDER;
2483
2486
  try {
2484
2487
  const prompt = buildObserverPrompt(input);
2485
2488
  const session = await ctx.client.session.create({