@lobehub/chat 0.95.1 → 0.96.1
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/issue-auto-comments.yml +72 -0
- package/.github/workflows/issue-close-require.yml +9 -6
- package/CHANGELOG.md +50 -0
- package/README.md +3 -3
- package/README.zh-CN.md +12 -12
- package/locales/en_US/chat.json +3 -0
- package/locales/en_US/error.json +1 -1
- package/locales/en_US/market.json +14 -0
- package/locales/en_US/plugin.json +5 -3
- package/locales/ja_JP/chat.json +3 -0
- package/locales/ja_JP/error.json +1 -1
- package/locales/ja_JP/market.json +14 -0
- package/locales/ja_JP/plugin.json +5 -3
- package/locales/ko_KR/chat.json +3 -0
- package/locales/ko_KR/market.json +14 -0
- package/locales/ko_KR/plugin.json +5 -3
- package/locales/ru_RU/chat.json +3 -0
- package/locales/ru_RU/error.json +1 -1
- package/locales/ru_RU/market.json +14 -0
- package/locales/ru_RU/plugin.json +5 -3
- package/locales/zh_CN/chat.json +3 -0
- package/locales/zh_CN/common.json +0 -1
- package/locales/zh_CN/error.json +1 -1
- package/locales/zh_CN/market.json +14 -0
- package/locales/zh_CN/plugin.json +3 -1
- package/locales/zh_TW/chat.json +3 -0
- package/locales/zh_TW/error.json +1 -1
- package/locales/zh_TW/market.json +14 -0
- package/locales/zh_TW/plugin.json +5 -3
- package/package.json +1 -1
- package/public/images/market_modal_banner.webp +0 -0
- package/src/app/chat/(desktop)/features/SessionList.tsx +12 -2
- package/src/app/chat/features/ChatHeader/ShareButton/Preview.tsx +1 -1
- package/src/app/chat/features/ChatHeader/ShareButton/style.ts +1 -0
- package/src/app/chat/features/Conversation/ChatList/Extras/Translate.tsx +8 -6
- package/src/app/chat/features/SessionListContent/CollapseGroup/index.tsx +1 -1
- package/src/app/chat/features/SessionListContent/Inbox/index.tsx +1 -1
- package/src/app/chat/features/SessionListContent/List/Item/index.tsx +18 -15
- package/src/app/chat/features/SessionListContent/List/index.tsx +7 -6
- package/src/app/chat/features/SessionListContent/index.tsx +37 -13
- package/src/app/chat/settings/features/SubmitAgentButton/index.tsx +0 -1
- package/src/app/market/(desktop)/features/Header.tsx +3 -14
- package/src/app/market/(mobile)/features/Header.tsx +3 -1
- package/src/app/market/features/AgentDetailContent/AgentInfo/index.tsx +5 -1
- package/src/app/market/features/AgentDetailContent/AgentInfo/style.ts +2 -1
- package/src/app/market/features/ShareAgentButton/Inner.tsx +52 -0
- package/src/app/market/features/ShareAgentButton/index.tsx +43 -0
- package/src/features/AgentInfo/index.tsx +3 -2
- package/src/features/AgentSetting/AgentPlugin/PluginSettings.tsx +10 -7
- package/src/features/PluginSettings/index.tsx +10 -7
- package/src/locales/default/chat.ts +3 -1
- package/src/locales/default/common.ts +0 -3
- package/src/locales/default/error.ts +1 -1
- package/src/locales/default/market.ts +14 -0
- package/src/store/global/initialState.ts +2 -0
- package/src/store/global/selectors/preference.ts +10 -0
- package/src/store/global/selectors.ts +1 -0
- package/src/store/session/slices/session/selectors/index.ts +6 -0
- package/src/store/session/slices/session/selectors/list.ts +7 -0
- package/.github/workflows/issue-remove-inactive.yml +0 -26
- package/.github/workflows/pr-welcome.yml +0 -27
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GlobalStore } from '@/store/global';
|
|
2
|
+
|
|
3
|
+
import { initialState } from '../initialState';
|
|
4
|
+
|
|
5
|
+
const sessionGroupKeys = (s: GlobalStore): string[] =>
|
|
6
|
+
s.preference.sessionGroupKeys || initialState.preference.sessionGroupKeys;
|
|
7
|
+
|
|
8
|
+
export const preferenceSelectors = {
|
|
9
|
+
sessionGroupKeys: sessionGroupKeys,
|
|
10
|
+
};
|
|
@@ -7,8 +7,11 @@ import {
|
|
|
7
7
|
currentSessionSafe,
|
|
8
8
|
getSessionById,
|
|
9
9
|
getSessionMetaById,
|
|
10
|
+
hasPinnedSessionList,
|
|
10
11
|
hasSessionList,
|
|
12
|
+
pinnedSessionList,
|
|
11
13
|
sessionList,
|
|
14
|
+
unpinnedSessionList,
|
|
12
15
|
} from './list';
|
|
13
16
|
|
|
14
17
|
const isInboxSession = (s: SessionStore) => s.activeId === INBOX_SESSION_ID;
|
|
@@ -21,7 +24,10 @@ export const sessionSelectors = {
|
|
|
21
24
|
getExportAgent,
|
|
22
25
|
getSessionById,
|
|
23
26
|
getSessionMetaById,
|
|
27
|
+
hasPinnedSessionList,
|
|
24
28
|
hasSessionList,
|
|
25
29
|
isInboxSession,
|
|
30
|
+
pinnedSessionList,
|
|
26
31
|
sessionList,
|
|
32
|
+
unpinnedSessionList,
|
|
27
33
|
};
|
|
@@ -39,10 +39,17 @@ export const sessionList = (s: SessionStore) => {
|
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
+
export const pinnedSessionList = (s: SessionStore) => sessionList(s).filter((s) => s.pinned);
|
|
43
|
+
export const unpinnedSessionList = (s: SessionStore) => sessionList(s).filter((s) => !s.pinned);
|
|
44
|
+
|
|
42
45
|
export const hasSessionList = (s: SessionStore) => {
|
|
43
46
|
const list = sessionList(s);
|
|
44
47
|
return list?.length > 0;
|
|
45
48
|
};
|
|
49
|
+
export const hasPinnedSessionList = (s: SessionStore) => {
|
|
50
|
+
const list = pinnedSessionList(s);
|
|
51
|
+
return list?.length > 0;
|
|
52
|
+
};
|
|
46
53
|
|
|
47
54
|
export const getSessionById =
|
|
48
55
|
(id: string) =>
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
token: ${{ secrets.GH_TOKEN }}
|
|
25
|
-
issue-number: ${{ github.event.issue.number }}
|
|
26
|
-
labels: 'Inactive'
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
name: PR Welcome
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request_target:
|
|
5
|
-
types:
|
|
6
|
-
- closed
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
if_merged:
|
|
10
|
-
name: Check merged and add comment
|
|
11
|
-
if: github.event.pull_request.merged == true
|
|
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
|
-
- uses: actions-cool/pr-welcome@main
|
|
18
|
-
with:
|
|
19
|
-
token: ${{ secrets.GH_TOKEN }}
|
|
20
|
-
comment: |
|
|
21
|
-
❤️ Great PR @${{ github.event.pull_request.user.login }} ❤️
|
|
22
|
-
|
|
23
|
-
The growth of project is inseparable from user feedback and contribution, thanks for your contribution!
|
|
24
|
-
|
|
25
|
-
项目的成长离不开用户反馈和贡献,感谢您的贡献!
|
|
26
|
-
emoji: 'hooray'
|
|
27
|
-
pr-emoji: '+1, heart'
|