|
@@ -258,10 +258,33 @@ export const SideBar = (props: { className?: string }) => {
|
|
|
if (isMobileScreen) {
|
|
if (isMobileScreen) {
|
|
|
closeSidebar();
|
|
closeSidebar();
|
|
|
}
|
|
}
|
|
|
|
|
+ // 保留重要的URL参数
|
|
|
|
|
+ const currentParams = new URLSearchParams(location.search);
|
|
|
|
|
+ const preservedParams = new URLSearchParams();
|
|
|
|
|
+
|
|
|
|
|
+ // 保留这些重要参数
|
|
|
|
|
+ if (currentParams.get('showMenu')) {
|
|
|
|
|
+ preservedParams.set('showMenu', currentParams.get('showMenu')!);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (currentParams.get('chatMode')) {
|
|
|
|
|
+ preservedParams.set('chatMode', currentParams.get('chatMode')!);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (currentParams.get('appId')) {
|
|
|
|
|
+ preservedParams.set('appId', currentParams.get('appId')!);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const searchString = preservedParams.toString();
|
|
|
|
|
+
|
|
|
if (getType() === 'bigModel') {
|
|
if (getType() === 'bigModel') {
|
|
|
- navigate({ pathname: '/newChat' });
|
|
|
|
|
|
|
+ navigate({
|
|
|
|
|
+ pathname: '/newChat',
|
|
|
|
|
+ search: searchString ? `?${searchString}` : ''
|
|
|
|
|
+ });
|
|
|
} else {
|
|
} else {
|
|
|
- navigate({ pathname: '/newDeepseekChat' });
|
|
|
|
|
|
|
+ navigate({
|
|
|
|
|
+ pathname: '/newDeepseekChat',
|
|
|
|
|
+ search: searchString ? `?${searchString}` : ''
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}}
|
|
}}
|
|
|
>
|
|
>
|