fix: replace remaining glob('*.md') with rglob('*.md') in all adaptors

Follow-up to #349 — the same bug existed in 4 more adaptor files:
- base.py (2 locations) — affects all adaptors via inheritance
- openai_compatible.py (2 locations) — affects minimax, deepseek,
  kimi, qwen, openrouter, together, fireworks
- markdown.py (1 location)
- streaming_adaptor.py (1 location)

No glob("*.md") remains in any adaptor.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
yusyus
2026-04-06 23:22:45 +03:00
parent 3619e0c233
commit 3cde94399e
4 changed files with 6 additions and 6 deletions

View File

@@ -288,7 +288,7 @@ class SkillAdaptor(ABC):
if not references_dir.exists():
return
for ref_file in sorted(references_dir.glob("*.md")):
for ref_file in sorted(references_dir.rglob("*.md")):
if ref_file.is_file() and not ref_file.name.startswith("."):
try:
content = ref_file.read_text(encoding="utf-8")
@@ -565,7 +565,7 @@ class SkillAdaptor(ABC):
return ""
toc_lines = []
for ref_file in sorted(refs_dir.glob("*.md")):
for ref_file in sorted(refs_dir.rglob("*.md")):
if ref_file.name == "index.md":
continue
title = ref_file.stem.replace("_", " ").title()

View File

@@ -261,7 +261,7 @@ Browse the reference files for detailed information on each topic. All files are
# Add all reference files
if refs_dir.exists():
# Sort for consistent ordering
ref_files = sorted(refs_dir.glob("*.md"))
ref_files = sorted(refs_dir.rglob("*.md"))
for ref_file in ref_files:
if ref_file.name == "index.md":

View File

@@ -218,7 +218,7 @@ Always prioritize accuracy by consulting the attached documentation files before
knowledge_dir = temp_path / "knowledge_files"
knowledge_count = 0
if knowledge_dir.exists():
knowledge_count = len(list(knowledge_dir.glob("*.md")))
knowledge_count = len(list(knowledge_dir.rglob("*.md")))
client = OpenAI(
api_key=api_key,
@@ -364,7 +364,7 @@ Always prioritize accuracy by consulting the attached documentation files before
references = {}
total_chars = 0
for ref_file in sorted(references_dir.glob("*.md")):
for ref_file in sorted(references_dir.rglob("*.md")):
if total_chars >= max_chars:
break

View File

@@ -197,7 +197,7 @@ class StreamingAdaptorMixin:
# Reference files
refs_dir = skill_dir / "references"
if refs_dir.exists():
for ref_file in sorted(refs_dir.glob("*.md")):
for ref_file in sorted(refs_dir.rglob("*.md")):
if ref_file.is_file() and not ref_file.name.startswith("."):
content = ref_file.read_text(encoding="utf-8")
char_count = len(content)