π€― LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
π· build: optimize claude action workflow and add vscode settings (#8796)
YuTengjing27d48e89e9fc
diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.ymlindex dde96fd1d2d..97c629546c3 100644--- a/.github/workflows/claude-code-review.yml+++ b/.github/workflows/claude-code-review.yml@@ -38,7 +38,8 @@ jobs:claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)- # model: "claude-opus-4-20250514"+ model: 'claude-opus-4-1-20250805'+ allowed_bots: 'bot'# Direct prompt for automated review (no @claude mention needed)direct_prompt: |@@ -51,8 +52,6 @@ jobs:Be constructive and helpful in your feedback.- allowed_bots: 'bot'-# Optional: Use sticky comments to make Claude reuse the same comment on subsequent pushes to the same PR# use_sticky_comment: true@@ -71,7 +70,7 @@ jobs:# 'Please provide a thorough code review focusing on our coding standards and best practices.' }}# Optional: Add specific tools for running tests or linting- # allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)"+ allowed_tools: 'Bash(bun run:*),Bash(pnpm run:*),Bash(npm run:*),Bash(npx vitest:*),Bash(rg:*),Bash(find:*),Bash(sed:*),Bash(grep:*),Bash(awk:*),Bash(wc:*),Bash(xargs:*)'# Optional: Skip review for certain conditions# if: |diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.ymlindex 64a3e5b14b3..f83cbc0cd96 100644--- a/.github/workflows/claude.yml+++ b/.github/workflows/claude.yml@@ -39,26 +39,26 @@ jobs:# This is an optional setting that allows Claude to read CI results on PRsadditional_permissions: |actions: read-+# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)- # model: "claude-opus-4-20250514"-+ model: 'claude-opus-4-1-20250805'+ allowed_bots: 'bot'+# Optional: Customize the trigger phrase (default: @claude)# trigger_phrase: "/claude"-+# Optional: Trigger when specific user is assigned to an issue# assignee_trigger: "claude-bot"-+# Optional: Allow Claude to run specific commands- # allowed_tools: "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)"-+ allowed_tools: 'Bash(bun run:*),Bash(pnpm run:*),Bash(npm run:*),Bash(npx vitest:*),Bash(rg:*),Bash(find:*),Bash(sed:*),Bash(grep:*),Bash(awk:*),Bash(wc:*),Bash(xargs:*)'+# Optional: Add custom instructions for Claude to customize its behavior for your project# custom_instructions: |# Follow our coding standards# Ensure all new code has tests# Use TypeScript for new files-+# Optional: Custom environment variables for Claude# claude_env: |# NODE_ENV: test-diff --git a/.gitignore b/.gitignoreindex 597ada62830..2132a00cca6 100644--- a/.gitignore+++ b/.gitignore@@ -19,7 +19,6 @@ Desktop.ini# IDE and editors.idea/-.vscode/*.sublime-*.history/.windsurfrules@@ -102,8 +101,8 @@ vertex-ai-key.json.local/.claude/.mcp.json-CLAUDE.md-CLAUDE.*.md++CLAUDE.local.md# Misc./packages/lobe-uidiff --git a/.vscode/extensions.json b/.vscode/extensions.jsonnew file mode 100644index 00000000000..96a430c969c--- /dev/null+++ b/.vscode/extensions.json@@ -0,0 +1,13 @@+{+ "recommendations": [+ "Anthropic.claude-code",+ "dbaeumer.vscode-eslint",+ "jrr997.antd-docs",+ "seatonjiang.gitmoji-vscode",+ "styled-components.vscode-styled-components",+ "stylelint.vscode-stylelint",+ "unifiedjs.vscode-mdx",+ "unifiedjs.vscode-remark",+ "vitest.explorer",+ ]+}\ No newline at end of filediff --git a/.vscode/settings.json b/.vscode/settings.jsonnew file mode 100644index 00000000000..fba169ddde5--- /dev/null+++ b/.vscode/settings.json@@ -0,0 +1,89 @@+{+ "npm.packageManager": "pnpm",+ // don't show errors, but fix when save and git pre commit+ "eslint.rules.customizations": [+ { "rule": "import/order", "severity": "off" },+ { "rule": "prettier/prettier", "severity": "off" },+ { "rule": "react/jsx-sort-props", "severity": "off" },+ { "rule": "sort-keys-fix/sort-keys-fix", "severity": "off" },+ { "rule": "typescript-sort-keys/interface", "severity": "off" }+ ],+ "stylelint.validate": [+ "css",+ "postcss",+ // make stylelint work with tsx antd-style css template string+ "typescriptreact"+ ],+ "search.exclude": {+ "**/node_modules": true,+ // useless to search this big folder+ "locales": true+ },+ "vitest.maximumConfigs": 6,+ "workbench.editor.customLabels.patterns": {+ "**/app/**/[[]*[]]/[[]*[]]/page.tsx": "${dirname(2)}/${dirname(1)}/${dirname} β’ page component",+ "**/app/**/[[]*[]]/page.tsx": "${dirname(1)}/${dirname} β’ page component",+ "**/app/**/page.tsx": "${dirname} β’ page component",++ "**/app/**/[[]*[]]/[[]*[]]/layout.tsx": "${dirname(2)}/${dirname(1)}/${dirname} β’ page layout",+ "**/app/**/[[]*[]]/layout.tsx": "${dirname(1)}/${dirname} β’ page layout",+ "**/app/**/layout.tsx": "${dirname} β’ page layout",++ "**/app/**/[[]*[]]/[[]*[]]/default.tsx": "${dirname(2)}/${dirname(1)}/${dirname} β’ slot default",+ "**/app/**/[[]*[]]/default.tsx": "${dirname(1)}/${dirname} β’ slot default",+ "**/app/**/default.tsx": "${dirname} β’ slot default",++ "**/app/**/[[]*[]]/[[]*[]]/error.tsx": "${dirname(2)}/${dirname(1)}/${dirname} β’ error component",+ "**/app/**/[[]*[]]/error.tsx": "${dirname(1)}/${dirname} β’ error component",+ "**/app/**/error.tsx": "${dirname} β’ error component",++ "**/app/**/[[]*[]]/[[]*[]]/loading.tsx": "${dirname(2)}/${dirname(1)}/${dirname} β’ loading component",+ "**/app/**/[[]*[]]/loading.tsx": "${dirname(1)}/${dirname} β’ loading component",+ "**/app/**/loading.tsx": "${dirname} β’ loading component",++ "**/src/**/route.ts": "${dirname(1)}/${dirname} β’ route",+ "**/src/**/index.tsx": "${dirname} β’ component",++ "**/src/database/repositories/*/index.ts": "${dirname} β’ db repository",+ "**/src/database/models/*.ts": "${filename} β’ db model",+ "**/src/database/schemas/*.ts": "${filename} β’ db schema",++ "**/src/services/*.ts": "${filename} β’ service",+ "**/src/services/*/client.ts": "${dirname} β’ client service",+ "**/src/services/*/server.ts": "${dirname} β’ server service",++ "**/src/store/*/action.ts": "${dirname} β’ action",+ "**/src/store/*/slices/*/action.ts": "${dirname(2)}/${dirname} β’ action",+ "**/src/store/*/slices/*/actions/*.ts": "${dirname(1)}/${dirname}/${filename} β’ action",++ "**/src/store/*/initialState.ts": "${dirname} β’ state",+ "**/src/store/*/slices/*/initialState.ts": "${dirname(2)}/${dirname} β’ state",++ "**/src/store/*/selectors.ts": "${dirname} β’ selectors",+ "**/src/store/*/slices/*/selectors.ts": "${dirname(2)}/${dirname} β’ selectors",++ "**/src/store/*/reducer.ts": "${dirname} β’ reducer",+ "**/src/store/*/slices/*/reducer.ts": "${dirname(2)}/${dirname} β’ reducer",++ "**/src/config/modelProviders/*.ts": "${filename} β’ provider",+ "**/src/config/aiModels/*.ts": "${filename} β’ model",+ "**/src/config/paramsSchemas/*/*.json": "${dirname(1)}/${filename} β’ params",+ "**/src/libs/model-runtime/*/index.ts": "${dirname} β’ runtime",++ "**/src/server/services/*/index.ts": "${dirname} β’ server/service",+ "**/src/server/routers/lambda/*.ts": "${filename} β’ lambda",+ "**/src/server/routers/async/*.ts": "${filename} β’ async",+ "**/src/server/routers/edge/*.ts": "${filename} β’ edge",++ "**/src/locales/default/*.ts": "${filename} β’ locale",+ },+ "eslint.validate": [+ "javascript",+ "javascriptreact",+ "typescript",+ "typescriptreact",+ "markdown",+ // support mdx+ "mdx"+ ]+}\ No newline at end of filediff --git a/CLAUDE.md b/CLAUDE.mdnew file mode 100644index 00000000000..66c69d76f4b--- /dev/null+++ b/CLAUDE.md@@ -0,0 +1,117 @@+# CLAUDE.md++This document serves as a shared guideline for all team members when using Claude Code in this repository.++## Suggestions++- When searching the project source code, it is recommended to exclude: `src/database/migrations/meta`, `**/*.test.*`, `**/__snapshots__`, `**/fixtures`+- Please store all temporary scripts (such as migration and refactoring scripts) in the `docs/.local/` directory; the contents of this folder will not be committed.++## Technologies Stack++read @.cursor/rules/project-introduce.mdc for more details.++### Directory Structure++```plaintext+src/+βββ app/ # Next.js App Router+βββ features/ # Feature-based UI components+βββ store/ # Zustand state stores+βββ services/ # Client services (tRPC/Model calls)+βββ server/ # Server-side (tRPC routers, services)+βββ database/ # Schemas, models, repositories+βββ libs/ # External library integrations+```++### Data Flow++- **Client DB Version**: UI β Zustand β Service β Model β PGLite+- **Server DB Version**: UI β Zustand β Service β tRPC β Repository/Model β PostgreSQL++## Development++### Git Workflow++- use rebase for git pull.+- git commit message should prefix with gitmoji.+- git branch name format example: tj/feat/feature-name+- use .github/PULL_REQUEST_TEMPLATE.md to generate pull request description++### Package Management++this is a monorepo project and we use `pnpm` as package manager++### TypeScript Code Style Guide++see @.cursor/rules/typescript.mdc++### Modify Code Rules++- **Code Language**:+ - For files with existing Chinese comments: Continue using Chinese to maintain consistency+ - For new files or files without Chinese comments: MUST use American English.+ - eg: new react tsx file and new test file+- Conservative for existing code, modern approaches for new features++### Testing++Testing work follows the Rule-Aware Task Execution system above.++- **Required Rule**: `testing-guide/testing-guide.mdc`+- **Command**: `npx vitest run --config vitest.config.ts '[file-path-pattern]'`, wrapped in single quotes to avoid shell expansion++**Important**:++- Never run `bun run test` etc to run tests, this will run all tests and cost about 10mins+- If try to fix the same test twice, but still failed, stop and ask for help.++### Typecheck++- use `bun run type-check` to check type errors.++### Internationalization++- **Keys**: Add to `src/locales/default/namespace.ts`+- **Dev**: Translate at least `zh-CN` files for preview+- **Structure**: Hierarchical nested objects, not flat keys+- **Script**: DON'T run `pnpm i18n` (user/CI handles it)++## Rules Index++Some useful rules of this project. Read them when needed.++**IMPORTANT**: All rule files referenced in this document are located in the `.cursor/rules/` directory. Throughout this document, rule files are referenced by their filename only for brevity.++### π Complete Rule Files++**Core Development**++- `backend-architecture.mdc` - Three-layer architecture, data flow+- `react-component.mdc` - antd-style, Lobe UI usage+- `drizzle-schema-style-guide.mdc` - Schema naming, patterns+- `define-database-model.mdc` - Model templates, CRUD patterns++**State & UI**++- `zustand-slice-organization.mdc` - Store organization+- `zustand-action-patterns.mdc` - Action patterns+- `packages/react-layout-kit.mdc` - Layout components usage++**Testing & Quality**++- `testing-guide/testing-guide.mdc` - Test strategy, mock patterns+- `code-review.mdc` - Review process and standards++**Desktop (Electron)**++- `desktop-feature-implementation.mdc` - Main/renderer process patterns+- `desktop-local-tools-implement.mdc` - Tool integration workflow+- `desktop-menu-configuration.mdc` - App menu, context menu, tray menu+- `desktop-window-management.mdc` - Window creation, state management, multi-window+- `desktop-controller-tests.mdc` - Controller unit testing guide++**Development Tools**++- `i18n.mdc` - Internationalization workflow+- `debug.mdc` - Debugging strategies