opencode-plugin-mimic 0.1.8 → 0.1.9
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 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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");
|
|
@@ -2479,7 +2479,8 @@ async function analyzePatternsWithLLM(ctx, input, config) {
|
|
|
2479
2479
|
}
|
|
2480
2480
|
const observerConfig = "observer" in config ? config.observer : void 0;
|
|
2481
2481
|
const modelId = observerConfig?.model || DEFAULT_OBSERVER_MODEL;
|
|
2482
|
-
const
|
|
2482
|
+
const extractedProvider = modelId.includes("/") ? modelId.split("/")[0] : void 0;
|
|
2483
|
+
const providerId = observerConfig?.provider || extractedProvider || DEFAULT_OBSERVER_PROVIDER;
|
|
2483
2484
|
try {
|
|
2484
2485
|
const prompt = buildObserverPrompt(input);
|
|
2485
2486
|
const session = await ctx.client.session.create({
|