@lobehub/chat 0.43.0 → 0.44.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/release.yml +1 -1
- package/CHANGELOG.md +66 -0
- package/package.json +5 -2
- package/src/const/meta.ts +3 -0
- package/src/const/session.ts +1 -0
- package/src/helpers/export.ts +15 -9
- package/src/layout/index.tsx +5 -5
- package/src/locales/default/common.ts +8 -1
- package/src/pages/chat/SessionList/Inbox.tsx +25 -0
- package/src/pages/chat/SessionList/List/Item/Actions.tsx +112 -0
- package/src/pages/chat/SessionList/List/Item/index.tsx +115 -0
- package/src/pages/chat/SessionList/List/{SkeletonItem.tsx → SkeletonList.tsx} +2 -2
- package/src/pages/chat/SessionList/List/index.tsx +7 -7
- package/src/pages/chat/SessionList/index.tsx +13 -1
- package/src/pages/chat/[id]/index.page.tsx +7 -9
- package/src/pages/chat/[id]/layout.tsx +7 -23
- package/src/pages/chat/[id]/setting/index.page.tsx +3 -3
- package/src/pages/chat/features/Conversation/ChatList/SkeletonList.tsx +43 -0
- package/src/pages/chat/{[id] → features}/Conversation/ChatList/index.tsx +35 -5
- package/src/pages/chat/{[id] → features}/Conversation/Input/index.tsx +1 -1
- package/src/pages/chat/{[id] → features}/Header/index.tsx +32 -34
- package/src/pages/chat/features/Sidebar/Inner.tsx +42 -0
- package/src/pages/chat/{[id]/Sidebar/Inner.tsx → features/Sidebar/SystemRole.tsx} +7 -37
- package/src/pages/chat/{[id] → features}/Sidebar/index.tsx +8 -4
- package/src/pages/chat/index.page.tsx +39 -1
- package/src/pages/chat/layout.tsx +27 -0
- package/src/pages/welcome/Footer/index.tsx +1 -0
- package/src/services/chatModel.ts +1 -1
- package/src/store/global/hooks/useOnFinishHydrationGlobal.ts +18 -0
- package/src/store/global/hooks/useSwitchSideBarOnInit.ts +4 -8
- package/src/store/session/hooks/index.ts +2 -0
- package/src/store/session/hooks/useOnFinishHydrationSession.ts +18 -0
- package/src/store/session/hooks/useSessionHydrated.ts +1 -1
- package/src/store/session/index.ts +1 -3
- package/src/store/session/initialState.ts +6 -3
- package/src/store/session/selectors.ts +3 -3
- package/src/store/session/slices/agentConfig/action.ts +2 -1
- package/src/store/session/slices/agentConfig/selectors.ts +11 -11
- package/src/store/session/slices/chat/actions/message.ts +13 -20
- package/src/store/session/slices/chat/actions/topic.ts +3 -1
- package/src/store/session/slices/chat/selectors/chat.ts +1 -1
- package/src/store/session/slices/chat/selectors/token.ts +1 -1
- package/src/store/session/slices/chat/selectors/topic.ts +4 -2
- package/src/store/session/slices/session/action.ts +24 -16
- package/src/store/session/slices/session/initialState.ts +18 -4
- package/src/store/session/slices/session/selectors/export.ts +13 -8
- package/src/store/session/slices/session/selectors/list.test.ts +303 -0
- package/src/store/session/slices/session/selectors/list.ts +8 -3
- package/src/store/session/store.ts +5 -5
- package/src/types/exportConfig.ts +93 -31
- package/src/utils/config.ts +9 -0
- package/src/pages/chat/SessionList/List/SessionItem.tsx +0 -178
- package/src/pages/chat/SessionList/List/style.ts +0 -36
- package/src/store/session/slices/chat/index.ts +0 -3
- package/src/store/session/slices/session/index.ts +0 -3
- package/src/pages/chat/{[id] → features}/Conversation/ChatList/Error/ApiKeyForm.tsx +0 -0
- package/src/pages/chat/{[id] → features}/Conversation/ChatList/Error/ErrorActionContainer.tsx +0 -0
- package/src/pages/chat/{[id] → features}/Conversation/ChatList/Error/InvalidAccess.tsx +1 -1
- /package/src/pages/chat/{[id] → features}/Conversation/ChatList/Error/OpenAiBizError.tsx +0 -0
- /package/src/pages/chat/{[id] → features}/Conversation/ChatList/Error/style.tsx +0 -0
- /package/src/pages/chat/{[id] → features}/Conversation/ChatList/MessageExtra.tsx +0 -0
- /package/src/pages/chat/{[id] → features}/Conversation/ChatList/OTPInput.tsx +0 -0
- /package/src/pages/chat/{[id] → features}/Conversation/ChatList/Plugins/FunctionCall.tsx +0 -0
- /package/src/pages/chat/{[id] → features}/Conversation/ChatList/Plugins/PluginMessage.tsx +0 -0
- /package/src/pages/chat/{[id] → features}/Conversation/ChatList/Plugins/PluginResultRender.tsx +0 -0
- /package/src/pages/chat/{[id] → features}/Conversation/ChatList/Plugins/style.ts +0 -0
- /package/src/pages/chat/{[id] → features}/Conversation/Input/Action.tsx +0 -0
- /package/src/pages/chat/{[id] → features}/Conversation/Input/ActionRight.tsx +0 -0
- /package/src/pages/chat/{[id] → features}/Conversation/Input/Token.tsx +0 -0
- /package/src/pages/chat/{[id] → features}/Conversation/index.tsx +0 -0
- /package/src/pages/chat/{[id] → features}/Header/PluginTag.tsx +0 -0
- /package/src/pages/chat/{[id] → features}/Sidebar/Header.tsx +0 -0
- /package/src/pages/chat/{[id] → features}/Sidebar/Topic/DefaultContent.tsx +0 -0
- /package/src/pages/chat/{[id] → features}/Sidebar/Topic/TopicContent.tsx +0 -0
- /package/src/pages/chat/{[id] → features}/Sidebar/Topic/TopicItem.tsx +0 -0
- /package/src/pages/chat/{[id] → features}/Sidebar/Topic/index.tsx +0 -0
|
@@ -6,9 +6,9 @@ import { StateCreator } from 'zustand/vanilla';
|
|
|
6
6
|
import { isDev } from '@/utils/env';
|
|
7
7
|
|
|
8
8
|
import { SessionStoreState, initialState } from './initialState';
|
|
9
|
-
import { AgentAction, createAgentSlice } from './slices/agentConfig';
|
|
10
|
-
import { ChatAction, createChatSlice } from './slices/chat';
|
|
11
|
-
import { SessionAction, createSessionSlice } from './slices/session';
|
|
9
|
+
import { AgentAction, createAgentSlice } from './slices/agentConfig/action';
|
|
10
|
+
import { ChatAction, createChatSlice } from './slices/chat/actions';
|
|
11
|
+
import { SessionAction, createSessionSlice } from './slices/session/action';
|
|
12
12
|
|
|
13
13
|
// =============== 聚合 createStoreFn ============ //
|
|
14
14
|
|
|
@@ -23,7 +23,7 @@ const createStore: StateCreator<SessionStore, [['zustand/devtools', never]]> = (
|
|
|
23
23
|
|
|
24
24
|
// =============== persist 本地缓存中间件配置 ============ //
|
|
25
25
|
|
|
26
|
-
type SessionPersist = Pick<SessionStore, 'sessions'>;
|
|
26
|
+
type SessionPersist = Pick<SessionStore, 'sessions' | 'inbox'>;
|
|
27
27
|
|
|
28
28
|
const LOBE_CHAT = 'LOBE_CHAT';
|
|
29
29
|
|
|
@@ -31,13 +31,13 @@ const persistOptions: PersistOptions<SessionStore, SessionPersist> = {
|
|
|
31
31
|
name: LOBE_CHAT,
|
|
32
32
|
|
|
33
33
|
partialize: (s) => ({
|
|
34
|
+
inbox: s.inbox,
|
|
34
35
|
sessions: s.sessions,
|
|
35
36
|
}),
|
|
36
37
|
|
|
37
38
|
// 手动控制 Hydration ,避免 ssr 报错
|
|
38
39
|
skipHydration: true,
|
|
39
40
|
version: 0,
|
|
40
|
-
// version: Migration.targetVersion,
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
// =============== 实装 useStore ============ //
|
|
@@ -1,61 +1,123 @@
|
|
|
1
|
-
import { LobeSessions } from '@/types/session';
|
|
1
|
+
import { LobeAgentSession, LobeSessions } from '@/types/session';
|
|
2
2
|
import { GlobalSettings } from '@/types/settings';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* 导出方式
|
|
6
|
+
* @enum ['agents', 'sessions', 'singleSession', 'settings', 'all']
|
|
7
|
+
* @enumNames ['agents', 'sessions', 'singleSession', 'settings', 'all']
|
|
8
|
+
*/
|
|
9
|
+
export type ExportType = 'agents' | 'sessions' | 'singleSession' | 'settings' | 'all';
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
/**
|
|
12
|
+
* 配置模型映射
|
|
13
|
+
*/
|
|
14
|
+
export interface ConfigModelMap {
|
|
15
|
+
agents: {
|
|
16
|
+
file: ConfigFileAgents;
|
|
17
|
+
state: ConfigStateAgents;
|
|
18
|
+
};
|
|
19
|
+
all: {
|
|
20
|
+
file: ConfigFileAll;
|
|
21
|
+
state: ConfigStateAll;
|
|
22
|
+
};
|
|
23
|
+
sessions: {
|
|
24
|
+
file: ConfigFileSessions;
|
|
25
|
+
state: ConfigStateSessions;
|
|
26
|
+
};
|
|
27
|
+
settings: {
|
|
28
|
+
file: ConfigFileSettings;
|
|
29
|
+
state: ConfigStateSettings;
|
|
30
|
+
};
|
|
31
|
+
singleSession: {
|
|
32
|
+
file: ConfigFileSingleSession;
|
|
33
|
+
state: ConfigStateSingleSession;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// ============= 配置数据结构 ============= //
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 配置状态:会话
|
|
41
|
+
*/
|
|
42
|
+
export interface ConfigStateSessions {
|
|
43
|
+
inbox: LobeAgentSession;
|
|
9
44
|
sessions: LobeSessions;
|
|
10
|
-
settings: GlobalSettings;
|
|
11
45
|
}
|
|
12
|
-
|
|
13
|
-
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 配置状态:单个会话
|
|
49
|
+
*/
|
|
50
|
+
export interface ConfigStateSingleSession {
|
|
51
|
+
sessions: LobeSessions;
|
|
14
52
|
}
|
|
15
|
-
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* 配置状态:角色
|
|
56
|
+
*/
|
|
57
|
+
export interface ConfigStateAgents {
|
|
16
58
|
sessions: LobeSessions;
|
|
17
59
|
}
|
|
18
60
|
|
|
19
|
-
|
|
61
|
+
/**
|
|
62
|
+
* 配置状态:设置
|
|
63
|
+
*/
|
|
64
|
+
export interface ConfigStateSettings {
|
|
65
|
+
settings: GlobalSettings;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* 配置状态:全部
|
|
70
|
+
*/
|
|
71
|
+
export interface ConfigStateAll extends ConfigStateSessions, ConfigStateSettings {}
|
|
72
|
+
|
|
73
|
+
// ============= 配置文件类型 ============= //
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 配置文件:设置
|
|
77
|
+
*/
|
|
20
78
|
export interface ConfigFileSettings {
|
|
21
79
|
exportType: 'settings';
|
|
22
80
|
state: ConfigStateSettings;
|
|
23
81
|
version: number;
|
|
24
82
|
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* 配置文件:会话
|
|
86
|
+
*/
|
|
25
87
|
export interface ConfigFileSessions {
|
|
26
88
|
exportType: 'sessions';
|
|
27
89
|
state: ConfigStateSessions;
|
|
28
90
|
version: number;
|
|
29
91
|
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* 配置文件:单个会话
|
|
95
|
+
*/
|
|
96
|
+
export interface ConfigFileSingleSession {
|
|
97
|
+
exportType: 'sessions';
|
|
98
|
+
state: ConfigStateSingleSession;
|
|
99
|
+
version: number;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* 配置文件:角色
|
|
104
|
+
*/
|
|
30
105
|
export interface ConfigFileAgents {
|
|
31
106
|
exportType: 'agents';
|
|
32
|
-
state:
|
|
107
|
+
state: ConfigStateAgents;
|
|
33
108
|
version: number;
|
|
34
109
|
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* 配置文件:全部
|
|
113
|
+
*/
|
|
35
114
|
export interface ConfigFileAll {
|
|
36
115
|
exportType: 'all';
|
|
37
116
|
state: ConfigStateAll;
|
|
38
117
|
version: number;
|
|
39
118
|
}
|
|
40
119
|
|
|
120
|
+
/**
|
|
121
|
+
* 配置文件
|
|
122
|
+
*/
|
|
41
123
|
export type ConfigFile = ConfigFileSettings | ConfigFileSessions | ConfigFileAll | ConfigFileAgents;
|
|
42
|
-
|
|
43
|
-
// 用于 map 收集类型的 map
|
|
44
|
-
export interface ConfigModelMap {
|
|
45
|
-
agents: {
|
|
46
|
-
file: ConfigFileAgents;
|
|
47
|
-
state: ConfigStateSessions;
|
|
48
|
-
};
|
|
49
|
-
all: {
|
|
50
|
-
file: ConfigFileAll;
|
|
51
|
-
state: ConfigStateAll;
|
|
52
|
-
};
|
|
53
|
-
sessions: {
|
|
54
|
-
file: ConfigFileSessions;
|
|
55
|
-
state: ConfigStateSessions;
|
|
56
|
-
};
|
|
57
|
-
settings: {
|
|
58
|
-
file: ConfigFileSettings;
|
|
59
|
-
state: ConfigStateSettings;
|
|
60
|
-
};
|
|
61
|
-
}
|
package/src/utils/config.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
ConfigFileAll,
|
|
8
8
|
ConfigFileSessions,
|
|
9
9
|
ConfigFileSettings,
|
|
10
|
+
ConfigFileSingleSession,
|
|
10
11
|
ConfigModelMap,
|
|
11
12
|
ExportType,
|
|
12
13
|
} from '@/types/exportConfig';
|
|
@@ -90,6 +91,14 @@ export const createConfigFile = <T extends ExportType>(
|
|
|
90
91
|
} as ConfigFileSettings;
|
|
91
92
|
}
|
|
92
93
|
|
|
94
|
+
case 'singleSession': {
|
|
95
|
+
return {
|
|
96
|
+
exportType: 'sessions',
|
|
97
|
+
state,
|
|
98
|
+
version: Migration.targetVersion,
|
|
99
|
+
} as ConfigFileSingleSession;
|
|
100
|
+
}
|
|
101
|
+
|
|
93
102
|
case 'all': {
|
|
94
103
|
return {
|
|
95
104
|
exportType: 'all',
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { ActionIcon, Avatar, Icon, List } from '@lobehub/ui';
|
|
2
|
-
import { useHover } from 'ahooks';
|
|
3
|
-
import { App, Dropdown, type MenuProps, Tag } from 'antd';
|
|
4
|
-
import { FolderOutput, MoreVertical, Pin, PinOff, Trash } from 'lucide-react';
|
|
5
|
-
import { FC, memo, useMemo, useRef, useState } from 'react';
|
|
6
|
-
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { Flexbox } from 'react-layout-kit';
|
|
8
|
-
import { shallow } from 'zustand/shallow';
|
|
9
|
-
|
|
10
|
-
import { exportSingleAgent, exportSingleSession } from '@/helpers/export';
|
|
11
|
-
import { useGlobalStore } from '@/store/global';
|
|
12
|
-
import { agentSelectors, chatSelectors, sessionSelectors, useSessionStore } from '@/store/session';
|
|
13
|
-
|
|
14
|
-
import { useStyles } from './style';
|
|
15
|
-
|
|
16
|
-
const { Item } = List;
|
|
17
|
-
|
|
18
|
-
interface SessionItemProps {
|
|
19
|
-
active?: boolean;
|
|
20
|
-
id: string;
|
|
21
|
-
loading?: boolean;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const SessionItem: FC<SessionItemProps> = memo(({ id, active = true, loading }) => {
|
|
25
|
-
const [open, setOpen] = useState(false);
|
|
26
|
-
const ref = useRef(null);
|
|
27
|
-
const isHovering = useHover(ref);
|
|
28
|
-
|
|
29
|
-
const { t } = useTranslation('common');
|
|
30
|
-
|
|
31
|
-
const { styles } = useStyles();
|
|
32
|
-
const [defaultModel] = useGlobalStore((s) => [s.settings.defaultAgent.config?.model]);
|
|
33
|
-
|
|
34
|
-
const [
|
|
35
|
-
pin,
|
|
36
|
-
title,
|
|
37
|
-
description,
|
|
38
|
-
systemRole,
|
|
39
|
-
avatar,
|
|
40
|
-
avatarBackground,
|
|
41
|
-
updateAt,
|
|
42
|
-
model,
|
|
43
|
-
chatLength,
|
|
44
|
-
removeSession,
|
|
45
|
-
pinSession,
|
|
46
|
-
] = useSessionStore((s) => {
|
|
47
|
-
const session = sessionSelectors.getSessionById(id)(s);
|
|
48
|
-
const meta = session.meta;
|
|
49
|
-
const systemRole = session.config.systemRole;
|
|
50
|
-
return [
|
|
51
|
-
session.pinned,
|
|
52
|
-
agentSelectors.getTitle(meta),
|
|
53
|
-
agentSelectors.getDescription(meta),
|
|
54
|
-
systemRole,
|
|
55
|
-
agentSelectors.getAvatar(meta),
|
|
56
|
-
meta.backgroundColor,
|
|
57
|
-
session?.updateAt,
|
|
58
|
-
session.config.model,
|
|
59
|
-
chatSelectors.getChatsById(id)(s).length,
|
|
60
|
-
s.removeSession,
|
|
61
|
-
s.pinSession,
|
|
62
|
-
];
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
const { modal } = App.useApp();
|
|
66
|
-
const items: MenuProps['items'] = useMemo(
|
|
67
|
-
() => [
|
|
68
|
-
{
|
|
69
|
-
icon: <Icon icon={pin ? PinOff : Pin} />,
|
|
70
|
-
key: 'pin',
|
|
71
|
-
label: t(pin ? 'pinOff' : 'pin'),
|
|
72
|
-
onClick: () => {
|
|
73
|
-
pinSession(id, !pin);
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
children: [
|
|
78
|
-
{
|
|
79
|
-
key: 'agent',
|
|
80
|
-
label: <div>{t('exportType.agent')}</div>,
|
|
81
|
-
onClick: () => {
|
|
82
|
-
exportSingleAgent(id);
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
key: 'agentWithMessage',
|
|
87
|
-
label: <div>{t('exportType.agentWithMessage')}</div>,
|
|
88
|
-
onClick: () => {
|
|
89
|
-
exportSingleSession(id);
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
],
|
|
93
|
-
icon: <Icon icon={FolderOutput} />,
|
|
94
|
-
key: 'export',
|
|
95
|
-
label: t('export'),
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
danger: true,
|
|
99
|
-
icon: <Icon icon={Trash} />,
|
|
100
|
-
key: 'delete',
|
|
101
|
-
label: t('delete'),
|
|
102
|
-
onClick: ({ domEvent }) => {
|
|
103
|
-
domEvent.stopPropagation();
|
|
104
|
-
|
|
105
|
-
modal.confirm({
|
|
106
|
-
centered: true,
|
|
107
|
-
okButtonProps: { danger: true },
|
|
108
|
-
okText: t('ok'),
|
|
109
|
-
onOk: () => {
|
|
110
|
-
removeSession(id);
|
|
111
|
-
},
|
|
112
|
-
rootClassName: styles.modalRoot,
|
|
113
|
-
title: t('confirmRemoveSessionItemAlert'),
|
|
114
|
-
});
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
],
|
|
118
|
-
[id, pin],
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
const showModel = model !== defaultModel;
|
|
122
|
-
const showChatLength = chatLength > 0;
|
|
123
|
-
|
|
124
|
-
return (
|
|
125
|
-
<Item
|
|
126
|
-
actions={
|
|
127
|
-
<Dropdown
|
|
128
|
-
arrow={false}
|
|
129
|
-
menu={{
|
|
130
|
-
items,
|
|
131
|
-
onClick: ({ domEvent }) => {
|
|
132
|
-
domEvent.stopPropagation();
|
|
133
|
-
},
|
|
134
|
-
}}
|
|
135
|
-
onOpenChange={setOpen}
|
|
136
|
-
open={open}
|
|
137
|
-
trigger={['click']}
|
|
138
|
-
>
|
|
139
|
-
<ActionIcon
|
|
140
|
-
icon={MoreVertical}
|
|
141
|
-
size={{
|
|
142
|
-
blockSize: 28,
|
|
143
|
-
fontSize: 16,
|
|
144
|
-
}}
|
|
145
|
-
/>
|
|
146
|
-
</Dropdown>
|
|
147
|
-
}
|
|
148
|
-
active={active}
|
|
149
|
-
addon={
|
|
150
|
-
!(showModel || showChatLength) ? undefined : (
|
|
151
|
-
<Flexbox gap={4} horizontal style={{ flexWrap: 'wrap' }}>
|
|
152
|
-
{showModel && <Tag bordered={false}>{model}</Tag>}
|
|
153
|
-
</Flexbox>
|
|
154
|
-
)
|
|
155
|
-
}
|
|
156
|
-
avatar={
|
|
157
|
-
<Avatar
|
|
158
|
-
animation={isHovering}
|
|
159
|
-
avatar={avatar}
|
|
160
|
-
background={avatarBackground}
|
|
161
|
-
shape="circle"
|
|
162
|
-
size={46}
|
|
163
|
-
title={title}
|
|
164
|
-
/>
|
|
165
|
-
}
|
|
166
|
-
className={styles.container}
|
|
167
|
-
date={updateAt}
|
|
168
|
-
description={description || systemRole}
|
|
169
|
-
loading={loading}
|
|
170
|
-
pin={pin}
|
|
171
|
-
ref={ref}
|
|
172
|
-
showAction={open || isHovering}
|
|
173
|
-
title={title}
|
|
174
|
-
/>
|
|
175
|
-
);
|
|
176
|
-
}, shallow);
|
|
177
|
-
|
|
178
|
-
export default SessionItem;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { createStyles } from 'antd-style';
|
|
2
|
-
import { rgba } from 'polished';
|
|
3
|
-
|
|
4
|
-
export const useStyles = createStyles(({ css, token }) => {
|
|
5
|
-
return {
|
|
6
|
-
button: css`
|
|
7
|
-
position: sticky;
|
|
8
|
-
z-index: 30;
|
|
9
|
-
bottom: 0;
|
|
10
|
-
|
|
11
|
-
display: flex;
|
|
12
|
-
gap: 8px;
|
|
13
|
-
align-items: center;
|
|
14
|
-
justify-content: center;
|
|
15
|
-
|
|
16
|
-
margin-top: 8px;
|
|
17
|
-
padding: 12px;
|
|
18
|
-
|
|
19
|
-
background: ${rgba(token.colorBgLayout, 0.5)};
|
|
20
|
-
backdrop-filter: blur(8px);
|
|
21
|
-
`,
|
|
22
|
-
container: css`
|
|
23
|
-
position: relative;
|
|
24
|
-
`,
|
|
25
|
-
|
|
26
|
-
modalRoot: css`
|
|
27
|
-
z-index: 2000;
|
|
28
|
-
`,
|
|
29
|
-
pin: css`
|
|
30
|
-
background-color: ${token.colorFillTertiary};
|
|
31
|
-
`,
|
|
32
|
-
time: css`
|
|
33
|
-
align-self: flex-start;
|
|
34
|
-
`,
|
|
35
|
-
};
|
|
36
|
-
});
|
|
File without changes
|
package/src/pages/chat/{[id] → features}/Conversation/ChatList/Error/ErrorActionContainer.tsx
RENAMED
|
File without changes
|
|
@@ -24,8 +24,8 @@ const InvalidAccess = memo<{ id: string }>(({ id }) => {
|
|
|
24
24
|
block
|
|
25
25
|
onChange={(value) => setMode(value as string)}
|
|
26
26
|
options={[
|
|
27
|
-
{ icon: <Icon icon={SquareAsterisk} />, label: '密码', value: 'password' },
|
|
28
27
|
{ icon: <Icon icon={KeySquare} />, label: 'OpenAI API Key', value: 'api' },
|
|
28
|
+
{ icon: <Icon icon={SquareAsterisk} />, label: '密码', value: 'password' },
|
|
29
29
|
]}
|
|
30
30
|
style={{ width: '100%' }}
|
|
31
31
|
value={mode}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/pages/chat/{[id] → features}/Conversation/ChatList/Plugins/PluginResultRender.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|