гих хук и сохранение изменений в контексте стори
This commit is contained in:
@@ -20,16 +20,15 @@ if [ -z "$STORY" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Run index (changed files only: previous commit -> HEAD)
|
||||
# Run index: all changes in the story (main..HEAD), not per-commit
|
||||
if command -v rag-agent >/dev/null 2>&1; then
|
||||
rag-agent index --changed --base-ref HEAD~1 --head-ref HEAD --story "$STORY"
|
||||
rag-agent index --changed --base-ref main --head-ref HEAD --story "$STORY"
|
||||
elif [ -n "${VIRTUAL_ENV}" ]; then
|
||||
rag-agent index --changed --base-ref HEAD~1 --head-ref HEAD --story "$STORY"
|
||||
rag-agent index --changed --base-ref main --head-ref HEAD --story "$STORY"
|
||||
else
|
||||
# Try repo venv or python -m
|
||||
if [ -f "venv/bin/rag-agent" ]; then
|
||||
venv/bin/rag-agent index --changed --base-ref HEAD~1 --head-ref HEAD --story "$STORY"
|
||||
venv/bin/rag-agent index --changed --base-ref main --head-ref HEAD --story "$STORY"
|
||||
else
|
||||
PYTHONPATH=src python -m rag_agent.cli index --changed --base-ref HEAD~1 --head-ref HEAD --story "$STORY" 2>/dev/null || true
|
||||
PYTHONPATH=src python -m rag_agent.cli index --changed --base-ref main --head-ref HEAD --story "$STORY" 2>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user