-
📁 File Upload (小文件 ≤ 50KB):
-
- - Supported formats: .txt, .md, .java, .py, .js, .sql, .json, .xml, .html, .csv
- - Maximum file size: 50KB (约50,000字符)
- - Files are automatically processed and added to the knowledge graph
- - File type is detected automatically from the extension
- - Large files will be rejected with suggestions
-
-
-
📂 Directory Processing (推荐用于大文件):
-
- - 处理超过50KB的大文件的首选方法
- - 将大文件放在本地目录中,然后指定目录路径
- - Use comma-separated patterns like: *.txt,*.md,*.java
- - Supports nested directories (recursive search)
- - Each file is processed as a separate document, regardless of size
- - No file size restrictions for directory processing
-
-
-
🤖 MCP Client (程序化处理):
-
- - Use
uv run mcp_client for large file processing
- - Supports unlimited file sizes
- - Best for integration with AI assistants
- - Programmatic access to all knowledge graph features
-
-
-
🔧 Features:
-
- - Real-time progress monitoring
- - Automatic task queue management
- - Error handling and retry mechanisms
- - Knowledge graph integration
-
-
- ''')
-
- task_payload_input = ui.textarea(
- 'Payload (JSON)',
- placeholder='{"document_content": "example content", "document_type": "text"}'
- ).classes('w-full')
-
- task_priority_select = ui.select(
- options={'0': 'Normal', '1': 'High', '2': 'Urgent'},
- label='Priority',
- value='0'
- ).classes('w-full')
-
- with ui.row().classes('gap-2'):
- ui.button('Create Task', on_click=create_task).props('color=green')
- ui.button('Load Example', on_click=load_example_payload)
-
- # Task list
- with ui.card().classes('w-full p-6'):
- with ui.row().classes('w-full justify-between items-center mb-4'):
- ui.label('Task List').classes('text-xl font-bold')
-
- with ui.row().classes('gap-2'):
- status_filter_select = ui.select(
- options={
- '': 'All Status',
- 'pending': 'Pending',
- 'processing': 'Processing',
- 'success': 'Completed',
- 'failed': 'Failed',
- 'cancelled': 'Cancelled'
- },
- value='',
- on_change=lambda: asyncio.create_task(refresh_data())
- )
-
- with ui.row().classes('gap-2'):
- ui.button('🔄 Manual Refresh', on_click=refresh_data).props('color=primary size=sm')
- ui.badge('🟢 Live Updates', color='green').classes('text-xs')
-
- # Task container
- task_container = ui.column().classes('w-full')
-
- # Initial load data
- await refresh_data()
-
- # Setup smart refresh (less intrusive than before)
- ui.timer(5.0, lambda: asyncio.create_task(smart_refresh()))
-
- @ui.page('/')
- async def root_page():
- """Root page that redirects to monitor"""
- ui.page_title('Code Graph Knowledge System')
-
- with ui.column().classes('w-full max-w-4xl mx-auto p-8'):
- with ui.card().classes('w-full text-center p-8'):
- ui.label('Code Graph Knowledge System').classes('text-3xl font-bold mb-4')
- ui.label('Neo4j-based intelligent knowledge management system').classes('text-gray-600 mb-6')
-
- with ui.row().classes('gap-4 justify-center'):
- ui.button('Task Monitor', on_click=lambda: ui.navigate.to('/monitor')).props('size=lg color=primary')
- ui.button('API Docs', on_click=lambda: ui.navigate.to('/docs')).props('size=lg color=secondary')
-
- with ui.expansion('System Information', icon='info').classes('w-full mt-6'):
- ui.label('Available Features:').classes('font-bold mb-2')
- features = [
- 'Document Processing and Knowledge Extraction',
- 'SQL Schema Parsing and Analysis',
- 'Knowledge Graph Construction',
- 'Vector Search and RAG Queries',
- 'Batch File Processing',
- 'Real-time Task Monitoring'
- ]
- for feature in features:
- ui.label(f'• {feature}').classes('ml-4 mb-1')
\ No newline at end of file
diff --git a/pyproject.toml b/pyproject.toml
index 6d0ff49..2504ff2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -29,8 +29,6 @@ dependencies = [
"llama-index-llms-gemini>=0.5.0",
"llama-index-embeddings-gemini>=0.3.2",
"google-generativeai>=0.3.0",
- "matplotlib>=3.10.3",
- "nicegui>=2.19.0",
"llama-index-llms-openrouter>=0.3.2",
"prometheus-client>=0.21.0",
]
@@ -51,7 +49,7 @@ server = "start:main"
mcp_client = "start_mcp:main"
[tool.setuptools]
-packages = ["api", "core", "services", "monitoring", "mcp_tools"]
+packages = ["api", "core", "services", "mcp_tools"]
py-modules = ["start", "start_mcp", "mcp_server", "config", "main"]
[tool.pytest.ini_options]
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..e35c9ef
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,564 @@
+# This file was autogenerated by uv via the following command:
+# uv pip compile pyproject.toml -o requirements.txt
+aiofiles==25.1.0
+ # via code-graph (pyproject.toml)
+aiohappyeyeballs==2.6.1
+ # via aiohttp
+aiohttp==3.13.2
+ # via
+ # huggingface-hub
+ # llama-index
+ # llama-index-core
+aiosignal==1.4.0
+ # via aiohttp
+aiosqlite==0.21.0
+ # via llama-index-core
+annotated-doc==0.0.3
+ # via fastapi
+annotated-types==0.7.0
+ # via pydantic
+anyio==4.11.0
+ # via
+ # httpx
+ # mcp
+ # openai
+ # sse-starlette
+ # starlette
+ # watchfiles
+attrs==25.4.0
+ # via
+ # aiohttp
+ # jsonschema
+ # referencing
+banks==2.2.0
+ # via llama-index-core
+cachetools==6.2.1
+ # via google-auth
+certifi==2025.10.5
+ # via
+ # httpcore
+ # httpx
+ # requests
+cffi==2.0.0
+ # via cryptography
+charset-normalizer==3.4.4
+ # via requests
+click==8.3.0
+ # via
+ # nltk
+ # uvicorn
+colorama==0.4.6
+ # via griffe
+cryptography==46.0.3
+ # via
+ # pyjwt
+ # python-jose
+dataclasses-json==0.6.7
+ # via
+ # llama-index
+ # llama-index-core
+deprecated==1.3.1
+ # via
+ # banks
+ # llama-index
+ # llama-index-core
+ # llama-index-instrumentation
+dirtyjson==1.0.8
+ # via
+ # llama-index
+ # llama-index-core
+distro==1.9.0
+ # via openai
+ecdsa==0.19.1
+ # via python-jose
+fastapi==0.121.0
+ # via code-graph (pyproject.toml)
+filelock==3.20.0
+ # via
+ # huggingface-hub
+ # torch
+ # transformers
+filetype==1.2.0
+ # via llama-index-core
+frozenlist==1.8.0
+ # via
+ # aiohttp
+ # aiosignal
+fsspec==2025.10.0
+ # via
+ # huggingface-hub
+ # llama-index
+ # llama-index-core
+ # torch
+google-ai-generativelanguage==0.6.15
+ # via google-generativeai
+google-api-core==2.28.1
+ # via
+ # google-ai-generativelanguage
+ # google-api-python-client
+ # google-generativeai
+google-api-python-client==2.187.0
+ # via google-generativeai
+google-auth==2.43.0
+ # via
+ # google-ai-generativelanguage
+ # google-api-core
+ # google-api-python-client
+ # google-auth-httplib2
+ # google-generativeai
+google-auth-httplib2==0.2.1
+ # via google-api-python-client
+google-generativeai==0.8.5
+ # via
+ # code-graph (pyproject.toml)
+ # llama-index-embeddings-gemini
+ # llama-index-llms-gemini
+googleapis-common-protos==1.71.0
+ # via
+ # google-api-core
+ # grpcio-status
+greenlet==3.2.4
+ # via sqlalchemy
+griffe==1.14.0
+ # via banks
+grpcio==1.76.0
+ # via
+ # google-api-core
+ # grpcio-status
+ # pymilvus
+grpcio-status==1.71.2
+ # via google-api-core
+h11==0.16.0
+ # via
+ # httpcore
+ # uvicorn
+hf-xet==1.2.0
+ # via huggingface-hub
+httpcore==1.0.9
+ # via httpx
+httplib2==0.31.0
+ # via
+ # google-api-python-client
+ # google-auth-httplib2
+httptools==0.7.1
+ # via uvicorn
+httpx==0.28.1
+ # via
+ # code-graph (pyproject.toml)
+ # llama-index
+ # llama-index-core
+ # mcp
+ # ollama
+ # openai
+httpx-sse==0.4.3
+ # via mcp
+huggingface-hub==0.36.0
+ # via
+ # llama-index-embeddings-huggingface
+ # sentence-transformers
+ # tokenizers
+ # transformers
+idna==3.11
+ # via
+ # anyio
+ # httpx
+ # requests
+ # yarl
+iniconfig==2.3.0
+ # via pytest
+jinja2==3.1.6
+ # via
+ # banks
+ # torch
+jiter==0.11.1
+ # via openai
+joblib==1.5.2
+ # via
+ # nltk
+ # scikit-learn
+jsonschema==4.25.1
+ # via mcp
+jsonschema-specifications==2025.9.1
+ # via jsonschema
+llama-index==0.9.48
+ # via code-graph (pyproject.toml)
+llama-index-core==0.14.7
+ # via
+ # llama-index-embeddings-gemini
+ # llama-index-embeddings-huggingface
+ # llama-index-embeddings-ollama
+ # llama-index-graph-stores-neo4j
+ # llama-index-llms-gemini
+ # llama-index-llms-ollama
+ # llama-index-llms-openai
+ # llama-index-llms-openai-like
+ # llama-index-llms-openrouter
+ # llama-index-vector-stores-milvus
+ # llama-index-vector-stores-neo4jvector
+llama-index-embeddings-gemini==0.4.1
+ # via code-graph (pyproject.toml)
+llama-index-embeddings-huggingface==0.6.1
+ # via code-graph (pyproject.toml)
+llama-index-embeddings-ollama==0.8.3
+ # via code-graph (pyproject.toml)
+llama-index-graph-stores-neo4j==0.5.1
+ # via code-graph (pyproject.toml)
+llama-index-instrumentation==0.4.2
+ # via llama-index-workflows
+llama-index-llms-gemini==0.6.1
+ # via code-graph (pyproject.toml)
+llama-index-llms-ollama==0.9.0
+ # via code-graph (pyproject.toml)
+llama-index-llms-openai==0.6.7
+ # via llama-index-llms-openai-like
+llama-index-llms-openai-like==0.5.3
+ # via llama-index-llms-openrouter
+llama-index-llms-openrouter==0.4.2
+ # via code-graph (pyproject.toml)
+llama-index-vector-stores-milvus==0.9.3
+ # via code-graph (pyproject.toml)
+llama-index-vector-stores-neo4jvector==0.5.1
+ # via code-graph (pyproject.toml)
+llama-index-workflows==2.11.0
+ # via llama-index-core
+loguru==0.7.3
+ # via code-graph (pyproject.toml)
+markupsafe==3.0.3
+ # via jinja2
+marshmallow==3.26.1
+ # via dataclasses-json
+mcp==1.20.0
+ # via code-graph (pyproject.toml)
+mpmath==1.3.0
+ # via sympy
+multidict==6.7.0
+ # via
+ # aiohttp
+ # yarl
+mypy-extensions==1.1.0
+ # via typing-inspect
+neo4j==5.28.2
+ # via
+ # code-graph (pyproject.toml)
+ # llama-index-graph-stores-neo4j
+ # llama-index-vector-stores-neo4jvector
+nest-asyncio==1.6.0
+ # via
+ # llama-index
+ # llama-index-core
+networkx==3.5
+ # via
+ # llama-index
+ # llama-index-core
+ # torch
+nltk==3.9.2
+ # via
+ # llama-index
+ # llama-index-core
+numpy==2.3.4
+ # via
+ # llama-index
+ # llama-index-core
+ # pandas
+ # scikit-learn
+ # scipy
+ # transformers
+nvidia-cublas-cu12==12.8.4.1
+ # via
+ # nvidia-cudnn-cu12
+ # nvidia-cusolver-cu12
+ # torch
+nvidia-cuda-cupti-cu12==12.8.90
+ # via torch
+nvidia-cuda-nvrtc-cu12==12.8.93
+ # via torch
+nvidia-cuda-runtime-cu12==12.8.90
+ # via torch
+nvidia-cudnn-cu12==9.10.2.21
+ # via torch
+nvidia-cufft-cu12==11.3.3.83
+ # via torch
+nvidia-cufile-cu12==1.13.1.3
+ # via torch
+nvidia-curand-cu12==10.3.9.90
+ # via torch
+nvidia-cusolver-cu12==11.7.3.90
+ # via torch
+nvidia-cusparse-cu12==12.5.8.93
+ # via
+ # nvidia-cusolver-cu12
+ # torch
+nvidia-cusparselt-cu12==0.7.1
+ # via torch
+nvidia-nccl-cu12==2.27.5
+ # via torch
+nvidia-nvjitlink-cu12==12.8.93
+ # via
+ # nvidia-cufft-cu12
+ # nvidia-cusolver-cu12
+ # nvidia-cusparse-cu12
+ # torch
+nvidia-nvshmem-cu12==3.3.20
+ # via torch
+nvidia-nvtx-cu12==12.8.90
+ # via torch
+ollama==0.6.0
+ # via
+ # llama-index-embeddings-ollama
+ # llama-index-llms-ollama
+openai==1.109.1
+ # via
+ # llama-index
+ # llama-index-llms-openai
+orjson==3.11.4
+ # via pymilvus
+packaging==25.0
+ # via
+ # huggingface-hub
+ # marshmallow
+ # pytest
+ # transformers
+pandas==2.3.3
+ # via
+ # llama-index
+ # pymilvus
+pillow==10.4.0
+ # via
+ # llama-index-core
+ # llama-index-llms-gemini
+ # sentence-transformers
+platformdirs==4.5.0
+ # via
+ # banks
+ # llama-index-core
+pluggy==1.6.0
+ # via pytest
+prometheus-client==0.23.1
+ # via code-graph (pyproject.toml)
+propcache==0.4.1
+ # via
+ # aiohttp
+ # yarl
+proto-plus==1.26.1
+ # via
+ # google-ai-generativelanguage
+ # google-api-core
+protobuf==5.29.5
+ # via
+ # google-ai-generativelanguage
+ # google-api-core
+ # google-generativeai
+ # googleapis-common-protos
+ # grpcio-status
+ # proto-plus
+ # pymilvus
+pyasn1==0.6.1
+ # via
+ # pyasn1-modules
+ # python-jose
+ # rsa
+pyasn1-modules==0.4.2
+ # via google-auth
+pycparser==2.23
+ # via cffi
+pydantic==2.12.4
+ # via
+ # code-graph (pyproject.toml)
+ # banks
+ # fastapi
+ # google-generativeai
+ # llama-index-core
+ # llama-index-instrumentation
+ # llama-index-workflows
+ # mcp
+ # ollama
+ # openai
+ # pydantic-settings
+pydantic-core==2.41.5
+ # via pydantic
+pydantic-settings==2.11.0
+ # via
+ # code-graph (pyproject.toml)
+ # mcp
+pygments==2.19.2
+ # via pytest
+pyjwt==2.10.1
+ # via mcp
+pymilvus==2.6.3
+ # via
+ # code-graph (pyproject.toml)
+ # llama-index-vector-stores-milvus
+pyparsing==3.2.5
+ # via httplib2
+pytest==8.4.2
+ # via pytest-asyncio
+pytest-asyncio==1.2.0
+ # via llama-index-embeddings-ollama
+python-dateutil==2.9.0.post0
+ # via pandas
+python-dotenv==1.2.1
+ # via
+ # code-graph (pyproject.toml)
+ # pydantic-settings
+ # pymilvus
+ # uvicorn
+python-jose==3.5.0
+ # via code-graph (pyproject.toml)
+python-multipart==0.0.20
+ # via
+ # code-graph (pyproject.toml)
+ # mcp
+pytz==2025.2
+ # via
+ # neo4j
+ # pandas
+pyyaml==6.0.3
+ # via
+ # huggingface-hub
+ # llama-index-core
+ # transformers
+ # uvicorn
+referencing==0.37.0
+ # via
+ # jsonschema
+ # jsonschema-specifications
+regex==2025.11.3
+ # via
+ # nltk
+ # tiktoken
+ # transformers
+requests==2.32.5
+ # via
+ # google-api-core
+ # huggingface-hub
+ # llama-index
+ # llama-index-core
+ # tiktoken
+ # transformers
+rpds-py==0.28.0
+ # via
+ # jsonschema
+ # referencing
+rsa==4.9.1
+ # via
+ # google-auth
+ # python-jose
+safetensors==0.6.2
+ # via transformers
+scikit-learn==1.7.2
+ # via sentence-transformers
+scipy==1.16.3
+ # via
+ # scikit-learn
+ # sentence-transformers
+sentence-transformers==5.1.2
+ # via llama-index-embeddings-huggingface
+setuptools==80.9.0
+ # via
+ # llama-index-core
+ # pymilvus
+six==1.17.0
+ # via
+ # ecdsa
+ # python-dateutil
+sniffio==1.3.1
+ # via
+ # anyio
+ # openai
+sqlalchemy==2.0.44
+ # via
+ # llama-index
+ # llama-index-core
+sqlglot==27.29.0
+ # via code-graph (pyproject.toml)
+sse-starlette==3.0.3
+ # via mcp
+starlette==0.49.3
+ # via
+ # fastapi
+ # mcp
+sympy==1.14.0
+ # via torch
+tenacity==8.5.0
+ # via
+ # llama-index
+ # llama-index-core
+threadpoolctl==3.6.0
+ # via scikit-learn
+tiktoken==0.12.0
+ # via
+ # llama-index
+ # llama-index-core
+tokenizers==0.22.1
+ # via transformers
+torch==2.9.0
+ # via sentence-transformers
+tqdm==4.67.1
+ # via
+ # google-generativeai
+ # huggingface-hub
+ # llama-index-core
+ # nltk
+ # openai
+ # sentence-transformers
+ # transformers
+transformers==4.57.1
+ # via
+ # llama-index-llms-openai-like
+ # sentence-transformers
+triton==3.5.0
+ # via torch
+typing-extensions==4.15.0
+ # via
+ # aiosignal
+ # aiosqlite
+ # anyio
+ # fastapi
+ # google-generativeai
+ # grpcio
+ # huggingface-hub
+ # llama-index
+ # llama-index-core
+ # llama-index-workflows
+ # openai
+ # pydantic
+ # pydantic-core
+ # pytest-asyncio
+ # referencing
+ # sentence-transformers
+ # sqlalchemy
+ # starlette
+ # torch
+ # typing-inspect
+ # typing-inspection
+typing-inspect==0.9.0
+ # via
+ # dataclasses-json
+ # llama-index
+ # llama-index-core
+typing-inspection==0.4.2
+ # via
+ # pydantic
+ # pydantic-settings
+tzdata==2025.2
+ # via pandas
+uritemplate==4.2.0
+ # via google-api-python-client
+urllib3==2.5.0
+ # via requests
+uvicorn==0.38.0
+ # via
+ # code-graph (pyproject.toml)
+ # mcp
+uvloop==0.22.1
+ # via uvicorn
+watchfiles==1.1.1
+ # via uvicorn
+websockets==15.0.1
+ # via uvicorn
+wrapt==2.0.0
+ # via
+ # deprecated
+ # llama-index-core
+yarl==1.22.0
+ # via aiohttp
diff --git a/scripts/demo_curl.sh b/scripts/demo_curl.sh
deleted file mode 100755
index 18433e4..0000000
--- a/scripts/demo_curl.sh
+++ /dev/null
@@ -1,265 +0,0 @@
-#!/bin/bash
-
-################################################################################
-# API Demo Script
-# Purpose: Demonstrate all core API endpoints of codebase-rag
-# Usage: ./scripts/demo_curl.sh
-################################################################################
-
-set -e # Exit on error
-
-# Colors
-GREEN='\033[0;32m'
-YELLOW='\033[1;33m'
-BLUE='\033[0;34m'
-RED='\033[0;31m'
-NC='\033[0m' # No Color
-
-# Configuration
-BASE_URL="${API_BASE_URL:-http://localhost:8000}"
-API_VERSION="v1"
-API_BASE="${BASE_URL}/api/${API_VERSION}"
-
-# Test data
-TEST_REPO_PATH="${TEST_REPO_PATH:-/tmp/test-repo}"
-TEST_REPO_ID="demo-repo-$(date +%s)"
-
-echo -e "${GREEN}========================================${NC}"
-echo -e "${GREEN}codebase-rag API Demo${NC}"
-echo -e "${GREEN}========================================${NC}"
-echo -e "Base URL: ${BLUE}${BASE_URL}${NC}"
-echo -e "Test Repo: ${BLUE}${TEST_REPO_PATH}${NC}"
-echo ""
-
-# Function to print API call
-print_api_call() {
- echo -e "\n${YELLOW}=== $1 ===${NC}"
- echo -e "${BLUE}$2${NC}"
-}
-
-# Function to make API call and display result
-api_call() {
- local description=$1
- local method=$2
- local endpoint=$3
- local data=$4
-
- print_api_call "$description" "$method $endpoint"
-
- if [ "$method" = "GET" ]; then
- response=$(curl -s -w "\nHTTP_STATUS:%{http_code}" "$endpoint")
- else
- response=$(curl -s -w "\nHTTP_STATUS:%{http_code}" -X "$method" \
- -H "Content-Type: application/json" \
- -d "$data" \
- "$endpoint")
- fi
-
- # Extract HTTP status
- http_status=$(echo "$response" | grep "HTTP_STATUS:" | cut -d: -f2)
- body=$(echo "$response" | sed '/HTTP_STATUS:/d')
-
- # Pretty print JSON if possible
- if command -v jq &> /dev/null; then
- echo "$body" | jq '.' 2>/dev/null || echo "$body"
- else
- echo "$body"
- fi
-
- # Check status
- if [ "$http_status" -ge 200 ] && [ "$http_status" -lt 300 ]; then
- echo -e "${GREEN}✓ Success (HTTP $http_status)${NC}"
- else
- echo -e "${RED}✗ Failed (HTTP $http_status)${NC}"
- fi
-
- # Save response for later use
- echo "$body" > /tmp/last_response.json
-}
-
-################################################################################
-# 1. HEALTH CHECK
-################################################################################
-
-api_call \
- "1. Health Check" \
- "GET" \
- "${API_BASE}/health"
-
-################################################################################
-# 2. SYSTEM INFO
-################################################################################
-
-api_call \
- "2. System Information" \
- "GET" \
- "${BASE_URL}/info"
-
-################################################################################
-# 3. REPOSITORY INGESTION
-################################################################################
-
-# Create test repository if it doesn't exist
-if [ ! -d "$TEST_REPO_PATH" ]; then
- echo -e "\n${YELLOW}Creating test repository at ${TEST_REPO_PATH}${NC}"
- mkdir -p "$TEST_REPO_PATH/src/auth"
-
- cat > "$TEST_REPO_PATH/src/auth/token.py" << 'EOF'
-"""Token management module"""
-
-def generate_token(user_id: str) -> str:
- """Generate authentication token for user"""
- return f"token_{user_id}"
-
-def validate_token(token: str) -> bool:
- """Validate authentication token"""
- return token.startswith("token_")
-EOF
-
- cat > "$TEST_REPO_PATH/src/auth/user.py" << 'EOF'
-"""User management module"""
-
-class User:
- def __init__(self, username: str):
- self.username = username
-
- def authenticate(self, password: str) -> bool:
- """Authenticate user with password"""
- return len(password) > 8
-EOF
-
- cat > "$TEST_REPO_PATH/src/main.py" << 'EOF'
-"""Main application entry point"""
-
-from auth.token import generate_token
-from auth.user import User
-
-def main():
- user = User("admin")
- if user.authenticate("password123"):
- token = generate_token("admin")
- print(f"Logged in: {token}")
-
-if __name__ == "__main__":
- main()
-EOF
-
- echo -e "${GREEN}✓ Test repository created${NC}"
-fi
-
-# Ingest repository
-api_call \
- "3. Ingest Repository" \
- "POST" \
- "${API_BASE}/ingest/repo" \
- "{
- \"local_path\": \"$TEST_REPO_PATH\",
- \"include_globs\": [\"**/*.py\", \"**/*.ts\", \"**/*.tsx\"],
- \"exclude_globs\": [\"**/node_modules/**\", \"**/.git/**\", \"**/__pycache__/**\"]
- }"
-
-# Wait a moment for ingestion to complete
-sleep 2
-
-################################################################################
-# 4. RELATED FILES SEARCH
-################################################################################
-
-api_call \
- "4a. Search Related Files - 'auth'" \
- "GET" \
- "${API_BASE}/graph/related?query=auth&repoId=${TEST_REPO_ID}&limit=10"
-
-api_call \
- "4b. Search Related Files - 'token'" \
- "GET" \
- "${API_BASE}/graph/related?query=token&repoId=${TEST_REPO_ID}&limit=10"
-
-api_call \
- "4c. Search Related Files - 'user'" \
- "GET" \
- "${API_BASE}/graph/related?query=user&repoId=${TEST_REPO_ID}&limit=10"
-
-################################################################################
-# 5. CONTEXT PACK GENERATION
-################################################################################
-
-api_call \
- "5a. Context Pack - Plan Stage" \
- "GET" \
- "${API_BASE}/context/pack?repoId=${TEST_REPO_ID}&stage=plan&budget=1500&keywords=auth,token"
-
-api_call \
- "5b. Context Pack - Review Stage with Focus" \
- "GET" \
- "${API_BASE}/context/pack?repoId=${TEST_REPO_ID}&stage=review&budget=2000&keywords=auth&focus=src/auth"
-
-api_call \
- "5c. Context Pack - Large Budget" \
- "GET" \
- "${API_BASE}/context/pack?repoId=${TEST_REPO_ID}&stage=implement&budget=5000"
-
-################################################################################
-# 6. IMPACT ANALYSIS
-################################################################################
-
-api_call \
- "6a. Impact Analysis - token.py (depth=1)" \
- "GET" \
- "${API_BASE}/graph/impact?repoId=${TEST_REPO_ID}&file=src/auth/token.py&depth=1&limit=50"
-
-api_call \
- "6b. Impact Analysis - user.py (depth=2)" \
- "GET" \
- "${API_BASE}/graph/impact?repoId=${TEST_REPO_ID}&file=src/auth/user.py&depth=2&limit=50"
-
-################################################################################
-# 7. GRAPH STATISTICS
-################################################################################
-
-api_call \
- "7. Graph Statistics" \
- "GET" \
- "${API_BASE}/statistics"
-
-################################################################################
-# 8. GRAPH SCHEMA
-################################################################################
-
-api_call \
- "8. Graph Schema" \
- "GET" \
- "${API_BASE}/schema"
-
-################################################################################
-# SUMMARY
-################################################################################
-
-echo -e "\n${GREEN}========================================${NC}"
-echo -e "${GREEN}Demo Complete!${NC}"
-echo -e "${GREEN}========================================${NC}"
-echo ""
-echo -e "API Endpoints Tested:"
-echo -e " ${GREEN}✓${NC} GET /api/v1/health"
-echo -e " ${GREEN}✓${NC} GET /info"
-echo -e " ${GREEN}✓${NC} POST /api/v1/ingest/repo"
-echo -e " ${GREEN}✓${NC} GET /api/v1/graph/related"
-echo -e " ${GREEN}✓${NC} GET /api/v1/context/pack"
-echo -e " ${GREEN}✓${NC} GET /api/v1/graph/impact"
-echo -e " ${GREEN}✓${NC} GET /api/v1/statistics"
-echo -e " ${GREEN}✓${NC} GET /api/v1/schema"
-echo ""
-echo -e "For interactive API documentation, visit:"
-echo -e " ${BLUE}${BASE_URL}/docs${NC}"
-echo ""
-echo -e "Test repository created at:"
-echo -e " ${BLUE}${TEST_REPO_PATH}${NC}"
-echo ""
-
-# Cleanup option
-read -p "Remove test repository? (y/N) " -n 1 -r
-echo
-if [[ $REPLY =~ ^[Yy]$ ]]; then
- rm -rf "$TEST_REPO_PATH"
- echo -e "${GREEN}✓ Test repository removed${NC}"
-fi