1a1254f045
CI - 构建、测试和质量检查 / Rust 代码检查 (push) Has been cancelled
CI - 构建、测试和质量检查 / 单元测试 (push) Has been cancelled
CI - 构建、测试和质量检查 / 代码格式检查 (push) Has been cancelled
CI - 构建、测试和质量检查 / Clippy 代码质量检查 (push) Has been cancelled
CI - 构建、测试和质量检查 / 构建可执行文件 (claude_code_rs, macos-latest, x86_64-apple-darwin) (push) Has been cancelled
CI - 构建、测试和质量检查 / 构建可执行文件 (claude_code_rs, ubuntu-latest, x86_64-unknown-linux-gnu) (push) Has been cancelled
CI - 构建、测试和质量检查 / 构建可执行文件 (claude_code_rs.exe, windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelled
- 添加 Rust GUI 桌面应用程序入口点 - 添加 TypeScript/JavaScript 项目基础结构文件 - 包含组件、工具、命令、服务和工具定义 - 添加配置文件如 .gitignore、.gitattributes 和 LICENSE - 包含图片资源和演示文件 - 为各种功能模块添加占位符和类型定义
56 lines
1.7 KiB
Bash
56 lines
1.7 KiB
Bash
#!/bin/bash
|
|
# Example SessionStart hook for loading project context
|
|
# This script detects project type and sets environment variables
|
|
|
|
set -euo pipefail
|
|
|
|
# Navigate to project directory
|
|
cd "$CLAUDE_PROJECT_DIR" || exit 1
|
|
|
|
echo "Loading project context..."
|
|
|
|
# Detect project type and set environment
|
|
if [ -f "package.json" ]; then
|
|
echo "📦 Node.js project detected"
|
|
echo "export PROJECT_TYPE=nodejs" >> "$CLAUDE_ENV_FILE"
|
|
|
|
# Check if TypeScript
|
|
if [ -f "tsconfig.json" ]; then
|
|
echo "export USES_TYPESCRIPT=true" >> "$CLAUDE_ENV_FILE"
|
|
fi
|
|
|
|
elif [ -f "Cargo.toml" ]; then
|
|
echo "🦀 Rust project detected"
|
|
echo "export PROJECT_TYPE=rust" >> "$CLAUDE_ENV_FILE"
|
|
|
|
elif [ -f "go.mod" ]; then
|
|
echo "🐹 Go project detected"
|
|
echo "export PROJECT_TYPE=go" >> "$CLAUDE_ENV_FILE"
|
|
|
|
elif [ -f "pyproject.toml" ] || [ -f "setup.py" ]; then
|
|
echo "🐍 Python project detected"
|
|
echo "export PROJECT_TYPE=python" >> "$CLAUDE_ENV_FILE"
|
|
|
|
elif [ -f "pom.xml" ]; then
|
|
echo "☕ Java (Maven) project detected"
|
|
echo "export PROJECT_TYPE=java" >> "$CLAUDE_ENV_FILE"
|
|
echo "export BUILD_SYSTEM=maven" >> "$CLAUDE_ENV_FILE"
|
|
|
|
elif [ -f "build.gradle" ] || [ -f "build.gradle.kts" ]; then
|
|
echo "☕ Java/Kotlin (Gradle) project detected"
|
|
echo "export PROJECT_TYPE=java" >> "$CLAUDE_ENV_FILE"
|
|
echo "export BUILD_SYSTEM=gradle" >> "$CLAUDE_ENV_FILE"
|
|
|
|
else
|
|
echo "❓ Unknown project type"
|
|
echo "export PROJECT_TYPE=unknown" >> "$CLAUDE_ENV_FILE"
|
|
fi
|
|
|
|
# Check for CI configuration
|
|
if [ -f ".github/workflows" ] || [ -f ".gitlab-ci.yml" ] || [ -f ".circleci/config.yml" ]; then
|
|
echo "export HAS_CI=true" >> "$CLAUDE_ENV_FILE"
|
|
fi
|
|
|
|
echo "Project context loaded successfully"
|
|
exit 0
|