-
Notifications
You must be signed in to change notification settings - Fork 5
Wip-bring-back-s3-mock-issue-36 #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
4582939
542dd48
8acc359
400b005
28a05f8
2343ecf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| *.pptx | ||
| *.jsonl | ||
|
|
||
| .ruff_cache | ||
| # Environment variables | ||
| .env | ||
| .claude | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| # GEMINI.md | ||
|
|
||
| This file provides guidance to the Gemini AI agent when working with code in this repository. | ||
|
|
||
| ## Project Overview | ||
|
|
||
| Atlas UI 3 is a full-stack LLM chat interface with Model Context Protocol (MCP) integration, supporting multiple LLM providers (OpenAI, Anthropic Claude, Google Gemini), RAG, and agentic capabilities. | ||
|
|
||
| **Tech Stack:** | ||
| - Backend: FastAPI + WebSockets, LiteLLM, FastMCP | ||
| - Frontend: React 19 + Vite 7 + Tailwind CSS | ||
| - Python Package Manager: **uv** (NOT pip!) | ||
| - Configuration: Pydantic with YAML/JSON configs | ||
|
|
||
| ## Building and Running | ||
|
|
||
| ### Quick Start (Recommended) | ||
| ```bash | ||
| bash agent_start.sh | ||
| ``` | ||
| This script handles: killing old processes, clearing logs, building frontend, and starting the backend. | ||
|
|
||
| ### Manual Development Workflow | ||
|
|
||
| **Frontend Build (CRITICAL):** | ||
| ```bash | ||
| cd frontend | ||
| npm install | ||
| npm run build # Use build, NOT npm run dev (WebSocket issues) | ||
| ``` | ||
|
|
||
| **Backend Start:** | ||
| ```bash | ||
| cd backend | ||
| python main.py # NEVER use uvicorn --reload (causes problems) | ||
| ``` | ||
|
|
||
| ### Testing | ||
|
|
||
| **Run all tests:** | ||
| ```bash | ||
| ./test/run_tests.sh all | ||
| ``` | ||
|
|
||
| **Individual test suites:** | ||
| ```bash | ||
| ./test/run_tests.sh backend | ||
| ./test/run_tests.sh frontend | ||
| ./test/run_tests.sh e2e | ||
| ``` | ||
|
|
||
| ## Development Conventions | ||
|
|
||
| - **Python Package Manager**: **ALWAYS use `uv`**, never pip or conda. | ||
| - **Frontend Development**: **NEVER use `npm run dev`**, it has WebSocket connection problems. Always use `npm run build`. | ||
| - **Backend Development**: **NEVER use `uvicorn --reload`**, it causes problems. | ||
| - **File Naming**: Do not use generic names like `utils.py` or `helpers.py`. Use descriptive names that reflect the file's purpose. | ||
| - **No Emojis**: No emojis should ever be added in this repo. | ||
| - **Linting**: Run `ruff check backend/` for Python and `npm run lint` for the frontend before committing. | ||
|
|
||
|
|
||
| Also read. | ||
| /workspaces/atlas-ui-3/.github/copilot-instructions.md | ||
|
|
||
| and CLAUDE.md |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -20,14 +20,26 @@ done | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Configuration | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| USE_NEW_FRONTEND=${USE_NEW_FRONTEND:-true} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Check if MinIO is running | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if ! docker ps | grep -q atlas-minio; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "⚠️ MinIO is not running. Starting MinIO with docker-compose..." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| docker-compose up -d minio minio-init | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "✅ MinIO started successfully" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sleep 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Read USE_MOCK_S3 from .env file | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ -f .env ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| USE_MOCK_S3=$(grep -E "^USE_MOCK_S3=" .env | cut -d '=' -f2) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "✅ MinIO is already running" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| USE_MOCK_S3="true" # Default to mock if no .env | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Only start MinIO if not using mock S3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ "$USE_MOCK_S3" = "true" ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "✅ Using Mock S3 (no Docker required)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Check if MinIO is running | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if ! docker ps | grep -q atlas-minio; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "⚠️ MinIO is not running. Starting MinIO with docker-compose..." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| docker-compose up -d minio minio-init | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "✅ MinIO started successfully" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "✅ MinIO started successfully" | |
| echo "MinIO started successfully" |
Outdated
Copilot
AI
Nov 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message uses an emoji '✅' which violates the project's coding guidelines that explicitly state 'No emojis in code or docs' (from GEMINI.md and CLAUDE.md).
| echo "✅ Using Mock S3 (no Docker required)" | |
| else | |
| # Check if MinIO is running | |
| if ! docker ps | grep -q atlas-minio; then | |
| echo "⚠️ MinIO is not running. Starting MinIO with docker-compose..." | |
| docker-compose up -d minio minio-init | |
| echo "✅ MinIO started successfully" | |
| sleep 3 | |
| else | |
| echo "✅ MinIO is already running" | |
| echo "Using Mock S3 (no Docker required)" | |
| else | |
| # Check if MinIO is running | |
| if ! docker ps | grep -q atlas-minio; then | |
| echo "⚠️ MinIO is not running. Starting MinIO with docker-compose..." | |
| docker-compose up -d minio minio-init | |
| echo "MinIO started successfully" | |
| sleep 3 | |
| else | |
| echo "MinIO is already running" |
Outdated
Copilot
AI
Nov 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message uses an emoji '✅' which violates the project's coding guidelines that explicitly state 'No emojis in code or docs' (from GEMINI.md and CLAUDE.md).
| echo "✅ Using Mock S3 (no Docker required)" | |
| else | |
| # Check if MinIO is running | |
| if ! docker ps | grep -q atlas-minio; then | |
| echo "⚠️ MinIO is not running. Starting MinIO with docker-compose..." | |
| docker-compose up -d minio minio-init | |
| echo "✅ MinIO started successfully" | |
| sleep 3 | |
| else | |
| echo "✅ MinIO is already running" | |
| echo "Using Mock S3 (no Docker required)" | |
| else | |
| # Check if MinIO is running | |
| if ! docker ps | grep -q atlas-minio; then | |
| echo "MinIO is not running. Starting MinIO with docker-compose..." | |
| docker-compose up -d minio minio-init | |
| echo "MinIO started successfully" | |
| sleep 3 | |
| else | |
| echo "MinIO is already running" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,22 +41,27 @@ async def build_messages( | |
| ) -> List[Dict[str, Any]]: | ||
| """ | ||
| Build messages array from session history and context. | ||
|
|
||
| Args: | ||
| session: Current chat session | ||
| include_files_manifest: Whether to append files manifest | ||
|
|
||
| Returns: | ||
| List of messages ready for LLM call | ||
| """ | ||
| # Get conversation history from session | ||
| messages = session.history.get_messages_for_llm() | ||
|
|
||
| # Optionally add files manifest | ||
| if include_files_manifest: | ||
| session_context = build_session_context(session) | ||
| files_in_context = session_context.get("files", {}) | ||
| logger.info(f"DEBUG: Session has {len(files_in_context)} files: {list(files_in_context.keys())}") | ||
|
||
| files_manifest = file_utils.build_files_manifest(session_context) | ||
| if files_manifest: | ||
| logger.info(f"DEBUG: Adding files manifest to messages: {files_manifest['content'][:100]}") | ||
| messages.append(files_manifest) | ||
|
|
||
| else: | ||
| logger.warning("DEBUG: No files manifest generated despite include_files_manifest=True") | ||
|
|
||
| return messages | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -127,6 +127,7 @@ def agent_mode_available(self) -> bool: | |
| test_user: str = "[email protected]" # Test user for development | ||
|
|
||
| # S3/MinIO storage settings | ||
| use_mock_s3: bool = False # Use in-process S3 mock (no Docker required) | ||
| s3_endpoint: str = "http://localhost:9000" | ||
| s3_bucket_name: str = "atlas-files" | ||
| s3_access_key: str = "minioadmin" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The warning message uses an emoji '⚠️ ' which violates the project's coding guidelines that explicitly state 'No emojis in code or docs' (from GEMINI.md and CLAUDE.md).