@lobehub/chat 0.1.6
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/.changelogrc.js +1 -0
- package/.commitlintrc.js +1 -0
- package/.editorconfig +16 -0
- package/.eslintignore +32 -0
- package/.eslintrc.js +6 -0
- package/.github/ISSUE_TEMPLATE/1_bug_report.yml +45 -0
- package/.github/ISSUE_TEMPLATE/2_feature_request.yml +21 -0
- package/.github/ISSUE_TEMPLATE/3_question.yml +15 -0
- package/.github/ISSUE_TEMPLATE/4_other.md +7 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +17 -0
- package/.github/dependabot.yml +17 -0
- package/.github/workflows/auto-merge.yml +32 -0
- package/.github/workflows/contributor-help.yml +29 -0
- package/.github/workflows/issue-check-inactive.yml +22 -0
- package/.github/workflows/issue-close-require.yml +46 -0
- package/.github/workflows/issue-remove-inactive.yml +25 -0
- package/.github/workflows/release.yml +34 -0
- package/.github/workflows/test.yml +30 -0
- package/.gitpod.yml +3 -0
- package/.husky/commit-msg +4 -0
- package/.husky/pre-commit +5 -0
- package/.i18nrc.js +13 -0
- package/.prettierignore +63 -0
- package/.prettierrc.js +1 -0
- package/.releaserc.js +1 -0
- package/.remarkrc.js +1 -0
- package/.stylelintrc.js +8 -0
- package/CHANGELOG.md +20 -0
- package/README.md +147 -0
- package/locales/en_US/common.json +41 -0
- package/locales/en_US/setting.json +117 -0
- package/locales/zh_CN/common.json +41 -0
- package/locales/zh_CN/setting.json +117 -0
- package/next.config.mjs +32 -0
- package/package.json +140 -0
- package/public/next.svg +1 -0
- package/public/vercel.svg +1 -0
- package/scripts/genDefaultLocale.ts +18 -0
- package/scripts/genResources.ts +51 -0
- package/scripts/toc.ts +7 -0
- package/src/const/fetch.ts +1 -0
- package/src/const/modelTokens.ts +8 -0
- package/src/features/AvatarWithUpload/index.tsx +27 -0
- package/src/features/FolderPanel/index.tsx +55 -0
- package/src/features/SideBar/index.tsx +35 -0
- package/src/helpers/prompt.test.ts +36 -0
- package/src/helpers/prompt.ts +36 -0
- package/src/helpers/url.ts +17 -0
- package/src/layout/index.tsx +57 -0
- package/src/layout/style.ts +18 -0
- package/src/locales/create.ts +49 -0
- package/src/locales/default/common.ts +41 -0
- package/src/locales/default/setting.ts +117 -0
- package/src/locales/index.ts +5 -0
- package/src/locales/options.ts +19 -0
- package/src/locales/resources/en_US.ts +9 -0
- package/src/locales/resources/index.ts +13 -0
- package/src/locales/resources/zh_CN.ts +9 -0
- package/src/migrations/FromV0ToV1.ts +12 -0
- package/src/migrations/index.ts +13 -0
- package/src/pages/_app.page.tsx +13 -0
- package/src/pages/_document.page.tsx +70 -0
- package/src/pages/api/LangChainStream.ts +95 -0
- package/src/pages/api/chain.api.ts +17 -0
- package/src/pages/api/openai.api.ts +31 -0
- package/src/pages/chat/SessionList/Header.tsx +56 -0
- package/src/pages/chat/SessionList/List/SessionItem.tsx +90 -0
- package/src/pages/chat/SessionList/List/index.tsx +31 -0
- package/src/pages/chat/SessionList/List/style.ts +77 -0
- package/src/pages/chat/SessionList/index.tsx +18 -0
- package/src/pages/chat/[id]/Config/ConfigCell.tsx +68 -0
- package/src/pages/chat/[id]/Config/ReadMode.tsx +63 -0
- package/src/pages/chat/[id]/Config/index.tsx +79 -0
- package/src/pages/chat/[id]/Conversation/ChatList.tsx +36 -0
- package/src/pages/chat/[id]/Conversation/Input.tsx +61 -0
- package/src/pages/chat/[id]/Conversation/index.tsx +32 -0
- package/src/pages/chat/[id]/Header.tsx +86 -0
- package/src/pages/chat/[id]/edit/AgentConfig.tsx +95 -0
- package/src/pages/chat/[id]/edit/AgentMeta.tsx +117 -0
- package/src/pages/chat/[id]/edit/FormItem.tsx +26 -0
- package/src/pages/chat/[id]/edit/Prompt.tsx +68 -0
- package/src/pages/chat/[id]/edit/index.page.tsx +62 -0
- package/src/pages/chat/[id]/edit/style.ts +42 -0
- package/src/pages/chat/[id]/index.page.tsx +40 -0
- package/src/pages/chat/index.page.tsx +1 -0
- package/src/pages/chat/layout.tsx +51 -0
- package/src/pages/index.page.tsx +1 -0
- package/src/pages/setting/Header.tsx +27 -0
- package/src/pages/setting/SettingForm.tsx +299 -0
- package/src/pages/setting/SliderWithInput/index.tsx +40 -0
- package/src/pages/setting/ThemeSwatches/ThemeSwatchesNeutral.tsx +33 -0
- package/src/pages/setting/ThemeSwatches/ThemeSwatchesPrimary.tsx +33 -0
- package/src/pages/setting/ThemeSwatches/index.ts +2 -0
- package/src/pages/setting/index.page.tsx +41 -0
- package/src/prompts/agent.ts +65 -0
- package/src/services/chatModel.ts +34 -0
- package/src/services/langChain.ts +18 -0
- package/src/services/url.ts +8 -0
- package/src/store/middleware/createHashStorage.ts +49 -0
- package/src/store/session/index.ts +33 -0
- package/src/store/session/initialState.ts +11 -0
- package/src/store/session/selectors.ts +3 -0
- package/src/store/session/slices/agentConfig/action.ts +226 -0
- package/src/store/session/slices/agentConfig/index.ts +3 -0
- package/src/store/session/slices/agentConfig/initialState.ts +34 -0
- package/src/store/session/slices/agentConfig/selectors.ts +54 -0
- package/src/store/session/slices/chat/action.ts +210 -0
- package/src/store/session/slices/chat/index.ts +3 -0
- package/src/store/session/slices/chat/initialState.ts +12 -0
- package/src/store/session/slices/chat/messageReducer.test.ts +70 -0
- package/src/store/session/slices/chat/messageReducer.ts +84 -0
- package/src/store/session/slices/chat/selectors.ts +83 -0
- package/src/store/session/slices/session/action.ts +118 -0
- package/src/store/session/slices/session/index.ts +3 -0
- package/src/store/session/slices/session/initialState.ts +31 -0
- package/src/store/session/slices/session/reducers/session.test.ts +456 -0
- package/src/store/session/slices/session/reducers/session.ts +113 -0
- package/src/store/session/slices/session/selectors/chat.ts +4 -0
- package/src/store/session/slices/session/selectors/index.ts +20 -0
- package/src/store/session/slices/session/selectors/list.ts +65 -0
- package/src/store/session/store.ts +17 -0
- package/src/store/settings/action.ts +40 -0
- package/src/store/settings/index.ts +23 -0
- package/src/store/settings/initialState.ts +41 -0
- package/src/store/settings/selectors.ts +17 -0
- package/src/store/settings/store.ts +13 -0
- package/src/styles/antdOverride.ts +33 -0
- package/src/styles/global.ts +23 -0
- package/src/styles/index.ts +6 -0
- package/src/types/chatMessage.ts +46 -0
- package/src/types/exportConfig.ts +44 -0
- package/src/types/global.d.ts +14 -0
- package/src/types/i18next.d.ts +8 -0
- package/src/types/langchain.ts +34 -0
- package/src/types/llm.ts +49 -0
- package/src/types/locale.ts +1 -0
- package/src/types/meta.ts +26 -0
- package/src/types/openai.ts +62 -0
- package/src/types/session.ts +59 -0
- package/src/utils/VersionController.test.ts +90 -0
- package/src/utils/VersionController.ts +64 -0
- package/src/utils/compass.ts +94 -0
- package/src/utils/fetch.ts +132 -0
- package/src/utils/filter.test.ts +120 -0
- package/src/utils/filter.ts +29 -0
- package/src/utils/uploadFIle.ts +8 -0
- package/src/utils/uuid.ts +9 -0
- package/tsconfig.json +31 -0
- package/vitest.config.ts +11 -0
package/.changelogrc.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@lobehub/lint').changelog;
|
package/.commitlintrc.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@lobehub/lint').commitlint;
|
package/.editorconfig
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# http://editorconfig.org
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
indent_style = space
|
|
6
|
+
indent_size = 2
|
|
7
|
+
end_of_line = lf
|
|
8
|
+
charset = utf-8
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
insert_final_newline = true
|
|
11
|
+
|
|
12
|
+
[*.md]
|
|
13
|
+
trim_trailing_whitespace = false
|
|
14
|
+
|
|
15
|
+
[Makefile]
|
|
16
|
+
indent_style = tab
|
package/.eslintignore
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Eslintignore for LobeHub
|
|
2
|
+
################################################################
|
|
3
|
+
|
|
4
|
+
# dependencies
|
|
5
|
+
node_modules
|
|
6
|
+
|
|
7
|
+
# ci
|
|
8
|
+
coverage
|
|
9
|
+
.coverage
|
|
10
|
+
|
|
11
|
+
# test
|
|
12
|
+
jest*
|
|
13
|
+
_test_
|
|
14
|
+
__test__
|
|
15
|
+
*.test.ts
|
|
16
|
+
|
|
17
|
+
# umi
|
|
18
|
+
.umi
|
|
19
|
+
.umi-production
|
|
20
|
+
.umi-test
|
|
21
|
+
.dumi/tmp*
|
|
22
|
+
!.dumirc.ts
|
|
23
|
+
|
|
24
|
+
# production
|
|
25
|
+
dist
|
|
26
|
+
es
|
|
27
|
+
lib
|
|
28
|
+
logs
|
|
29
|
+
|
|
30
|
+
# misc
|
|
31
|
+
# add other ignore file below
|
|
32
|
+
.next
|
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: '🐛 反馈缺陷 Bug Report'
|
|
2
|
+
description: '反馈一个问题缺陷 | Report an bug'
|
|
3
|
+
title: '[Bug] '
|
|
4
|
+
labels: '🐛 Bug'
|
|
5
|
+
body:
|
|
6
|
+
- type: dropdown
|
|
7
|
+
attributes:
|
|
8
|
+
label: '💻 系统环境 | Operating System'
|
|
9
|
+
options:
|
|
10
|
+
- Windows
|
|
11
|
+
- macOS
|
|
12
|
+
- Ubuntu
|
|
13
|
+
- Other Linux
|
|
14
|
+
- Other
|
|
15
|
+
validations:
|
|
16
|
+
required: true
|
|
17
|
+
- type: dropdown
|
|
18
|
+
attributes:
|
|
19
|
+
label: '🌐 浏览器 | Browser'
|
|
20
|
+
options:
|
|
21
|
+
- Chrome
|
|
22
|
+
- Edge
|
|
23
|
+
- Safari
|
|
24
|
+
- Firefox
|
|
25
|
+
- Other
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
- type: textarea
|
|
29
|
+
attributes:
|
|
30
|
+
label: '🐛 问题描述 | Bug Description'
|
|
31
|
+
description: A clear and concise description of the bug.
|
|
32
|
+
validations:
|
|
33
|
+
required: true
|
|
34
|
+
- type: textarea
|
|
35
|
+
attributes:
|
|
36
|
+
label: '🚦 期望结果 | Expected Behavior'
|
|
37
|
+
description: A clear and concise description of what you expected to happen.
|
|
38
|
+
- type: textarea
|
|
39
|
+
attributes:
|
|
40
|
+
label: '📷 复现步骤 | Recurrence Steps'
|
|
41
|
+
description: A clear and concise description of how to recurrence.
|
|
42
|
+
- type: textarea
|
|
43
|
+
attributes:
|
|
44
|
+
label: '📝 补充信息 | Additional Information'
|
|
45
|
+
description: If your problem needs further explanation, or if the issue you're seeing cannot be reproduced in a gist, please add more information here.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: '🌠 功能需求 Feature Request'
|
|
2
|
+
description: '需求或建议 | Suggest an idea'
|
|
3
|
+
title: '[Request] '
|
|
4
|
+
labels: '🌠 Feature Request'
|
|
5
|
+
body:
|
|
6
|
+
- type: textarea
|
|
7
|
+
attributes:
|
|
8
|
+
label: '🥰 需求描述 | Feature Description'
|
|
9
|
+
description: Please add a clear and concise description of the problem you are seeking to solve with this feature request.
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
- type: textarea
|
|
13
|
+
attributes:
|
|
14
|
+
label: '🧐 解决方案 | Proposed Solution'
|
|
15
|
+
description: Describe the solution you'd like in a clear and concise manner.
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
- type: textarea
|
|
19
|
+
attributes:
|
|
20
|
+
label: '📝 补充信息 | Additional Information'
|
|
21
|
+
description: Add any other context about the problem here.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
name: '😇 疑问或帮助 Help Wanted'
|
|
2
|
+
description: '疑问或需要帮助 | Need help'
|
|
3
|
+
title: '[Question] '
|
|
4
|
+
labels: '😇 Help Wanted'
|
|
5
|
+
body:
|
|
6
|
+
- type: textarea
|
|
7
|
+
attributes:
|
|
8
|
+
label: '🧐 问题描述 | Proposed Solution'
|
|
9
|
+
description: A clear and concise description of the proplem.
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
- type: textarea
|
|
13
|
+
attributes:
|
|
14
|
+
label: '📝 补充信息 | Additional Information'
|
|
15
|
+
description: Add any other context about the problem here.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#### 💻 变更类型 | Change Type
|
|
2
|
+
|
|
3
|
+
<!-- For change type, change [ ] to [x]. -->
|
|
4
|
+
|
|
5
|
+
- [ ] ✨ feat
|
|
6
|
+
- [ ] 🐛 fix
|
|
7
|
+
- [ ] 💄 style
|
|
8
|
+
- [ ] 🔨 chore
|
|
9
|
+
- [ ] 📝 docs
|
|
10
|
+
|
|
11
|
+
#### 🔀 变更说明 | Description of Change
|
|
12
|
+
|
|
13
|
+
<!-- Thank you for your Pull Request. Please provide a description above. -->
|
|
14
|
+
|
|
15
|
+
#### 📝 补充信息 | Additional Information
|
|
16
|
+
|
|
17
|
+
<!-- Add any other context about the Pull Request here. -->
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: npm
|
|
4
|
+
directory: '/'
|
|
5
|
+
schedule:
|
|
6
|
+
interval: weekly
|
|
7
|
+
time: '19:00'
|
|
8
|
+
timezone: 'Asia/Shanghai'
|
|
9
|
+
open-pull-requests-limit: 10
|
|
10
|
+
versioning-strategy: increase
|
|
11
|
+
|
|
12
|
+
- package-ecosystem: 'github-actions'
|
|
13
|
+
directory: '/'
|
|
14
|
+
schedule:
|
|
15
|
+
interval: monthly
|
|
16
|
+
time: '19:00'
|
|
17
|
+
timezone: 'Asia/Shanghai'
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Dependabot Auto Merge
|
|
2
|
+
on:
|
|
3
|
+
pull_request_target:
|
|
4
|
+
types: [labeled, edited]
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
merge:
|
|
8
|
+
if: contains(github.event.pull_request.labels.*.name, 'dependencies')
|
|
9
|
+
name: Dependabot Auto Merge
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v3
|
|
13
|
+
|
|
14
|
+
- name: Install pnpm
|
|
15
|
+
uses: pnpm/action-setup@v2
|
|
16
|
+
with:
|
|
17
|
+
version: 7
|
|
18
|
+
|
|
19
|
+
- name: Setup Node.js environment
|
|
20
|
+
uses: actions/setup-node@v3
|
|
21
|
+
with:
|
|
22
|
+
node-version: '18'
|
|
23
|
+
|
|
24
|
+
- name: Install deps
|
|
25
|
+
run: pnpm install
|
|
26
|
+
|
|
27
|
+
- name: Merge
|
|
28
|
+
uses: ahmadnassri/action-dependabot-auto-merge@v2
|
|
29
|
+
with:
|
|
30
|
+
command: merge
|
|
31
|
+
target: minor
|
|
32
|
+
github-token: ${{ secrets.GH_TOKEN }}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Contributor Helper
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
# 🌏 Think about the planet! No need to update stats too frequently
|
|
5
|
+
schedule: [{ cron: '0 18 * * *' }]
|
|
6
|
+
# 💡 The following line lets you run workflow manually from the action tab!
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
jobs:
|
|
9
|
+
contributor:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@master
|
|
13
|
+
|
|
14
|
+
- uses: actions-cool/contributor-helper@v1
|
|
15
|
+
with:
|
|
16
|
+
token: ${{ secrets.GH_TOKEN }}
|
|
17
|
+
style: 'simple'
|
|
18
|
+
update-files: 'README.md'
|
|
19
|
+
update-places: '<!-- CONTRIBUTION GROUP -->/<!-- CONTRIBUTION END -->'
|
|
20
|
+
|
|
21
|
+
- name: Commit and push if changed
|
|
22
|
+
run: |-
|
|
23
|
+
git diff
|
|
24
|
+
git config --global user.email "actions@github.com"
|
|
25
|
+
git config --global user.name "github-actions"
|
|
26
|
+
git pull
|
|
27
|
+
git add -A
|
|
28
|
+
git commit -m "🤖 docs: Auto update contributors" || exit 0
|
|
29
|
+
git push
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Issue Check Inactive
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: '0 0 */15 * *'
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
issue-check-inactive:
|
|
12
|
+
permissions:
|
|
13
|
+
issues: write # for actions-cool/issues-helper to update issues
|
|
14
|
+
pull-requests: write # for actions-cool/issues-helper to update PRs
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- name: check-inactive
|
|
18
|
+
uses: actions-cool/issues-helper@v3
|
|
19
|
+
with:
|
|
20
|
+
actions: 'check-inactive'
|
|
21
|
+
inactive-label: 'Inactive'
|
|
22
|
+
inactive-day: 30
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Issue Close Require
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: '0 0 * * *'
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
issue-close-require:
|
|
12
|
+
permissions:
|
|
13
|
+
issues: write # for actions-cool/issues-helper to update issues
|
|
14
|
+
pull-requests: write # for actions-cool/issues-helper to update PRs
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- name: need reproduce
|
|
18
|
+
uses: actions-cool/issues-helper@v3
|
|
19
|
+
with:
|
|
20
|
+
actions: 'close-issues'
|
|
21
|
+
labels: '✅ Fixed'
|
|
22
|
+
inactive-day: 3
|
|
23
|
+
body: |
|
|
24
|
+
Since the issue was labeled with `✅ Fixed`, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.
|
|
25
|
+
|
|
26
|
+
由于该 issue 被标记为已修复,同时 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。
|
|
27
|
+
- name: need reproduce
|
|
28
|
+
uses: actions-cool/issues-helper@v3
|
|
29
|
+
with:
|
|
30
|
+
actions: 'close-issues'
|
|
31
|
+
labels: '🤔 Need Reproduce'
|
|
32
|
+
inactive-day: 3
|
|
33
|
+
body: |
|
|
34
|
+
Since the issue was labeled with `🤔 Need Reproduce`, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.
|
|
35
|
+
|
|
36
|
+
由于该 issue 被标记为需要更多信息,却 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。
|
|
37
|
+
- name: need reproduce
|
|
38
|
+
uses: actions-cool/issues-helper@v3
|
|
39
|
+
with:
|
|
40
|
+
actions: 'close-issues'
|
|
41
|
+
labels: "🙅🏻♀️ WON'T DO"
|
|
42
|
+
inactive-day: 3
|
|
43
|
+
body: |
|
|
44
|
+
Since the issue was labeled with `🙅🏻♀️ WON'T DO`, and no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.
|
|
45
|
+
|
|
46
|
+
由于该 issue 被标记为暂不处理,同时 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Issue Remove Inactive
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
issues:
|
|
5
|
+
types: [edited]
|
|
6
|
+
issue_comment:
|
|
7
|
+
types: [created, edited]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
issue-remove-inactive:
|
|
14
|
+
permissions:
|
|
15
|
+
issues: write # for actions-cool/issues-helper to update issues
|
|
16
|
+
pull-requests: write # for actions-cool/issues-helper to update PRs
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- name: remove inactive
|
|
20
|
+
if: github.event.issue.state == 'open' && github.actor == github.event.issue.user.login
|
|
21
|
+
uses: actions-cool/issues-helper@v3
|
|
22
|
+
with:
|
|
23
|
+
actions: 'remove-labels'
|
|
24
|
+
issue-number: ${{ github.event.issue.number }}
|
|
25
|
+
labels: 'Inactive'
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Release CI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- master
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
release:
|
|
9
|
+
name: Release
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v3
|
|
13
|
+
|
|
14
|
+
- name: Install pnpm
|
|
15
|
+
uses: pnpm/action-setup@v2
|
|
16
|
+
with:
|
|
17
|
+
version: 8
|
|
18
|
+
|
|
19
|
+
- name: Setup Node.js environment
|
|
20
|
+
uses: actions/setup-node@v3
|
|
21
|
+
with:
|
|
22
|
+
node-version: '18'
|
|
23
|
+
|
|
24
|
+
- name: Install deps
|
|
25
|
+
run: pnpm install
|
|
26
|
+
|
|
27
|
+
- name: Test
|
|
28
|
+
run: pnpm run test
|
|
29
|
+
|
|
30
|
+
- name: release
|
|
31
|
+
run: pnpm run release
|
|
32
|
+
env:
|
|
33
|
+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
34
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Test CI
|
|
2
|
+
on: [push, pull_request]
|
|
3
|
+
jobs:
|
|
4
|
+
test:
|
|
5
|
+
runs-on: ubuntu-latest
|
|
6
|
+
|
|
7
|
+
steps:
|
|
8
|
+
- uses: actions/checkout@v3
|
|
9
|
+
|
|
10
|
+
- name: Install pnpm
|
|
11
|
+
uses: pnpm/action-setup@v2
|
|
12
|
+
with:
|
|
13
|
+
version: 8
|
|
14
|
+
|
|
15
|
+
- name: Setup Node.js environment
|
|
16
|
+
uses: actions/setup-node@v3
|
|
17
|
+
with:
|
|
18
|
+
node-version: '18'
|
|
19
|
+
|
|
20
|
+
- name: Install deps
|
|
21
|
+
run: pnpm install
|
|
22
|
+
|
|
23
|
+
- name: lint
|
|
24
|
+
run: pnpm run lint
|
|
25
|
+
|
|
26
|
+
- name: Test and coverage
|
|
27
|
+
run: pnpm run test:coverage
|
|
28
|
+
|
|
29
|
+
- name: Upload coverage to Codecov
|
|
30
|
+
uses: codecov/codecov-action@v3
|
package/.gitpod.yml
ADDED
package/.i18nrc.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { description } = require('./package.json');
|
|
2
|
+
const { defineConfig } = require('@lobehub/i18n-cli');
|
|
3
|
+
|
|
4
|
+
module.exports = defineConfig({
|
|
5
|
+
reference: description,
|
|
6
|
+
entry: 'locales/zh_CN',
|
|
7
|
+
entryLocale: 'zh_CN',
|
|
8
|
+
output: 'locales',
|
|
9
|
+
outputLocales: ['en_US'],
|
|
10
|
+
splitToken: 2500,
|
|
11
|
+
temperature: 0,
|
|
12
|
+
modelName: 'gpt-3.5-turbo',
|
|
13
|
+
});
|
package/.prettierignore
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Prettierignore for LobeHub
|
|
2
|
+
################################################################
|
|
3
|
+
|
|
4
|
+
# general
|
|
5
|
+
.DS_Store
|
|
6
|
+
.editorconfig
|
|
7
|
+
.idea
|
|
8
|
+
.vscode
|
|
9
|
+
.history
|
|
10
|
+
.temp
|
|
11
|
+
.env.local
|
|
12
|
+
.husky
|
|
13
|
+
.npmrc
|
|
14
|
+
.gitkeep
|
|
15
|
+
venv
|
|
16
|
+
temp
|
|
17
|
+
tmp
|
|
18
|
+
LICENSE
|
|
19
|
+
|
|
20
|
+
# dependencies
|
|
21
|
+
node_modules
|
|
22
|
+
*.log
|
|
23
|
+
*.lock
|
|
24
|
+
package-lock.json
|
|
25
|
+
|
|
26
|
+
# ci
|
|
27
|
+
coverage
|
|
28
|
+
.coverage
|
|
29
|
+
.eslintcache
|
|
30
|
+
.stylelintcache
|
|
31
|
+
test-output
|
|
32
|
+
__snapshots__
|
|
33
|
+
*.snap
|
|
34
|
+
|
|
35
|
+
# production
|
|
36
|
+
dist
|
|
37
|
+
es
|
|
38
|
+
lib
|
|
39
|
+
logs
|
|
40
|
+
|
|
41
|
+
# umi
|
|
42
|
+
.umi
|
|
43
|
+
.umi-production
|
|
44
|
+
.umi-test
|
|
45
|
+
.dumi/tmp*
|
|
46
|
+
|
|
47
|
+
# ignore files
|
|
48
|
+
.*ignore
|
|
49
|
+
|
|
50
|
+
# docker
|
|
51
|
+
docker
|
|
52
|
+
Dockerfile*
|
|
53
|
+
|
|
54
|
+
# image
|
|
55
|
+
*.webp
|
|
56
|
+
*.gif
|
|
57
|
+
*.png
|
|
58
|
+
*.jpg
|
|
59
|
+
*.svg
|
|
60
|
+
|
|
61
|
+
# misc
|
|
62
|
+
# add other ignore file below
|
|
63
|
+
.next
|
package/.prettierrc.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@lobehub/lint').prettier;
|
package/.releaserc.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@lobehub/lint').semanticRelease;
|
package/.remarkrc.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@lobehub/lint').remarklint;
|
package/.stylelintrc.js
ADDED
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<a name="readme-top"></a>
|
|
2
|
+
|
|
3
|
+
# Changelog
|
|
4
|
+
|
|
5
|
+
### [Version 0.1.6](https://github.com/lobehub/lobe-chat/compare/v0.1.5...v0.1.6)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-07-18**</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>
|