oh-my-opencode 3.1.5 → 3.1.6

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/cli/index.js CHANGED
@@ -6203,7 +6203,6 @@ var init_model_availability = __esm(() => {
6203
6203
  var init_model_resolver = __esm(() => {
6204
6204
  init_logger();
6205
6205
  init_model_availability();
6206
- init_connected_providers_cache();
6207
6206
  });
6208
6207
 
6209
6208
  // src/features/hook-message-injector/constants.ts
@@ -8089,7 +8088,7 @@ var import_picocolors2 = __toESM(require_picocolors(), 1);
8089
8088
  // package.json
8090
8089
  var package_default = {
8091
8090
  name: "oh-my-opencode",
8092
- version: "3.1.5",
8091
+ version: "3.1.6",
8093
8092
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
8094
8093
  main: "dist/index.js",
8095
8094
  types: "dist/index.d.ts",
@@ -8162,13 +8161,13 @@ var package_default = {
8162
8161
  typescript: "^5.7.3"
8163
8162
  },
8164
8163
  optionalDependencies: {
8165
- "oh-my-opencode-darwin-arm64": "3.1.5",
8166
- "oh-my-opencode-darwin-x64": "3.1.5",
8167
- "oh-my-opencode-linux-arm64": "3.1.5",
8168
- "oh-my-opencode-linux-arm64-musl": "3.1.5",
8169
- "oh-my-opencode-linux-x64": "3.1.5",
8170
- "oh-my-opencode-linux-x64-musl": "3.1.5",
8171
- "oh-my-opencode-windows-x64": "3.1.5"
8164
+ "oh-my-opencode-darwin-arm64": "3.1.6",
8165
+ "oh-my-opencode-darwin-x64": "3.1.6",
8166
+ "oh-my-opencode-linux-arm64": "3.1.6",
8167
+ "oh-my-opencode-linux-arm64-musl": "3.1.6",
8168
+ "oh-my-opencode-linux-x64": "3.1.6",
8169
+ "oh-my-opencode-linux-x64-musl": "3.1.6",
8170
+ "oh-my-opencode-windows-x64": "3.1.6"
8172
8171
  },
8173
8172
  trustedDependencies: [
8174
8173
  "@ast-grep/cli",
package/dist/index.js CHANGED
@@ -5404,26 +5404,7 @@ function resolveModelWithFallback(input) {
5404
5404
  }
5405
5405
  if (fallbackChain && fallbackChain.length > 0) {
5406
5406
  if (availableModels.size === 0) {
5407
- const connectedProviders = readConnectedProvidersCache();
5408
- const connectedSet = connectedProviders ? new Set(connectedProviders) : null;
5409
- if (connectedSet === null) {
5410
- log("No cache available, skipping fallback chain to use system default");
5411
- } else {
5412
- for (const entry of fallbackChain) {
5413
- for (const provider of entry.providers) {
5414
- if (connectedSet.has(provider)) {
5415
- const model = `${provider}/${entry.model}`;
5416
- log("Model resolved via fallback chain (no model cache, using connected provider)", {
5417
- provider,
5418
- model: entry.model,
5419
- variant: entry.variant
5420
- });
5421
- return { model, source: "provider-fallback", variant: entry.variant };
5422
- }
5423
- }
5424
- }
5425
- log("No matching provider in connected cache, falling through to system default");
5426
- }
5407
+ log("No model cache available, skipping fallback chain to use system default");
5427
5408
  }
5428
5409
  for (const entry of fallbackChain) {
5429
5410
  for (const provider of entry.providers) {
@@ -5447,7 +5428,6 @@ function resolveModelWithFallback(input) {
5447
5428
  var init_model_resolver = __esm(() => {
5448
5429
  init_logger();
5449
5430
  init_model_availability();
5450
- init_connected_providers_cache();
5451
5431
  });
5452
5432
 
5453
5433
  // src/shared/session-utils.ts
@@ -44046,22 +44026,47 @@ Original error: ${createResult.error}`;
44046
44026
  const sessionID = createResult.data.id;
44047
44027
  log(`[look_at] Created session: ${sessionID}`);
44048
44028
  log(`[look_at] Sending prompt with file passthrough to session ${sessionID}`);
44049
- await ctx.client.session.prompt({
44050
- path: { id: sessionID },
44051
- body: {
44052
- agent: MULTIMODAL_LOOKER_AGENT,
44053
- tools: {
44054
- task: false,
44055
- call_omo_agent: false,
44056
- look_at: false,
44057
- read: false
44058
- },
44059
- parts: [
44060
- { type: "text", text: prompt },
44061
- { type: "file", mime: mimeType, url: pathToFileURL2(args.file_path).href, filename }
44062
- ]
44029
+ try {
44030
+ await ctx.client.session.prompt({
44031
+ path: { id: sessionID },
44032
+ body: {
44033
+ agent: MULTIMODAL_LOOKER_AGENT,
44034
+ tools: {
44035
+ task: false,
44036
+ call_omo_agent: false,
44037
+ look_at: false,
44038
+ read: false
44039
+ },
44040
+ parts: [
44041
+ { type: "text", text: prompt },
44042
+ { type: "file", mime: mimeType, url: pathToFileURL2(args.file_path).href, filename }
44043
+ ]
44044
+ }
44045
+ });
44046
+ } catch (promptError) {
44047
+ const errorMessage = promptError instanceof Error ? promptError.message : String(promptError);
44048
+ log(`[look_at] Prompt error:`, promptError);
44049
+ const isJsonParseError = errorMessage.includes("JSON") && (errorMessage.includes("EOF") || errorMessage.includes("parse"));
44050
+ if (isJsonParseError) {
44051
+ return `Error: Failed to analyze file - received malformed response from multimodal-looker agent.
44052
+
44053
+ This typically occurs when:
44054
+ 1. The multimodal-looker model is not available or not connected
44055
+ 2. The model does not support this file type (${mimeType})
44056
+ 3. The API returned an empty or truncated response
44057
+
44058
+ File: ${args.file_path}
44059
+ MIME type: ${mimeType}
44060
+
44061
+ Try:
44062
+ - Ensure a vision-capable model (e.g., gemini-3-flash, gpt-5.2) is available
44063
+ - Check provider connections in opencode settings
44064
+ - For text files like .md, .txt, use the Read tool instead
44065
+
44066
+ Original error: ${errorMessage}`;
44063
44067
  }
44064
- });
44068
+ return `Error: Failed to send prompt to multimodal-looker agent: ${errorMessage}`;
44069
+ }
44065
44070
  log(`[look_at] Prompt sent, fetching messages...`);
44066
44071
  const messagesResult = await ctx.client.session.messages({
44067
44072
  path: { id: sessionID }
@@ -44679,7 +44684,7 @@ To continue this session: session_id="${args.session_id}"`;
44679
44684
  }
44680
44685
  } else {
44681
44686
  const resolution = resolveModelWithFallback({
44682
- userModel: userCategories?.[args.category]?.model ?? sisyphusJuniorModel,
44687
+ userModel: userCategories?.[args.category]?.model ?? resolved.model ?? sisyphusJuniorModel,
44683
44688
  fallbackChain: requirement.fallbackChain,
44684
44689
  availableModels,
44685
44690
  systemDefaultModel
@@ -44704,7 +44709,7 @@ To continue this session: session_id="${args.session_id}"`;
44704
44709
  }
44705
44710
  modelInfo = { model: actualModel, type: type2, source };
44706
44711
  const parsedModel = parseModelString(actualModel);
44707
- const variantToUse = userCategories?.[args.category]?.variant ?? resolvedVariant;
44712
+ const variantToUse = userCategories?.[args.category]?.variant ?? resolvedVariant ?? resolved.config.variant;
44708
44713
  categoryModel = parsedModel ? variantToUse ? { ...parsedModel, variant: variantToUse } : parsedModel : undefined;
44709
44714
  }
44710
44715
  }
@@ -56561,7 +56566,6 @@ var OhMyOpenCodePlugin = async (ctx) => {
56561
56566
  const currentVersion = getOpenCodeVersion();
56562
56567
  const hasNativeSupport = currentVersion !== null && isOpenCodeVersionAtLeast(OPENCODE_NATIVE_AGENTS_INJECTION_VERSION);
56563
56568
  if (hasNativeSupport) {
56564
- console.warn(`[oh-my-opencode] directory-agents-injector hook auto-disabled: ` + `OpenCode ${currentVersion} has native AGENTS.md support (>= ${OPENCODE_NATIVE_AGENTS_INJECTION_VERSION})`);
56565
56569
  log("directory-agents-injector auto-disabled due to native OpenCode support", {
56566
56570
  currentVersion,
56567
56571
  nativeVersion: OPENCODE_NATIVE_AGENTS_INJECTION_VERSION
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode",
3
- "version": "3.1.5",
3
+ "version": "3.1.6",
4
4
  "description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -73,13 +73,13 @@
73
73
  "typescript": "^5.7.3"
74
74
  },
75
75
  "optionalDependencies": {
76
- "oh-my-opencode-darwin-arm64": "3.1.5",
77
- "oh-my-opencode-darwin-x64": "3.1.5",
78
- "oh-my-opencode-linux-arm64": "3.1.5",
79
- "oh-my-opencode-linux-arm64-musl": "3.1.5",
80
- "oh-my-opencode-linux-x64": "3.1.5",
81
- "oh-my-opencode-linux-x64-musl": "3.1.5",
82
- "oh-my-opencode-windows-x64": "3.1.5"
76
+ "oh-my-opencode-darwin-arm64": "3.1.6",
77
+ "oh-my-opencode-darwin-x64": "3.1.6",
78
+ "oh-my-opencode-linux-arm64": "3.1.6",
79
+ "oh-my-opencode-linux-arm64-musl": "3.1.6",
80
+ "oh-my-opencode-linux-x64": "3.1.6",
81
+ "oh-my-opencode-linux-x64-musl": "3.1.6",
82
+ "oh-my-opencode-windows-x64": "3.1.6"
83
83
  },
84
84
  "trustedDependencies": [
85
85
  "@ast-grep/cli",