# Sidecar Service Configuration
SIDECAR_HOST=0.0.0.0
SIDECAR_PORT=8001
SIDECAR_SERVICE_NAME=  # Docker service name for container networking
SIDECAR_DEBUG=true

SIDECAR_DEV_MODE=true  # set to false in production otherwise the sidecar will use the fixed token for testing


# Metadata Configuration
# Controls whether commit operations include notebook metadata (hashing, timestamps, etc.)
# Set to "false" for faster commits during development
INCLUDE_METADATA=false

GIT_AUTH_METHOD=embedded

# ====== Git Configuration (Gitea) =============
# GIT_SERVER=gitea
# GIT_SERVER_URL=http://localhost:3000  # or https://localhost:8443 for gitlab
# GIT_SERVER_ADMIN_TOKEN=${GITEA_ADMIN_TOKEN}
# ALLOWED_DOMAINS=test.org

# GIT_USER_NAME='test user 7'
# GIT_USER_EMAIL=test.user.7@test.org

# ====== END of Git Configuration ==============


# ====== GitHub Enterprise Test Env Variables ======
GIT_SERVER=github_enterprise
GIT_SERVER_ADMIN_TOKEN=
GITHUB_ENTERPRISE_URL=https://github.com/JupyterTestOrg
GITHUB_ENTERPRISE_ORG=JupyterTestOrg
GITHUB_APP_ID=1783232
GITHUB_APP_INSTALLATION_ID=81119717
GITHUB_APP_PRIVATE_KEY_PATH=/home/ji-liu/Axle/jupyter_extension_project/git_lock_sign_jlx/github_app/jupyterlab-extension.2025-08-14.private-key.pem

# User Configuration  
GIT_USER_NAME='liuji1031-new'
GIT_USER_EMAIL=liuji1031@live.com

# Optional Configuration
ALLOWED_DOMAINS=
DEFAULT_REPO_PRIVATE=true

# ===== END of GitHub Enterprise Test Env Variables =====


# Logging Configuration
LOG_LEVEL=DEBUG

# =============================================================================
# Git Configuration  
# =============================================================================
# Git user configuration with environment variable precedence:
#
# PRIORITY ORDER:
# 1. Environment variables (GIT_USER_EMAIL, GIT_USER_NAME) - if GIT_USER_EMAIL is set
# 2. Local git config in the repository directory  
# 3. Global git config (fallback)
#
# CONTAINERIZED DEVELOPMENT:
# When running in containers, git config may not be available, so these
# environment variables take precedence. If GIT_USER_EMAIL is provided:
# - The git repository will be automatically initialized if needed
# - Git user configuration will be set using these environment variables
#
# USERNAME EXTRACTION:
# If GIT_USER_NAME is not provided but GIT_USER_EMAIL is set,
# the username will be extracted from the email (part before @ symbol)
#
GIT_SSL_VERIFY=false
SINGLE_REPO_PER_USER=true

# Optional: GPG key ID for signing commits
# GPG_KEY_ID=your_gpg_key_id_here

# =============================================================================
# Commit Message Configuration
# =============================================================================
# Options: "generic" | "detailed" (detailed mode will use LLM in future)
COMMIT_MESSAGE_MODE=detailed

# =============================================================================
# Operation Debouncing (in seconds)
# =============================================================================
# Prevent spam commits when cells are executed rapidly (set to 0 for immediate operation)
COMMIT_DEBOUNCE_SECONDS=0

# Prevent spam pushes when notebook is saved rapidly (set to 0 for immediate operation)
PUSH_DEBOUNCE_SECONDS=0

# =============================================================================
# Auto-save Configuration
# =============================================================================
# Enable automatic periodic saving and pushing
AUTO_SAVE_ENABLED=true

# How often to auto-save and push (in minutes)
AUTO_SAVE_INTERVAL_MINUTES=5

# =============================================================================
# Frontend Configuration
# =============================================================================
# Delay before enabling cell execution detection (in milliseconds)
CELL_EXECUTION_DETECTION_DELAY_MS=3000


# =============================================================================
# UI Button Control
# =============================================================================
# Enable or disable specific UI buttons (true/false)
# When disabled, buttons appear grayed out and are not clickable
ENABLE_COMMIT_BUTTON=false
ENABLE_PUSH_BUTTON=false
ENABLE_LOCK_BUTTON=false

CREATE_WORK_SUBDIRECTORY=true