From 463f6b7dfee07c549fe9ac47b0f3dc043528f221 Mon Sep 17 00:00:00 2001 From: lanxi <1220lanxi@gmail.com> Date: Tue, 16 Jun 2026 13:46:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:MCP=E7=94=9F=E6=88=90=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=AD=97=E5=85=B8=E5=A4=B1=E8=B4=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/mcp/gva_execute.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/mcp/gva_execute.go b/server/mcp/gva_execute.go index 5e50817d1..9f3e59115 100644 --- a/server/mcp/gva_execute.go +++ b/server/mcp/gva_execute.go @@ -679,8 +679,8 @@ func (g *GVAExecutor) collectExpectedFilePaths(plan *ExecutionPlan) []string { } // checkDictionaryExists 检查字典是否存在 -func (g *GVAExecutor) checkDictionaryExists(dictType string) (bool, error) { - dictionary, err := findDictionaryByType(context.Background(), dictType) +func (g *GVAExecutor) checkDictionaryExists(ctx context.Context, dictType string) (bool, error) { + dictionary, err := findDictionaryByType(ctx, dictType) if err != nil { return false, err } @@ -694,7 +694,7 @@ func (g *GVAExecutor) createDictionariesFromInfo(ctx context.Context, dictionari messages = append(messages, fmt.Sprintf("开始创建 %d 个指定字典: ", len(dictionariesInfo))) for _, dictInfo := range dictionariesInfo { - exists, err := g.checkDictionaryExists(dictInfo.DictType) + exists, err := g.checkDictionaryExists(ctx, dictInfo.DictType) if err != nil { messages = append(messages, fmt.Sprintf("检查字典 %s 时出错: %v; ", dictInfo.DictType, err)) continue