fix: address review findings (comment, marker budget, naming)
- UserMeta comment: "never trimmed" → "truncated only if base exceeds budget" - Skip diff truncation marker when diffBudget < markerBudget (prevents marker itself from pushing EstTokens over the limit) - Rename filepath → filePath to avoid shadowing stdlib package name
This commit is contained in:
@@ -255,12 +255,12 @@ func fetchPatterns(ctx context.Context, client *gitea.Client, patternsRepo, patt
|
||||
continue
|
||||
}
|
||||
|
||||
for filepath, content := range files {
|
||||
for filePath, content := range files {
|
||||
// Only include markdown and text files as patterns
|
||||
if !isPatternFile(filepath) {
|
||||
if !isPatternFile(filePath) {
|
||||
continue
|
||||
}
|
||||
sb.WriteString(fmt.Sprintf("### %s/%s\n\n%s\n\n", repoRef, filepath, content))
|
||||
sb.WriteString(fmt.Sprintf("### %s/%s\n\n%s\n\n", repoRef, filePath, content))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user