mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-27 13:29:15 +07:00
🐛 fix(copilot): pass correct scope when creating new session in PageEditor (#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
This commit is contained in:
@@ -189,7 +189,7 @@ const CopilotToolbar = memo<CopilotToolbarProps>(({ agentId, isHovered }) => {
|
||||
<div className={cx(styles.fadeContainer, isHovered ? styles.fadeIn : styles.fadeOut)}>
|
||||
<ActionIcon
|
||||
icon={PlusIcon}
|
||||
onClick={() => switchTopic()}
|
||||
onClick={() => switchTopic(null, { scope: 'page' })}
|
||||
size={DESKTOP_HEADER_ICON_SIZE}
|
||||
title={t('actions.addNewTopic')}
|
||||
/>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { isDesktop } from '@lobechat/const';
|
||||
import { type Theme, css } from 'antd-style';
|
||||
import { rgba } from 'polished';
|
||||
|
||||
@@ -16,4 +17,12 @@ export default ({ token }: { prefixCls: string; token: Theme }) => css`
|
||||
background: ${rgba(token.colorBgLayout, 0.5)} !important;
|
||||
backdrop-filter: blur(2px);
|
||||
}
|
||||
|
||||
${isDesktop &&
|
||||
css`
|
||||
.${token.prefixCls}-modal-mask.${token.prefixCls}-modal-mask-blur {
|
||||
background: ${rgba(token.colorBgLayout, 0.8)} !important;
|
||||
backdrop-filter: none !important;
|
||||
}
|
||||
`}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user