Skip to content

Commit

Permalink
💄 style: Fix style warning in antd 5.23.0 and some error logs (#5319)
Browse files Browse the repository at this point in the history
* 💄 style: Fix style problem in antd 5.23.0

* 💄 style: Fix props

* 🔧 chore: Revert some change

* 🔧 chore: Revert some change

* 🔧 chore: Remove shiki from deps
  • Loading branch information
canisminor1990 authored Jan 7, 2025
1 parent 20f2809 commit 4fcf5d6
Show file tree
Hide file tree
Showing 30 changed files with 219 additions and 192 deletions.
2 changes: 1 addition & 1 deletion next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const nextConfig: NextConfig = {
source: '/welcome',
},
],
serverExternalPackages: ['@electric-sql/pglite'],
serverExternalPackages: ['@electric-sql/pglite', 'shiki/wasm', 'sharp'],

transpilePackages: ['pdfjs-dist', 'mermaid'],

Expand Down
173 changes: 86 additions & 87 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,215 +103,214 @@
]
},
"dependencies": {
"@ant-design/icons": "^5.5.1",
"@ant-design/pro-components": "^2.7.18",
"@anthropic-ai/sdk": "^0.33.0",
"@auth/core": "^0.37.0",
"@aws-sdk/client-bedrock-runtime": "^3.675.0",
"@aws-sdk/client-s3": "^3.675.0",
"@aws-sdk/s3-request-presigner": "^3.675.0",
"@ant-design/icons": "^5.5.2",
"@ant-design/pro-components": "^2.8.3",
"@anthropic-ai/sdk": "^0.33.1",
"@auth/core": "^0.37.4",
"@aws-sdk/client-bedrock-runtime": "^3.723.0",
"@aws-sdk/client-s3": "^3.723.0",
"@aws-sdk/s3-request-presigner": "^3.723.0",
"@azure/core-rest-pipeline": "1.16.0",
"@azure/openai": "1.0.0-beta.12",
"@baiducloud/qianfan": "^0.1.9",
"@cfworker/json-schema": "^4.0.0",
"@clerk/localizations": "^3.3.0",
"@cfworker/json-schema": "^4.1.0",
"@clerk/localizations": "^3.9.5",
"@clerk/nextjs": "^6.9.6",
"@clerk/themes": "^2.1.37",
"@codesandbox/sandpack-react": "^2.19.9",
"@clerk/themes": "^2.2.3",
"@codesandbox/sandpack-react": "^2.19.10",
"@cyntler/react-doc-viewer": "^1.17.0",
"@electric-sql/pglite": "0.2.13",
"@google/generative-ai": "^0.21.0",
"@huggingface/inference": "^2.8.1",
"@icons-pack/react-simple-icons": "9.6.0",
"@khmyznikov/pwa-install": "^0.3.9",
"@langchain/community": "^0.3.0",
"@lobehub/charts": "^1.9.12",
"@langchain/community": "^0.3.22",
"@lobehub/charts": "^1.11.0",
"@lobehub/chat-plugin-sdk": "^1.32.4",
"@lobehub/chat-plugins-gateway": "^1.9.0",
"@lobehub/icons": "^1.56.0",
"@lobehub/tts": "^1.25.1",
"@lobehub/ui": "^1.156.3",
"@neondatabase/serverless": "^0.10.1",
"@next/third-parties": "^15.0.0",
"@lobehub/icons": "^1.61.1",
"@lobehub/tts": "^1.27.0",
"@lobehub/ui": "^1.161.0",
"@neondatabase/serverless": "^0.10.4",
"@next/third-parties": "^15.1.3",
"@react-spring/web": "^9.7.5",
"@sentry/nextjs": "^7.119.2",
"@serwist/next": "^9.0.9",
"@sentry/nextjs": "^7.120.2",
"@serwist/next": "^9.0.11",
"@t3-oss/env-nextjs": "^0.11.1",
"@tanstack/react-query": "^5.59.15",
"@tanstack/react-query": "^5.62.16",
"@trpc/client": "next",
"@trpc/next": "next",
"@trpc/react-query": "next",
"@trpc/server": "next",
"@vercel/analytics": "^1.3.1",
"@vercel/edge-config": "^1.3.0",
"@vercel/speed-insights": "^1.0.12",
"ahooks": "^3.8.1",
"ai": "^3.4.16",
"antd": "^5.22.6",
"@vercel/analytics": "^1.4.1",
"@vercel/edge-config": "^1.4.0",
"@vercel/speed-insights": "^1.1.0",
"ahooks": "^3.8.4",
"ai": "^3.4.33",
"antd": "^5.23.0",
"antd-style": "^3.7.1",
"brotli-wasm": "^3.0.1",
"chroma-js": "^3.1.2",
"dayjs": "^1.11.13",
"debug": "^4.3.7",
"debug": "^4.4.0",
"dexie": "^3.2.7",
"diff": "^5.2.0",
"drizzle-orm": "^0.38.0",
"drizzle-orm": "^0.38.3",
"drizzle-zod": "^0.5.1",
"fast-deep-equal": "^3.1.3",
"file-type": "^19.6.0",
"framer-motion": "^11.11.9",
"gpt-tokenizer": "^2.5.0",
"i18next": "^23.16.1",
"i18next-browser-languagedetector": "^7.2.1",
"framer-motion": "^11.16.0",
"gpt-tokenizer": "^2.8.1",
"i18next": "^23.16.8",
"i18next-browser-languagedetector": "^7.2.2",
"i18next-resources-to-backend": "^1.2.1",
"idb-keyval": "^6.2.1",
"immer": "^10.1.1",
"jose": "^5.9.4",
"jose": "^5.9.6",
"js-sha256": "^0.11.0",
"jsonl-parse-stringify": "^1.0.3",
"langchain": "^0.3.2",
"langchain": "^0.3.10",
"langfuse": "3.29.1",
"langfuse-core": "3.29.1",
"lodash-es": "^4.17.21",
"lucide-react": "latest",
"mammoth": "^1.8.0",
"modern-screenshot": "^4.4.39",
"nanoid": "^5.0.7",
"mammoth": "^1.9.0",
"modern-screenshot": "^4.5.5",
"nanoid": "^5.0.9",
"next": "^15.1.3",
"next-auth": "beta",
"next-mdx-remote": "^4.4.1",
"nextjs-toploader": "^3.7.15",
"numeral": "^2.0.6",
"nuqs": "^1.20.0",
"officeparser": "^4.2.0",
"ollama": "^0.5.10",
"openai": "^4.68.1",
"ollama": "^0.5.11",
"openai": "^4.77.3",
"openapi-fetch": "^0.9.8",
"partial-json": "^0.1.7",
"pdf-parse": "^1.1.1",
"pdfjs-dist": "4.8.69",
"pg": "^8.13.0",
"pino": "^9.5.0",
"pg": "^8.13.1",
"pino": "^9.6.0",
"plaiceholder": "^3.0.0",
"polished": "^4.3.1",
"posthog-js": "^1.174.2",
"pwa-install-handler": "^2.6.1",
"posthog-js": "^1.204.0",
"pwa-install-handler": "^2.6.2",
"query-string": "^9.1.1",
"random-words": "^2.0.1",
"react": "^19.0.0",
"react-confetti": "^6.1.0",
"react-confetti": "^6.2.2",
"react-dom": "^19.0.0",
"react-fast-marquee": "^1.6.5",
"react-hotkeys-hook": "^4.5.1",
"react-hotkeys-hook": "^4.6.1",
"react-i18next": "14.0.2",
"react-layout-kit": "^1.9.0",
"react-layout-kit": "^1.9.1",
"react-lazy-load": "^4.0.1",
"react-pdf": "^9.2.1",
"react-scan": "^0.0.51",
"react-virtuoso": "^4.12.0",
"react-virtuoso": "^4.12.3",
"react-wrap-balancer": "^1.1.1",
"remark": "^14.0.3",
"remark-gfm": "^3.0.1",
"remark-html": "^15.0.2",
"request-filtering-agent": "^2.0.1",
"resolve-accept-language": "^3.1.8",
"resolve-accept-language": "^3.1.10",
"rtl-detect": "^1.1.2",
"semver": "^7.6.3",
"sharp": "^0.33.5",
"shiki": "^1.22.0",
"stripe": "^15.12.0",
"superjson": "^2.2.1",
"svix": "^1.37.0",
"swr": "^2.2.5",
"superjson": "^2.2.2",
"svix": "^1.45.1",
"swr": "^2.3.0",
"systemjs": "^6.15.1",
"ts-md5": "^1.3.1",
"ua-parser-js": "^1.0.39",
"unstructured-client": "^0.18.1",
"ua-parser-js": "^1.0.40",
"unstructured-client": "^0.18.2",
"url-join": "^5.0.0",
"use-merge-value": "^1.2.0",
"utility-types": "^3.11.0",
"uuid": "^11.0.0",
"uuid": "^11.0.4",
"ws": "^8.18.0",
"y-protocols": "^1.0.6",
"y-webrtc": "^10.3.0",
"yaml": "^2.6.0",
"yjs": "^13.6.20",
"zod": "^3.23.8",
"yaml": "^2.7.0",
"yjs": "^13.6.21",
"zod": "^3.24.1",
"zustand": "5.0.1",
"zustand-utils": "^1.3.2"
},
"devDependencies": {
"@commitlint/cli": "^19.5.0",
"@commitlint/cli": "^19.6.1",
"@edge-runtime/vm": "^5.0.0",
"@huggingface/tasks": "^0.12.22",
"@huggingface/tasks": "^0.12.30",
"@lobehub/i18n-cli": "^1.20.3",
"@lobehub/lint": "^1.24.4",
"@lobehub/seo-cli": "^1.4.2",
"@next/bundle-analyzer": "^15.0.0",
"@next/eslint-plugin-next": "^15.0.0",
"@lobehub/seo-cli": "^1.4.3",
"@next/bundle-analyzer": "^15.1.3",
"@next/eslint-plugin-next": "^15.1.3",
"@peculiar/webcrypto": "^1.5.0",
"@semantic-release/exec": "^6.0.3",
"@testing-library/jest-dom": "^6.6.2",
"@testing-library/react": "^16.0.1",
"@types/chroma-js": "^2.4.4",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.1.0",
"@types/chroma-js": "^2.4.5",
"@types/crypto-js": "^4.2.2",
"@types/debug": "^4.1.12",
"@types/diff": "^6.0.0",
"@types/fs-extra": "^11.0.4",
"@types/ip": "^1.1.3",
"@types/json-schema": "^7.0.15",
"@types/lodash": "^4.17.12",
"@types/lodash": "^4.17.14",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.16.13",
"@types/node": "^20.17.12",
"@types/numeral": "^2.0.5",
"@types/pg": "^8.11.10",
"@types/react": "18.3.13",
"@types/react-dom": "^19.0.0",
"@types/react-dom": "^19.0.2",
"@types/rtl-detect": "^1.0.3",
"@types/semver": "^7.5.8",
"@types/systemjs": "^6.15.1",
"@types/ua-parser-js": "^0.7.39",
"@types/unist": "^3.0.3",
"@types/uuid": "^10.0.0",
"@types/ws": "^8.5.12",
"@types/ws": "^8.5.13",
"@vitest/coverage-v8": "~1.2.2",
"ajv-keywords": "^5.1.0",
"commitlint": "^19.5.0",
"consola": "^3.2.3",
"commitlint": "^19.6.1",
"consola": "^3.3.3",
"crypto-js": "^4.2.0",
"dotenv": "^16.4.5",
"dpdm-fast": "^1.0.4",
"drizzle-kit": "^0.30.0",
"dotenv": "^16.4.7",
"dpdm-fast": "^1.0.7",
"drizzle-kit": "^0.30.1",
"eslint": "^8.57.1",
"eslint-plugin-mdx": "^2.3.4",
"eslint-plugin-unused-imports": "4.0.1",
"fake-indexeddb": "^6.0.0",
"fs-extra": "^11.2.0",
"glob": "^11.0.0",
"gray-matter": "^4.0.3",
"happy-dom": "^15.7.4",
"husky": "^9.1.6",
"happy-dom": "^15.11.7",
"husky": "^9.1.7",
"just-diff": "^6.0.2",
"lint-staged": "^15.2.10",
"lint-staged": "^15.3.0",
"lodash": "^4.17.21",
"markdown-table": "^3.0.3",
"markdown-table": "^3.0.4",
"markdown-to-txt": "^2.0.1",
"mime": "^4.0.4",
"mime": "^4.0.6",
"node-fetch": "^3.3.2",
"node-gyp": "^11.0.0",
"openapi-typescript": "^6.7.6",
"p-map": "^7.0.2",
"prettier": "^3.3.3",
"p-map": "^7.0.3",
"prettier": "^3.4.2",
"remark-cli": "^11.0.0",
"remark-parse": "^10.0.2",
"semantic-release": "^21.1.2",
"serwist": "^9.0.9",
"serwist": "^9.0.11",
"stylelint": "^15.11.0",
"tsx": "^4.19.1",
"typescript": "^5.6.3",
"tsx": "^4.19.2",
"typescript": "^5.7.2",
"unified": "^11.0.5",
"unist-util-visit": "^5.0.0",
"vite": "^5.4.9",
"vite": "^5.4.11",
"vitest": "~1.2.2",
"vitest-canvas-mock": "^0.3.3"
},
Expand Down
6 changes: 4 additions & 2 deletions src/app/(main)/chat/features/Migration/Failed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ const Failed = memo<FailedProps>(({ error, state, setUpgradeStatus, setError, up
type: 'primary',
}}
onConfirm={clearLocal}
overlayInnerStyle={{ background: lighten(0.03, theme.colorBgElevated) }}
overlayStyle={{ width: 340 }}
styles={{
body: { background: lighten(0.03, theme.colorBgElevated) },
root: { width: 340 },
}}
title={t('dbV1.clear.confirm')}
>
<Button size={'large'}>{t('dbV1.action.clearDB')}</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Skeleton } from 'antd';
import Link from 'next/link';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import { Flexbox, FlexboxProps } from 'react-layout-kit';
import { Flexbox } from 'react-layout-kit';
import urlJoin from 'url-join';

import { DiscoverAssistantItem, DiscoverPlugintem } from '@/types/discover';
Expand All @@ -13,18 +13,17 @@ import Block from '../../../../features/Block';
import SuggestionItem from './SuggestionItem';
import ToolItem from './ToolItem';

interface InfoSidebarProps extends FlexboxProps {
interface InfoSidebarProps {
data: DiscoverAssistantItem;
identifier: string;
mobile?: boolean;
pluginData?: DiscoverPlugintem[];
}

const InfoSidebar = memo<InfoSidebarProps>(({ pluginData, data, ...rest }) => {
const InfoSidebar = memo<InfoSidebarProps>(({ pluginData, data }) => {
const { t } = useTranslation('discover');

return (
<Flexbox gap={48} style={{ position: 'relative' }} width={'100%'} {...rest}>
<Flexbox gap={48} style={{ position: 'relative' }} width={'100%'}>
{pluginData && pluginData?.length > 0 && (
<Block gap={12} title={t('assistants.plugins')}>
{pluginData.map((item) => (
Expand Down
9 changes: 1 addition & 8 deletions src/app/(main)/discover/(detail)/assistant/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,7 @@ const Page = async (props: DiscoverPageProps) => {
actions={<Actions data={data} identifier={identifier} />}
header={<Header data={data} identifier={identifier} mobile={mobile} />}
mobile={mobile}
sidebar={
<InfoSidebar
data={data}
identifier={identifier}
mobile={mobile}
pluginData={pluginData}
/>
}
sidebar={<InfoSidebar data={data} identifier={identifier} pluginData={pluginData} />}
/* ↓ cloud slot ↓ */

/* ↑ cloud slot ↑ */
Expand Down
Loading

0 comments on commit 4fcf5d6

Please sign in to comment.