@lobehub/chat 0.96.0 → 0.96.2
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/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/banner_market_modal.webp +0 -0
- 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/Inbox/index.tsx +3 -1
- package/src/app/chat/features/SessionListContent/List/Item/index.tsx +5 -6
- 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 +53 -0
- package/src/app/market/features/ShareAgentButton/index.tsx +43 -0
- package/src/app/settings/features/SideBar/Item.tsx +6 -1
- package/src/app/settings/features/SideBar/index.tsx +3 -1
- package/src/const/url.ts +1 -0
- package/src/features/AgentInfo/index.tsx +3 -2
- package/src/features/AgentSetting/AgentPlugin/MarketList.tsx +22 -26
- package/src/features/AgentSetting/AgentPlugin/MarketSettingModal.tsx +9 -2
- package/src/features/AgentSetting/AgentPlugin/PluginSettings.tsx +10 -7
- package/src/features/PluginDevModal/index.tsx +13 -1
- package/src/features/PluginSettings/index.tsx +10 -7
- package/src/locales/default/common.ts +0 -2
- package/src/locales/default/error.ts +1 -1
- package/src/locales/default/market.ts +14 -0
- package/.github/workflows/issue-remove-inactive.yml +0 -26
- package/.github/workflows/pr-welcome.yml +0 -27
|
@@ -5,6 +5,7 @@ import Link from 'next/link';
|
|
|
5
5
|
import { memo, useMemo, useRef } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
|
|
8
|
+
import { useStyles } from '@/app/chat/features/SessionListContent/List/Item';
|
|
8
9
|
import { DEFAULT_INBOX_AVATAR } from '@/const/meta';
|
|
9
10
|
import { INBOX_SESSION_ID } from '@/const/session';
|
|
10
11
|
import { SESSION_CHAT_URL } from '@/const/url';
|
|
@@ -14,6 +15,7 @@ const { Item } = List;
|
|
|
14
15
|
|
|
15
16
|
const Inbox = memo(() => {
|
|
16
17
|
const ref = useRef(null);
|
|
18
|
+
const { styles } = useStyles();
|
|
17
19
|
const isHovering = useHover(ref);
|
|
18
20
|
const { t } = useTranslation('chat');
|
|
19
21
|
const { mobile } = useResponsive();
|
|
@@ -48,8 +50,8 @@ const Inbox = memo(() => {
|
|
|
48
50
|
<Item
|
|
49
51
|
active={mobile ? false : activeId === INBOX_SESSION_ID}
|
|
50
52
|
avatar={avatarRender}
|
|
53
|
+
className={styles.container}
|
|
51
54
|
ref={ref}
|
|
52
|
-
style={{ alignItems: 'center', borderRadius: 8 }}
|
|
53
55
|
title={t('inbox.title')}
|
|
54
56
|
/>
|
|
55
57
|
</Link>
|
|
@@ -14,15 +14,14 @@ import Actions from './Actions';
|
|
|
14
14
|
|
|
15
15
|
const { Item } = List;
|
|
16
16
|
|
|
17
|
-
const useStyles = createStyles(({ css }) => {
|
|
17
|
+
export const useStyles = createStyles(({ css, token, responsive }) => {
|
|
18
18
|
return {
|
|
19
19
|
container: css`
|
|
20
20
|
position: relative;
|
|
21
|
-
border-radius:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
z-index: 2000;
|
|
21
|
+
border-radius: ${token.borderRadius}px;
|
|
22
|
+
${responsive.mobile} {
|
|
23
|
+
border-radius: 0;
|
|
24
|
+
}
|
|
26
25
|
`,
|
|
27
26
|
};
|
|
28
27
|
});
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { ChatHeader,
|
|
2
|
-
import { Button } from 'antd';
|
|
1
|
+
import { ChatHeader, Logo } from '@lobehub/ui';
|
|
3
2
|
import { createStyles } from 'antd-style';
|
|
4
|
-
import { Bot } from 'lucide-react';
|
|
5
3
|
import Link from 'next/link';
|
|
6
4
|
import { memo } from 'react';
|
|
7
|
-
import { useTranslation } from 'react-i18next';
|
|
8
5
|
|
|
9
|
-
import
|
|
6
|
+
import ShareAgentButton from '../../features/ShareAgentButton';
|
|
10
7
|
|
|
11
8
|
export const useStyles = createStyles(({ css, token }) => ({
|
|
12
9
|
logo: css`
|
|
@@ -17,7 +14,6 @@ export const useStyles = createStyles(({ css, token }) => ({
|
|
|
17
14
|
|
|
18
15
|
const Header = memo(() => {
|
|
19
16
|
const { styles } = useStyles();
|
|
20
|
-
const { t } = useTranslation('market');
|
|
21
17
|
|
|
22
18
|
return (
|
|
23
19
|
<ChatHeader
|
|
@@ -26,14 +22,7 @@ const Header = memo(() => {
|
|
|
26
22
|
<Logo className={styles.logo} extra={'Discover'} size={36} type={'text'} />
|
|
27
23
|
</Link>
|
|
28
24
|
}
|
|
29
|
-
right={
|
|
30
|
-
<Button
|
|
31
|
-
icon={<Icon icon={Bot} />}
|
|
32
|
-
onClick={() => window.open(AGENTS_INDEX_GITHUB, '__blank')}
|
|
33
|
-
>
|
|
34
|
-
{t('submitAgent')}
|
|
35
|
-
</Button>
|
|
36
|
-
}
|
|
25
|
+
right={<ShareAgentButton />}
|
|
37
26
|
/>
|
|
38
27
|
);
|
|
39
28
|
});
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Logo, MobileNavBar } from '@lobehub/ui';
|
|
2
2
|
import { memo } from 'react';
|
|
3
3
|
|
|
4
|
+
import ShareAgentButton from '../../features/ShareAgentButton';
|
|
5
|
+
|
|
4
6
|
const Header = memo(() => {
|
|
5
|
-
return <MobileNavBar center={<Logo type={'text'} />} />;
|
|
7
|
+
return <MobileNavBar center={<Logo type={'text'} />} right={<ShareAgentButton mobile />} />;
|
|
6
8
|
});
|
|
7
9
|
|
|
8
10
|
export default Header;
|
|
@@ -59,7 +59,11 @@ const AgentModalInner = memo(() => {
|
|
|
59
59
|
/>
|
|
60
60
|
</Flexbox>
|
|
61
61
|
<Flexbox style={{ padding: 16 }}>
|
|
62
|
-
{tab === InfoTabs.prompt &&
|
|
62
|
+
{tab === InfoTabs.prompt && (
|
|
63
|
+
<Markdown className={styles.markdown} fullFeaturedCodeBlock>
|
|
64
|
+
{systemRole}
|
|
65
|
+
</Markdown>
|
|
66
|
+
)}
|
|
63
67
|
{tab === InfoTabs.comment && <Comment identifier={identifier} />}
|
|
64
68
|
</Flexbox>
|
|
65
69
|
</>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createStyles } from 'antd-style';
|
|
2
2
|
|
|
3
|
-
export const useStyles = createStyles(({ css, token, prefixCls }) => ({
|
|
3
|
+
export const useStyles = createStyles(({ css, token, prefixCls, stylish }) => ({
|
|
4
4
|
author: css`
|
|
5
5
|
font-size: 12px;
|
|
6
6
|
`,
|
|
@@ -27,6 +27,7 @@ export const useStyles = createStyles(({ css, token, prefixCls }) => ({
|
|
|
27
27
|
flex-direction: column;
|
|
28
28
|
}
|
|
29
29
|
`,
|
|
30
|
+
markdown: stylish.markdownInChat,
|
|
30
31
|
nav: css`
|
|
31
32
|
padding-top: 4px;
|
|
32
33
|
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Icon } from '@lobehub/ui';
|
|
2
|
+
import { Button, Divider, Tag } from 'antd';
|
|
3
|
+
import { Github, Settings, Share2 } from 'lucide-react';
|
|
4
|
+
import Image from 'next/image';
|
|
5
|
+
import { memo } from 'react';
|
|
6
|
+
import { useTranslation } from 'react-i18next';
|
|
7
|
+
|
|
8
|
+
import MobilePadding from '@/components/MobilePadding';
|
|
9
|
+
import { AGENTS_INDEX_GITHUB } from '@/const/url';
|
|
10
|
+
|
|
11
|
+
const Inner = memo(() => {
|
|
12
|
+
const { t } = useTranslation('market');
|
|
13
|
+
return (
|
|
14
|
+
<MobilePadding>
|
|
15
|
+
<Image
|
|
16
|
+
alt={'banner'}
|
|
17
|
+
height={602}
|
|
18
|
+
src={'/images/banner_market_modal.webp'}
|
|
19
|
+
style={{ height: 'auto', marginBottom: 24, width: '100%' }}
|
|
20
|
+
width={1602}
|
|
21
|
+
/>
|
|
22
|
+
<h3>
|
|
23
|
+
<Tag color={'cyan'}>{t('guide.func1.tag')}</Tag>
|
|
24
|
+
<span>{t('guide.func1.title')}</span>
|
|
25
|
+
</h3>
|
|
26
|
+
<p>
|
|
27
|
+
<Icon icon={Settings} />
|
|
28
|
+
{' - '}
|
|
29
|
+
{t('guide.func1.desc1')}
|
|
30
|
+
<br />
|
|
31
|
+
<Icon icon={Share2} />
|
|
32
|
+
{' - '}
|
|
33
|
+
{t('guide.func1.desc2')}
|
|
34
|
+
</p>
|
|
35
|
+
<Divider />
|
|
36
|
+
<h3>
|
|
37
|
+
<Tag color={'cyan'}>{t('guide.func2.tag')}</Tag>
|
|
38
|
+
<span>{t('guide.func2.title')}</span>
|
|
39
|
+
</h3>
|
|
40
|
+
<p>{t('guide.func2.desc')}</p>
|
|
41
|
+
<br />
|
|
42
|
+
<Button
|
|
43
|
+
icon={<Icon icon={Github} />}
|
|
44
|
+
onClick={() => window.open(AGENTS_INDEX_GITHUB, '__blank')}
|
|
45
|
+
type={'primary'}
|
|
46
|
+
>
|
|
47
|
+
{t('guide.func2.button')}
|
|
48
|
+
</Button>
|
|
49
|
+
</MobilePadding>
|
|
50
|
+
);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export default Inner;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ActionIcon, Icon, Modal } from '@lobehub/ui';
|
|
2
|
+
import { Button } from 'antd';
|
|
3
|
+
import { Share2 } from 'lucide-react';
|
|
4
|
+
import { memo, useState } from 'react';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
|
+
|
|
7
|
+
import { MOBILE_HEADER_ICON_SIZE } from '@/const/layoutTokens';
|
|
8
|
+
|
|
9
|
+
import Inner from './Inner';
|
|
10
|
+
|
|
11
|
+
const ShareAgentButton = memo<{ mobile?: boolean }>(({ mobile }) => {
|
|
12
|
+
const { t } = useTranslation('market');
|
|
13
|
+
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
14
|
+
|
|
15
|
+
const buttonContent = mobile ? (
|
|
16
|
+
<ActionIcon
|
|
17
|
+
icon={Share2}
|
|
18
|
+
onClick={() => setIsModalOpen(true)}
|
|
19
|
+
size={MOBILE_HEADER_ICON_SIZE}
|
|
20
|
+
title={t('submitAgent')}
|
|
21
|
+
/>
|
|
22
|
+
) : (
|
|
23
|
+
<Button icon={<Icon icon={Share2} />} onClick={() => setIsModalOpen(true)}>
|
|
24
|
+
{t('submitAgent')}
|
|
25
|
+
</Button>
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<>
|
|
30
|
+
{buttonContent}
|
|
31
|
+
<Modal
|
|
32
|
+
footer={null}
|
|
33
|
+
onCancel={() => setIsModalOpen(false)}
|
|
34
|
+
open={isModalOpen}
|
|
35
|
+
title={t('submitAgent')}
|
|
36
|
+
>
|
|
37
|
+
<Inner />
|
|
38
|
+
</Modal>
|
|
39
|
+
</>
|
|
40
|
+
);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export default ShareAgentButton;
|
|
@@ -5,10 +5,15 @@ import { CSSProperties, ReactNode, memo } from 'react';
|
|
|
5
5
|
|
|
6
6
|
const { Item } = List;
|
|
7
7
|
|
|
8
|
-
const useStyles = createStyles(({ css }) => ({
|
|
8
|
+
const useStyles = createStyles(({ css, token, responsive }) => ({
|
|
9
9
|
container: css`
|
|
10
|
+
position: relative;
|
|
10
11
|
padding-top: 20px;
|
|
11
12
|
padding-bottom: 20px;
|
|
13
|
+
border-radius: ${token.borderRadius}px;
|
|
14
|
+
${responsive.mobile} {
|
|
15
|
+
border-radius: 0;
|
|
16
|
+
}
|
|
12
17
|
`,
|
|
13
18
|
}));
|
|
14
19
|
|
package/src/const/url.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { INBOX_SESSION_ID } from './session';
|
|
|
10
10
|
export const GITHUB = pkg.homepage;
|
|
11
11
|
export const CHANGELOG = urlJoin(GITHUB, 'blob/master/CHANGELOG.md');
|
|
12
12
|
export const WIKI = urlJoin(GITHUB, 'wiki');
|
|
13
|
+
export const WIKI_PLUGIN_GUIDE = urlJoin(WIKI, 'Plugin-Development');
|
|
13
14
|
export const ABOUT = pkg.homepage;
|
|
14
15
|
export const FEEDBACK = pkg.bugs.url;
|
|
15
16
|
export const DISCORD = 'https://discord.gg/AYFPHvv2jT';
|
|
@@ -7,7 +7,7 @@ import { Center } from 'react-layout-kit';
|
|
|
7
7
|
|
|
8
8
|
import { MetaData } from '@/types/meta';
|
|
9
9
|
|
|
10
|
-
const useStyles = createStyles(({ css, token }) => ({
|
|
10
|
+
const useStyles = createStyles(({ css, token, stylish }) => ({
|
|
11
11
|
avatar: css`
|
|
12
12
|
flex: none;
|
|
13
13
|
`,
|
|
@@ -15,6 +15,7 @@ const useStyles = createStyles(({ css, token }) => ({
|
|
|
15
15
|
color: ${token.colorTextDescription};
|
|
16
16
|
text-align: center;
|
|
17
17
|
`,
|
|
18
|
+
markdown: stylish.markdownInChat,
|
|
18
19
|
|
|
19
20
|
title: css`
|
|
20
21
|
font-size: 20px;
|
|
@@ -59,7 +60,7 @@ const AgentInfo = memo<AgentInfoProps>(({ systemRole, style, meta }) => {
|
|
|
59
60
|
{systemRole && (
|
|
60
61
|
<>
|
|
61
62
|
<Divider style={{ margin: '8px 0' }} />
|
|
62
|
-
<Markdown>{systemRole}</Markdown>
|
|
63
|
+
<Markdown className={styles.markdown}>{systemRole}</Markdown>
|
|
63
64
|
</>
|
|
64
65
|
)}
|
|
65
66
|
</Center>
|
|
@@ -181,7 +181,17 @@ const MarketList = memo(() => {
|
|
|
181
181
|
{
|
|
182
182
|
children: isEmpty ? loadingList : [...deprecatedList, ...customList, ...list],
|
|
183
183
|
extra: (
|
|
184
|
-
<
|
|
184
|
+
<Space.Compact style={{ width: 'auto' }}>
|
|
185
|
+
<Button
|
|
186
|
+
icon={<Icon icon={LucideBlocks} />}
|
|
187
|
+
onClick={(e) => {
|
|
188
|
+
e.stopPropagation();
|
|
189
|
+
setModal(true);
|
|
190
|
+
}}
|
|
191
|
+
size={'small'}
|
|
192
|
+
>
|
|
193
|
+
{t('settingPlugin.addTooltip')}
|
|
194
|
+
</Button>
|
|
185
195
|
{hasDeprecated ? (
|
|
186
196
|
<Tooltip title={t('settingPlugin.clearDeprecated')}>
|
|
187
197
|
<Button
|
|
@@ -193,34 +203,20 @@ const MarketList = memo(() => {
|
|
|
193
203
|
}
|
|
194
204
|
}}
|
|
195
205
|
size={'small'}
|
|
196
|
-
type={'text'}
|
|
197
206
|
/>
|
|
198
207
|
</Tooltip>
|
|
199
208
|
) : null}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
</Tooltip>
|
|
212
|
-
<Tooltip title={t('settingPlugin.settings')}>
|
|
213
|
-
<Button
|
|
214
|
-
icon={<Icon icon={LucideSettings} />}
|
|
215
|
-
onClick={(e) => {
|
|
216
|
-
e.stopPropagation();
|
|
217
|
-
setShowSettings(true);
|
|
218
|
-
}}
|
|
219
|
-
size={'small'}
|
|
220
|
-
/>
|
|
221
|
-
</Tooltip>
|
|
222
|
-
</Space.Compact>
|
|
223
|
-
</Flexbox>
|
|
209
|
+
<Tooltip title={t('settingPlugin.settings')}>
|
|
210
|
+
<Button
|
|
211
|
+
icon={<Icon icon={LucideSettings} />}
|
|
212
|
+
onClick={(e) => {
|
|
213
|
+
e.stopPropagation();
|
|
214
|
+
setShowSettings(true);
|
|
215
|
+
}}
|
|
216
|
+
size={'small'}
|
|
217
|
+
/>
|
|
218
|
+
</Tooltip>
|
|
219
|
+
</Space.Compact>
|
|
224
220
|
),
|
|
225
221
|
icon: LucideStore,
|
|
226
222
|
title: t('settingPlugin.title'),
|
|
@@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
5
5
|
import { Flexbox } from 'react-layout-kit';
|
|
6
6
|
|
|
7
7
|
import MobilePadding from '@/components/MobilePadding';
|
|
8
|
-
import { PLUGINS_INDEX_URL } from '@/const/url';
|
|
8
|
+
import { PLUGINS_INDEX_URL, WIKI_PLUGIN_GUIDE } from '@/const/url';
|
|
9
9
|
|
|
10
10
|
interface MarketSettingModalProps {
|
|
11
11
|
onOpenChange: (open: boolean) => void;
|
|
@@ -34,7 +34,14 @@ const MarketSettingModal = memo<MarketSettingModalProps>(({ open, onOpenChange }
|
|
|
34
34
|
style={{ width: '100%' }}
|
|
35
35
|
/>
|
|
36
36
|
),
|
|
37
|
-
desc:
|
|
37
|
+
desc: (
|
|
38
|
+
<>
|
|
39
|
+
{t('dev.modalDesc')}
|
|
40
|
+
<a href={WIKI_PLUGIN_GUIDE} rel="noreferrer" target={'_blank'}>
|
|
41
|
+
{WIKI_PLUGIN_GUIDE}
|
|
42
|
+
</a>
|
|
43
|
+
</>
|
|
44
|
+
),
|
|
38
45
|
label: t('settings.indexUrl.title'),
|
|
39
46
|
},
|
|
40
47
|
],
|
|
@@ -12,12 +12,15 @@ import { pluginHelpers, pluginSelectors, usePluginStore } from '@/store/plugin';
|
|
|
12
12
|
|
|
13
13
|
import { useStore } from '../store';
|
|
14
14
|
|
|
15
|
-
const useStyles = createStyles(({ css, token }) => ({
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
const useStyles = createStyles(({ css, token, cx, stylish }) => ({
|
|
16
|
+
markdown: cx(
|
|
17
|
+
stylish.markdownInChat,
|
|
18
|
+
css`
|
|
19
|
+
p {
|
|
20
|
+
color: ${token.colorTextDescription};
|
|
21
|
+
}
|
|
22
|
+
`,
|
|
23
|
+
),
|
|
21
24
|
}));
|
|
22
25
|
|
|
23
26
|
const PluginSettings = memo(() => {
|
|
@@ -62,7 +65,7 @@ const PluginSettings = memo(() => {
|
|
|
62
65
|
type={item.type as any}
|
|
63
66
|
/>
|
|
64
67
|
),
|
|
65
|
-
desc: item.desc && <Markdown className={styles.
|
|
68
|
+
desc: item.desc && <Markdown className={styles.markdown}>{item.desc}</Markdown>,
|
|
66
69
|
})),
|
|
67
70
|
icon: ToyBrick,
|
|
68
71
|
title: t('settingPlugin.config', { id: pluginHelpers.getPluginTitle(item.meta) }),
|
|
@@ -6,6 +6,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
6
6
|
import { Flexbox } from 'react-layout-kit';
|
|
7
7
|
|
|
8
8
|
import MobilePadding from '@/components/MobilePadding';
|
|
9
|
+
import { WIKI_PLUGIN_GUIDE } from '@/const/url';
|
|
9
10
|
import { CustomPlugin } from '@/types/plugin';
|
|
10
11
|
|
|
11
12
|
import ManifestForm from './ManifestForm';
|
|
@@ -102,7 +103,18 @@ const DevModal = memo<DevModalProps>(
|
|
|
102
103
|
>
|
|
103
104
|
<Flexbox gap={mobile ? 0 : 16}>
|
|
104
105
|
<MobilePadding bottom={0} gap={16}>
|
|
105
|
-
<Alert
|
|
106
|
+
<Alert
|
|
107
|
+
message={
|
|
108
|
+
<>
|
|
109
|
+
{t('dev.modalDesc')}
|
|
110
|
+
<a href={WIKI_PLUGIN_GUIDE} rel="noreferrer" target={'_blank'}>
|
|
111
|
+
{WIKI_PLUGIN_GUIDE}
|
|
112
|
+
</a>
|
|
113
|
+
</>
|
|
114
|
+
}
|
|
115
|
+
showIcon
|
|
116
|
+
type={'info'}
|
|
117
|
+
/>
|
|
106
118
|
{/*<Tabs*/}
|
|
107
119
|
{/* items={[*/}
|
|
108
120
|
{/* { children: <MetaForm />, key: 'meta', label: t('dev.tabs.meta') },*/}
|
|
@@ -26,12 +26,15 @@ interface PluginSettingsConfigProps {
|
|
|
26
26
|
schema: PluginSchema;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
const useStyles = createStyles(({ css, token }) => ({
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
const useStyles = createStyles(({ css, token, stylish, cx }) => ({
|
|
30
|
+
markdown: cx(
|
|
31
|
+
stylish.markdownInChat,
|
|
32
|
+
css`
|
|
33
|
+
p {
|
|
34
|
+
color: ${token.colorTextDescription};
|
|
35
|
+
}
|
|
36
|
+
`,
|
|
37
|
+
),
|
|
35
38
|
}));
|
|
36
39
|
|
|
37
40
|
const PluginSettingsConfig = memo<PluginSettingsConfigProps>(({ schema, id }) => {
|
|
@@ -45,7 +48,7 @@ const PluginSettingsConfig = memo<PluginSettingsConfigProps>(({ schema, id }) =>
|
|
|
45
48
|
<Form layout={'vertical'}>
|
|
46
49
|
{items.map((item) => (
|
|
47
50
|
<Form.Item
|
|
48
|
-
desc={item.desc && <Markdown className={styles.
|
|
51
|
+
desc={item.desc && <Markdown className={styles.markdown}>{item.desc as string}</Markdown>}
|
|
49
52
|
key={item.label}
|
|
50
53
|
label={item.label}
|
|
51
54
|
tag={item.tag}
|
|
@@ -30,7 +30,6 @@ export default {
|
|
|
30
30
|
feedback: '反馈与建议',
|
|
31
31
|
historyRange: '历史范围',
|
|
32
32
|
import: '导入配置',
|
|
33
|
-
|
|
34
33
|
lang: {
|
|
35
34
|
'en': '英语',
|
|
36
35
|
'en-US': '英语',
|
|
@@ -45,7 +44,6 @@ export default {
|
|
|
45
44
|
noDescription: '暂无描述',
|
|
46
45
|
ok: '确定',
|
|
47
46
|
password: '密码',
|
|
48
|
-
|
|
49
47
|
pin: '置顶',
|
|
50
48
|
pinOff: '取消置顶',
|
|
51
49
|
regenerate: '重新生成',
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
addAgent: '添加助手',
|
|
3
|
+
guide: {
|
|
4
|
+
func1: {
|
|
5
|
+
desc1: '在会话窗口中通过右上角设置进入你想提交助手的设置页面;',
|
|
6
|
+
desc2: '点击右上角提交到助手市场按钮。',
|
|
7
|
+
tag: '方法一',
|
|
8
|
+
title: '通过 LobeChat 提交',
|
|
9
|
+
},
|
|
10
|
+
func2: {
|
|
11
|
+
button: '前往 Github 助手仓库',
|
|
12
|
+
desc: '如果您想将助手添加到索引中,请使用 agent-template.json 或 agent-template-full.json 在 plugins 目录中创建一个条目,编写简短的描述并适当标记,然后创建一个拉取请求。',
|
|
13
|
+
tag: '方法二',
|
|
14
|
+
title: '通过 Github 提交',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
3
17
|
search: {
|
|
4
18
|
placeholder: '搜索助手名称介绍或关键词...',
|
|
5
19
|
},
|
|
@@ -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'
|