@lobehub/chat 1.44.3 → 1.45.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.remarkrc.mdx.js +6 -0
- package/CHANGELOG.md +50 -0
- package/changelog/v1.json +18 -0
- package/docs/changelog/2023-09-09-plugin-system.mdx +5 -0
- package/docs/changelog/2023-09-09-plugin-system.zh-CN.mdx +5 -0
- package/docs/changelog/2023-11-14-gpt4-vision.mdx +6 -0
- package/docs/changelog/2023-11-14-gpt4-vision.zh-CN.mdx +6 -0
- package/docs/changelog/2023-11-19-tts-stt.mdx +6 -0
- package/docs/changelog/2023-11-19-tts-stt.zh-CN.mdx +7 -0
- package/docs/changelog/2023-12-22-dalle-3.mdx +6 -0
- package/docs/changelog/2023-12-22-dalle-3.zh-CN.mdx +4 -0
- package/docs/changelog/2024-02-08-sso-oauth.mdx +6 -0
- package/docs/changelog/2024-02-08-sso-oauth.zh-CN.mdx +6 -0
- package/docs/changelog/2024-02-14-ollama.mdx +6 -0
- package/docs/changelog/2024-02-14-ollama.zh-CN.mdx +5 -0
- package/docs/changelog/2024-06-19-lobe-chat-v1.mdx +6 -0
- package/docs/changelog/2024-06-19-lobe-chat-v1.zh-CN.mdx +5 -0
- package/docs/changelog/2024-07-19-gpt-4o-mini.mdx +5 -0
- package/docs/changelog/2024-07-19-gpt-4o-mini.zh-CN.mdx +4 -0
- package/docs/changelog/2024-08-02-lobe-chat-database-docker.mdx +6 -0
- package/docs/changelog/2024-08-02-lobe-chat-database-docker.zh-CN.mdx +5 -0
- package/docs/changelog/2024-08-21-file-upload-and-knowledge-base.mdx +6 -0
- package/docs/changelog/2024-08-21-file-upload-and-knowledge-base.zh-CN.mdx +5 -0
- package/docs/changelog/2024-09-13-openai-o1-models.mdx +6 -0
- package/docs/changelog/2024-09-13-openai-o1-models.zh-CN.mdx +6 -0
- package/docs/changelog/2024-09-20-artifacts.mdx +6 -0
- package/docs/changelog/2024-09-20-artifacts.zh-CN.mdx +6 -0
- package/docs/changelog/2024-10-27-pin-assistant.mdx +5 -0
- package/docs/changelog/2024-10-27-pin-assistant.zh-CN.mdx +4 -0
- package/docs/changelog/2024-11-06-share-text-json.mdx +4 -0
- package/docs/changelog/2024-11-06-share-text-json.zh-CN.mdx +4 -0
- package/docs/changelog/2024-11-25-november-providers.mdx +7 -0
- package/docs/changelog/2024-11-25-november-providers.zh-CN.mdx +7 -0
- package/docs/changelog/2024-11-27-forkable-chat.mdx +4 -0
- package/docs/changelog/2024-11-27-forkable-chat.zh-CN.mdx +5 -0
- package/docs/changelog/2025-01-03-user-profile.mdx +5 -0
- package/docs/changelog/2025-01-03-user-profile.zh-CN.mdx +4 -1
- package/docs/self-hosting/advanced/auth/clerk.mdx +25 -41
- package/docs/self-hosting/advanced/auth/clerk.zh-CN.mdx +23 -37
- package/docs/self-hosting/advanced/auth/next-auth/auth0.mdx +31 -58
- package/docs/self-hosting/advanced/auth/next-auth/auth0.zh-CN.mdx +30 -57
- package/docs/self-hosting/advanced/auth/next-auth/authelia.mdx +38 -38
- package/docs/self-hosting/advanced/auth/next-auth/authelia.zh-CN.mdx +37 -38
- package/docs/self-hosting/advanced/auth/next-auth/authentik.mdx +26 -31
- package/docs/self-hosting/advanced/auth/next-auth/authentik.zh-CN.mdx +25 -30
- package/docs/self-hosting/advanced/auth/next-auth/casdoor.mdx +74 -75
- package/docs/self-hosting/advanced/auth/next-auth/casdoor.zh-CN.mdx +72 -73
- package/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.mdx +24 -25
- package/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.zh-CN.mdx +23 -24
- package/docs/self-hosting/advanced/auth/next-auth/github.mdx +46 -73
- package/docs/self-hosting/advanced/auth/next-auth/github.zh-CN.mdx +43 -70
- package/docs/self-hosting/advanced/auth/next-auth/logto.mdx +28 -37
- package/docs/self-hosting/advanced/auth/next-auth/logto.zh-CN.mdx +28 -37
- package/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.mdx +36 -49
- package/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.zh-CN.mdx +30 -43
- package/docs/self-hosting/advanced/auth/next-auth/wechat.mdx +13 -14
- package/docs/self-hosting/advanced/auth/next-auth/wechat.zh-CN.mdx +14 -15
- package/docs/self-hosting/advanced/auth/next-auth/zitadel.mdx +35 -69
- package/docs/self-hosting/advanced/auth/next-auth/zitadel.zh-CN.mdx +34 -68
- package/docs/self-hosting/advanced/auth.mdx +14 -13
- package/docs/self-hosting/advanced/auth.zh-CN.mdx +15 -14
- package/docs/self-hosting/advanced/feature-flags.zh-CN.mdx +15 -15
- package/docs/self-hosting/advanced/knowledge-base.mdx +14 -3
- package/docs/self-hosting/advanced/knowledge-base.zh-CN.mdx +12 -3
- package/docs/self-hosting/advanced/model-list.zh-CN.mdx +5 -5
- package/docs/self-hosting/advanced/s3/cloudflare-r2.mdx +52 -81
- package/docs/self-hosting/advanced/s3/cloudflare-r2.zh-CN.mdx +51 -80
- package/docs/self-hosting/advanced/s3/tencent-cloud.mdx +20 -34
- package/docs/self-hosting/advanced/s3/tencent-cloud.zh-CN.mdx +28 -43
- package/docs/self-hosting/advanced/s3.mdx +30 -34
- package/docs/self-hosting/advanced/s3.zh-CN.mdx +28 -33
- package/docs/self-hosting/advanced/settings-url-share.mdx +6 -6
- package/docs/self-hosting/advanced/settings-url-share.zh-CN.mdx +19 -19
- package/docs/self-hosting/advanced/upstream-sync.mdx +73 -89
- package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +71 -87
- package/docs/self-hosting/advanced/webrtc.mdx +14 -21
- package/docs/self-hosting/advanced/webrtc.zh-CN.mdx +19 -26
- package/docs/self-hosting/environment-variables/analytics.zh-CN.mdx +0 -3
- package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +1 -1
- package/docs/self-hosting/environment-variables/basic.mdx +13 -13
- package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +15 -15
- package/docs/self-hosting/environment-variables/model-provider.mdx +1 -1
- package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +1 -1
- package/docs/self-hosting/environment-variables/s3.mdx +3 -4
- package/docs/self-hosting/environment-variables/s3.zh-CN.mdx +5 -7
- package/docs/self-hosting/environment-variables.mdx +8 -4
- package/docs/self-hosting/environment-variables.zh-CN.mdx +4 -0
- package/docs/self-hosting/examples/azure-openai.mdx +9 -12
- package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +8 -11
- package/docs/self-hosting/examples/ollama.mdx +8 -7
- package/docs/self-hosting/examples/ollama.zh-CN.mdx +8 -7
- package/docs/self-hosting/platform/alibaba-cloud.mdx +5 -7
- package/docs/self-hosting/platform/alibaba-cloud.zh-CN.mdx +5 -7
- package/docs/self-hosting/platform/btpanel.mdx +3 -2
- package/docs/self-hosting/platform/btpanel.zh-CN.mdx +3 -3
- package/docs/self-hosting/platform/docker-compose.mdx +75 -85
- package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +75 -85
- package/docs/self-hosting/platform/docker.mdx +87 -92
- package/docs/self-hosting/platform/docker.zh-CN.mdx +96 -115
- package/docs/self-hosting/platform/netlify.mdx +44 -94
- package/docs/self-hosting/platform/netlify.zh-CN.mdx +40 -90
- package/docs/self-hosting/platform/railway.mdx +6 -7
- package/docs/self-hosting/platform/railway.zh-CN.mdx +6 -7
- package/docs/self-hosting/platform/repocloud.mdx +6 -7
- package/docs/self-hosting/platform/repocloud.zh-CN.mdx +6 -7
- package/docs/self-hosting/platform/sealos.mdx +6 -7
- package/docs/self-hosting/platform/sealos.zh-CN.mdx +6 -7
- package/docs/self-hosting/platform/vercel.mdx +7 -8
- package/docs/self-hosting/platform/vercel.zh-CN.mdx +7 -8
- package/docs/self-hosting/platform/zeabur.mdx +29 -32
- package/docs/self-hosting/platform/zeabur.zh-CN.mdx +29 -32
- package/docs/self-hosting/server-database/docker-compose.mdx +44 -71
- package/docs/self-hosting/server-database/docker-compose.zh-CN.mdx +44 -71
- package/docs/self-hosting/server-database/docker.mdx +84 -88
- package/docs/self-hosting/server-database/docker.zh-CN.mdx +87 -91
- package/docs/self-hosting/server-database/dokploy.mdx +18 -1
- package/docs/self-hosting/server-database/dokploy.zh-CN.mdx +84 -68
- package/docs/self-hosting/server-database/repocloud.mdx +7 -9
- package/docs/self-hosting/server-database/repocloud.zh-CN.mdx +9 -11
- package/docs/self-hosting/server-database/vercel.mdx +158 -243
- package/docs/self-hosting/server-database/vercel.zh-CN.mdx +137 -205
- package/docs/self-hosting/server-database/zeabur.mdx +21 -23
- package/docs/self-hosting/server-database/zeabur.zh-CN.mdx +20 -22
- package/docs/self-hosting/server-database.mdx +34 -36
- package/docs/self-hosting/server-database.zh-CN.mdx +34 -37
- package/docs/self-hosting/start.mdx +1 -4
- package/docs/self-hosting/start.zh-CN.mdx +1 -1
- package/docs/usage/agents/agent-organization.mdx +5 -21
- package/docs/usage/agents/agent-organization.zh-CN.mdx +5 -21
- package/docs/usage/agents/concepts.mdx +4 -4
- package/docs/usage/agents/concepts.zh-CN.mdx +4 -4
- package/docs/usage/agents/custom-agent.mdx +2 -2
- package/docs/usage/agents/custom-agent.zh-CN.mdx +2 -2
- package/docs/usage/agents/model.mdx +4 -4
- package/docs/usage/agents/model.zh-CN.mdx +6 -6
- package/docs/usage/agents/prompt.mdx +5 -6
- package/docs/usage/agents/prompt.zh-CN.mdx +5 -6
- package/docs/usage/agents/topics.mdx +2 -2
- package/docs/usage/agents/topics.zh-CN.mdx +2 -2
- package/docs/usage/features/agent-market.mdx +2 -2
- package/docs/usage/features/agent-market.zh-CN.mdx +2 -2
- package/docs/usage/features/auth.mdx +1 -5
- package/docs/usage/features/auth.zh-CN.mdx +1 -5
- package/docs/usage/features/database.mdx +1 -5
- package/docs/usage/features/database.zh-CN.mdx +1 -5
- package/docs/usage/features/local-llm.mdx +2 -6
- package/docs/usage/features/local-llm.zh-CN.mdx +2 -6
- package/docs/usage/features/mobile.mdx +1 -5
- package/docs/usage/features/mobile.zh-CN.mdx +1 -5
- package/docs/usage/features/multi-ai-providers.mdx +3 -11
- package/docs/usage/features/multi-ai-providers.zh-CN.mdx +3 -11
- package/docs/usage/features/plugin-system.mdx +9 -10
- package/docs/usage/features/plugin-system.zh-CN.mdx +9 -10
- package/docs/usage/features/pwa.mdx +11 -25
- package/docs/usage/features/pwa.zh-CN.mdx +11 -25
- package/docs/usage/features/text-to-image.mdx +2 -2
- package/docs/usage/features/text-to-image.zh-CN.mdx +2 -2
- package/docs/usage/features/theme.mdx +1 -6
- package/docs/usage/features/theme.zh-CN.mdx +1 -6
- package/docs/usage/features/tts.mdx +3 -7
- package/docs/usage/features/tts.zh-CN.mdx +3 -7
- package/docs/usage/features/vision.mdx +2 -2
- package/docs/usage/features/vision.zh-CN.mdx +2 -2
- package/docs/usage/foundation/basic.mdx +7 -18
- package/docs/usage/foundation/basic.zh-CN.mdx +6 -16
- package/docs/usage/foundation/share.mdx +3 -13
- package/docs/usage/foundation/share.zh-CN.mdx +3 -13
- package/docs/usage/foundation/text2image.mdx +3 -12
- package/docs/usage/foundation/text2image.zh-CN.mdx +3 -12
- package/docs/usage/foundation/translate.mdx +3 -13
- package/docs/usage/foundation/translate.zh-CN.mdx +3 -13
- package/docs/usage/foundation/tts-stt.mdx +3 -12
- package/docs/usage/foundation/tts-stt.zh-CN.mdx +3 -12
- package/docs/usage/foundation/vision.mdx +4 -16
- package/docs/usage/foundation/vision.zh-CN.mdx +4 -16
- package/docs/usage/plugins/basic-usage.mdx +7 -30
- package/docs/usage/plugins/basic-usage.zh-CN.mdx +7 -30
- package/docs/usage/plugins/development.mdx +30 -78
- package/docs/usage/plugins/development.zh-CN.mdx +31 -79
- package/docs/usage/plugins/store.mdx +2 -10
- package/docs/usage/plugins/store.zh-CN.mdx +2 -10
- package/docs/usage/providers/ai21.mdx +17 -33
- package/docs/usage/providers/ai21.zh-CN.mdx +17 -33
- package/docs/usage/providers/ai360.mdx +17 -33
- package/docs/usage/providers/ai360.zh-CN.mdx +20 -36
- package/docs/usage/providers/anthropic.mdx +23 -45
- package/docs/usage/providers/anthropic.zh-CN.mdx +22 -44
- package/docs/usage/providers/azure.mdx +21 -51
- package/docs/usage/providers/azure.zh-CN.mdx +19 -48
- package/docs/usage/providers/baichuan.mdx +16 -34
- package/docs/usage/providers/baichuan.zh-CN.mdx +15 -33
- package/docs/usage/providers/bedrock.mdx +38 -87
- package/docs/usage/providers/bedrock.zh-CN.mdx +37 -86
- package/docs/usage/providers/cloudflare.mdx +25 -48
- package/docs/usage/providers/cloudflare.zh-CN.mdx +24 -45
- package/docs/usage/providers/deepseek.mdx +25 -51
- package/docs/usage/providers/deepseek.zh-CN.mdx +24 -50
- package/docs/usage/providers/fireworksai.mdx +23 -43
- package/docs/usage/providers/fireworksai.zh-CN.mdx +21 -41
- package/docs/usage/providers/gemini.mdx +20 -46
- package/docs/usage/providers/gemini.zh-CN.mdx +20 -46
- package/docs/usage/providers/giteeai.mdx +24 -45
- package/docs/usage/providers/giteeai.zh-CN.mdx +22 -43
- package/docs/usage/providers/github.mdx +19 -45
- package/docs/usage/providers/github.zh-CN.mdx +19 -44
- package/docs/usage/providers/groq.mdx +12 -29
- package/docs/usage/providers/groq.zh-CN.mdx +11 -28
- package/docs/usage/providers/hunyuan.mdx +19 -39
- package/docs/usage/providers/hunyuan.zh-CN.mdx +18 -38
- package/docs/usage/providers/internlm.mdx +21 -38
- package/docs/usage/providers/internlm.zh-CN.mdx +19 -36
- package/docs/usage/providers/minimax.mdx +24 -50
- package/docs/usage/providers/minimax.zh-CN.mdx +22 -48
- package/docs/usage/providers/mistral.mdx +21 -39
- package/docs/usage/providers/mistral.zh-CN.mdx +20 -38
- package/docs/usage/providers/moonshot.mdx +20 -38
- package/docs/usage/providers/moonshot.zh-CN.mdx +19 -37
- package/docs/usage/providers/novita.mdx +20 -43
- package/docs/usage/providers/novita.zh-CN.mdx +19 -42
- package/docs/usage/providers/ollama/gemma.mdx +12 -29
- package/docs/usage/providers/ollama/gemma.zh-CN.mdx +12 -30
- package/docs/usage/providers/ollama/qwen.mdx +17 -32
- package/docs/usage/providers/ollama/qwen.zh-CN.mdx +12 -27
- package/docs/usage/providers/ollama.mdx +67 -99
- package/docs/usage/providers/ollama.zh-CN.mdx +67 -99
- package/docs/usage/providers/openai.mdx +42 -56
- package/docs/usage/providers/openai.zh-CN.mdx +39 -52
- package/docs/usage/providers/openrouter.mdx +48 -84
- package/docs/usage/providers/openrouter.zh-CN.mdx +31 -67
- package/docs/usage/providers/perplexity.mdx +16 -34
- package/docs/usage/providers/perplexity.zh-CN.mdx +16 -34
- package/docs/usage/providers/qwen.mdx +26 -52
- package/docs/usage/providers/qwen.zh-CN.mdx +25 -51
- package/docs/usage/providers/sensenova.mdx +24 -45
- package/docs/usage/providers/sensenova.zh-CN.mdx +22 -43
- package/docs/usage/providers/siliconcloud.mdx +17 -33
- package/docs/usage/providers/siliconcloud.zh-CN.mdx +17 -33
- package/docs/usage/providers/spark.mdx +20 -40
- package/docs/usage/providers/spark.zh-CN.mdx +19 -39
- package/docs/usage/providers/stepfun.mdx +17 -35
- package/docs/usage/providers/stepfun.zh-CN.mdx +17 -35
- package/docs/usage/providers/taichu.mdx +16 -34
- package/docs/usage/providers/taichu.zh-CN.mdx +15 -33
- package/docs/usage/providers/togetherai.mdx +18 -40
- package/docs/usage/providers/togetherai.zh-CN.mdx +18 -40
- package/docs/usage/providers/upstage.mdx +18 -34
- package/docs/usage/providers/upstage.zh-CN.mdx +17 -33
- package/docs/usage/providers/wenxin.mdx +22 -42
- package/docs/usage/providers/wenxin.zh-CN.mdx +20 -40
- package/docs/usage/providers/xai.mdx +21 -38
- package/docs/usage/providers/xai.zh-CN.mdx +20 -37
- package/docs/usage/providers/zeroone.mdx +22 -48
- package/docs/usage/providers/zeroone.zh-CN.mdx +22 -48
- package/docs/usage/providers/zhipu.mdx +17 -35
- package/docs/usage/providers/zhipu.zh-CN.mdx +18 -34
- package/docs/usage/providers.mdx +1 -6
- package/docs/usage/providers.zh-CN.mdx +1 -6
- package/docs/usage/start.mdx +4 -18
- package/docs/usage/start.zh-CN.mdx +2 -19
- package/docs/usage/tools-calling/anthropic.mdx +18 -51
- package/docs/usage/tools-calling/anthropic.zh-CN.mdx +22 -55
- package/docs/usage/tools-calling/google.mdx +16 -23
- package/docs/usage/tools-calling/google.zh-CN.mdx +17 -24
- package/docs/usage/tools-calling/groq.mdx +9 -0
- package/docs/usage/tools-calling/groq.zh-CN.mdx +44 -70
- package/docs/usage/tools-calling/moonshot.mdx +9 -0
- package/docs/usage/tools-calling/openai.mdx +19 -44
- package/docs/usage/tools-calling/openai.zh-CN.mdx +20 -45
- package/docs/usage/tools-calling.mdx +9 -0
- package/docs/usage/tools-calling.zh-CN.mdx +60 -68
- package/next.config.ts +1 -0
- package/package.json +48 -41
- package/scripts/mdxWorkflow/index.ts +7 -0
- package/src/app/(main)/(mobile)/me/(home)/features/Header.tsx +2 -1
- package/src/app/(main)/(mobile)/me/data/features/Header.tsx +1 -1
- package/src/app/(main)/(mobile)/me/profile/features/Header.tsx +1 -1
- package/src/app/(main)/(mobile)/me/settings/features/Header.tsx +1 -1
- package/src/app/(main)/@nav/_layout/Mobile.tsx +2 -1
- package/src/app/(main)/chat/(workspace)/@topic/features/SystemRole/SystemRoleContent.tsx +2 -1
- package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/ByTimeMode/GroupItem.tsx +2 -2
- package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Main.tsx +2 -1
- package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/index.tsx +1 -1
- package/src/app/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/ChatHeaderTitle.tsx +2 -1
- package/src/app/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/index.tsx +1 -1
- package/src/app/(main)/chat/@session/_layout/Mobile/SessionHeader.tsx +2 -1
- package/src/app/(main)/chat/settings/_layout/Desktop/Header.tsx +1 -1
- package/src/app/(main)/chat/settings/_layout/Mobile/Header.tsx +1 -1
- package/src/app/(main)/discover/(detail)/provider/[slug]/features/InfoSidebar/SuggestionItem.tsx +8 -6
- package/src/app/(main)/discover/(list)/_layout/Desktop/Nav.tsx +1 -1
- package/src/app/(main)/discover/(list)/_layout/Mobile/Header.tsx +2 -1
- package/src/app/(main)/discover/_layout/Desktop/Header.tsx +1 -1
- package/src/app/(main)/discover/components/VirtuosoGridList/index.tsx +9 -5
- package/src/app/(main)/discover/search/_layout/Mobile/Header.tsx +1 -1
- package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/EmptyStatus.tsx +21 -13
- package/src/app/(main)/repos/[id]/evals/evaluation/EvaluationList/index.tsx +1 -1
- package/src/app/(main)/settings/sync/features/DeviceInfo/SystemIcon.tsx +2 -0
- package/src/components/Branding/ProductLogo/Custom.tsx +19 -20
- package/src/components/BrowserIcon/index.tsx +19 -30
- package/src/components/BubblesLoading/index.tsx +31 -23
- package/src/components/FunctionModal/createModalHooks.ts +6 -3
- package/src/components/StopLoading.tsx +10 -7
- package/src/features/ChatInput/Desktop/InputArea/index.tsx +2 -2
- package/src/features/InitClientDB/EnableModal.tsx +2 -2
- package/src/features/InitClientDB/{PGliteSVG.tsx → PGliteIcon.tsx} +17 -11
- package/src/features/ShareModal/ShareImage/index.tsx +32 -22
- package/src/features/ShareModal/ShareJSON/Preview.tsx +2 -2
- package/src/features/ShareModal/ShareJSON/index.tsx +49 -37
- package/src/features/ShareModal/ShareText/Preview.tsx +4 -1
- package/src/features/ShareModal/ShareText/index.tsx +49 -38
- package/src/features/ShareModal/index.tsx +1 -1
- package/src/features/ShareModal/style.ts +30 -0
- package/src/utils/colorUtils.ts +1 -1
- package/src/components/BrowserIcon/components/Brave.tsx +0 -56
- package/src/components/BrowserIcon/components/Chrome.tsx +0 -14
- package/src/components/BrowserIcon/components/Chromium.tsx +0 -14
- package/src/components/BrowserIcon/components/Edge.tsx +0 -36
- package/src/components/BrowserIcon/components/Firefox.tsx +0 -38
- package/src/components/BrowserIcon/components/Opera.tsx +0 -19
- package/src/components/BrowserIcon/components/Safari.tsx +0 -23
- package/src/components/BrowserIcon/components/Samsung.tsx +0 -21
package/src/app/(main)/discover/(detail)/provider/[slug]/features/InfoSidebar/SuggestionItem.tsx
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import { ProviderCombine } from '@lobehub/icons';
|
2
2
|
import { Typography } from 'antd';
|
3
3
|
import { createStyles } from 'antd-style';
|
4
|
-
import { memo } from 'react';
|
4
|
+
import { CSSProperties, memo } from 'react';
|
5
5
|
import { useTranslation } from 'react-i18next';
|
6
|
-
import { Flexbox
|
6
|
+
import { Flexbox } from 'react-layout-kit';
|
7
7
|
|
8
8
|
import { DiscoverProviderItem } from '@/types/discover';
|
9
9
|
|
@@ -44,17 +44,19 @@ const useStyles = createStyles(({ css, token, isDarkMode }) => ({
|
|
44
44
|
}));
|
45
45
|
|
46
46
|
export interface SuggestionItemProps
|
47
|
-
extends Omit<DiscoverProviderItem, 'suggestions' | 'socialData'
|
48
|
-
|
47
|
+
extends Omit<DiscoverProviderItem, 'suggestions' | 'socialData'> {
|
48
|
+
className?: string;
|
49
|
+
style?: CSSProperties;
|
50
|
+
}
|
49
51
|
|
50
52
|
const SuggestionItem = memo<SuggestionItemProps>(
|
51
|
-
({ className, meta, identifier, models,
|
53
|
+
({ className, meta, identifier, models, style }) => {
|
52
54
|
const { title, description } = meta;
|
53
55
|
const { t } = useTranslation(['discover', 'providers']);
|
54
56
|
const { cx, styles, theme } = useStyles();
|
55
57
|
|
56
58
|
return (
|
57
|
-
<Flexbox className={cx(styles.container, className)} gap={12} key={identifier} {
|
59
|
+
<Flexbox className={cx(styles.container, className)} gap={12} key={identifier} style={style}>
|
58
60
|
<ProviderCombine provider={identifier} size={24} title={title} />
|
59
61
|
<Flexbox gap={8} horizontal style={{ fontSize: 12, marginTop: -8 }}>
|
60
62
|
<div style={{ color: theme.colorTextSecondary }}>@{meta.title}</div>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
|
-
import { ActionIcon
|
3
|
+
import { ActionIcon } from '@lobehub/ui';
|
4
|
+
import { MobileNavBar } from '@lobehub/ui/mobile';
|
4
5
|
import { createStyles } from 'antd-style';
|
5
6
|
import { SearchIcon } from 'lucide-react';
|
6
7
|
import { memo, useState } from 'react';
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { Grid } from '@lobehub/ui';
|
2
|
-
import { memo } from 'react';
|
1
|
+
import { DivProps, Grid } from '@lobehub/ui';
|
2
|
+
import { forwardRef, memo } from 'react';
|
3
3
|
import { Flexbox } from 'react-layout-kit';
|
4
4
|
import { VirtuosoGrid, VirtuosoGridProps } from 'react-virtuoso';
|
5
5
|
|
@@ -10,7 +10,11 @@ export const VirtuosoList = memo<VirtuosoGridProps<any, any>>(({ data, ...rest }
|
|
10
10
|
const initialItemCount = data && data?.length >= 8 ? 8 : data?.length;
|
11
11
|
return (
|
12
12
|
<VirtuosoGrid
|
13
|
-
components={{
|
13
|
+
components={{
|
14
|
+
List: forwardRef<HTMLDivElement, DivProps>((props, ref) => (
|
15
|
+
<Flexbox gap={16} ref={ref} {...props} />
|
16
|
+
)),
|
17
|
+
}}
|
14
18
|
customScrollParent={scrollParent}
|
15
19
|
data={data}
|
16
20
|
initialItemCount={initialItemCount}
|
@@ -31,9 +35,9 @@ const VirtuosoGridList = memo<VirtuosoGridProps<any, any>>(
|
|
31
35
|
return (
|
32
36
|
<VirtuosoGrid
|
33
37
|
components={{
|
34
|
-
List: (props, ref) => (
|
38
|
+
List: forwardRef<HTMLDivElement, DivProps>((props, ref) => (
|
35
39
|
<Grid gap={16} maxItemWidth={280} ref={ref} rows={rows} {...props} />
|
36
|
-
),
|
40
|
+
)),
|
37
41
|
}}
|
38
42
|
customScrollParent={scrollParent}
|
39
43
|
data={data}
|
@@ -1,5 +1,6 @@
|
|
1
|
+
import type { IconType } from '@lobehub/icons';
|
1
2
|
import { createStyles } from 'antd-style';
|
2
|
-
import
|
3
|
+
import { forwardRef, memo } from 'react';
|
3
4
|
import { Trans } from 'react-i18next';
|
4
5
|
import { Flexbox } from 'react-layout-kit';
|
5
6
|
|
@@ -21,7 +22,23 @@ const useStyles = createStyles(({ css, token }) => ({
|
|
21
22
|
}
|
22
23
|
`,
|
23
24
|
}));
|
24
|
-
|
25
|
+
|
26
|
+
const LineIcon: IconType = forwardRef(({ size = 130, style, ...rest }, ref) => (
|
27
|
+
<svg
|
28
|
+
fill="currentColor"
|
29
|
+
fillRule="evenodd"
|
30
|
+
ref={ref}
|
31
|
+
style={{ flex: 'none', lineHeight: 1, ...style }}
|
32
|
+
viewBox="0 0 126 64"
|
33
|
+
width={size}
|
34
|
+
xmlns="http://www.w3.org/2000/svg"
|
35
|
+
{...rest}
|
36
|
+
>
|
37
|
+
<path d="M.5 63a.5.5 0 001 0h-1zM122 1l-2.887 5h5.774L122 1zM1.5 62.042a.5.5 0 10-1 0h1zm-1-1.917a.5.5 0 001 0h-1zm1-1.917a.5.5 0 00-1 0h1zm-1-1.916a.5.5 0 001 0h-1zm1-1.917a.5.5 0 00-1 0h1zm-1-1.917a.5.5 0 101 0h-1zm1-1.916a.5.5 0 10-1 0h1zm-1-1.917a.5.5 0 001 0h-1zm1-1.917a.5.5 0 00-1 0h1zm-1-1.916a.5.5 0 001 0h-1zm1-1.917a.5.5 0 00-1 0h1zm-1-1.917a.5.5 0 101 0h-1zm1.063-1.938a.5.5 0 10-.991-.13l.991.13zm-.418-2.274a.5.5 0 00.924.383l-.924-.383zm1.904-1.312a.5.5 0 10-.793-.609l.793.61zm.776-2.178a.5.5 0 00.61.793l-.61-.793zm2.304-.187a.5.5 0 00-.383-.924l.383.924zm1.761-1.497a.5.5 0 00.13.991l-.13-.991zm2.12.928a.5.5 0 100-1v1zm2.019-1a.5.5 0 000 1v-1zm2.02 1a.5.5 0 000-1v1zm2.018-1a.5.5 0 000 1v-1zm2.02 1a.5.5 0 100-1v1zm2.019-1a.5.5 0 100 1v-1zm2.019 1a.5.5 0 000-1v1zm2.02-1a.5.5 0 000 1v-1zm2.018 1a.5.5 0 000-1v1zm2.02-1a.5.5 0 000 1v-1zm2.019 1a.5.5 0 100-1v1zm2.02-1a.5.5 0 100 1v-1zm2.018 1a.5.5 0 000-1v1zm2.02-1a.5.5 0 000 1v-1zm2.019 1a.5.5 0 100-1v1zm2.02-1a.5.5 0 100 1v-1zm2.018 1a.5.5 0 000-1v1zm2.02-1a.5.5 0 000 1v-1zm2.019 1a.5.5 0 000-1v1zm2.019-1a.5.5 0 000 1v-1zm2.02 1a.5.5 0 100-1v1zm2.018-1a.5.5 0 100 1v-1zm2.02 1a.5.5 0 000-1v1zm2.019-1a.5.5 0 000 1v-1zm2.02 1a.5.5 0 100-1v1zm2.018-1a.5.5 0 100 1v-1zm2.02 1a.5.5 0 000-1v1zm2.019-1a.5.5 0 000 1v-1zm2.02 1a.5.5 0 000-1v1zm2.018-1a.5.5 0 000 1v-1zm2.02 1a.5.5 0 100-1v1zm2.019-1a.5.5 0 100 1v-1zm2.019 1a.5.5 0 000-1v1zm2.02-1a.5.5 0 000 1v-1zm2.019 1a.5.5 0 000-1v1zm2.019-1a.5.5 0 100 1v-1zm2.019 1a.5.5 0 100-1v1zm2.02-1a.5.5 0 100 1v-1zm2.018 1a.5.5 0 000-1v1zm2.02-1a.5.5 0 000 1v-1zm2.019 1a.5.5 0 000-1v1zm2.02-1a.5.5 0 100 1v-1zm2.018 1a.5.5 0 100-1v1zm2.02-1a.5.5 0 100 1v-1zm2.019 1a.5.5 0 000-1v1zm2.019-1a.5.5 0 000 1v-1zm2.019 1a.5.5 0 000-1v1zm2.019-1a.5.5 0 000 1v-1zm2.02 1a.5.5 0 000-1v1zm2.019-1a.5.5 0 000 1v-1zm2.019 1a.5.5 0 000-1v1zm2.019-1a.5.5 0 000 1v-1zm2.12.928a.501.501 0 00-.13-.991l.13.991zm1.761-1.497a.501.501 0 00.383.924l-.383-.924zm2.304-.187a.5.5 0 00-.609-.793l.609.793zm.776-2.178a.5.5 0 10.793.609l-.793-.61zm1.904-1.312a.5.5 0 10-.924-.383l.924.383zm-.418-2.274a.5.5 0 10.991.13l-.991-.13zm1.063-1.938a.5.5 0 00-1 0h1zm-1-1.917a.5.5 0 001 0h-1zm1-1.917a.5.5 0 00-1 0h1zm-1-1.916a.5.5 0 001 0h-1zm1-1.917a.5.5 0 00-1 0h1zm-1-1.917a.5.5 0 001 0h-1zm1-1.916a.5.5 0 00-1 0h1zm-1-1.917a.5.5 0 001 0h-1zm1-1.917a.5.5 0 00-1 0h1zm-1-1.916a.5.5 0 001 0h-1zm1-1.917a.5.5 0 00-1 0h1zm-1-1.917a.5.5 0 001 0h-1zM1.5 63v-.958h-1V63h1zm0-2.875v-1.917h-1v1.917h1zm0-3.833v-1.917h-1v1.917h1zm0-3.834v-1.916h-1v1.916h1zm0-3.833v-1.917h-1v1.917h1zm0-3.833v-1.917h-1v1.917h1zm0-3.834V40h-1v.958h1zm0-.958c0-.333.022-.66.063-.98l-.991-.13A8.574 8.574 0 00.5 40h1zm.569-2.87c.253-.61.584-1.18.98-1.696l-.793-.609a8.49 8.49 0 00-1.11 1.921l.923.383zm2.365-3.08a7.487 7.487 0 011.695-.981l-.383-.924a8.495 8.495 0 00-1.92 1.111l.608.793zm3.586-1.487c.32-.041.648-.063.98-.063v-1c-.376 0-.746.024-1.11.072l.13.991zM9 32.5h1.01v-1H9v1zm3.029 0h2.02v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.019v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.019v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.019v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.02v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.02v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.02v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.019v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.019v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.019v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.019v-1h-2.02v1zm4.038 0h2.019v-1h-2.019v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.019v-1h-2.019v1zm4.038 0H114v-1h-1.01v1zm1.01 0c.376 0 .746-.024 1.11-.072l-.13-.991c-.32.041-.648.063-.98.063v1zm3.254-.645a8.506 8.506 0 001.921-1.111l-.609-.793a7.519 7.519 0 01-1.695.98l.383.924zm3.49-2.68a8.516 8.516 0 001.111-1.921l-.924-.383a7.527 7.527 0 01-.98 1.695l.793.609zm1.684-4.066c.048-.363.072-.733.072-1.109h-1c0 .332-.022.66-.063.98l.991.13zM122.5 24v-.958h-1V24h1zm0-2.875v-1.917h-1v1.917h1zm0-3.833v-1.917h-1v1.917h1zm0-3.834v-1.916h-1v1.916h1zm0-3.833V7.708h-1v1.917h1zm0-3.833V3.875h-1v1.917h1z"></path>
|
38
|
+
</svg>
|
39
|
+
));
|
40
|
+
|
41
|
+
const EmptyStatus = memo(() => {
|
25
42
|
const { styles } = useStyles();
|
26
43
|
return (
|
27
44
|
<Flexbox
|
@@ -31,16 +48,7 @@ const EmptyStatus = () => {
|
|
31
48
|
paddingInline={20}
|
32
49
|
width={'100%'}
|
33
50
|
>
|
34
|
-
<
|
35
|
-
fill="currentColor"
|
36
|
-
fillRule="evenodd"
|
37
|
-
style={{ flex: 'none', height: 'fit-content', lineHeight: 1 }}
|
38
|
-
viewBox="0 0 126 64"
|
39
|
-
width={130}
|
40
|
-
xmlns="http://www.w3.org/2000/svg"
|
41
|
-
>
|
42
|
-
<path d="M.5 63a.5.5 0 001 0h-1zM122 1l-2.887 5h5.774L122 1zM1.5 62.042a.5.5 0 10-1 0h1zm-1-1.917a.5.5 0 001 0h-1zm1-1.917a.5.5 0 00-1 0h1zm-1-1.916a.5.5 0 001 0h-1zm1-1.917a.5.5 0 00-1 0h1zm-1-1.917a.5.5 0 101 0h-1zm1-1.916a.5.5 0 10-1 0h1zm-1-1.917a.5.5 0 001 0h-1zm1-1.917a.5.5 0 00-1 0h1zm-1-1.916a.5.5 0 001 0h-1zm1-1.917a.5.5 0 00-1 0h1zm-1-1.917a.5.5 0 101 0h-1zm1.063-1.938a.5.5 0 10-.991-.13l.991.13zm-.418-2.274a.5.5 0 00.924.383l-.924-.383zm1.904-1.312a.5.5 0 10-.793-.609l.793.61zm.776-2.178a.5.5 0 00.61.793l-.61-.793zm2.304-.187a.5.5 0 00-.383-.924l.383.924zm1.761-1.497a.5.5 0 00.13.991l-.13-.991zm2.12.928a.5.5 0 100-1v1zm2.019-1a.5.5 0 000 1v-1zm2.02 1a.5.5 0 000-1v1zm2.018-1a.5.5 0 000 1v-1zm2.02 1a.5.5 0 100-1v1zm2.019-1a.5.5 0 100 1v-1zm2.019 1a.5.5 0 000-1v1zm2.02-1a.5.5 0 000 1v-1zm2.018 1a.5.5 0 000-1v1zm2.02-1a.5.5 0 000 1v-1zm2.019 1a.5.5 0 100-1v1zm2.02-1a.5.5 0 100 1v-1zm2.018 1a.5.5 0 000-1v1zm2.02-1a.5.5 0 000 1v-1zm2.019 1a.5.5 0 100-1v1zm2.02-1a.5.5 0 100 1v-1zm2.018 1a.5.5 0 000-1v1zm2.02-1a.5.5 0 000 1v-1zm2.019 1a.5.5 0 000-1v1zm2.019-1a.5.5 0 000 1v-1zm2.02 1a.5.5 0 100-1v1zm2.018-1a.5.5 0 100 1v-1zm2.02 1a.5.5 0 000-1v1zm2.019-1a.5.5 0 000 1v-1zm2.02 1a.5.5 0 100-1v1zm2.018-1a.5.5 0 100 1v-1zm2.02 1a.5.5 0 000-1v1zm2.019-1a.5.5 0 000 1v-1zm2.02 1a.5.5 0 000-1v1zm2.018-1a.5.5 0 000 1v-1zm2.02 1a.5.5 0 100-1v1zm2.019-1a.5.5 0 100 1v-1zm2.019 1a.5.5 0 000-1v1zm2.02-1a.5.5 0 000 1v-1zm2.019 1a.5.5 0 000-1v1zm2.019-1a.5.5 0 100 1v-1zm2.019 1a.5.5 0 100-1v1zm2.02-1a.5.5 0 100 1v-1zm2.018 1a.5.5 0 000-1v1zm2.02-1a.5.5 0 000 1v-1zm2.019 1a.5.5 0 000-1v1zm2.02-1a.5.5 0 100 1v-1zm2.018 1a.5.5 0 100-1v1zm2.02-1a.5.5 0 100 1v-1zm2.019 1a.5.5 0 000-1v1zm2.019-1a.5.5 0 000 1v-1zm2.019 1a.5.5 0 000-1v1zm2.019-1a.5.5 0 000 1v-1zm2.02 1a.5.5 0 000-1v1zm2.019-1a.5.5 0 000 1v-1zm2.019 1a.5.5 0 000-1v1zm2.019-1a.5.5 0 000 1v-1zm2.12.928a.501.501 0 00-.13-.991l.13.991zm1.761-1.497a.501.501 0 00.383.924l-.383-.924zm2.304-.187a.5.5 0 00-.609-.793l.609.793zm.776-2.178a.5.5 0 10.793.609l-.793-.61zm1.904-1.312a.5.5 0 10-.924-.383l.924.383zm-.418-2.274a.5.5 0 10.991.13l-.991-.13zm1.063-1.938a.5.5 0 00-1 0h1zm-1-1.917a.5.5 0 001 0h-1zm1-1.917a.5.5 0 00-1 0h1zm-1-1.916a.5.5 0 001 0h-1zm1-1.917a.5.5 0 00-1 0h1zm-1-1.917a.5.5 0 001 0h-1zm1-1.916a.5.5 0 00-1 0h1zm-1-1.917a.5.5 0 001 0h-1zm1-1.917a.5.5 0 00-1 0h1zm-1-1.916a.5.5 0 001 0h-1zm1-1.917a.5.5 0 00-1 0h1zm-1-1.917a.5.5 0 001 0h-1zM1.5 63v-.958h-1V63h1zm0-2.875v-1.917h-1v1.917h1zm0-3.833v-1.917h-1v1.917h1zm0-3.834v-1.916h-1v1.916h1zm0-3.833v-1.917h-1v1.917h1zm0-3.833v-1.917h-1v1.917h1zm0-3.834V40h-1v.958h1zm0-.958c0-.333.022-.66.063-.98l-.991-.13A8.574 8.574 0 00.5 40h1zm.569-2.87c.253-.61.584-1.18.98-1.696l-.793-.609a8.49 8.49 0 00-1.11 1.921l.923.383zm2.365-3.08a7.487 7.487 0 011.695-.981l-.383-.924a8.495 8.495 0 00-1.92 1.111l.608.793zm3.586-1.487c.32-.041.648-.063.98-.063v-1c-.376 0-.746.024-1.11.072l.13.991zM9 32.5h1.01v-1H9v1zm3.029 0h2.02v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.019v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.019v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.019v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.02v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.02v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.02v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.019v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.019v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.019v-1h-2.02v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.019v-1h-2.02v1zm4.038 0h2.019v-1h-2.019v1zm4.038 0h2.02v-1h-2.02v1zm4.039 0h2.019v-1h-2.019v1zm4.038 0H114v-1h-1.01v1zm1.01 0c.376 0 .746-.024 1.11-.072l-.13-.991c-.32.041-.648.063-.98.063v1zm3.254-.645a8.506 8.506 0 001.921-1.111l-.609-.793a7.519 7.519 0 01-1.695.98l.383.924zm3.49-2.68a8.516 8.516 0 001.111-1.921l-.924-.383a7.527 7.527 0 01-.98 1.695l.793.609zm1.684-4.066c.048-.363.072-.733.072-1.109h-1c0 .332-.022.66-.063.98l.991.13zM122.5 24v-.958h-1V24h1zm0-2.875v-1.917h-1v1.917h1zm0-3.833v-1.917h-1v1.917h1zm0-3.834v-1.916h-1v1.916h1zm0-3.833V7.708h-1v1.917h1zm0-3.833V3.875h-1v1.917h1z"></path>
|
43
|
-
</svg>
|
51
|
+
<LineIcon />
|
44
52
|
<Flexbox align={'center'} className={styles.paragraph} horizontal>
|
45
53
|
<Trans i18nKey={'knowledgeBase.list.empty'} ns={'file'}>
|
46
54
|
点击 <kbd>+</kbd> 开始创建知识库
|
@@ -48,6 +56,6 @@ const EmptyStatus = () => {
|
|
48
56
|
</Flexbox>
|
49
57
|
</Flexbox>
|
50
58
|
);
|
51
|
-
};
|
59
|
+
});
|
52
60
|
|
53
61
|
export default EmptyStatus;
|
@@ -45,7 +45,7 @@ const EvaluationList = ({ knowledgeBaseId }: { knowledgeBaseId: string }) => {
|
|
45
45
|
]);
|
46
46
|
const [isCheckingStatus, setCheckingStatus] = useState(false);
|
47
47
|
const { modal } = App.useApp();
|
48
|
-
const actionRef = useRef<ActionType>();
|
48
|
+
const actionRef = useRef<ActionType>(null);
|
49
49
|
|
50
50
|
const columns: ProColumns<RAGEvalEvaluationItem>[] = [
|
51
51
|
{
|
@@ -13,6 +13,8 @@ const SystemIcon = memo<{ title?: string }>(({ title }) => {
|
|
13
13
|
|
14
14
|
if (['Mac OS', 'iOS', 'iPadOS'].includes(title)) return <SiApple size={24} />;
|
15
15
|
|
16
|
+
// Remove Microsoft brands in @icons-pack/react-simple-icons v10
|
17
|
+
// https://github.com/simple-icons/simple-icons/pull/10019
|
16
18
|
if (['Windows'].includes(title)) return <SiWindows11 size={24} />;
|
17
19
|
|
18
20
|
if (title === 'Android') return <SiAndroid size={24} />;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import type {
|
1
|
+
import type { IconType } from '@lobehub/icons';
|
2
2
|
import type { LobeChatProps } from '@lobehub/ui/brand';
|
3
3
|
import { createStyles, useTheme } from 'antd-style';
|
4
4
|
import Image, { ImageProps } from 'next/image';
|
5
|
-
import { ReactNode, memo } from 'react';
|
5
|
+
import { ReactNode, forwardRef, memo } from 'react';
|
6
6
|
import { Flexbox, FlexboxProps } from 'react-layout-kit';
|
7
7
|
|
8
8
|
import { BRANDING_LOGO_URL, BRANDING_NAME } from '@/const/branding';
|
@@ -48,24 +48,23 @@ const CustomImageLogo = memo<Omit<ImageProps, 'alt' | 'src'> & { size: number }>
|
|
48
48
|
},
|
49
49
|
);
|
50
50
|
|
51
|
-
const Divider =
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
);
|
51
|
+
const Divider: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => (
|
52
|
+
<svg
|
53
|
+
fill="none"
|
54
|
+
height={size}
|
55
|
+
ref={ref}
|
56
|
+
shapeRendering="geometricPrecision"
|
57
|
+
stroke="currentColor"
|
58
|
+
strokeLinecap="round"
|
59
|
+
strokeLinejoin="round"
|
60
|
+
style={{ flex: 'none', lineHeight: 1, ...style }}
|
61
|
+
viewBox="0 0 24 24"
|
62
|
+
width={size}
|
63
|
+
{...rest}
|
64
|
+
>
|
65
|
+
<path d="M16.88 3.549L7.12 20.451" />
|
66
|
+
</svg>
|
67
|
+
));
|
69
68
|
|
70
69
|
const CustomLogo = memo<LobeChatProps>(({ extra, size = 32, className, style, type, ...rest }) => {
|
71
70
|
const theme = useTheme();
|
@@ -1,24 +1,24 @@
|
|
1
|
+
import {
|
2
|
+
SiBrave,
|
3
|
+
SiFirefox,
|
4
|
+
SiGooglechrome,
|
5
|
+
SiMicrosoftedge,
|
6
|
+
SiOpera,
|
7
|
+
SiSafari,
|
8
|
+
SiSamsung,
|
9
|
+
} from '@icons-pack/react-simple-icons';
|
1
10
|
import React, { memo } from 'react';
|
2
11
|
|
3
|
-
import Brave from './components/Brave';
|
4
|
-
import Chrome from './components/Chrome';
|
5
|
-
import Chromium from './components/Chromium';
|
6
|
-
import Edge from './components/Edge';
|
7
|
-
import Firefox from './components/Firefox';
|
8
|
-
import Opera from './components/Opera';
|
9
|
-
import Safari from './components/Safari';
|
10
|
-
import Samsung from './components/Samsung';
|
11
|
-
|
12
12
|
const lastVersion = {
|
13
|
-
'Brave':
|
14
|
-
'Chrome':
|
15
|
-
'Chromium':
|
16
|
-
'Edge':
|
17
|
-
'Firefox':
|
18
|
-
'Mobile Safari':
|
19
|
-
'Opera':
|
20
|
-
'Safari':
|
21
|
-
'Samsung':
|
13
|
+
'Brave': SiBrave,
|
14
|
+
'Chrome': SiGooglechrome,
|
15
|
+
'Chromium': SiGooglechrome,
|
16
|
+
'Edge': SiMicrosoftedge,
|
17
|
+
'Firefox': SiFirefox,
|
18
|
+
'Mobile Safari': SiSafari,
|
19
|
+
'Opera': SiOpera,
|
20
|
+
'Safari': SiSafari,
|
21
|
+
'Samsung': SiSamsung,
|
22
22
|
};
|
23
23
|
|
24
24
|
export type Browsers = keyof typeof lastVersion;
|
@@ -35,16 +35,5 @@ export const BrowserIcon = memo<BrowserIconProps>(({ browser, className, style,
|
|
35
35
|
|
36
36
|
if (!Component) return null;
|
37
37
|
|
38
|
-
return
|
39
|
-
<Component
|
40
|
-
className={className}
|
41
|
-
height={size}
|
42
|
-
style={{
|
43
|
-
...style,
|
44
|
-
minHeight: size,
|
45
|
-
minWidth: size,
|
46
|
-
}}
|
47
|
-
width={size}
|
48
|
-
/>
|
49
|
-
);
|
38
|
+
return <Component className={className} size={size} style={style} />;
|
50
39
|
});
|
@@ -1,61 +1,69 @@
|
|
1
|
+
import type { IconType } from '@lobehub/icons';
|
1
2
|
import { css, cx, useTheme } from 'antd-style';
|
3
|
+
import { forwardRef, memo } from 'react';
|
2
4
|
import { Center } from 'react-layout-kit';
|
3
5
|
|
4
6
|
const container = css`
|
5
7
|
circle {
|
6
8
|
animation: bubble 1.5s cubic-bezier(0.05, 0.2, 0.35, 1) infinite;
|
7
|
-
}
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
10
|
+
&:nth-child(2) {
|
11
|
+
animation-delay: 0.3s;
|
12
|
+
}
|
12
13
|
|
13
|
-
|
14
|
-
|
14
|
+
&:nth-child(3) {
|
15
|
+
animation-delay: 0.6s;
|
16
|
+
}
|
15
17
|
}
|
16
18
|
|
17
19
|
@keyframes bubble {
|
18
20
|
0% {
|
19
21
|
opacity: 1;
|
20
|
-
|
21
|
-
/* transform: translateY(0); */
|
22
22
|
}
|
23
23
|
|
24
24
|
25% {
|
25
25
|
opacity: 0.5;
|
26
|
-
|
27
|
-
/* transform: translateY(-4px); */
|
28
26
|
}
|
29
27
|
|
30
28
|
75% {
|
31
29
|
opacity: 0.25;
|
32
|
-
|
33
|
-
/* transform: translateY(4px); */
|
34
30
|
}
|
35
31
|
|
36
32
|
to {
|
37
33
|
opacity: 1;
|
38
|
-
|
39
|
-
/* transform: translateY(0); */
|
40
34
|
}
|
41
35
|
}
|
42
36
|
`;
|
43
37
|
|
44
|
-
const
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
38
|
+
const BubblesLoadingIcon: IconType = forwardRef(
|
39
|
+
({ size = '1em', style, className, ...rest }, ref) => {
|
40
|
+
return (
|
41
|
+
<svg
|
42
|
+
className={cx(container, className)}
|
43
|
+
fill="currentColor"
|
44
|
+
fillRule="evenodd"
|
45
|
+
height={size}
|
46
|
+
ref={ref}
|
47
|
+
style={{ flex: 'none', lineHeight: 1, ...style }}
|
48
|
+
viewBox="0 0 60 32"
|
49
|
+
xmlns="http://www.w3.org/2000/svg"
|
50
|
+
{...rest}
|
51
|
+
>
|
52
|
+
<circle cx="7" cy="16" r="6"></circle>
|
53
|
+
<circle cx="30" cy="16" r="6"></circle>
|
54
|
+
<circle cx="53" cy="16" r="6"></circle>
|
55
|
+
</svg>
|
56
|
+
);
|
57
|
+
},
|
50
58
|
);
|
51
59
|
|
52
|
-
const BubblesLoading = () => {
|
60
|
+
const BubblesLoading = memo(() => {
|
53
61
|
const theme = useTheme();
|
54
62
|
return (
|
55
63
|
<Center style={{ fill: theme.colorTextSecondary, height: 24, width: 32 }}>
|
56
|
-
<
|
64
|
+
<BubblesLoadingIcon size={14} />
|
57
65
|
</Center>
|
58
66
|
);
|
59
|
-
};
|
67
|
+
});
|
60
68
|
|
61
69
|
export default BubblesLoading;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { App } from 'antd';
|
2
2
|
import { ModalFuncProps } from 'antd/es/modal/interface';
|
3
|
-
import { MutableRefObject, ReactNode, useRef } from 'react';
|
3
|
+
import { MutableRefObject, ReactNode, RefObject, useRef } from 'react';
|
4
4
|
|
5
5
|
import { closeIcon, useStyles } from './style';
|
6
6
|
|
@@ -21,10 +21,13 @@ const createModal = <T>(params: CreateModalProps | PropsFunc<T>) => {
|
|
21
21
|
const useModal = () => {
|
22
22
|
const { styles } = useStyles();
|
23
23
|
const { modal } = App.useApp();
|
24
|
-
const instanceRef = useRef<ModalInstance>();
|
24
|
+
const instanceRef = useRef<ModalInstance>(null);
|
25
25
|
|
26
26
|
const open = (outProps?: T) => {
|
27
|
-
const props =
|
27
|
+
const props =
|
28
|
+
typeof params === 'function'
|
29
|
+
? params(instanceRef as RefObject<ModalInstance>, outProps)
|
30
|
+
: params;
|
28
31
|
|
29
32
|
instanceRef.current = modal.confirm({
|
30
33
|
className: styles.content,
|
@@ -1,17 +1,20 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import type { IconType } from '@lobehub/icons';
|
2
|
+
import { cx, useTheme } from 'antd-style';
|
3
|
+
import { forwardRef } from 'react';
|
3
4
|
|
4
|
-
const StopLoadingIcon =
|
5
|
+
const StopLoadingIcon: IconType = forwardRef(({ size = 16, className, style, ...rest }, ref) => {
|
5
6
|
const theme = useTheme();
|
6
7
|
return (
|
7
8
|
<svg
|
8
|
-
className={'anticon'}
|
9
|
+
className={cx('anticon', className)}
|
9
10
|
color="currentColor"
|
10
|
-
height={
|
11
|
+
height={size}
|
12
|
+
ref={ref}
|
13
|
+
style={{ flex: 'none', lineHeight: 1, ...style }}
|
11
14
|
viewBox="0 0 1024 1024"
|
12
|
-
width={
|
15
|
+
width={size}
|
13
16
|
xmlns="http://www.w3.org/2000/svg"
|
14
|
-
|
17
|
+
{...rest}
|
15
18
|
>
|
16
19
|
<g fill="none">
|
17
20
|
<circle cx="512" cy="512" fill="none" r="426" stroke={theme.colorBorder} strokeWidth="72" />
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { TextArea } from '@lobehub/ui';
|
2
2
|
import { createStyles } from 'antd-style';
|
3
3
|
import { TextAreaRef } from 'antd/es/input/TextArea';
|
4
|
-
import { memo, useEffect, useRef } from 'react';
|
4
|
+
import { RefObject, memo, useEffect, useRef } from 'react';
|
5
5
|
import { useTranslation } from 'react-i18next';
|
6
6
|
|
7
7
|
import { useUserStore } from '@/store/user';
|
@@ -45,7 +45,7 @@ const InputArea = memo<InputAreaProps>(({ onSend, value, loading, onChange }) =>
|
|
45
45
|
|
46
46
|
const useCmdEnterToSend = useUserStore(preferenceSelectors.useCmdEnterToSend);
|
47
47
|
|
48
|
-
useAutoFocus(ref);
|
48
|
+
useAutoFocus(ref as RefObject<TextAreaRef>);
|
49
49
|
|
50
50
|
const hasValue = !!value;
|
51
51
|
|
@@ -9,7 +9,7 @@ import { Center, Flexbox } from 'react-layout-kit';
|
|
9
9
|
import DataStyleModal from '@/components/DataStyleModal';
|
10
10
|
import { useGlobalStore } from '@/store/global';
|
11
11
|
|
12
|
-
import
|
12
|
+
import PGliteIcon from './PGliteIcon';
|
13
13
|
|
14
14
|
const useStyles = createStyles(({ css, token, isDarkMode, responsive }) => ({
|
15
15
|
desc: css`
|
@@ -59,7 +59,7 @@ const EnableClientDBModal = memo<EnableClientDBModalProps>(({ open }) => {
|
|
59
59
|
const markPgliteEnabled = useGlobalStore((s) => s.markPgliteEnabled);
|
60
60
|
const features = [
|
61
61
|
{
|
62
|
-
avatar:
|
62
|
+
avatar: PGliteIcon,
|
63
63
|
desc: t('clientDB.modal.features.pglite.desc'),
|
64
64
|
title: t('clientDB.modal.features.pglite.title'),
|
65
65
|
},
|
@@ -1,22 +1,28 @@
|
|
1
|
-
|
1
|
+
'use client';
|
2
|
+
|
3
|
+
import type { IconType } from '@lobehub/icons';
|
2
4
|
import { forwardRef } from 'react';
|
3
5
|
|
4
|
-
|
5
|
-
|
6
|
-
({ size }, ref) => (
|
6
|
+
const PGliteIcon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
|
7
|
+
return (
|
7
8
|
<svg
|
8
9
|
fill="currentColor"
|
10
|
+
fillRule="evenodd"
|
9
11
|
height={size}
|
10
|
-
ref={ref
|
11
|
-
|
12
|
+
ref={ref}
|
13
|
+
style={{ flex: 'none', lineHeight: 1, ...style }}
|
14
|
+
viewBox="0 0 1024 1024"
|
12
15
|
width={size}
|
13
16
|
xmlns="http://www.w3.org/2000/svg"
|
17
|
+
{...rest}
|
14
18
|
>
|
19
|
+
<title>PGlite</title>
|
15
20
|
<path
|
16
21
|
clip-rule="evenodd"
|
17
|
-
d="M941.581 335.737v460.806c0 15.926-12.913 28.836-28.832 28.818l-115.283-.137c-15.243-.018-27.706-11.88-28.703-26.877.011-.569.018-1.138.018-1.711l-.004-172.904c0-47.745-38.736-86.451-86.454-86.451-46.245 0-84.052-36.359-86.342-82.068V191.496l201.708.149c79.484.058 143.892 64.553 143.892 144.
|
18
|
-
|
19
|
-
/>
|
22
|
+
d="M941.581 335.737v460.806c0 15.926-12.913 28.836-28.832 28.818l-115.283-.137c-15.243-.018-27.706-11.88-28.703-26.877.011-.569.018-1.138.018-1.711l-.004-172.904c0-47.745-38.736-86.451-86.454-86.451-46.245 0-84.052-36.359-86.342-82.068V191.496l201.708.149c79.484.058 143.892 64.553 143.892 144.092zm-576-144.281v201.818c0 47.746 38.682 86.456 86.4 86.456h86.4v-5.796c0 66.816 54.13 120.98 120.902 120.98 28.617 0 51.815 23.213 51.815 51.848v149.644c0 .688.011 1.372.025 2.057-.943 15.065-13.453 26.992-28.746 26.992l-144.982-.007.986-201.586c.079-15.915-12.755-28.88-28.66-28.959-15.904-.079-28.861 12.763-28.94 28.678l-.986 201.741v.118l-172.174-.01V623.722c0-15.915-12.895-28.819-28.8-28.819-15.906 0-28.8 12.904-28.8 28.819v201.704l-143.642-.007c-15.905-.004-28.798-12.904-28.798-28.819V335.547c0-79.58 64.471-144.093 144.001-144.092l143.999.001zm446.544 173.693c0-23.874-19.343-43.228-43.2-43.228-23.861 0-43.2 19.354-43.2 43.228 0 23.875 19.339 43.226 43.2 43.226 23.857 0 43.2-19.351 43.2-43.226z"
|
23
|
+
></path>
|
20
24
|
</svg>
|
21
|
-
)
|
22
|
-
);
|
25
|
+
);
|
26
|
+
});
|
27
|
+
|
28
|
+
export default PGliteIcon;
|
@@ -10,6 +10,7 @@ import { ImageType, imageTypeOptions, useScreenshot } from '@/hooks/useScreensho
|
|
10
10
|
import { useSessionStore } from '@/store/session';
|
11
11
|
import { sessionMetaSelectors } from '@/store/session/selectors';
|
12
12
|
|
13
|
+
import { useStyles } from '../style';
|
13
14
|
import Preview from './Preview';
|
14
15
|
import { FieldType } from './type';
|
15
16
|
|
@@ -21,13 +22,15 @@ const DEFAULT_FIELD_VALUE: FieldType = {
|
|
21
22
|
withSystemRole: false,
|
22
23
|
};
|
23
24
|
|
24
|
-
const ShareImage = memo(() => {
|
25
|
+
const ShareImage = memo<{ mobile?: boolean }>(({ mobile }) => {
|
25
26
|
const currentAgentTitle = useSessionStore(sessionMetaSelectors.currentAgentTitle);
|
26
27
|
const [fieldValue, setFieldValue] = useState<FieldType>(DEFAULT_FIELD_VALUE);
|
27
28
|
const { t } = useTranslation(['chat', 'common']);
|
29
|
+
const { styles } = useStyles();
|
28
30
|
const { loading, onDownload, title } = useScreenshot({
|
29
31
|
imageType: fieldValue.imageType,
|
30
32
|
title: currentAgentTitle,
|
33
|
+
width: mobile ? 720 : undefined,
|
31
34
|
});
|
32
35
|
|
33
36
|
const settings: FormItemProps[] = [
|
@@ -61,29 +64,36 @@ const ShareImage = memo(() => {
|
|
61
64
|
];
|
62
65
|
|
63
66
|
const isMobile = useIsMobile();
|
67
|
+
|
68
|
+
const button = (
|
69
|
+
<Button
|
70
|
+
block
|
71
|
+
loading={loading}
|
72
|
+
onClick={onDownload}
|
73
|
+
size={isMobile ? undefined : 'large'}
|
74
|
+
type={'primary'}
|
75
|
+
>
|
76
|
+
{t('shareModal.download')}
|
77
|
+
</Button>
|
78
|
+
);
|
79
|
+
|
64
80
|
return (
|
65
|
-
|
66
|
-
<
|
67
|
-
|
68
|
-
<
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
onClick={onDownload}
|
79
|
-
size={'large'}
|
80
|
-
style={isMobile ? { bottom: 0, position: 'sticky' } : undefined}
|
81
|
-
type={'primary'}
|
82
|
-
>
|
83
|
-
{t('shareModal.download')}
|
84
|
-
</Button>
|
81
|
+
<>
|
82
|
+
<Flexbox className={styles.body} gap={16} horizontal={!isMobile}>
|
83
|
+
<Preview title={title} {...fieldValue} />
|
84
|
+
<Flexbox className={styles.sidebar} gap={16}>
|
85
|
+
<Form
|
86
|
+
initialValues={DEFAULT_FIELD_VALUE}
|
87
|
+
items={settings}
|
88
|
+
itemsType={'flat'}
|
89
|
+
onValuesChange={(_, v) => setFieldValue(v)}
|
90
|
+
{...FORM_STYLE}
|
91
|
+
/>
|
92
|
+
{!isMobile && button}
|
93
|
+
</Flexbox>
|
85
94
|
</Flexbox>
|
86
|
-
|
95
|
+
{isMobile && <Flexbox className={styles.footer}>{button}</Flexbox>}
|
96
|
+
</>
|
87
97
|
);
|
88
98
|
});
|
89
99
|
|
@@ -7,8 +7,8 @@ const Preview = memo<{ content: string }>(({ content }) => {
|
|
7
7
|
const { styles } = useContainerStyles();
|
8
8
|
|
9
9
|
return (
|
10
|
-
<div className={styles.preview}>
|
11
|
-
<Highlighter language={'json'} wrap>
|
10
|
+
<div className={styles.preview} style={{ padding: 16 }}>
|
11
|
+
<Highlighter language={'json'} type={'pure'} wrap>
|
12
12
|
{content}
|
13
13
|
</Highlighter>
|
14
14
|
</div>
|