diff --git a/service/prompt/prompt_files_handle_service.go b/service/prompt/prompt_files_handle_service.go index 30f6821..6e514de 100644 --- a/service/prompt/prompt_files_handle_service.go +++ b/service/prompt/prompt_files_handle_service.go @@ -194,10 +194,10 @@ func fetchFileContent(ctx context.Context, client *http.Client, url string) (str return strings.TrimSpace(string(body)), nil } -// SkillMdContent 根据 skillName 获取 zip 内所有 md 文件拼接内容 func SkillMdContent(ctx context.Context, skillName string) string { skillResp, err := gateway.GetSkillUser(ctx, skillName) if err != nil { + g.Log().Warningf(ctx, "[SkillMd] GetSkillUser 失败: %v", err) return "" } @@ -208,11 +208,13 @@ func SkillMdContent(ctx context.Context, skillName string) string { zipBytes, err := downloadFile(client, fullUrl, maxSize) if err != nil { + g.Log().Warningf(ctx, "[SkillMd] 下载失败 url=%s err=%v", fullUrl, err) return "" } mdContents, err := extractMdFiles(ctx, zipBytes) if err != nil || len(mdContents) == 0 { + g.Log().Warningf(ctx, "[SkillMd] 提取md失败 count=%d err=%v", len(mdContents), err) return "" }