Skip to content

Commit 0259270

Browse files
authored
šŸ› fix(copilot): pass correct scope when creating new session in PageEditor (lobehub#11714)
The switchTopic function was called without scope parameter, defaulting to 'main' scope while PageAgentProvider uses 'page' scope, causing new session creation to fail. fix LOBE-3378
1 parent 89750fc commit 0259270

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

ā€Žsrc/features/PageEditor/Copilot/Toolbar.tsxā€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ const CopilotToolbar = memo<CopilotToolbarProps>(({ agentId, isHovered }) => {
189189
<div className={cx(styles.fadeContainer, isHovered ? styles.fadeIn : styles.fadeOut)}>
190190
<ActionIcon
191191
icon={PlusIcon}
192-
onClick={() => switchTopic()}
192+
onClick={() => switchTopic(null, { scope: 'page' })}
193193
size={DESKTOP_HEADER_ICON_SIZE}
194194
title={t('actions.addNewTopic')}
195195
/>

ā€Žsrc/styles/antdOverride.tsā€Ž

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { isDesktop } from '@lobechat/const';
12
import { type Theme, css } from 'antd-style';
23
import { rgba } from 'polished';
34

@@ -16,4 +17,12 @@ export default ({ token }: { prefixCls: string; token: Theme }) => css`
1617
background: ${rgba(token.colorBgLayout, 0.5)} !important;
1718
backdrop-filter: blur(2px);
1819
}
20+
21+
${isDesktop &&
22+
css`
23+
.${token.prefixCls}-modal-mask.${token.prefixCls}-modal-mask-blur {
24+
background: ${rgba(token.colorBgLayout, 0.8)} !important;
25+
backdrop-filter: none !important;
26+
}
27+
`}
1928
`;

0 commit comments

Comments
Ā (0)