From 70c033060b1e551bb0f6348c0c2291d62fb74731 Mon Sep 17 00:00:00 2001 From: Bo Li Date: Tue, 10 Feb 2026 00:01:01 +0800 Subject: [PATCH] fix: preserve git-master config defaults and tighten type safety --- src/tools/slashcommand/skill-formatter.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tools/slashcommand/skill-formatter.ts b/src/tools/slashcommand/skill-formatter.ts index 1e76bd54f..9396c99c4 100644 --- a/src/tools/slashcommand/skill-formatter.ts +++ b/src/tools/slashcommand/skill-formatter.ts @@ -4,6 +4,7 @@ import { extractSkillTemplate } from "../../features/opencode-skill-loader/skill import { injectGitMasterConfig as injectGitMasterConfigOriginal } from "../../features/opencode-skill-loader/skill-content" import type { SkillMcpManager, SkillMcpClientInfo, SkillMcpServerContext } from "../../features/skill-mcp-manager" import type { Tool, Resource, Prompt } from "@modelcontextprotocol/sdk/types.js" +import type { GitMasterConfig } from "../../config/schema/git-master" export async function extractSkillBody(skill: LoadedSkill): Promise { if (skill.lazyContent) { @@ -97,11 +98,11 @@ export async function formatSkillOutput( skill: LoadedSkill, mcpManager?: SkillMcpManager, getSessionID?: () => string, - gitMasterConfig?: any + gitMasterConfig?: GitMasterConfig ): Promise { let body = await extractSkillBody(skill) - if (skill.name === "git-master" && gitMasterConfig) { + if (skill.name === "git-master") { body = injectGitMasterConfigOriginal(body, gitMasterConfig) }