opencode-anthropic-multi-account 0.3.4 → 0.3.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.
@@ -2295,16 +2295,18 @@ function cloneTemplate(template2, sourceOverride) {
2295
2295
  };
2296
2296
  }
2297
2297
  function applyBundledTemplateFallbacks(template2) {
2298
+ const existingToolNames = new Set(template2.tools.map((tool) => tool.name));
2299
+ const preservedTools = bundledTemplate.tools.filter((tool) => INTERACTIVE_ONLY_TOOL_NAMES.has(tool.name) && !existingToolNames.has(tool.name)).map((tool) => ({ ...tool }));
2300
+ const tools = preservedTools.length === 0 ? template2.tools : [...template2.tools, ...preservedTools].sort((left, right) => left.name.localeCompare(right.name));
2298
2301
  const variants = {
2299
2302
  ...getClaudeCodeSystemPromptVariants(bundledTemplate),
2300
2303
  ...getClaudeCodeSystemPromptVariants(template2)
2301
2304
  };
2302
- if (Object.keys(variants).length === 0) {
2303
- return template2;
2304
- }
2305
2305
  return {
2306
2306
  ...template2,
2307
- system_prompt_variants: variants
2307
+ tools,
2308
+ tool_names: tools.map((tool) => tool.name),
2309
+ ...Object.keys(variants).length > 0 ? { system_prompt_variants: variants } : {}
2308
2310
  };
2309
2311
  }
2310
2312
  function prepareBundledTemplate(template2) {
@@ -2844,4 +2846,4 @@ export {
2844
2846
  setFingerprintCaptureTestOverridesForTest,
2845
2847
  resetFingerprintCaptureForTest
2846
2848
  };
2847
- //# sourceMappingURL=chunk-IR544YLV.js.map
2849
+ //# sourceMappingURL=chunk-OTUIWUMD.js.map