@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.
Files changed (61) hide show
  1. package/.github/workflows/issue-auto-comments.yml +72 -0
  2. package/.github/workflows/issue-close-require.yml +9 -6
  3. package/CHANGELOG.md +50 -0
  4. package/README.md +3 -3
  5. package/README.zh-CN.md +12 -12
  6. package/locales/en_US/chat.json +3 -0
  7. package/locales/en_US/error.json +1 -1
  8. package/locales/en_US/market.json +14 -0
  9. package/locales/en_US/plugin.json +5 -3
  10. package/locales/ja_JP/chat.json +3 -0
  11. package/locales/ja_JP/error.json +1 -1
  12. package/locales/ja_JP/market.json +14 -0
  13. package/locales/ja_JP/plugin.json +5 -3
  14. package/locales/ko_KR/chat.json +3 -0
  15. package/locales/ko_KR/market.json +14 -0
  16. package/locales/ko_KR/plugin.json +5 -3
  17. package/locales/ru_RU/chat.json +3 -0
  18. package/locales/ru_RU/error.json +1 -1
  19. package/locales/ru_RU/market.json +14 -0
  20. package/locales/ru_RU/plugin.json +5 -3
  21. package/locales/zh_CN/chat.json +3 -0
  22. package/locales/zh_CN/common.json +0 -1
  23. package/locales/zh_CN/error.json +1 -1
  24. package/locales/zh_CN/market.json +14 -0
  25. package/locales/zh_CN/plugin.json +3 -1
  26. package/locales/zh_TW/chat.json +3 -0
  27. package/locales/zh_TW/error.json +1 -1
  28. package/locales/zh_TW/market.json +14 -0
  29. package/locales/zh_TW/plugin.json +5 -3
  30. package/package.json +1 -1
  31. package/public/images/market_modal_banner.webp +0 -0
  32. package/src/app/chat/(desktop)/features/SessionList.tsx +12 -2
  33. package/src/app/chat/features/ChatHeader/ShareButton/Preview.tsx +1 -1
  34. package/src/app/chat/features/ChatHeader/ShareButton/style.ts +1 -0
  35. package/src/app/chat/features/Conversation/ChatList/Extras/Translate.tsx +8 -6
  36. package/src/app/chat/features/SessionListContent/CollapseGroup/index.tsx +1 -1
  37. package/src/app/chat/features/SessionListContent/Inbox/index.tsx +1 -1
  38. package/src/app/chat/features/SessionListContent/List/Item/index.tsx +18 -15
  39. package/src/app/chat/features/SessionListContent/List/index.tsx +7 -6
  40. package/src/app/chat/features/SessionListContent/index.tsx +37 -13
  41. package/src/app/chat/settings/features/SubmitAgentButton/index.tsx +0 -1
  42. package/src/app/market/(desktop)/features/Header.tsx +3 -14
  43. package/src/app/market/(mobile)/features/Header.tsx +3 -1
  44. package/src/app/market/features/AgentDetailContent/AgentInfo/index.tsx +5 -1
  45. package/src/app/market/features/AgentDetailContent/AgentInfo/style.ts +2 -1
  46. package/src/app/market/features/ShareAgentButton/Inner.tsx +52 -0
  47. package/src/app/market/features/ShareAgentButton/index.tsx +43 -0
  48. package/src/features/AgentInfo/index.tsx +3 -2
  49. package/src/features/AgentSetting/AgentPlugin/PluginSettings.tsx +10 -7
  50. package/src/features/PluginSettings/index.tsx +10 -7
  51. package/src/locales/default/chat.ts +3 -1
  52. package/src/locales/default/common.ts +0 -3
  53. package/src/locales/default/error.ts +1 -1
  54. package/src/locales/default/market.ts +14 -0
  55. package/src/store/global/initialState.ts +2 -0
  56. package/src/store/global/selectors/preference.ts +10 -0
  57. package/src/store/global/selectors.ts +1 -0
  58. package/src/store/session/slices/session/selectors/index.ts +6 -0
  59. package/src/store/session/slices/session/selectors/list.ts +7 -0
  60. package/.github/workflows/issue-remove-inactive.yml +0 -26
  61. 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
+ };
@@ -1 +1,2 @@
1
+ export * from './selectors/preference';
1
2
  export * from './selectors/settings';
@@ -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'