@lobehub/chat 1.111.11 → 1.111.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/claude-code-review.yml +12 -12
- package/.github/workflows/claude.yml +9 -9
- package/.vscode/extensions.json +13 -0
- package/.vscode/settings.json +89 -0
- package/CHANGELOG.md +17 -0
- package/CLAUDE.md +117 -0
- package/changelog/v1.json +5 -0
- package/package.json +1 -1
- package/src/config/aiModels/aihubmix.ts +0 -2
- package/src/config/aiModels/openai.ts +0 -2
- package/src/server/routers/async/image.ts +1 -0
- package/src/services/file/_deprecated.ts +1 -1
- package/src/store/file/slices/upload/action.ts +1 -1
@@ -17,14 +17,14 @@ jobs:
|
|
17
17
|
# github.event.pull_request.user.login == 'external-contributor' ||
|
18
18
|
# github.event.pull_request.user.login == 'new-developer' ||
|
19
19
|
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
|
20
|
-
|
20
|
+
|
21
21
|
runs-on: ubuntu-latest
|
22
22
|
permissions:
|
23
23
|
contents: read
|
24
24
|
pull-requests: read
|
25
25
|
issues: read
|
26
26
|
id-token: write
|
27
|
-
|
27
|
+
|
28
28
|
steps:
|
29
29
|
- name: Checkout repository
|
30
30
|
uses: actions/checkout@v4
|
@@ -38,8 +38,9 @@ jobs:
|
|
38
38
|
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
39
39
|
|
40
40
|
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
|
41
|
-
|
42
|
-
|
41
|
+
model: 'claude-opus-4-1-20250805'
|
42
|
+
allowed_bots: 'bot'
|
43
|
+
|
43
44
|
# Direct prompt for automated review (no @claude mention needed)
|
44
45
|
direct_prompt: |
|
45
46
|
Please review this pull request and provide feedback on:
|
@@ -48,12 +49,12 @@ jobs:
|
|
48
49
|
- Performance considerations
|
49
50
|
- Security concerns
|
50
51
|
- Test coverage
|
51
|
-
|
52
|
+
|
52
53
|
Be constructive and helpful in your feedback.
|
53
54
|
|
54
55
|
# Optional: Use sticky comments to make Claude reuse the same comment on subsequent pushes to the same PR
|
55
56
|
# use_sticky_comment: true
|
56
|
-
|
57
|
+
|
57
58
|
# Optional: Customize review based on file types
|
58
59
|
# direct_prompt: |
|
59
60
|
# Review this PR focusing on:
|
@@ -61,18 +62,17 @@ jobs:
|
|
61
62
|
# - For API endpoints: Security, input validation, and error handling
|
62
63
|
# - For React components: Performance, accessibility, and best practices
|
63
64
|
# - For tests: Coverage, edge cases, and test quality
|
64
|
-
|
65
|
+
|
65
66
|
# Optional: Different prompts for different authors
|
66
67
|
# direct_prompt: |
|
67
|
-
# ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
|
68
|
+
# ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
|
68
69
|
# 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' ||
|
69
70
|
# 'Please provide a thorough code review focusing on our coding standards and best practices.' }}
|
70
|
-
|
71
|
+
|
71
72
|
# Optional: Add specific tools for running tests or linting
|
72
|
-
|
73
|
-
|
73
|
+
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:*)'
|
74
|
+
|
74
75
|
# Optional: Skip review for certain conditions
|
75
76
|
# if: |
|
76
77
|
# !contains(github.event.pull_request.title, '[skip-review]') &&
|
77
78
|
# !contains(github.event.pull_request.title, '[WIP]')
|
78
|
-
|
@@ -39,26 +39,26 @@ jobs:
|
|
39
39
|
# This is an optional setting that allows Claude to read CI results on PRs
|
40
40
|
additional_permissions: |
|
41
41
|
actions: read
|
42
|
-
|
42
|
+
|
43
43
|
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
|
44
|
-
|
45
|
-
|
44
|
+
model: 'claude-opus-4-1-20250805'
|
45
|
+
allowed_bots: 'bot'
|
46
|
+
|
46
47
|
# Optional: Customize the trigger phrase (default: @claude)
|
47
48
|
# trigger_phrase: "/claude"
|
48
|
-
|
49
|
+
|
49
50
|
# Optional: Trigger when specific user is assigned to an issue
|
50
51
|
# assignee_trigger: "claude-bot"
|
51
|
-
|
52
|
+
|
52
53
|
# Optional: Allow Claude to run specific commands
|
53
|
-
|
54
|
-
|
54
|
+
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:*)'
|
55
|
+
|
55
56
|
# Optional: Add custom instructions for Claude to customize its behavior for your project
|
56
57
|
# custom_instructions: |
|
57
58
|
# Follow our coding standards
|
58
59
|
# Ensure all new code has tests
|
59
60
|
# Use TypeScript for new files
|
60
|
-
|
61
|
+
|
61
62
|
# Optional: Custom environment variables for Claude
|
62
63
|
# claude_env: |
|
63
64
|
# NODE_ENV: test
|
64
|
-
|
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"recommendations": [
|
3
|
+
"Anthropic.claude-code",
|
4
|
+
"dbaeumer.vscode-eslint",
|
5
|
+
"jrr997.antd-docs",
|
6
|
+
"seatonjiang.gitmoji-vscode",
|
7
|
+
"styled-components.vscode-styled-components",
|
8
|
+
"stylelint.vscode-stylelint",
|
9
|
+
"unifiedjs.vscode-mdx",
|
10
|
+
"unifiedjs.vscode-remark",
|
11
|
+
"vitest.explorer",
|
12
|
+
]
|
13
|
+
}
|
@@ -0,0 +1,89 @@
|
|
1
|
+
{
|
2
|
+
"npm.packageManager": "pnpm",
|
3
|
+
// don't show errors, but fix when save and git pre commit
|
4
|
+
"eslint.rules.customizations": [
|
5
|
+
{ "rule": "import/order", "severity": "off" },
|
6
|
+
{ "rule": "prettier/prettier", "severity": "off" },
|
7
|
+
{ "rule": "react/jsx-sort-props", "severity": "off" },
|
8
|
+
{ "rule": "sort-keys-fix/sort-keys-fix", "severity": "off" },
|
9
|
+
{ "rule": "typescript-sort-keys/interface", "severity": "off" }
|
10
|
+
],
|
11
|
+
"stylelint.validate": [
|
12
|
+
"css",
|
13
|
+
"postcss",
|
14
|
+
// make stylelint work with tsx antd-style css template string
|
15
|
+
"typescriptreact"
|
16
|
+
],
|
17
|
+
"search.exclude": {
|
18
|
+
"**/node_modules": true,
|
19
|
+
// useless to search this big folder
|
20
|
+
"locales": true
|
21
|
+
},
|
22
|
+
"vitest.maximumConfigs": 6,
|
23
|
+
"workbench.editor.customLabels.patterns": {
|
24
|
+
"**/app/**/[[]*[]]/[[]*[]]/page.tsx": "${dirname(2)}/${dirname(1)}/${dirname} • page component",
|
25
|
+
"**/app/**/[[]*[]]/page.tsx": "${dirname(1)}/${dirname} • page component",
|
26
|
+
"**/app/**/page.tsx": "${dirname} • page component",
|
27
|
+
|
28
|
+
"**/app/**/[[]*[]]/[[]*[]]/layout.tsx": "${dirname(2)}/${dirname(1)}/${dirname} • page layout",
|
29
|
+
"**/app/**/[[]*[]]/layout.tsx": "${dirname(1)}/${dirname} • page layout",
|
30
|
+
"**/app/**/layout.tsx": "${dirname} • page layout",
|
31
|
+
|
32
|
+
"**/app/**/[[]*[]]/[[]*[]]/default.tsx": "${dirname(2)}/${dirname(1)}/${dirname} • slot default",
|
33
|
+
"**/app/**/[[]*[]]/default.tsx": "${dirname(1)}/${dirname} • slot default",
|
34
|
+
"**/app/**/default.tsx": "${dirname} • slot default",
|
35
|
+
|
36
|
+
"**/app/**/[[]*[]]/[[]*[]]/error.tsx": "${dirname(2)}/${dirname(1)}/${dirname} • error component",
|
37
|
+
"**/app/**/[[]*[]]/error.tsx": "${dirname(1)}/${dirname} • error component",
|
38
|
+
"**/app/**/error.tsx": "${dirname} • error component",
|
39
|
+
|
40
|
+
"**/app/**/[[]*[]]/[[]*[]]/loading.tsx": "${dirname(2)}/${dirname(1)}/${dirname} • loading component",
|
41
|
+
"**/app/**/[[]*[]]/loading.tsx": "${dirname(1)}/${dirname} • loading component",
|
42
|
+
"**/app/**/loading.tsx": "${dirname} • loading component",
|
43
|
+
|
44
|
+
"**/src/**/route.ts": "${dirname(1)}/${dirname} • route",
|
45
|
+
"**/src/**/index.tsx": "${dirname} • component",
|
46
|
+
|
47
|
+
"**/src/database/repositories/*/index.ts": "${dirname} • db repository",
|
48
|
+
"**/src/database/models/*.ts": "${filename} • db model",
|
49
|
+
"**/src/database/schemas/*.ts": "${filename} • db schema",
|
50
|
+
|
51
|
+
"**/src/services/*.ts": "${filename} • service",
|
52
|
+
"**/src/services/*/client.ts": "${dirname} • client service",
|
53
|
+
"**/src/services/*/server.ts": "${dirname} • server service",
|
54
|
+
|
55
|
+
"**/src/store/*/action.ts": "${dirname} • action",
|
56
|
+
"**/src/store/*/slices/*/action.ts": "${dirname(2)}/${dirname} • action",
|
57
|
+
"**/src/store/*/slices/*/actions/*.ts": "${dirname(1)}/${dirname}/${filename} • action",
|
58
|
+
|
59
|
+
"**/src/store/*/initialState.ts": "${dirname} • state",
|
60
|
+
"**/src/store/*/slices/*/initialState.ts": "${dirname(2)}/${dirname} • state",
|
61
|
+
|
62
|
+
"**/src/store/*/selectors.ts": "${dirname} • selectors",
|
63
|
+
"**/src/store/*/slices/*/selectors.ts": "${dirname(2)}/${dirname} • selectors",
|
64
|
+
|
65
|
+
"**/src/store/*/reducer.ts": "${dirname} • reducer",
|
66
|
+
"**/src/store/*/slices/*/reducer.ts": "${dirname(2)}/${dirname} • reducer",
|
67
|
+
|
68
|
+
"**/src/config/modelProviders/*.ts": "${filename} • provider",
|
69
|
+
"**/src/config/aiModels/*.ts": "${filename} • model",
|
70
|
+
"**/src/config/paramsSchemas/*/*.json": "${dirname(1)}/${filename} • params",
|
71
|
+
"**/src/libs/model-runtime/*/index.ts": "${dirname} • runtime",
|
72
|
+
|
73
|
+
"**/src/server/services/*/index.ts": "${dirname} • server/service",
|
74
|
+
"**/src/server/routers/lambda/*.ts": "${filename} • lambda",
|
75
|
+
"**/src/server/routers/async/*.ts": "${filename} • async",
|
76
|
+
"**/src/server/routers/edge/*.ts": "${filename} • edge",
|
77
|
+
|
78
|
+
"**/src/locales/default/*.ts": "${filename} • locale",
|
79
|
+
},
|
80
|
+
"eslint.validate": [
|
81
|
+
"javascript",
|
82
|
+
"javascriptreact",
|
83
|
+
"typescript",
|
84
|
+
"typescriptreact",
|
85
|
+
"markdown",
|
86
|
+
// support mdx
|
87
|
+
"mdx"
|
88
|
+
]
|
89
|
+
}
|
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,23 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.111.12](https://github.com/lobehub/lobe-chat/compare/v1.111.11...v1.111.12)
|
6
|
+
|
7
|
+
<sup>Released on **2025-08-14**</sup>
|
8
|
+
|
9
|
+
<br/>
|
10
|
+
|
11
|
+
<details>
|
12
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
13
|
+
|
14
|
+
</details>
|
15
|
+
|
16
|
+
<div align="right">
|
17
|
+
|
18
|
+
[](#readme-top)
|
19
|
+
|
20
|
+
</div>
|
21
|
+
|
5
22
|
### [Version 1.111.11](https://github.com/lobehub/lobe-chat/compare/v1.111.10...v1.111.11)
|
6
23
|
|
7
24
|
<sup>Released on **2025-08-13**</sup>
|
package/CLAUDE.md
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
# CLAUDE.md
|
2
|
+
|
3
|
+
This document serves as a shared guideline for all team members when using Claude Code in this repository.
|
4
|
+
|
5
|
+
## Suggestions
|
6
|
+
|
7
|
+
- When searching the project source code, it is recommended to exclude: `src/database/migrations/meta`, `**/*.test.*`, `**/__snapshots__`, `**/fixtures`
|
8
|
+
- 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.
|
9
|
+
|
10
|
+
## Technologies Stack
|
11
|
+
|
12
|
+
read @.cursor/rules/project-introduce.mdc for more details.
|
13
|
+
|
14
|
+
### Directory Structure
|
15
|
+
|
16
|
+
```plaintext
|
17
|
+
src/
|
18
|
+
├── app/ # Next.js App Router
|
19
|
+
├── features/ # Feature-based UI components
|
20
|
+
├── store/ # Zustand state stores
|
21
|
+
├── services/ # Client services (tRPC/Model calls)
|
22
|
+
├── server/ # Server-side (tRPC routers, services)
|
23
|
+
├── database/ # Schemas, models, repositories
|
24
|
+
├── libs/ # External library integrations
|
25
|
+
```
|
26
|
+
|
27
|
+
### Data Flow
|
28
|
+
|
29
|
+
- **Client DB Version**: UI → Zustand → Service → Model → PGLite
|
30
|
+
- **Server DB Version**: UI → Zustand → Service → tRPC → Repository/Model → PostgreSQL
|
31
|
+
|
32
|
+
## Development
|
33
|
+
|
34
|
+
### Git Workflow
|
35
|
+
|
36
|
+
- use rebase for git pull.
|
37
|
+
- git commit message should prefix with gitmoji.
|
38
|
+
- git branch name format example: tj/feat/feature-name
|
39
|
+
- use .github/PULL_REQUEST_TEMPLATE.md to generate pull request description
|
40
|
+
|
41
|
+
### Package Management
|
42
|
+
|
43
|
+
this is a monorepo project and we use `pnpm` as package manager
|
44
|
+
|
45
|
+
### TypeScript Code Style Guide
|
46
|
+
|
47
|
+
see @.cursor/rules/typescript.mdc
|
48
|
+
|
49
|
+
### Modify Code Rules
|
50
|
+
|
51
|
+
- **Code Language**:
|
52
|
+
- For files with existing Chinese comments: Continue using Chinese to maintain consistency
|
53
|
+
- For new files or files without Chinese comments: MUST use American English.
|
54
|
+
- eg: new react tsx file and new test file
|
55
|
+
- Conservative for existing code, modern approaches for new features
|
56
|
+
|
57
|
+
### Testing
|
58
|
+
|
59
|
+
Testing work follows the Rule-Aware Task Execution system above.
|
60
|
+
|
61
|
+
- **Required Rule**: `testing-guide/testing-guide.mdc`
|
62
|
+
- **Command**: `npx vitest run --config vitest.config.ts '[file-path-pattern]'`, wrapped in single quotes to avoid shell expansion
|
63
|
+
|
64
|
+
**Important**:
|
65
|
+
|
66
|
+
- Never run `bun run test` etc to run tests, this will run all tests and cost about 10mins
|
67
|
+
- If try to fix the same test twice, but still failed, stop and ask for help.
|
68
|
+
|
69
|
+
### Typecheck
|
70
|
+
|
71
|
+
- use `bun run type-check` to check type errors.
|
72
|
+
|
73
|
+
### Internationalization
|
74
|
+
|
75
|
+
- **Keys**: Add to `src/locales/default/namespace.ts`
|
76
|
+
- **Dev**: Translate at least `zh-CN` files for preview
|
77
|
+
- **Structure**: Hierarchical nested objects, not flat keys
|
78
|
+
- **Script**: DON'T run `pnpm i18n` (user/CI handles it)
|
79
|
+
|
80
|
+
## Rules Index
|
81
|
+
|
82
|
+
Some useful rules of this project. Read them when needed.
|
83
|
+
|
84
|
+
**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.
|
85
|
+
|
86
|
+
### 📋 Complete Rule Files
|
87
|
+
|
88
|
+
**Core Development**
|
89
|
+
|
90
|
+
- `backend-architecture.mdc` - Three-layer architecture, data flow
|
91
|
+
- `react-component.mdc` - antd-style, Lobe UI usage
|
92
|
+
- `drizzle-schema-style-guide.mdc` - Schema naming, patterns
|
93
|
+
- `define-database-model.mdc` - Model templates, CRUD patterns
|
94
|
+
|
95
|
+
**State & UI**
|
96
|
+
|
97
|
+
- `zustand-slice-organization.mdc` - Store organization
|
98
|
+
- `zustand-action-patterns.mdc` - Action patterns
|
99
|
+
- `packages/react-layout-kit.mdc` - Layout components usage
|
100
|
+
|
101
|
+
**Testing & Quality**
|
102
|
+
|
103
|
+
- `testing-guide/testing-guide.mdc` - Test strategy, mock patterns
|
104
|
+
- `code-review.mdc` - Review process and standards
|
105
|
+
|
106
|
+
**Desktop (Electron)**
|
107
|
+
|
108
|
+
- `desktop-feature-implementation.mdc` - Main/renderer process patterns
|
109
|
+
- `desktop-local-tools-implement.mdc` - Tool integration workflow
|
110
|
+
- `desktop-menu-configuration.mdc` - App menu, context menu, tray menu
|
111
|
+
- `desktop-window-management.mdc` - Window creation, state management, multi-window
|
112
|
+
- `desktop-controller-tests.mdc` - Controller unit testing guide
|
113
|
+
|
114
|
+
**Development Tools**
|
115
|
+
|
116
|
+
- `i18n.mdc` - Internationalization workflow
|
117
|
+
- `debug.mdc` - Debugging strategies
|
package/changelog/v1.json
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.111.
|
3
|
+
"version": "1.111.12",
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
5
5
|
"keywords": [
|
6
6
|
"framework",
|
@@ -4,7 +4,6 @@ const aihubmixModels: AIChatModelCard[] = [
|
|
4
4
|
{
|
5
5
|
abilities: {
|
6
6
|
functionCall: true,
|
7
|
-
imageOutput: true,
|
8
7
|
reasoning: true,
|
9
8
|
search: true,
|
10
9
|
vision: true,
|
@@ -61,7 +60,6 @@ const aihubmixModels: AIChatModelCard[] = [
|
|
61
60
|
{
|
62
61
|
abilities: {
|
63
62
|
functionCall: true,
|
64
|
-
imageOutput: true,
|
65
63
|
reasoning: true,
|
66
64
|
vision: true,
|
67
65
|
},
|
@@ -21,7 +21,6 @@ export const openaiChatModels: AIChatModelCard[] = [
|
|
21
21
|
{
|
22
22
|
abilities: {
|
23
23
|
functionCall: true,
|
24
|
-
imageOutput: true,
|
25
24
|
reasoning: true,
|
26
25
|
search: true,
|
27
26
|
vision: true,
|
@@ -78,7 +77,6 @@ export const openaiChatModels: AIChatModelCard[] = [
|
|
78
77
|
{
|
79
78
|
abilities: {
|
80
79
|
functionCall: true,
|
81
|
-
imageOutput: true,
|
82
80
|
reasoning: true,
|
83
81
|
vision: true,
|
84
82
|
},
|
@@ -31,7 +31,7 @@ export class ClientService implements IFileService {
|
|
31
31
|
|
32
32
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
33
33
|
async checkFileHash(_hash: string) {
|
34
|
-
return { isExist: false, metadata: {} };
|
34
|
+
return { isExist: false, metadata: {}, url: '' };
|
35
35
|
}
|
36
36
|
|
37
37
|
async getFile(id: string): Promise<FileItem> {
|