fix: RAG chunking crash using non-existent converter.output_dir

DocToSkillConverter has self.skill_dir (string), not self.output_dir.
The --chunk-for-rag flag on scrape command crashed with AttributeError.
Changed to Path(converter.skill_dir).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
yusyus
2026-02-27 22:26:21 +03:00
parent 4b59bd43be
commit 3bad7cf365
2 changed files with 4 additions and 2 deletions

View File

@@ -2289,10 +2289,11 @@ def execute_scraping_and_building(
)
# Chunk the skill
chunks = chunker.chunk_skill(converter.output_dir)
skill_dir = Path(converter.skill_dir)
chunks = chunker.chunk_skill(skill_dir)
# Save chunks
chunks_path = converter.output_dir / "rag_chunks.json"
chunks_path = skill_dir / "rag_chunks.json"
chunker.save_chunks(chunks, chunks_path)
logger.info(f"✅ Generated {len(chunks)} RAG chunks")