diff --git a/electron.vite.config.ts b/electron.vite.config.ts index 9a695c1701..7930b57f35 100644 --- a/electron.vite.config.ts +++ b/electron.vite.config.ts @@ -24,12 +24,10 @@ export default defineConfig({ build: { rollupOptions: { external: ['@libsql/client', 'bufferutil', 'utf-8-validate', '@cherrystudio/mac-system-ocr'], - output: isProd - ? { - manualChunks: undefined, // 彻底禁用代码分割 - 返回 null 强制单文件打包 - inlineDynamicImports: true // 内联所有动态导入,这是关键配置 - } - : {} + output: { + manualChunks: undefined, // 彻底禁用代码分割 - 返回 null 强制单文件打包 + inlineDynamicImports: true // 内联所有动态导入,这是关键配置 + } }, sourcemap: isDev }, diff --git a/src/renderer/src/pages/home/Messages/CitationsList.tsx b/src/renderer/src/pages/home/Messages/CitationsList.tsx index 4087a96fe3..b3dcffebd8 100644 --- a/src/renderer/src/pages/home/Messages/CitationsList.tsx +++ b/src/renderer/src/pages/home/Messages/CitationsList.tsx @@ -1,5 +1,6 @@ import ContextMenu from '@renderer/components/ContextMenu' import Favicon from '@renderer/components/Icons/FallbackFavicon' +import Scrollbar from '@renderer/components/Scrollbar' import { Citation } from '@renderer/types' import { fetchWebContent } from '@renderer/utils/fetch' import { cleanMarkdownContent } from '@renderer/utils/formats' @@ -43,7 +44,7 @@ const CitationsList: React.FC = ({ citations }) => { if (!count) return null const popoverContent = ( -
+ {citations.map((citation) => ( {citation.type === 'websearch' ? ( @@ -57,7 +58,7 @@ const CitationsList: React.FC = ({ citations }) => { )} ))} -
+ ) return ( @@ -309,9 +310,12 @@ const WebSearchCardContent = styled.div` } ` +const PopoverContentContainer = styled(Scrollbar)` + max-height: 70vh; +` + const PopoverContent = styled.div` max-width: min(400px, 60vw); - max-height: 60vh; padding: 0 12px; `