@lobehub/chat 1.0.0 → 1.0.2
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.
Potentially problematic release.
This version of @lobehub/chat might be problematic. Click here for more details.
- package/.bunfig.toml +3 -0
- package/.dockerignore +11 -0
- package/.env.example +131 -0
- package/.eslintignore +1 -2
- package/.eslintrc.js +32 -1
- package/.github/FUNDING.yml +13 -0
- package/.github/ISSUE_TEMPLATE/1_bug_report.yml +46 -22
- package/.github/ISSUE_TEMPLATE/1_bug_report_cn.yml +69 -0
- package/.github/ISSUE_TEMPLATE/2_feature_request.yml +6 -6
- package/.github/ISSUE_TEMPLATE/2_feature_request_cn.yml +21 -0
- package/.github/ISSUE_TEMPLATE/config.yml +4 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +2 -0
- package/.github/workflows/docker.yml +45 -0
- package/.github/workflows/issue-auto-comments.yml +73 -0
- package/.github/workflows/issue-close-require.yml +26 -6
- package/.github/workflows/issues-translate.yml +14 -0
- package/.github/workflows/lighthouse.yml +72 -0
- package/.github/workflows/release.yml +46 -15
- package/.github/workflows/sync.yml +54 -0
- package/.github/workflows/test.yml +44 -16
- package/.github/workflows/wiki-sync.yml +19 -0
- package/.husky/pre-commit +0 -3
- package/.i18nrc.js +41 -7
- package/.nvmrc +1 -0
- package/.seorc.cjs +9 -0
- package/CHANGELOG.md +16675 -46
- package/CODE_OF_CONDUCT.md +128 -0
- package/CONTRIBUTING.md +88 -0
- package/Dockerfile +138 -0
- package/LICENSE +38 -0
- package/README.md +696 -80
- package/README.zh-CN.md +782 -0
- package/__mocks__/zustand/traditional.ts +25 -0
- package/codecov.yml +11 -0
- package/contributing/Basic/Add-New-Authentication-Providers.md +193 -0
- package/contributing/Basic/Add-New-Authentication-Providers.zh-CN.md +192 -0
- package/contributing/Basic/Architecture.md +47 -0
- package/contributing/Basic/Architecture.zh-CN.md +47 -0
- package/contributing/Basic/Chat-API.md +136 -0
- package/contributing/Basic/Chat-API.zh-CN.md +174 -0
- package/contributing/Basic/Contributing-Guidelines.md +83 -0
- package/contributing/Basic/Contributing-Guidelines.zh-CN.md +85 -0
- package/contributing/Basic/Feature-Development-Frontend.md +126 -0
- package/contributing/Basic/Feature-Development-Frontend.zh-CN.md +126 -0
- package/contributing/Basic/Feature-Development.md +713 -0
- package/contributing/Basic/Feature-Development.zh-CN.md +707 -0
- package/contributing/Basic/Folder-Structure.md +40 -0
- package/contributing/Basic/Folder-Structure.zh-CN.md +40 -0
- package/contributing/Basic/Intro.md +111 -0
- package/contributing/Basic/Intro.zh-CN.md +111 -0
- package/contributing/Basic/Resources.md +19 -0
- package/contributing/Basic/Resources.zh-CN.md +19 -0
- package/contributing/Basic/Setup-Development.md +69 -0
- package/contributing/Basic/Setup-Development.zh-CN.md +69 -0
- package/contributing/Basic/Test.md +87 -0
- package/contributing/Basic/Test.zh-CN.md +87 -0
- package/contributing/Home.md +87 -0
- package/contributing/Internationalization/Add-New-Locale.md +62 -0
- package/contributing/Internationalization/Add-New-Locale.zh-CN.md +62 -0
- package/contributing/Internationalization/Internationalization-Implementation.md +125 -0
- package/contributing/Internationalization/Internationalization-Implementation.zh-CN.md +125 -0
- package/contributing/Others/Lighthouse.md +65 -0
- package/contributing/Others/Lighthouse.zh-CN.md +65 -0
- package/contributing/State-Management/State-Management-Intro.md +224 -0
- package/contributing/State-Management/State-Management-Intro.zh-CN.md +216 -0
- package/contributing/State-Management/State-Management-Selectors.md +68 -0
- package/contributing/State-Management/State-Management-Selectors.zh-CN.md +49 -0
- package/contributing/Upstream-Sync.md +58 -0
- package/contributing/Upstream-Sync.zh-CN.md +58 -0
- package/contributing/_Footer.md +1 -0
- package/contributing/_Sidebar.md +48 -0
- package/docs/self-hosting/advanced/analytics.mdx +31 -0
- package/docs/self-hosting/advanced/analytics.zh-CN.mdx +28 -0
- package/docs/self-hosting/advanced/authentication.mdx +67 -0
- package/docs/self-hosting/advanced/authentication.zh-CN.mdx +65 -0
- package/docs/self-hosting/advanced/feature-flags.mdx +45 -0
- package/docs/self-hosting/advanced/feature-flags.zh-CN.mdx +42 -0
- package/docs/self-hosting/advanced/model-list.mdx +48 -0
- package/docs/self-hosting/advanced/model-list.zh-CN.mdx +46 -0
- package/docs/self-hosting/advanced/settings-url-share.mdx +132 -0
- package/docs/self-hosting/advanced/settings-url-share.zh-CN.mdx +131 -0
- package/docs/self-hosting/advanced/sso-providers/auth0.mdx +134 -0
- package/docs/self-hosting/advanced/sso-providers/auth0.zh-CN.mdx +126 -0
- package/docs/self-hosting/advanced/sso-providers/authentik.mdx +75 -0
- package/docs/self-hosting/advanced/sso-providers/authentik.zh-CN.mdx +69 -0
- package/docs/self-hosting/advanced/sso-providers/github.mdx +103 -0
- package/docs/self-hosting/advanced/sso-providers/github.zh-CN.mdx +95 -0
- package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.mdx +106 -0
- package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.zh-CN.mdx +100 -0
- package/docs/self-hosting/advanced/sso-providers/zitadel.mdx +120 -0
- package/docs/self-hosting/advanced/sso-providers/zitadel.zh-CN.mdx +112 -0
- package/docs/self-hosting/advanced/upstream-sync.mdx +161 -0
- package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +153 -0
- package/docs/self-hosting/environment-variables/analytics.mdx +84 -0
- package/docs/self-hosting/environment-variables/analytics.zh-CN.mdx +82 -0
- package/docs/self-hosting/environment-variables/auth.mdx +171 -0
- package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +168 -0
- package/docs/self-hosting/environment-variables/basic.mdx +118 -0
- package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +114 -0
- package/docs/self-hosting/environment-variables/model-provider.mdx +299 -0
- package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +297 -0
- package/docs/self-hosting/environment-variables.mdx +22 -0
- package/docs/self-hosting/environment-variables.zh-CN.mdx +20 -0
- package/docs/self-hosting/examples/azure-openai.mdx +46 -0
- package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +48 -0
- package/docs/self-hosting/examples/ollama.mdx +104 -0
- package/docs/self-hosting/examples/ollama.zh-CN.mdx +103 -0
- package/docs/self-hosting/faq/no-v1-suffix.mdx +30 -0
- package/docs/self-hosting/faq/no-v1-suffix.zh-CN.mdx +27 -0
- package/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.mdx +84 -0
- package/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.zh-CN.mdx +81 -0
- package/docs/self-hosting/platform/docker-compose.mdx +143 -0
- package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +134 -0
- package/docs/self-hosting/platform/docker.mdx +169 -0
- package/docs/self-hosting/platform/docker.zh-CN.mdx +167 -0
- package/docs/self-hosting/platform/netlify.mdx +154 -0
- package/docs/self-hosting/platform/netlify.zh-CN.mdx +148 -0
- package/docs/self-hosting/platform/railway.mdx +35 -0
- package/docs/self-hosting/platform/railway.zh-CN.mdx +34 -0
- package/docs/self-hosting/platform/repocloud.mdx +38 -0
- package/docs/self-hosting/platform/repocloud.zh-CN.mdx +36 -0
- package/docs/self-hosting/platform/sealos.mdx +37 -0
- package/docs/self-hosting/platform/sealos.zh-CN.mdx +36 -0
- package/docs/self-hosting/platform/vercel.mdx +46 -0
- package/docs/self-hosting/platform/vercel.zh-CN.mdx +47 -0
- package/docs/self-hosting/platform/zeabur.mdx +85 -0
- package/docs/self-hosting/platform/zeabur.zh-CN.mdx +84 -0
- package/docs/self-hosting/start.mdx +31 -0
- package/docs/self-hosting/start.zh-CN.mdx +32 -0
- package/docs/usage/agents/concepts.mdx +41 -0
- package/docs/usage/agents/concepts.zh-CN.mdx +38 -0
- package/docs/usage/agents/custom-agent.mdx +58 -0
- package/docs/usage/agents/custom-agent.zh-CN.mdx +53 -0
- package/docs/usage/agents/model.mdx +80 -0
- package/docs/usage/agents/model.zh-CN.mdx +75 -0
- package/docs/usage/agents/prompt.mdx +110 -0
- package/docs/usage/agents/prompt.zh-CN.mdx +106 -0
- package/docs/usage/agents/topics.mdx +27 -0
- package/docs/usage/agents/topics.zh-CN.mdx +25 -0
- package/docs/usage/features/agent-market.mdx +40 -0
- package/docs/usage/features/agent-market.zh-CN.mdx +36 -0
- package/docs/usage/features/local-llm.mdx +51 -0
- package/docs/usage/features/local-llm.zh-CN.mdx +43 -0
- package/docs/usage/features/mobile.mdx +24 -0
- package/docs/usage/features/mobile.zh-CN.mdx +23 -0
- package/docs/usage/features/more.mdx +33 -0
- package/docs/usage/features/more.zh-CN.mdx +28 -0
- package/docs/usage/features/multi-ai-providers.mdx +61 -0
- package/docs/usage/features/multi-ai-providers.zh-CN.mdx +61 -0
- package/docs/usage/features/plugin-system.mdx +89 -0
- package/docs/usage/features/plugin-system.zh-CN.mdx +77 -0
- package/docs/usage/features/pwa.mdx +73 -0
- package/docs/usage/features/pwa.zh-CN.mdx +73 -0
- package/docs/usage/features/text-to-image.mdx +26 -0
- package/docs/usage/features/text-to-image.zh-CN.mdx +26 -0
- package/docs/usage/features/theme.mdx +34 -0
- package/docs/usage/features/theme.zh-CN.mdx +30 -0
- package/docs/usage/features/tts.mdx +52 -0
- package/docs/usage/features/tts.zh-CN.mdx +46 -0
- package/docs/usage/features/vision.mdx +28 -0
- package/docs/usage/features/vision.zh-CN.mdx +25 -0
- package/docs/usage/plugins/basic-usage.mdx +69 -0
- package/docs/usage/plugins/basic-usage.zh-CN.mdx +67 -0
- package/docs/usage/plugins/custom-plugin.mdx +37 -0
- package/docs/usage/plugins/custom-plugin.zh-CN.mdx +35 -0
- package/docs/usage/plugins/development.mdx +329 -0
- package/docs/usage/plugins/development.zh-CN.mdx +323 -0
- package/docs/usage/plugins/store.mdx +30 -0
- package/docs/usage/plugins/store.zh-CN.mdx +27 -0
- package/docs/usage/providers/groq.mdx +76 -0
- package/docs/usage/providers/groq.zh-CN.mdx +70 -0
- package/docs/usage/providers/ollama/gemma.mdx +68 -0
- package/docs/usage/providers/ollama/gemma.zh-CN.mdx +67 -0
- package/docs/usage/providers/ollama/qwen.mdx +69 -0
- package/docs/usage/providers/ollama/qwen.zh-CN.mdx +66 -0
- package/docs/usage/providers/ollama.mdx +204 -0
- package/docs/usage/providers/ollama.zh-CN.mdx +202 -0
- package/docs/usage/start.mdx +46 -0
- package/docs/usage/start.zh-CN.mdx +38 -0
- package/drizzle.config.ts +29 -0
- package/locales/ar/auth.json +8 -0
- package/locales/ar/chat.json +138 -0
- package/locales/ar/clerk.json +769 -0
- package/locales/ar/common.json +224 -0
- package/locales/ar/components.json +16 -0
- package/locales/ar/error.json +114 -0
- package/locales/ar/market.json +32 -0
- package/locales/ar/metadata.json +18 -0
- package/locales/ar/migration.json +45 -0
- package/locales/ar/modelProvider.json +108 -0
- package/locales/ar/plugin.json +165 -0
- package/locales/ar/setting.json +404 -0
- package/locales/ar/tool.json +10 -0
- package/locales/ar/welcome.json +49 -0
- package/locales/bg-BG/auth.json +8 -0
- package/locales/bg-BG/chat.json +138 -0
- package/locales/bg-BG/clerk.json +769 -0
- package/locales/bg-BG/common.json +224 -0
- package/locales/bg-BG/components.json +16 -0
- package/locales/bg-BG/error.json +114 -0
- package/locales/bg-BG/market.json +32 -0
- package/locales/bg-BG/metadata.json +18 -0
- package/locales/bg-BG/migration.json +45 -0
- package/locales/bg-BG/modelProvider.json +108 -0
- package/locales/bg-BG/plugin.json +165 -0
- package/locales/bg-BG/setting.json +404 -0
- package/locales/bg-BG/tool.json +10 -0
- package/locales/bg-BG/welcome.json +49 -0
- package/locales/de-DE/auth.json +8 -0
- package/locales/de-DE/chat.json +138 -0
- package/locales/de-DE/clerk.json +769 -0
- package/locales/de-DE/common.json +224 -0
- package/locales/de-DE/components.json +16 -0
- package/locales/de-DE/error.json +114 -0
- package/locales/de-DE/market.json +32 -0
- package/locales/de-DE/metadata.json +18 -0
- package/locales/de-DE/migration.json +45 -0
- package/locales/de-DE/modelProvider.json +108 -0
- package/locales/de-DE/plugin.json +165 -0
- package/locales/de-DE/setting.json +404 -0
- package/locales/de-DE/tool.json +10 -0
- package/locales/de-DE/welcome.json +49 -0
- package/locales/en-US/auth.json +8 -0
- package/locales/en-US/chat.json +138 -0
- package/locales/en-US/clerk.json +769 -0
- package/locales/en-US/common.json +224 -0
- package/locales/en-US/components.json +16 -0
- package/locales/en-US/error.json +114 -0
- package/locales/en-US/market.json +32 -0
- package/locales/en-US/metadata.json +18 -0
- package/locales/en-US/migration.json +45 -0
- package/locales/en-US/modelProvider.json +108 -0
- package/locales/en-US/plugin.json +165 -0
- package/locales/en-US/setting.json +404 -0
- package/locales/en-US/tool.json +10 -0
- package/locales/en-US/welcome.json +49 -0
- package/locales/es-ES/auth.json +8 -0
- package/locales/es-ES/chat.json +138 -0
- package/locales/es-ES/clerk.json +769 -0
- package/locales/es-ES/common.json +224 -0
- package/locales/es-ES/components.json +16 -0
- package/locales/es-ES/error.json +114 -0
- package/locales/es-ES/market.json +32 -0
- package/locales/es-ES/metadata.json +18 -0
- package/locales/es-ES/migration.json +45 -0
- package/locales/es-ES/modelProvider.json +108 -0
- package/locales/es-ES/plugin.json +165 -0
- package/locales/es-ES/setting.json +404 -0
- package/locales/es-ES/tool.json +10 -0
- package/locales/es-ES/welcome.json +49 -0
- package/locales/fr-FR/auth.json +8 -0
- package/locales/fr-FR/chat.json +138 -0
- package/locales/fr-FR/clerk.json +769 -0
- package/locales/fr-FR/common.json +224 -0
- package/locales/fr-FR/components.json +16 -0
- package/locales/fr-FR/error.json +114 -0
- package/locales/fr-FR/market.json +32 -0
- package/locales/fr-FR/metadata.json +18 -0
- package/locales/fr-FR/migration.json +45 -0
- package/locales/fr-FR/modelProvider.json +108 -0
- package/locales/fr-FR/plugin.json +165 -0
- package/locales/fr-FR/setting.json +404 -0
- package/locales/fr-FR/tool.json +10 -0
- package/locales/fr-FR/welcome.json +49 -0
- package/locales/it-IT/auth.json +8 -0
- package/locales/it-IT/chat.json +138 -0
- package/locales/it-IT/clerk.json +769 -0
- package/locales/it-IT/common.json +224 -0
- package/locales/it-IT/components.json +16 -0
- package/locales/it-IT/error.json +114 -0
- package/locales/it-IT/market.json +32 -0
- package/locales/it-IT/metadata.json +18 -0
- package/locales/it-IT/migration.json +45 -0
- package/locales/it-IT/modelProvider.json +108 -0
- package/locales/it-IT/plugin.json +165 -0
- package/locales/it-IT/setting.json +404 -0
- package/locales/it-IT/tool.json +10 -0
- package/locales/it-IT/welcome.json +49 -0
- package/locales/ja-JP/auth.json +8 -0
- package/locales/ja-JP/chat.json +138 -0
- package/locales/ja-JP/clerk.json +769 -0
- package/locales/ja-JP/common.json +224 -0
- package/locales/ja-JP/components.json +16 -0
- package/locales/ja-JP/error.json +114 -0
- package/locales/ja-JP/market.json +32 -0
- package/locales/ja-JP/metadata.json +18 -0
- package/locales/ja-JP/migration.json +45 -0
- package/locales/ja-JP/modelProvider.json +108 -0
- package/locales/ja-JP/plugin.json +165 -0
- package/locales/ja-JP/setting.json +404 -0
- package/locales/ja-JP/tool.json +10 -0
- package/locales/ja-JP/welcome.json +49 -0
- package/locales/ko-KR/auth.json +8 -0
- package/locales/ko-KR/chat.json +138 -0
- package/locales/ko-KR/clerk.json +769 -0
- package/locales/ko-KR/common.json +224 -0
- package/locales/ko-KR/components.json +16 -0
- package/locales/ko-KR/error.json +114 -0
- package/locales/ko-KR/market.json +32 -0
- package/locales/ko-KR/metadata.json +18 -0
- package/locales/ko-KR/migration.json +45 -0
- package/locales/ko-KR/modelProvider.json +108 -0
- package/locales/ko-KR/plugin.json +165 -0
- package/locales/ko-KR/setting.json +404 -0
- package/locales/ko-KR/tool.json +10 -0
- package/locales/ko-KR/welcome.json +49 -0
- package/locales/nl-NL/auth.json +8 -0
- package/locales/nl-NL/chat.json +138 -0
- package/locales/nl-NL/clerk.json +769 -0
- package/locales/nl-NL/common.json +224 -0
- package/locales/nl-NL/components.json +16 -0
- package/locales/nl-NL/error.json +114 -0
- package/locales/nl-NL/market.json +32 -0
- package/locales/nl-NL/metadata.json +18 -0
- package/locales/nl-NL/migration.json +45 -0
- package/locales/nl-NL/modelProvider.json +108 -0
- package/locales/nl-NL/plugin.json +165 -0
- package/locales/nl-NL/setting.json +404 -0
- package/locales/nl-NL/tool.json +10 -0
- package/locales/nl-NL/welcome.json +49 -0
- package/locales/pl-PL/auth.json +8 -0
- package/locales/pl-PL/chat.json +138 -0
- package/locales/pl-PL/clerk.json +769 -0
- package/locales/pl-PL/common.json +224 -0
- package/locales/pl-PL/components.json +16 -0
- package/locales/pl-PL/error.json +114 -0
- package/locales/pl-PL/market.json +32 -0
- package/locales/pl-PL/metadata.json +18 -0
- package/locales/pl-PL/migration.json +45 -0
- package/locales/pl-PL/modelProvider.json +108 -0
- package/locales/pl-PL/plugin.json +165 -0
- package/locales/pl-PL/setting.json +404 -0
- package/locales/pl-PL/tool.json +10 -0
- package/locales/pl-PL/welcome.json +49 -0
- package/locales/pt-BR/auth.json +8 -0
- package/locales/pt-BR/chat.json +138 -0
- package/locales/pt-BR/clerk.json +769 -0
- package/locales/pt-BR/common.json +224 -0
- package/locales/pt-BR/components.json +16 -0
- package/locales/pt-BR/error.json +114 -0
- package/locales/pt-BR/market.json +32 -0
- package/locales/pt-BR/metadata.json +18 -0
- package/locales/pt-BR/migration.json +45 -0
- package/locales/pt-BR/modelProvider.json +108 -0
- package/locales/pt-BR/plugin.json +165 -0
- package/locales/pt-BR/setting.json +404 -0
- package/locales/pt-BR/tool.json +10 -0
- package/locales/pt-BR/welcome.json +49 -0
- package/locales/ru-RU/auth.json +8 -0
- package/locales/ru-RU/chat.json +138 -0
- package/locales/ru-RU/clerk.json +769 -0
- package/locales/ru-RU/common.json +224 -0
- package/locales/ru-RU/components.json +16 -0
- package/locales/ru-RU/error.json +114 -0
- package/locales/ru-RU/market.json +32 -0
- package/locales/ru-RU/metadata.json +18 -0
- package/locales/ru-RU/migration.json +45 -0
- package/locales/ru-RU/modelProvider.json +108 -0
- package/locales/ru-RU/plugin.json +165 -0
- package/locales/ru-RU/setting.json +404 -0
- package/locales/ru-RU/tool.json +10 -0
- package/locales/ru-RU/welcome.json +49 -0
- package/locales/tr-TR/auth.json +8 -0
- package/locales/tr-TR/chat.json +138 -0
- package/locales/tr-TR/clerk.json +769 -0
- package/locales/tr-TR/common.json +224 -0
- package/locales/tr-TR/components.json +16 -0
- package/locales/tr-TR/error.json +114 -0
- package/locales/tr-TR/market.json +32 -0
- package/locales/tr-TR/metadata.json +18 -0
- package/locales/tr-TR/migration.json +45 -0
- package/locales/tr-TR/modelProvider.json +108 -0
- package/locales/tr-TR/plugin.json +165 -0
- package/locales/tr-TR/setting.json +404 -0
- package/locales/tr-TR/tool.json +10 -0
- package/locales/tr-TR/welcome.json +49 -0
- package/locales/vi-VN/auth.json +8 -0
- package/locales/vi-VN/chat.json +138 -0
- package/locales/vi-VN/clerk.json +769 -0
- package/locales/vi-VN/common.json +224 -0
- package/locales/vi-VN/components.json +16 -0
- package/locales/vi-VN/error.json +114 -0
- package/locales/vi-VN/market.json +32 -0
- package/locales/vi-VN/metadata.json +18 -0
- package/locales/vi-VN/migration.json +45 -0
- package/locales/vi-VN/modelProvider.json +108 -0
- package/locales/vi-VN/plugin.json +165 -0
- package/locales/vi-VN/setting.json +404 -0
- package/locales/vi-VN/tool.json +10 -0
- package/locales/vi-VN/welcome.json +49 -0
- package/locales/zh-CN/auth.json +8 -0
- package/locales/zh-CN/chat.json +138 -0
- package/locales/zh-CN/clerk.json +769 -0
- package/locales/zh-CN/common.json +224 -0
- package/locales/zh-CN/components.json +16 -0
- package/locales/zh-CN/error.json +114 -0
- package/locales/zh-CN/market.json +32 -0
- package/locales/zh-CN/metadata.json +18 -0
- package/locales/zh-CN/migration.json +45 -0
- package/locales/zh-CN/modelProvider.json +108 -0
- package/locales/zh-CN/plugin.json +165 -0
- package/locales/zh-CN/setting.json +404 -0
- package/locales/zh-CN/tool.json +10 -0
- package/locales/zh-CN/welcome.json +49 -0
- package/locales/zh-TW/auth.json +8 -0
- package/locales/zh-TW/chat.json +138 -0
- package/locales/zh-TW/clerk.json +769 -0
- package/locales/zh-TW/common.json +224 -0
- package/locales/zh-TW/components.json +16 -0
- package/locales/zh-TW/error.json +114 -0
- package/locales/zh-TW/market.json +32 -0
- package/locales/zh-TW/metadata.json +18 -0
- package/locales/zh-TW/migration.json +45 -0
- package/locales/zh-TW/modelProvider.json +108 -0
- package/locales/zh-TW/plugin.json +165 -0
- package/locales/zh-TW/setting.json +404 -0
- package/locales/zh-TW/tool.json +10 -0
- package/locales/zh-TW/welcome.json +49 -0
- package/netlify.toml +10 -0
- package/next-sitemap.config.mjs +53 -0
- package/next.config.mjs +113 -16
- package/package.json +212 -83
- package/public/apple-touch-icon.png +0 -0
- package/public/favicon-32x32.ico +0 -0
- package/public/favicon.ico +0 -0
- package/public/icons/icon-192x192.maskable.png +0 -0
- package/public/icons/icon-192x192.png +0 -0
- package/public/icons/icon-512x512.maskable.png +0 -0
- package/public/icons/icon-512x512.png +0 -0
- package/public/images/banner_market_modal.webp +0 -0
- package/public/images/chatmode_chat_dark.webp +0 -0
- package/public/images/chatmode_chat_light.webp +0 -0
- package/public/images/chatmode_docs_dark.webp +0 -0
- package/public/images/chatmode_docs_light.webp +0 -0
- package/public/images/empty_topic_dark.webp +0 -0
- package/public/images/empty_topic_light.webp +0 -0
- package/public/images/logo.png +0 -0
- package/public/images/screenshot_background.webp +0 -0
- package/public/images/theme_auto.webp +0 -0
- package/public/images/theme_dark.webp +0 -0
- package/public/images/theme_light.webp +0 -0
- package/public/manifest.json +121 -0
- package/public/og/cover.png +0 -0
- package/public/screenshots/shot-1.desktop.png +0 -0
- package/public/screenshots/shot-1.mobile.png +0 -0
- package/public/screenshots/shot-2.desktop.png +0 -0
- package/public/screenshots/shot-2.mobile.png +0 -0
- package/public/screenshots/shot-3.desktop.png +0 -0
- package/public/screenshots/shot-3.mobile.png +0 -0
- package/public/screenshots/shot-4.desktop.png +0 -0
- package/public/screenshots/shot-4.mobile.png +0 -0
- package/public/screenshots/shot-5.desktop.png +0 -0
- package/public/screenshots/shot-5.mobile.png +0 -0
- package/public/videos/feedback.mp4 +0 -0
- package/public/videos/star.mp4 +0 -0
- package/renovate.json +13 -0
- package/scripts/docsWorkflow/const.ts +14 -0
- package/scripts/docsWorkflow/index.ts +82 -0
- package/scripts/docsWorkflow/toc.ts +60 -0
- package/scripts/docsWorkflow/utils.ts +38 -0
- package/scripts/i18nWorkflow/const.ts +18 -0
- package/scripts/i18nWorkflow/genDefaultLocale.ts +19 -0
- package/scripts/i18nWorkflow/genDiff.ts +50 -0
- package/scripts/i18nWorkflow/index.ts +11 -0
- package/scripts/i18nWorkflow/utils.ts +57 -0
- package/scripts/mdxWorkflow/index.ts +48 -0
- package/scripts/migrateServerDB/index.ts +30 -0
- package/scripts/readmeWorkflow/const.ts +19 -0
- package/scripts/readmeWorkflow/index.ts +12 -0
- package/scripts/readmeWorkflow/syncAgentIndex.ts +47 -0
- package/scripts/readmeWorkflow/syncPluginIndex.ts +42 -0
- package/scripts/readmeWorkflow/utlis.ts +52 -0
- package/sentry.client.config.ts +30 -0
- package/sentry.edge.config.ts +17 -0
- package/sentry.server.config.ts +19 -0
- package/src/app/(auth)/layout.tsx +19 -0
- package/src/app/(auth)/login/[[...login]]/page.tsx +21 -0
- package/src/app/(auth)/signup/[[...signup]]/page.tsx +21 -0
- package/src/app/(loading)/Client.tsx +13 -0
- package/src/app/(loading)/Redirect.tsx +51 -0
- package/src/app/(main)/(mobile)/me/(home)/__tests__/UserBanner.test.tsx +80 -0
- package/src/app/(main)/(mobile)/me/(home)/__tests__/useCategory.test.tsx +116 -0
- package/src/app/(main)/(mobile)/me/(home)/features/Category.tsx +15 -0
- package/src/app/(main)/(mobile)/me/(home)/features/Header.tsx +30 -0
- package/src/app/(main)/(mobile)/me/(home)/features/UserBanner.tsx +37 -0
- package/src/app/(main)/(mobile)/me/(home)/features/useCategory.tsx +118 -0
- package/src/app/(main)/(mobile)/me/(home)/layout.tsx +17 -0
- package/src/app/(main)/(mobile)/me/(home)/loading.tsx +38 -0
- package/src/app/(main)/(mobile)/me/(home)/page.tsx +38 -0
- package/src/app/(main)/(mobile)/me/data/features/Category.tsx +48 -0
- package/src/app/(main)/(mobile)/me/data/features/Header.tsx +33 -0
- package/src/app/(main)/(mobile)/me/data/layout.tsx +13 -0
- package/src/app/(main)/(mobile)/me/data/loading.tsx +5 -0
- package/src/app/(main)/(mobile)/me/data/page.tsx +27 -0
- package/src/app/(main)/(mobile)/me/profile/features/Category.tsx +45 -0
- package/src/app/(main)/(mobile)/me/profile/features/Header.tsx +33 -0
- package/src/app/(main)/(mobile)/me/profile/layout.tsx +16 -0
- package/src/app/(main)/(mobile)/me/profile/loading.tsx +5 -0
- package/src/app/(main)/(mobile)/me/profile/page.tsx +28 -0
- package/src/app/(main)/(mobile)/me/settings/features/Category.tsx +15 -0
- package/src/app/(main)/(mobile)/me/settings/features/Header.tsx +33 -0
- package/src/app/(main)/(mobile)/me/settings/features/useCategory.tsx +57 -0
- package/src/app/(main)/(mobile)/me/settings/layout.tsx +13 -0
- package/src/app/(main)/(mobile)/me/settings/loading.tsx +5 -0
- package/src/app/(main)/(mobile)/me/settings/page.tsx +28 -0
- package/src/app/(main)/@nav/_layout/Desktop/Avatar.test.tsx +55 -0
- package/src/app/(main)/@nav/_layout/Desktop/Avatar.tsx +53 -0
- package/src/app/(main)/@nav/_layout/Desktop/BottomActions.tsx +24 -0
- package/src/app/(main)/@nav/_layout/Desktop/TopActions.tsx +50 -0
- package/src/app/(main)/@nav/_layout/Desktop/index.tsx +26 -0
- package/src/app/(main)/@nav/_layout/Mobile.tsx +71 -0
- package/src/app/(main)/@nav/default.tsx +10 -0
- package/src/app/(main)/_layout/Desktop.tsx +33 -0
- package/src/app/(main)/_layout/Mobile.tsx +29 -0
- package/src/app/(main)/_layout/type.ts +6 -0
- package/src/app/(main)/chat/(workspace)/@conversation/default.tsx +23 -0
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/DragUpload.tsx +245 -0
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/LocalFiles.tsx +10 -0
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/SendMore.tsx +122 -0
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/index.tsx +173 -0
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Header/index.tsx +25 -0
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/TextArea.test.tsx +316 -0
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/TextArea.tsx +129 -0
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/__tests__/useAutoFocus.test.ts +45 -0
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/index.tsx +60 -0
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/useAutoFocus.ts +13 -0
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files.tsx +19 -0
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/index.tsx +52 -0
- package/src/app/(main)/chat/(workspace)/@topic/_layout/Desktop.tsx +17 -0
- package/src/app/(main)/chat/(workspace)/@topic/_layout/Mobile.tsx +21 -0
- package/src/app/(main)/chat/(workspace)/@topic/default.tsx +32 -0
- package/src/app/(main)/chat/(workspace)/@topic/features/Header.tsx +88 -0
- package/src/app/(main)/chat/(workspace)/@topic/features/SkeletonList.tsx +57 -0
- package/src/app/(main)/chat/(workspace)/@topic/features/SystemRole/SystemRoleContent.tsx +128 -0
- package/src/app/(main)/chat/(workspace)/@topic/features/SystemRole/index.tsx +18 -0
- package/src/app/(main)/chat/(workspace)/@topic/features/SystemRole/style.ts +32 -0
- package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/DefaultContent.tsx +29 -0
- package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/TopicContent.tsx +211 -0
- package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/TopicItem.tsx +81 -0
- package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/index.tsx +107 -0
- package/src/app/(main)/chat/(workspace)/@topic/features/TopicSearchBar/index.tsx +42 -0
- package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/HeaderAction.tsx +40 -0
- package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Main.tsx +91 -0
- package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Tags.tsx +31 -0
- package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/index.tsx +8 -0
- package/src/app/(main)/chat/(workspace)/_layout/Desktop/HotKeys.tsx +49 -0
- package/src/app/(main)/chat/(workspace)/_layout/Desktop/TopicPanel.tsx +77 -0
- package/src/app/(main)/chat/(workspace)/_layout/Desktop/index.tsx +35 -0
- package/src/app/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/ChatHeaderTitle.tsx +55 -0
- package/src/app/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/index.tsx +37 -0
- package/src/app/(main)/chat/(workspace)/_layout/Mobile/TopicModal.tsx +35 -0
- package/src/app/(main)/chat/(workspace)/_layout/Mobile/index.tsx +21 -0
- package/src/app/(main)/chat/(workspace)/_layout/type.ts +7 -0
- package/src/app/(main)/chat/(workspace)/_layout/useInitAgentConfig.ts +10 -0
- package/src/app/(main)/chat/(workspace)/features/PluginTag/PluginStatus.tsx +108 -0
- package/src/app/(main)/chat/(workspace)/features/PluginTag/index.tsx +60 -0
- package/src/app/(main)/chat/(workspace)/features/SettingButton.tsx +25 -0
- package/src/app/(main)/chat/(workspace)/features/ShareButton/Preview.tsx +78 -0
- package/src/app/(main)/chat/(workspace)/features/ShareButton/ShareModal.tsx +164 -0
- package/src/app/(main)/chat/(workspace)/features/ShareButton/index.tsx +40 -0
- package/src/app/(main)/chat/(workspace)/features/ShareButton/style.ts +71 -0
- package/src/app/(main)/chat/(workspace)/features/ShareButton/type.ts +14 -0
- package/src/app/(main)/chat/(workspace)/features/ShareButton/useScreenshot.ts +60 -0
- package/src/app/(main)/chat/(workspace)/features/TelemetryNotification.tsx +93 -0
- package/src/app/(main)/chat/(workspace)/features/useWorkspaceModal.tsx +27 -0
- package/src/app/(main)/chat/(workspace)/layout.ts +11 -0
- package/src/app/(main)/chat/(workspace)/page.tsx +39 -0
- package/src/app/(main)/chat/@session/_layout/Desktop/PanelBody.tsx +22 -0
- package/src/app/(main)/chat/@session/_layout/Desktop/SessionHeader.tsx +59 -0
- package/src/app/(main)/chat/@session/_layout/Desktop/index.tsx +18 -0
- package/src/app/(main)/chat/@session/_layout/Mobile/SessionHeader.tsx +44 -0
- package/src/app/(main)/chat/@session/_layout/Mobile/index.tsx +22 -0
- package/src/app/(main)/chat/@session/default.tsx +29 -0
- package/src/app/(main)/chat/@session/features/SessionHydration.tsx +45 -0
- package/src/app/(main)/chat/@session/features/SessionListContent/CollapseGroup/Actions.tsx +141 -0
- package/src/app/(main)/chat/@session/features/SessionListContent/CollapseGroup/index.tsx +63 -0
- package/src/app/(main)/chat/@session/features/SessionListContent/DefaultMode.tsx +106 -0
- package/src/app/(main)/chat/@session/features/SessionListContent/Inbox/index.tsx +38 -0
- package/src/app/(main)/chat/@session/features/SessionListContent/List/AddButton.tsx +28 -0
- package/src/app/(main)/chat/@session/features/SessionListContent/List/Item/Actions.tsx +196 -0
- package/src/app/(main)/chat/@session/features/SessionListContent/List/Item/index.tsx +95 -0
- package/src/app/(main)/chat/@session/features/SessionListContent/List/index.tsx +67 -0
- package/src/app/(main)/chat/@session/features/SessionListContent/ListItem/index.tsx +67 -0
- package/src/app/(main)/chat/@session/features/SessionListContent/Modals/ConfigGroupModal/GroupItem.tsx +89 -0
- package/src/app/(main)/chat/@session/features/SessionListContent/Modals/ConfigGroupModal/index.tsx +85 -0
- package/src/app/(main)/chat/@session/features/SessionListContent/Modals/CreateGroupModal.tsx +70 -0
- package/src/app/(main)/chat/@session/features/SessionListContent/Modals/RenameGroupModal.tsx +59 -0
- package/src/app/(main)/chat/@session/features/SessionListContent/SearchMode.tsx +21 -0
- package/src/app/(main)/chat/@session/features/SessionListContent/index.tsx +18 -0
- package/src/app/(main)/chat/@session/features/SessionListContent/useSwitchSession.ts +26 -0
- package/src/app/(main)/chat/@session/features/SessionSearchBar.tsx +37 -0
- package/src/app/(main)/chat/@session/features/SkeletonList.tsx +51 -0
- package/src/app/(main)/chat/_layout/Desktop/SessionPanel.tsx +75 -0
- package/src/app/(main)/chat/_layout/Desktop/index.tsx +31 -0
- package/src/app/(main)/chat/_layout/Mobile.tsx +49 -0
- package/src/app/(main)/chat/_layout/type.ts +6 -0
- package/src/app/(main)/chat/error.tsx +5 -0
- package/src/app/(main)/chat/features/Migration/ExportConfigButton.tsx +33 -0
- package/src/app/(main)/chat/features/Migration/Failed.tsx +118 -0
- package/src/app/(main)/chat/features/Migration/Modal.tsx +80 -0
- package/src/app/(main)/chat/features/Migration/Start.tsx +106 -0
- package/src/app/(main)/chat/features/Migration/UpgradeButton.tsx +74 -0
- package/src/app/(main)/chat/features/Migration/const.ts +15 -0
- package/src/app/(main)/chat/features/Migration/index.tsx +39 -0
- package/src/app/(main)/chat/features/PageTitle/index.tsx +17 -0
- package/src/app/(main)/chat/layout.ts +11 -0
- package/src/app/(main)/chat/not-found.tsx +3 -0
- package/src/app/(main)/chat/settings/_layout/Desktop/Header.tsx +26 -0
- package/src/app/(main)/chat/settings/_layout/Desktop/index.tsx +21 -0
- package/src/app/(main)/chat/settings/_layout/Mobile/Header.tsx +27 -0
- package/src/app/(main)/chat/settings/_layout/Mobile/index.tsx +19 -0
- package/src/app/(main)/chat/settings/error.tsx +5 -0
- package/src/app/(main)/chat/settings/features/EditPage.tsx +40 -0
- package/src/app/(main)/chat/settings/features/HeaderContent.tsx +70 -0
- package/src/app/(main)/chat/settings/features/SubmitAgentButton/SubmitAgentModal.tsx +98 -0
- package/src/app/(main)/chat/settings/features/SubmitAgentButton/index.tsx +36 -0
- package/src/app/(main)/chat/settings/features/SubmitAgentButton/style.ts +46 -0
- package/src/app/(main)/chat/settings/layout.tsx +21 -0
- package/src/app/(main)/chat/settings/loading.tsx +3 -0
- package/src/app/(main)/chat/settings/modal/page.tsx +23 -0
- package/src/app/(main)/chat/settings/not-found.tsx +3 -0
- package/src/app/(main)/chat/settings/page.tsx +7 -0
- package/src/app/(main)/error.tsx +5 -0
- package/src/app/(main)/layout.tsx +11 -0
- package/src/app/(main)/market/@detail/default.tsx +12 -0
- package/src/app/(main)/market/@detail/features/AgentDetailContent.tsx +73 -0
- package/src/app/(main)/market/@detail/features/Banner.tsx +46 -0
- package/src/app/(main)/market/@detail/features/Comment.tsx +16 -0
- package/src/app/(main)/market/@detail/features/Header.tsx +81 -0
- package/src/app/(main)/market/@detail/features/Loading.tsx +63 -0
- package/src/app/(main)/market/@detail/features/TokenTag.tsx +26 -0
- package/src/app/(main)/market/@detail/features/style.ts +31 -0
- package/src/app/(main)/market/_layout/Desktop/DetailSidebar.tsx +84 -0
- package/src/app/(main)/market/_layout/Desktop/Header.tsx +27 -0
- package/src/app/(main)/market/_layout/Desktop/Hero.tsx +39 -0
- package/src/app/(main)/market/_layout/Desktop/index.tsx +46 -0
- package/src/app/(main)/market/_layout/Mobile/DetailModal.tsx +32 -0
- package/src/app/(main)/market/_layout/Mobile/Header.tsx +20 -0
- package/src/app/(main)/market/_layout/Mobile/index.tsx +25 -0
- package/src/app/(main)/market/_layout/type.ts +6 -0
- package/src/app/(main)/market/features/AgentCard/AgentCardBanner.tsx +59 -0
- package/src/app/(main)/market/features/AgentCard/index.tsx +139 -0
- package/src/app/(main)/market/features/AgentList.tsx +103 -0
- package/src/app/(main)/market/features/AgentSearchBar.tsx +42 -0
- package/src/app/(main)/market/features/ShareAgentButton/Inner.tsx +54 -0
- package/src/app/(main)/market/features/ShareAgentButton/index.tsx +50 -0
- package/src/app/(main)/market/features/TagList.tsx +69 -0
- package/src/app/(main)/market/layout.tsx +11 -0
- package/src/app/(main)/market/loading.tsx +15 -0
- package/src/app/(main)/market/page.tsx +44 -0
- package/src/app/(main)/not-found.tsx +3 -0
- package/src/app/(main)/profile/[[...slugs]]/Client.tsx +74 -0
- package/src/app/(main)/profile/[[...slugs]]/page.tsx +21 -0
- package/src/app/(main)/profile/_layout/Mobile/Header.tsx +26 -0
- package/src/app/(main)/profile/_layout/Mobile/index.tsx +16 -0
- package/src/app/(main)/profile/layout.tsx +20 -0
- package/src/app/(main)/profile/loading.tsx +23 -0
- package/src/app/(main)/settings/@category/default.tsx +15 -0
- package/src/app/(main)/settings/@category/features/CategoryContent.tsx +37 -0
- package/src/app/(main)/settings/@category/features/UpgradeAlert.tsx +38 -0
- package/src/app/(main)/settings/_layout/Desktop/Header.tsx +85 -0
- package/src/app/(main)/settings/_layout/Desktop/SideBar.tsx +59 -0
- package/src/app/(main)/settings/_layout/Desktop/index.tsx +54 -0
- package/src/app/(main)/settings/_layout/Mobile/Header.tsx +43 -0
- package/src/app/(main)/settings/_layout/Mobile/index.tsx +18 -0
- package/src/app/(main)/settings/_layout/type.ts +6 -0
- package/src/app/(main)/settings/about/features/AboutList.tsx +27 -0
- package/src/app/(main)/settings/about/features/Analytics.tsx +42 -0
- package/src/app/(main)/settings/about/features/ItemCard.tsx +45 -0
- package/src/app/(main)/settings/about/features/ItemLink.tsx +32 -0
- package/src/app/(main)/settings/about/features/Version.tsx +74 -0
- package/src/app/(main)/settings/about/index.tsx +139 -0
- package/src/app/(main)/settings/about/page.tsx +20 -0
- package/src/app/(main)/settings/agent/index.tsx +33 -0
- package/src/app/(main)/settings/agent/page.tsx +12 -0
- package/src/app/(main)/settings/common/features/Common.tsx +171 -0
- package/src/app/(main)/settings/common/features/Theme/ThemeSwatches/ThemeSwatchesNeutral.tsx +33 -0
- package/src/app/(main)/settings/common/features/Theme/ThemeSwatches/ThemeSwatchesPrimary.tsx +33 -0
- package/src/app/(main)/settings/common/features/Theme/ThemeSwatches/index.ts +2 -0
- package/src/app/(main)/settings/common/features/Theme/index.tsx +148 -0
- package/src/app/(main)/settings/common/index.tsx +15 -0
- package/src/app/(main)/settings/common/page.tsx +13 -0
- package/src/app/(main)/settings/error.tsx +5 -0
- package/src/app/(main)/settings/features/UpgradeAlert.tsx +42 -0
- package/src/app/(main)/settings/hooks/useCategory.tsx +94 -0
- package/src/app/(main)/settings/hooks/useSyncSettings.ts +23 -0
- package/src/app/(main)/settings/layout.ts +11 -0
- package/src/app/(main)/settings/llm/ProviderList/Azure/index.tsx +107 -0
- package/src/app/(main)/settings/llm/ProviderList/Bedrock/index.tsx +68 -0
- package/src/app/(main)/settings/llm/ProviderList/Ollama/Checker.tsx +73 -0
- package/src/app/(main)/settings/llm/ProviderList/Ollama/index.tsx +29 -0
- package/src/app/(main)/settings/llm/ProviderList/OpenAI/index.tsx +20 -0
- package/src/app/(main)/settings/llm/ProviderList/providers.tsx +141 -0
- package/src/app/(main)/settings/llm/components/Checker.tsx +111 -0
- package/src/app/(main)/settings/llm/components/Footer.tsx +35 -0
- package/src/app/(main)/settings/llm/components/ProviderConfig/index.tsx +214 -0
- package/src/app/(main)/settings/llm/components/ProviderModelList/CustomModelOption.tsx +93 -0
- package/src/app/(main)/settings/llm/components/ProviderModelList/ModelConfigModal/Form.tsx +98 -0
- package/src/app/(main)/settings/llm/components/ProviderModelList/ModelConfigModal/MaxTokenSlider.tsx +103 -0
- package/src/app/(main)/settings/llm/components/ProviderModelList/ModelConfigModal/index.tsx +78 -0
- package/src/app/(main)/settings/llm/components/ProviderModelList/ModelFetcher.tsx +86 -0
- package/src/app/(main)/settings/llm/components/ProviderModelList/Option.tsx +66 -0
- package/src/app/(main)/settings/llm/components/ProviderModelList/index.tsx +147 -0
- package/src/app/(main)/settings/llm/const.ts +20 -0
- package/src/app/(main)/settings/llm/index.tsx +25 -0
- package/src/app/(main)/settings/llm/page.tsx +23 -0
- package/src/app/(main)/settings/llm/type.ts +5 -0
- package/src/app/(main)/settings/loading.tsx +9 -0
- package/src/app/(main)/settings/modal/page.tsx +27 -0
- package/src/app/(main)/settings/not-found.tsx +3 -0
- package/src/app/(main)/settings/sync/features/Alert.tsx +39 -0
- package/src/app/(main)/settings/sync/features/DeviceInfo/Card.tsx +42 -0
- package/src/app/(main)/settings/sync/features/DeviceInfo/DeviceName.tsx +63 -0
- package/src/app/(main)/settings/sync/features/DeviceInfo/SystemIcon.tsx +29 -0
- package/src/app/(main)/settings/sync/features/DeviceInfo/index.tsx +103 -0
- package/src/app/(main)/settings/sync/features/WebRTC/ChannelNameInput.tsx +46 -0
- package/src/app/(main)/settings/sync/features/WebRTC/SyncSwitch/index.css +237 -0
- package/src/app/(main)/settings/sync/features/WebRTC/SyncSwitch/index.tsx +79 -0
- package/src/app/(main)/settings/sync/features/WebRTC/generateRandomRoomName.ts +4 -0
- package/src/app/(main)/settings/sync/features/WebRTC/index.tsx +98 -0
- package/src/app/(main)/settings/sync/index.tsx +17 -0
- package/src/app/(main)/settings/sync/page.tsx +26 -0
- package/src/app/(main)/settings/system-agent/features/Topic.tsx +56 -0
- package/src/app/(main)/settings/system-agent/features/Translation.tsx +56 -0
- package/src/app/(main)/settings/system-agent/features/useSync.ts +23 -0
- package/src/app/(main)/settings/system-agent/index.tsx +15 -0
- package/src/app/(main)/settings/system-agent/page.tsx +14 -0
- package/src/app/(main)/settings/tts/features/OpenAI.tsx +54 -0
- package/src/app/(main)/settings/tts/features/STT.tsx +58 -0
- package/src/app/(main)/settings/tts/features/const.ts +30 -0
- package/src/app/(main)/settings/tts/index.tsx +15 -0
- package/src/app/(main)/settings/tts/page.tsx +12 -0
- package/src/app/(main)/welcome/_layout/Desktop.tsx +36 -0
- package/src/app/(main)/welcome/_layout/Mobile.tsx +12 -0
- package/src/app/(main)/welcome/features/Actions.tsx +39 -0
- package/src/app/(main)/welcome/features/Hero.tsx +63 -0
- package/src/app/(main)/welcome/features/Logo.tsx +30 -0
- package/src/app/(main)/welcome/layout.tsx +10 -0
- package/src/app/(main)/welcome/page.tsx +41 -0
- package/src/app/@modal/(.)settings/modal/index.tsx +45 -0
- package/src/app/@modal/(.)settings/modal/layout.tsx +44 -0
- package/src/app/@modal/(.)settings/modal/loading.tsx +5 -0
- package/src/app/@modal/(.)settings/modal/page.tsx +19 -0
- package/src/app/@modal/_layout/SettingModalLayout.tsx +71 -0
- package/src/app/@modal/chat/(.)settings/modal/features/CategoryContent.tsx +37 -0
- package/src/app/@modal/chat/(.)settings/modal/features/useCategory.tsx +54 -0
- package/src/app/@modal/chat/(.)settings/modal/layout.tsx +58 -0
- package/src/app/@modal/chat/(.)settings/modal/loading.tsx +5 -0
- package/src/app/@modal/chat/(.)settings/modal/page.tsx +55 -0
- package/src/app/@modal/default.tsx +3 -0
- package/src/app/@modal/error.tsx +5 -0
- package/src/app/@modal/layout.tsx +34 -0
- package/src/app/@modal/loading.tsx +5 -0
- package/src/app/api/auth/[...nextauth]/route.ts +3 -0
- package/src/app/api/chat/[provider]/route.test.ts +222 -0
- package/src/app/api/chat/[provider]/route.ts +56 -0
- package/src/app/api/chat/agentRuntime.test.ts +333 -0
- package/src/app/api/chat/agentRuntime.ts +240 -0
- package/src/app/api/chat/anthropic/route.test.ts +28 -0
- package/src/app/api/chat/anthropic/route.ts +33 -0
- package/src/app/api/chat/apiKeyManager.test.ts +131 -0
- package/src/app/api/chat/apiKeyManager.ts +46 -0
- package/src/app/api/chat/google/route.test.ts +28 -0
- package/src/app/api/chat/google/route.ts +20 -0
- package/src/app/api/chat/minimax/route.test.ts +24 -0
- package/src/app/api/chat/minimax/route.ts +5 -0
- package/src/app/api/chat/models/[provider]/route.ts +45 -0
- package/src/app/api/config.test.ts +43 -0
- package/src/app/api/config.ts +14 -0
- package/src/app/api/errorResponse.test.ts +100 -0
- package/src/app/api/errorResponse.ts +54 -0
- package/src/app/api/market/AgentMarket.test.ts +55 -0
- package/src/app/api/market/AgentMarket.ts +25 -0
- package/src/app/api/market/[id]/route.ts +22 -0
- package/src/app/api/market/route.ts +23 -0
- package/src/app/api/middleware/auth/index.test.ts +77 -0
- package/src/app/api/middleware/auth/index.ts +62 -0
- package/src/app/api/middleware/auth/utils.test.ts +150 -0
- package/src/app/api/middleware/auth/utils.ts +83 -0
- package/src/app/api/openai/createBizOpenAI/auth.test.ts +53 -0
- package/src/app/api/openai/createBizOpenAI/auth.ts +31 -0
- package/src/app/api/openai/createBizOpenAI/createAzureOpenai.ts +33 -0
- package/src/app/api/openai/createBizOpenAI/createOpenai.ts +17 -0
- package/src/app/api/openai/createBizOpenAI/index.ts +37 -0
- package/src/app/api/openai/stt/route.ts +31 -0
- package/src/app/api/openai/tts/route.ts +19 -0
- package/src/app/api/plugin/gateway/route.ts +82 -0
- package/src/app/api/plugin/gateway/settings.test.ts +105 -0
- package/src/app/api/plugin/gateway/settings.ts +29 -0
- package/src/app/api/plugin/store/Store.test.ts +26 -0
- package/src/app/api/plugin/store/Store.ts +19 -0
- package/src/app/api/plugin/store/route.ts +23 -0
- package/src/app/api/proxy/route.ts +34 -0
- package/src/app/api/text-to-image/[provider]/route.ts +61 -0
- package/src/app/api/trace/route.ts +40 -0
- package/src/app/api/tts/edge-speech/route.ts +9 -0
- package/src/app/api/tts/microsoft-speech/route.ts +9 -0
- package/src/app/api/webhooks/clerk/__tests__/fixtures/createUser.json +73 -0
- package/src/app/api/webhooks/clerk/route.ts +159 -0
- package/src/app/api/webhooks/clerk/validateRequest.ts +22 -0
- package/src/app/error.tsx +5 -0
- package/src/app/global-error.tsx +20 -0
- package/src/app/layout.tsx +64 -0
- package/src/app/metadata.ts +58 -0
- package/src/app/not-found.tsx +3 -0
- package/src/app/page.tsx +23 -0
- package/src/app/trpc/edge/[trpc]/route.ts +28 -0
- package/src/app/trpc/lambda/[trpc]/route.ts +26 -0
- package/src/chains/__tests__/langDetect.test.ts +51 -0
- package/src/chains/__tests__/pickEmoji.test.ts +47 -0
- package/src/chains/__tests__/summaryAgentName.test.ts +57 -0
- package/src/chains/__tests__/summaryDescription.test.ts +83 -0
- package/src/chains/__tests__/summaryTags.test.ts +54 -0
- package/src/chains/__tests__/summaryTitle.test.ts +54 -0
- package/src/chains/__tests__/translate.test.ts +28 -0
- package/src/chains/langDetect.ts +31 -0
- package/src/chains/pickEmoji.ts +31 -0
- package/src/chains/summaryAgentName.ts +35 -0
- package/src/chains/summaryDescription.ts +49 -0
- package/src/chains/summaryTags.ts +28 -0
- package/src/chains/summaryTitle.ts +21 -0
- package/src/chains/translate.ts +17 -0
- package/src/components/404/index.tsx +43 -0
- package/src/components/Analytics/Clarity.tsx +28 -0
- package/src/components/Analytics/Google.tsx +7 -0
- package/src/components/Analytics/Plausible.tsx +16 -0
- package/src/components/Analytics/Posthog.tsx +22 -0
- package/src/components/Analytics/Umami.tsx +16 -0
- package/src/components/Analytics/Vercel.tsx +8 -0
- package/src/components/Analytics/index.tsx +44 -0
- package/src/components/AntdStaticMethods/index.test.tsx +43 -0
- package/src/components/AntdStaticMethods/index.tsx +20 -0
- package/src/components/BrandWatermark/index.tsx +39 -0
- package/src/components/BrowserIcon/components/Brave.tsx +56 -0
- package/src/components/BrowserIcon/components/Chrome.tsx +14 -0
- package/src/components/BrowserIcon/components/Chromium.tsx +14 -0
- package/src/components/BrowserIcon/components/Edge.tsx +36 -0
- package/src/components/BrowserIcon/components/Firefox.tsx +38 -0
- package/src/components/BrowserIcon/components/Opera.tsx +19 -0
- package/src/components/BrowserIcon/components/Safari.tsx +23 -0
- package/src/components/BrowserIcon/components/Samsung.tsx +21 -0
- package/src/components/BrowserIcon/index.tsx +50 -0
- package/src/components/BrowserIcon/types.ts +8 -0
- package/src/components/Cell/Divider.tsx +22 -0
- package/src/components/Cell/index.tsx +53 -0
- package/src/components/DataStyleModal/index.tsx +64 -0
- package/src/components/Error/index.tsx +58 -0
- package/src/components/Error/sentryCaptureException.ts +9 -0
- package/src/components/FetchErrorNotification/Description.tsx +48 -0
- package/src/components/FetchErrorNotification/index.tsx +15 -0
- package/src/components/FileList/EditableFileList.tsx +47 -0
- package/src/components/FileList/FileListViewer.tsx +19 -0
- package/src/components/FileList/index.ts +2 -0
- package/src/components/FileList/type.tsx +7 -0
- package/src/components/FullscreenLoading/index.tsx +20 -0
- package/src/components/GalleyGrid/Grid.tsx +36 -0
- package/src/components/GalleyGrid/index.tsx +58 -0
- package/src/components/GalleyGrid/style.ts +24 -0
- package/src/components/GuideModal/index.tsx +77 -0
- package/src/components/GuideVideo/index.tsx +30 -0
- package/src/components/HotKeys/index.tsx +77 -0
- package/src/components/ImageItem/index.tsx +75 -0
- package/src/components/ImageItem/style.ts +1 -0
- package/src/components/ManifestPreviewer/index.tsx +30 -0
- package/src/components/Menu/index.tsx +97 -0
- package/src/components/ModelIcon/index.tsx +97 -0
- package/src/components/ModelProviderIcon/index.tsx +118 -0
- package/src/components/ModelSelect/index.tsx +163 -0
- package/src/components/ModelTag/ModelIcon.tsx +93 -0
- package/src/components/ModelTag/index.tsx +13 -0
- package/src/components/Notification/index.tsx +95 -0
- package/src/components/PageTitle/index.tsx +11 -0
- package/src/components/SafeSpacing/index.tsx +27 -0
- package/src/components/SidebarHeader/index.tsx +38 -0
- package/src/components/SkeletonLoading/index.tsx +21 -0
- package/src/components/StopLoading.tsx +38 -0
- package/src/components/StoreHydration/ChatHydration/index.tsx +33 -0
- package/src/components/StructuredData/index.tsx +12 -0
- package/src/components/client/ClientResponsiveContent/index.tsx +32 -0
- package/src/components/client/ClientResponsiveLayout.tsx +32 -0
- package/src/components/server/MobileNavLayout.tsx +62 -0
- package/src/components/server/ServerLayout.tsx +19 -0
- package/src/config/__tests__/analytics.test.ts +70 -0
- package/src/config/__tests__/app.test.ts +48 -0
- package/src/config/__tests__/client.test.ts +40 -0
- package/src/config/analytics.ts +148 -0
- package/src/config/app.ts +60 -0
- package/src/config/auth.ts +149 -0
- package/src/config/db.ts +28 -0
- package/src/config/debug.ts +22 -0
- package/src/config/featureFlags/index.ts +31 -0
- package/src/config/featureFlags/schema.test.ts +59 -0
- package/src/config/featureFlags/schema.ts +57 -0
- package/src/config/featureFlags/utils/parser.test.ts +88 -0
- package/src/config/featureFlags/utils/parser.ts +32 -0
- package/src/config/file.ts +34 -0
- package/src/config/langfuse.ts +23 -0
- package/src/config/llm.ts +195 -0
- package/src/config/modelProviders/anthropic.ts +69 -0
- package/src/config/modelProviders/azure.ts +45 -0
- package/src/config/modelProviders/bedrock.ts +96 -0
- package/src/config/modelProviders/deepseek.ts +26 -0
- package/src/config/modelProviders/google.ts +108 -0
- package/src/config/modelProviders/groq.ts +48 -0
- package/src/config/modelProviders/index.ts +80 -0
- package/src/config/modelProviders/minimax.ts +50 -0
- package/src/config/modelProviders/mistral.ts +49 -0
- package/src/config/modelProviders/moonshot.ts +33 -0
- package/src/config/modelProviders/ollama.ts +190 -0
- package/src/config/modelProviders/openai.ts +142 -0
- package/src/config/modelProviders/openrouter.ts +125 -0
- package/src/config/modelProviders/perplexity.ts +52 -0
- package/src/config/modelProviders/qwen.ts +58 -0
- package/src/config/modelProviders/togetherai.ts +79 -0
- package/src/config/modelProviders/zeroone.ts +74 -0
- package/src/config/modelProviders/zhipu.ts +64 -0
- package/src/const/auth.ts +45 -0
- package/src/const/fetch.ts +27 -1
- package/src/const/guide.ts +86 -0
- package/src/const/hotkeys.ts +5 -0
- package/src/const/layoutTokens.ts +21 -0
- package/src/const/locale.ts +12 -0
- package/src/const/market.ts +15 -0
- package/src/const/message.test.ts +55 -0
- package/src/const/message.ts +15 -0
- package/src/const/meta.ts +8 -0
- package/src/const/plugin.ts +2 -0
- package/src/const/session.ts +25 -0
- package/src/const/settings/agent.ts +40 -0
- package/src/const/settings/common.ts +7 -0
- package/src/const/settings/index.ts +28 -0
- package/src/const/settings/llm.ts +96 -0
- package/src/const/settings/sync.ts +5 -0
- package/src/const/settings/systemAgent.ts +13 -0
- package/src/const/settings/tool.ts +5 -0
- package/src/const/settings/tts.ts +10 -0
- package/src/const/theme.ts +5 -0
- package/src/const/trace.ts +60 -0
- package/src/const/url.ts +59 -0
- package/src/const/user.ts +10 -0
- package/src/const/version.ts +6 -0
- package/src/database/client/core/__tests__/db-upgrade.test.ts +42 -0
- package/src/database/client/core/__tests__/db.test.ts +79 -0
- package/src/database/client/core/__tests__/model.test.ts +55 -0
- package/src/database/client/core/db.ts +246 -0
- package/src/database/client/core/index.ts +3 -0
- package/src/database/client/core/migrations/migrateSettingsToUser/fixtures/input.json +55 -0
- package/src/database/client/core/migrations/migrateSettingsToUser/fixtures/output.json +60 -0
- package/src/database/client/core/migrations/migrateSettingsToUser/index.test.ts +14 -0
- package/src/database/client/core/migrations/migrateSettingsToUser/index.ts +22 -0
- package/src/database/client/core/migrations/migrateSettingsToUser/type.ts +108 -0
- package/src/database/client/core/model.ts +252 -0
- package/src/database/client/core/schemas.ts +88 -0
- package/src/database/client/core/sync.ts +328 -0
- package/src/database/client/core/types/db.ts +15 -0
- package/src/database/client/models/__DEBUG.ts +124 -0
- package/src/database/client/models/__tests__/file.test.ts +83 -0
- package/src/database/client/models/__tests__/message.test.ts +417 -0
- package/src/database/client/models/__tests__/plugin.test.ts +81 -0
- package/src/database/client/models/__tests__/session.test.ts +254 -0
- package/src/database/client/models/__tests__/sessionGroup.test.ts +220 -0
- package/src/database/client/models/__tests__/topic.test.ts +523 -0
- package/src/database/client/models/__tests__/user.test.ts +82 -0
- package/src/database/client/models/file.ts +31 -0
- package/src/database/client/models/message.ts +262 -0
- package/src/database/client/models/plugin.ts +62 -0
- package/src/database/client/models/session.ts +271 -0
- package/src/database/client/models/sessionGroup.ts +90 -0
- package/src/database/client/models/topic.ts +244 -0
- package/src/database/client/models/user.ts +69 -0
- package/src/database/client/schemas/files.ts +39 -0
- package/src/database/client/schemas/message.ts +50 -0
- package/src/database/client/schemas/plugin.ts +12 -0
- package/src/database/client/schemas/session.ts +51 -0
- package/src/database/client/schemas/sessionGroup.ts +8 -0
- package/src/database/client/schemas/topic.ts +12 -0
- package/src/database/client/schemas/user.ts +40 -0
- package/src/database/server/core/db.ts +44 -0
- package/src/database/server/core/dbForTest.ts +45 -0
- package/src/database/server/index.ts +1 -0
- package/src/database/server/migrations/0000_init.sql +439 -0
- package/src/database/server/migrations/0001_add_client_id.sql +9 -0
- package/src/database/server/migrations/0002_amusing_puma.sql +9 -0
- package/src/database/server/migrations/meta/0000_snapshot.json +1583 -0
- package/src/database/server/migrations/meta/0001_snapshot.json +1636 -0
- package/src/database/server/migrations/meta/0002_snapshot.json +1630 -0
- package/src/database/server/migrations/meta/_journal.json +27 -0
- package/src/database/server/models/__tests__/file.test.ts +140 -0
- package/src/database/server/models/__tests__/message.test.ts +847 -0
- package/src/database/server/models/__tests__/plugin.test.ts +172 -0
- package/src/database/server/models/__tests__/session.test.ts +595 -0
- package/src/database/server/models/__tests__/topic.test.ts +623 -0
- package/src/database/server/models/__tests__/user.test.ts +173 -0
- package/src/database/server/models/_template.ts +44 -0
- package/src/database/server/models/file.ts +51 -0
- package/src/database/server/models/message.ts +378 -0
- package/src/database/server/models/plugin.ts +63 -0
- package/src/database/server/models/session.ts +290 -0
- package/src/database/server/models/sessionGroup.ts +69 -0
- package/src/database/server/models/topic.ts +265 -0
- package/src/database/server/models/user.ts +138 -0
- package/src/database/server/modules/DataImporter/__tests__/fixtures/messages.json +1101 -0
- package/src/database/server/modules/DataImporter/__tests__/index.test.ts +954 -0
- package/src/database/server/modules/DataImporter/index.ts +333 -0
- package/src/database/server/schemas/_id.ts +15 -0
- package/src/database/server/schemas/lobechat.ts +601 -0
- package/src/database/server/utils/idGenerator.test.ts +39 -0
- package/src/database/server/utils/idGenerator.ts +26 -0
- package/src/features/AgentInfo/index.tsx +70 -0
- package/src/features/AgentSetting/AgentChat/index.tsx +142 -0
- package/src/features/AgentSetting/AgentMeta/AutoGenerateInput.tsx +45 -0
- package/src/features/AgentSetting/AgentMeta/AutoGenerateSelect.tsx +50 -0
- package/src/features/AgentSetting/AgentMeta/BackgroundSwatches.tsx +27 -0
- package/src/features/AgentSetting/AgentMeta/index.tsx +135 -0
- package/src/features/AgentSetting/AgentModal/ModelSelect.tsx +20 -0
- package/src/features/AgentSetting/AgentModal/index.tsx +95 -0
- package/src/features/AgentSetting/AgentPlugin/AddPluginButton.tsx +49 -0
- package/src/features/AgentSetting/AgentPlugin/LoadingList.tsx +48 -0
- package/src/features/AgentSetting/AgentPlugin/LocalPluginItem.tsx +42 -0
- package/src/features/AgentSetting/AgentPlugin/PluginAction/index.tsx +36 -0
- package/src/features/AgentSetting/AgentPlugin/index.tsx +163 -0
- package/src/features/AgentSetting/AgentPrompt/TokenTag.tsx +39 -0
- package/src/features/AgentSetting/AgentPrompt/index.tsx +128 -0
- package/src/features/AgentSetting/AgentTTS/SelectWithTTSPreview.tsx +120 -0
- package/src/features/AgentSetting/AgentTTS/index.tsx +122 -0
- package/src/features/AgentSetting/AgentTTS/options.ts +16 -0
- package/src/features/AgentSetting/StoreUpdater.tsx +27 -0
- package/src/features/AgentSetting/index.tsx +26 -0
- package/src/features/AgentSetting/store/action.ts +287 -0
- package/src/features/AgentSetting/store/index.ts +16 -0
- package/src/features/AgentSetting/store/initialState.ts +28 -0
- package/src/features/AgentSetting/store/reducers/config.ts +54 -0
- package/src/features/AgentSetting/store/reducers/meta.ts +21 -0
- package/src/features/AgentSetting/store/selectors.ts +11 -0
- package/src/features/AgentSetting/useSyncAgemtSettings.ts +14 -0
- package/src/features/AvatarWithUpload/index.tsx +40 -0
- package/src/features/ChatInput/ActionBar/Clear.tsx +49 -0
- package/src/features/ChatInput/ActionBar/FileUpload.tsx +69 -0
- package/src/features/ChatInput/ActionBar/History.tsx +70 -0
- package/src/features/ChatInput/ActionBar/ModelSwitch.tsx +20 -0
- package/src/features/ChatInput/ActionBar/Temperature.tsx +49 -0
- package/src/features/ChatInput/ActionBar/Token/TokenProgress.tsx +80 -0
- package/src/features/ChatInput/ActionBar/Token/TokenTag.tsx +149 -0
- package/src/features/ChatInput/ActionBar/Token/index.tsx +18 -0
- package/src/features/ChatInput/ActionBar/Tools/Dropdown.tsx +145 -0
- package/src/features/ChatInput/ActionBar/Tools/ToolItem.tsx +45 -0
- package/src/features/ChatInput/ActionBar/Tools/index.tsx +33 -0
- package/src/features/ChatInput/ActionBar/config.ts +33 -0
- package/src/features/ChatInput/ActionBar/index.tsx +58 -0
- package/src/features/ChatInput/STT/browser.tsx +118 -0
- package/src/features/ChatInput/STT/common.tsx +120 -0
- package/src/features/ChatInput/STT/index.tsx +20 -0
- package/src/features/ChatInput/STT/openai.tsx +129 -0
- package/src/features/ChatInput/Topic/index.tsx +41 -0
- package/src/features/ChatInput/useChatInput.ts +45 -0
- package/src/features/ChatInput/useSend.ts +35 -0
- package/src/features/Conversation/Actions/Assistant.tsx +36 -0
- package/src/features/Conversation/Actions/Error.tsx +11 -0
- package/src/features/Conversation/Actions/Fallback.tsx +13 -0
- package/src/features/Conversation/Actions/Tool.tsx +28 -0
- package/src/features/Conversation/Actions/User.tsx +20 -0
- package/src/features/Conversation/Actions/customAction.ts +37 -0
- package/src/features/Conversation/Actions/index.ts +79 -0
- package/src/features/Conversation/Error/APIKeyForm/Bedrock.tsx +80 -0
- package/src/features/Conversation/Error/APIKeyForm/ProviderApiKeyForm.tsx +79 -0
- package/src/features/Conversation/Error/APIKeyForm/ProviderAvatar.tsx +89 -0
- package/src/features/Conversation/Error/APIKeyForm/index.tsx +96 -0
- package/src/features/Conversation/Error/AccessCodeForm.tsx +63 -0
- package/src/features/Conversation/Error/ClerkLogin/index.tsx +47 -0
- package/src/features/Conversation/Error/ErrorJsonViewer.tsx +26 -0
- package/src/features/Conversation/Error/InvalidAPIKey.tsx +16 -0
- package/src/features/Conversation/Error/InvalidAccessCode.tsx +79 -0
- package/src/features/Conversation/Error/OAuthForm.tsx +97 -0
- package/src/features/Conversation/Error/OllamaBizError/InvalidOllamaModel/index.tsx +153 -0
- package/src/features/Conversation/Error/OllamaBizError/InvalidOllamaModel/useDownloadMonitor.ts +46 -0
- package/src/features/Conversation/Error/OllamaBizError/SetupGuide.tsx +221 -0
- package/src/features/Conversation/Error/OllamaBizError/index.tsx +47 -0
- package/src/features/Conversation/Error/OpenAiBizError.tsx +29 -0
- package/src/features/Conversation/Error/PluginSettings.tsx +66 -0
- package/src/features/Conversation/Error/index.tsx +117 -0
- package/src/features/Conversation/Error/style.tsx +76 -0
- package/src/features/Conversation/Extras/Assistant.test.tsx +86 -0
- package/src/features/Conversation/Extras/Assistant.tsx +51 -0
- package/src/features/Conversation/Extras/ExtraContainer.tsx +13 -0
- package/src/features/Conversation/Extras/TTS/FilePlayer.tsx +25 -0
- package/src/features/Conversation/Extras/TTS/InitPlayer.tsx +93 -0
- package/src/features/Conversation/Extras/TTS/Player.tsx +61 -0
- package/src/features/Conversation/Extras/TTS/index.tsx +32 -0
- package/src/features/Conversation/Extras/Translate.tsx +72 -0
- package/src/features/Conversation/Extras/User.tsx +36 -0
- package/src/features/Conversation/Extras/index.ts +8 -0
- package/src/features/Conversation/Extras/type.ts +5 -0
- package/src/features/Conversation/Messages/Assistant/ToolCalls/index.tsx +73 -0
- package/src/features/Conversation/Messages/Assistant/ToolCalls/style.ts +25 -0
- package/src/features/Conversation/Messages/Assistant/index.tsx +51 -0
- package/src/features/Conversation/Messages/Default.tsx +19 -0
- package/src/features/Conversation/Messages/Tool/Inspector/PluginResultJSON.tsx +24 -0
- package/src/features/Conversation/Messages/Tool/Inspector/Settings.tsx +39 -0
- package/src/features/Conversation/Messages/Tool/Inspector/index.tsx +134 -0
- package/src/features/Conversation/Messages/Tool/Inspector/style.ts +26 -0
- package/src/features/Conversation/Messages/Tool/index.tsx +44 -0
- package/src/features/Conversation/Messages/User.tsx +23 -0
- package/src/features/Conversation/Messages/index.ts +38 -0
- package/src/features/Conversation/Plugins/Render/BuiltinType/index.test.tsx +53 -0
- package/src/features/Conversation/Plugins/Render/BuiltinType/index.tsx +29 -0
- package/src/features/Conversation/Plugins/Render/DefaultType/IFrameRender/index.tsx +61 -0
- package/src/features/Conversation/Plugins/Render/DefaultType/SystemJsRender/index.tsx +40 -0
- package/src/features/Conversation/Plugins/Render/DefaultType/SystemJsRender/utils.ts +26 -0
- package/src/features/Conversation/Plugins/Render/DefaultType/index.tsx +53 -0
- package/src/features/Conversation/Plugins/Render/Loading.tsx +60 -0
- package/src/features/Conversation/Plugins/Render/MarkdownType/index.tsx +25 -0
- package/src/features/Conversation/Plugins/Render/StandaloneType/Iframe.tsx +163 -0
- package/src/features/Conversation/Plugins/Render/StandaloneType/index.tsx +29 -0
- package/src/features/Conversation/Plugins/Render/index.tsx +51 -0
- package/src/features/Conversation/Plugins/Render/useParseContent.ts +15 -0
- package/src/features/Conversation/Plugins/Render/utils/iframeOnReady.test.ts +75 -0
- package/src/features/Conversation/Plugins/Render/utils/iframeOnReady.ts +25 -0
- package/src/features/Conversation/Plugins/Render/utils/listenToPlugin.test.ts +164 -0
- package/src/features/Conversation/Plugins/Render/utils/listenToPlugin.ts +98 -0
- package/src/features/Conversation/Plugins/Render/utils/pluginSettings.test.ts +53 -0
- package/src/features/Conversation/Plugins/Render/utils/pluginSettings.ts +17 -0
- package/src/features/Conversation/Plugins/Render/utils/pluginState.test.ts +43 -0
- package/src/features/Conversation/Plugins/Render/utils/pluginState.ts +20 -0
- package/src/features/Conversation/Plugins/Render/utils/postMessage.test.ts +64 -0
- package/src/features/Conversation/Plugins/Render/utils/postMessage.ts +28 -0
- package/src/features/Conversation/components/AutoScroll.tsx +26 -0
- package/src/features/Conversation/components/BackBottom/index.tsx +31 -0
- package/src/features/Conversation/components/BackBottom/style.ts +36 -0
- package/src/features/Conversation/components/BubblesLoading.tsx +61 -0
- package/src/features/Conversation/components/ChatItem/ActionsBar.tsx +58 -0
- package/src/features/Conversation/components/ChatItem/HistoryDivider.tsx +26 -0
- package/src/features/Conversation/components/ChatItem/index.tsx +156 -0
- package/src/features/Conversation/components/ChatList/index.tsx +21 -0
- package/src/features/Conversation/components/InboxWelcome/AgentsSuggest.tsx +113 -0
- package/src/features/Conversation/components/InboxWelcome/QuestionSuggest.tsx +104 -0
- package/src/features/Conversation/components/InboxWelcome/index.tsx +70 -0
- package/src/features/Conversation/components/OTPInput.tsx +136 -0
- package/src/features/Conversation/components/SkeletonList.tsx +51 -0
- package/src/features/Conversation/components/VirtualizedList/index.tsx +138 -0
- package/src/features/Conversation/hooks/useChatListActionsBar.tsx +55 -0
- package/src/features/Conversation/index.tsx +30 -0
- package/src/features/Conversation/types/index.tsx +32 -0
- package/src/features/DataImporter/Error.tsx +65 -0
- package/src/features/DataImporter/FileUploading.tsx +50 -0
- package/src/features/DataImporter/Loading.tsx +125 -0
- package/src/features/DataImporter/SuccessResult.tsx +61 -0
- package/src/features/DataImporter/index.tsx +185 -0
- package/src/features/DataImporter/style.ts +17 -0
- package/src/features/DebugUI/index.tsx +36 -0
- package/src/features/FileList/EditableFileList.tsx +31 -0
- package/src/features/FileList/FileListPreviewer.tsx +17 -0
- package/src/features/FileList/index.tsx +2 -0
- package/src/features/Follow/index.tsx +64 -0
- package/src/features/MobileSwitchLoading/index.tsx +13 -0
- package/src/features/MobileTabBar/index.tsx +61 -0
- package/src/features/ModelSelect/index.tsx +67 -0
- package/src/features/ModelSwitchPanel/index.tsx +113 -0
- package/src/features/PWAInstall/index.tsx +72 -0
- package/src/features/PluginDetailModal/APIs.tsx +43 -0
- package/src/features/PluginDetailModal/Meta.tsx +57 -0
- package/src/features/PluginDetailModal/index.tsx +75 -0
- package/src/features/PluginDevModal/LocalForm.tsx +124 -0
- package/src/features/PluginDevModal/PluginPreview.tsx +36 -0
- package/src/features/PluginDevModal/UrlManifestForm.tsx +134 -0
- package/src/features/PluginDevModal/index.tsx +172 -0
- package/src/features/PluginSettings/PluginSettingRender.tsx +86 -0
- package/src/features/PluginSettings/index.tsx +87 -0
- package/src/features/PluginStore/AddPluginButton.tsx +47 -0
- package/src/features/PluginStore/InstalledPluginList.tsx +61 -0
- package/src/features/PluginStore/Loading.tsx +13 -0
- package/src/features/PluginStore/OnlineList.tsx +89 -0
- package/src/features/PluginStore/PluginItem/Action.tsx +116 -0
- package/src/features/PluginStore/PluginItem/EditCustomPlugin.tsx +55 -0
- package/src/features/PluginStore/PluginItem/PluginTag.tsx +58 -0
- package/src/features/PluginStore/PluginItem/index.tsx +82 -0
- package/src/features/PluginStore/index.tsx +57 -0
- package/src/features/Setting/Footer.tsx +96 -0
- package/src/features/Setting/SettingContainer.tsx +35 -0
- package/src/features/SyncStatusInspector/DisableSync.tsx +79 -0
- package/src/features/SyncStatusInspector/EnableSync.tsx +136 -0
- package/src/features/SyncStatusInspector/EnableTag.tsx +66 -0
- package/src/features/SyncStatusInspector/index.tsx +27 -0
- package/src/features/User/DataStatistics.tsx +155 -0
- package/src/features/User/PlanTag.tsx +45 -0
- package/src/features/User/UserAvatar.tsx +75 -0
- package/src/features/User/UserInfo.tsx +59 -0
- package/src/features/User/UserLoginOrSignup.tsx +23 -0
- package/src/features/User/UserPanel/LangButton.tsx +57 -0
- package/src/features/User/UserPanel/PanelContent.tsx +85 -0
- package/src/features/User/UserPanel/ThemeButton.tsx +70 -0
- package/src/features/User/UserPanel/UpgradeBadge.tsx +19 -0
- package/src/features/User/UserPanel/index.tsx +43 -0
- package/src/features/User/UserPanel/useMenu.tsx +239 -0
- package/src/features/User/UserPanel/useNewVersion.tsx +14 -0
- package/src/features/User/__tests__/PanelContent.test.tsx +155 -0
- package/src/features/User/__tests__/UserAvatar.test.tsx +83 -0
- package/src/features/User/__tests__/useMenu.test.tsx +146 -0
- package/src/hooks/_header.ts +23 -0
- package/src/hooks/useActiveSettingsKey.ts +20 -0
- package/src/hooks/useActiveTabKey.ts +12 -0
- package/src/hooks/useDownloadSpeed.ts +50 -0
- package/src/hooks/useGreeting/greetingTime.ts +14 -0
- package/src/hooks/useGreeting/index.ts +16 -0
- package/src/hooks/useInterceptingRoutes.test.ts +70 -0
- package/src/hooks/useInterceptingRoutes.ts +46 -0
- package/src/hooks/useIsMobile.ts +8 -0
- package/src/hooks/useIsSubSlug.ts +12 -0
- package/src/hooks/usePWAInstall.test.ts +78 -0
- package/src/hooks/usePWAInstall.ts +39 -0
- package/src/hooks/usePlatform.test.ts +82 -0
- package/src/hooks/usePlatform.ts +32 -0
- package/src/hooks/useProviderName.ts +8 -0
- package/src/hooks/useQuery.test.ts +19 -0
- package/src/hooks/useQuery.ts +8 -0
- package/src/hooks/useQueryRoute.test.ts +86 -0
- package/src/hooks/useQueryRoute.ts +46 -0
- package/src/hooks/useSyncData.ts +50 -0
- package/src/hooks/useTTS.ts +84 -0
- package/src/hooks/useTokenCount.test.ts +41 -0
- package/src/hooks/useTokenCount.ts +20 -0
- package/src/layout/AuthProvider/Clerk/UserUpdater.tsx +40 -0
- package/src/layout/AuthProvider/Clerk/index.tsx +26 -0
- package/src/layout/AuthProvider/Clerk/useAppearance.ts +123 -0
- package/src/layout/AuthProvider/NextAuth/UserUpdater.tsx +35 -0
- package/src/layout/AuthProvider/NextAuth/index.tsx +17 -0
- package/src/layout/AuthProvider/NoAuth/index.tsx +16 -0
- package/src/layout/AuthProvider/index.tsx +17 -0
- package/src/layout/GlobalProvider/AppTheme.tsx +127 -0
- package/src/layout/GlobalProvider/Locale.tsx +62 -0
- package/src/layout/GlobalProvider/StoreInitialization.tsx +79 -0
- package/src/layout/GlobalProvider/StyleRegistry.tsx +24 -0
- package/src/layout/GlobalProvider/index.tsx +100 -0
- package/src/libs/agent-runtime/AgentRuntime.test.ts +416 -0
- package/src/libs/agent-runtime/AgentRuntime.ts +221 -0
- package/src/libs/agent-runtime/BaseAI.ts +24 -0
- package/src/libs/agent-runtime/anthropic/index.test.ts +507 -0
- package/src/libs/agent-runtime/anthropic/index.ts +160 -0
- package/src/libs/agent-runtime/azureOpenai/index.test.ts +356 -0
- package/src/libs/agent-runtime/azureOpenai/index.ts +106 -0
- package/src/libs/agent-runtime/bedrock/index.test.ts +394 -0
- package/src/libs/agent-runtime/bedrock/index.ts +154 -0
- package/src/libs/agent-runtime/deepseek/index.test.ts +255 -0
- package/src/libs/agent-runtime/deepseek/index.ts +10 -0
- package/src/libs/agent-runtime/error.ts +26 -0
- package/src/libs/agent-runtime/google/index.test.ts +602 -0
- package/src/libs/agent-runtime/google/index.ts +336 -0
- package/src/libs/agent-runtime/groq/index.test.ts +320 -0
- package/src/libs/agent-runtime/groq/index.ts +25 -0
- package/src/libs/agent-runtime/index.ts +22 -0
- package/src/libs/agent-runtime/minimax/index.test.ts +275 -0
- package/src/libs/agent-runtime/minimax/index.ts +176 -0
- package/src/libs/agent-runtime/mistral/index.test.ts +331 -0
- package/src/libs/agent-runtime/mistral/index.ts +21 -0
- package/src/libs/agent-runtime/moonshot/index.test.ts +251 -0
- package/src/libs/agent-runtime/moonshot/index.ts +10 -0
- package/src/libs/agent-runtime/ollama/index.test.ts +197 -0
- package/src/libs/agent-runtime/ollama/index.ts +111 -0
- package/src/libs/agent-runtime/ollama/type.ts +8 -0
- package/src/libs/agent-runtime/openai/__snapshots__/index.test.ts.snap +101 -0
- package/src/libs/agent-runtime/openai/fixtures/openai-models.json +170 -0
- package/src/libs/agent-runtime/openai/index.test.ts +245 -0
- package/src/libs/agent-runtime/openai/index.ts +16 -0
- package/src/libs/agent-runtime/openrouter/__snapshots__/index.test.ts.snap +82 -0
- package/src/libs/agent-runtime/openrouter/fixtures/models.json +62 -0
- package/src/libs/agent-runtime/openrouter/index.test.ts +312 -0
- package/src/libs/agent-runtime/openrouter/index.ts +41 -0
- package/src/libs/agent-runtime/openrouter/type.ts +28 -0
- package/src/libs/agent-runtime/perplexity/index.test.ts +249 -0
- package/src/libs/agent-runtime/perplexity/index.ts +31 -0
- package/src/libs/agent-runtime/qwen/index.test.ts +251 -0
- package/src/libs/agent-runtime/qwen/index.ts +28 -0
- package/src/libs/agent-runtime/togetherai/__snapshots__/index.test.ts.snap +886 -0
- package/src/libs/agent-runtime/togetherai/fixtures/models.json +8111 -0
- package/src/libs/agent-runtime/togetherai/index.test.ts +313 -0
- package/src/libs/agent-runtime/togetherai/index.ts +47 -0
- package/src/libs/agent-runtime/togetherai/type.ts +75 -0
- package/src/libs/agent-runtime/types/chat.ts +150 -0
- package/src/libs/agent-runtime/types/index.ts +3 -0
- package/src/libs/agent-runtime/types/textToImage.ts +34 -0
- package/src/libs/agent-runtime/types/type.ts +44 -0
- package/src/libs/agent-runtime/utils/anthropicHelpers.test.ts +233 -0
- package/src/libs/agent-runtime/utils/anthropicHelpers.ts +120 -0
- package/src/libs/agent-runtime/utils/createError.ts +11 -0
- package/src/libs/agent-runtime/utils/debugStream.test.ts +70 -0
- package/src/libs/agent-runtime/utils/debugStream.ts +48 -0
- package/src/libs/agent-runtime/utils/desensitizeUrl.test.ts +47 -0
- package/src/libs/agent-runtime/utils/desensitizeUrl.ts +34 -0
- package/src/libs/agent-runtime/utils/handleOpenAIError.ts +39 -0
- package/src/libs/agent-runtime/utils/openaiCompatibleFactory/index.test.ts +641 -0
- package/src/libs/agent-runtime/utils/openaiCompatibleFactory/index.ts +294 -0
- package/src/libs/agent-runtime/utils/response.ts +12 -0
- package/src/libs/agent-runtime/utils/streams/anthropic.test.ts +197 -0
- package/src/libs/agent-runtime/utils/streams/anthropic.ts +91 -0
- package/src/libs/agent-runtime/utils/streams/bedrock/claude.ts +21 -0
- package/src/libs/agent-runtime/utils/streams/bedrock/common.ts +32 -0
- package/src/libs/agent-runtime/utils/streams/bedrock/index.ts +3 -0
- package/src/libs/agent-runtime/utils/streams/bedrock/llama.test.ts +196 -0
- package/src/libs/agent-runtime/utils/streams/bedrock/llama.ts +51 -0
- package/src/libs/agent-runtime/utils/streams/google-ai.test.ts +97 -0
- package/src/libs/agent-runtime/utils/streams/google-ai.ts +68 -0
- package/src/libs/agent-runtime/utils/streams/index.ts +7 -0
- package/src/libs/agent-runtime/utils/streams/minimax.ts +39 -0
- package/src/libs/agent-runtime/utils/streams/ollama.test.ts +77 -0
- package/src/libs/agent-runtime/utils/streams/ollama.ts +38 -0
- package/src/libs/agent-runtime/utils/streams/openai.test.ts +263 -0
- package/src/libs/agent-runtime/utils/streams/openai.ts +83 -0
- package/src/libs/agent-runtime/utils/streams/protocol.ts +100 -0
- package/src/libs/agent-runtime/utils/uriParser.test.ts +29 -0
- package/src/libs/agent-runtime/utils/uriParser.ts +24 -0
- package/src/libs/agent-runtime/zeroone/index.test.ts +299 -0
- package/src/libs/agent-runtime/zeroone/index.ts +11 -0
- package/src/libs/agent-runtime/zhipu/authToken.test.ts +18 -0
- package/src/libs/agent-runtime/zhipu/authToken.ts +22 -0
- package/src/libs/agent-runtime/zhipu/index.test.ts +322 -0
- package/src/libs/agent-runtime/zhipu/index.ts +130 -0
- package/src/libs/logger/index.ts +5 -0
- package/src/libs/next-auth/index.ts +46 -0
- package/src/libs/next-auth/sso-providers/auth0.ts +17 -0
- package/src/libs/next-auth/sso-providers/authentik.ts +17 -0
- package/src/libs/next-auth/sso-providers/azure-ad.ts +17 -0
- package/src/libs/next-auth/sso-providers/github.ts +15 -0
- package/src/libs/next-auth/sso-providers/index.ts +7 -0
- package/src/libs/next-auth/sso-providers/zitadel.ts +16 -0
- package/src/libs/swr/index.ts +74 -0
- package/src/libs/traces/event.test.ts +158 -0
- package/src/libs/traces/event.ts +133 -0
- package/src/libs/traces/index.test.ts +61 -0
- package/src/libs/traces/index.ts +52 -0
- package/src/libs/trpc/client.ts +65 -0
- package/src/libs/trpc/index.ts +42 -0
- package/src/libs/trpc/init.ts +26 -0
- package/src/libs/trpc/middleware/password.test.ts +88 -0
- package/src/libs/trpc/middleware/password.ts +26 -0
- package/src/libs/trpc/middleware/userAuth.test.ts +44 -0
- package/src/libs/trpc/middleware/userAuth.ts +18 -0
- package/src/locales/create.ts +51 -38
- package/src/locales/default/auth.ts +8 -0
- package/src/locales/default/chat.ts +139 -0
- package/src/locales/default/clerk.ts +782 -0
- package/src/locales/default/common.ts +214 -39
- package/src/locales/default/components.ts +16 -0
- package/src/locales/default/error.ts +127 -0
- package/src/locales/default/index.ts +33 -0
- package/src/locales/default/market.ts +32 -0
- package/src/locales/default/metadata.ts +20 -0
- package/src/locales/default/migration.ts +47 -0
- package/src/locales/default/modelProvider.ts +111 -0
- package/src/locales/default/plugin.ts +166 -0
- package/src/locales/default/setting.ts +343 -32
- package/src/locales/default/tool.ts +10 -0
- package/src/locales/default/welcome.ts +50 -0
- package/src/locales/resources.test.ts +49 -0
- package/src/locales/resources.ts +114 -0
- package/src/middleware.ts +47 -0
- package/src/migrations/FromV0ToV1.ts +2 -4
- package/src/migrations/FromV1ToV2/fixtures/input-v1-session.json +191 -0
- package/src/migrations/FromV1ToV2/fixtures/output-v2.json +202 -0
- package/src/migrations/FromV1ToV2/index.ts +82 -0
- package/src/migrations/FromV1ToV2/migrations.test.ts +224 -0
- package/src/migrations/FromV1ToV2/types/v1.ts +78 -0
- package/src/migrations/FromV1ToV2/types/v2.ts +52 -0
- package/src/migrations/FromV2ToV3/fixtures/input-v2-session.json +72 -0
- package/src/migrations/FromV2ToV3/fixtures/output-v3-from-v1.json +203 -0
- package/src/migrations/FromV2ToV3/fixtures/output-v3.json +74 -0
- package/src/migrations/FromV2ToV3/index.ts +30 -0
- package/src/migrations/FromV2ToV3/migrations.test.ts +42 -0
- package/src/migrations/FromV2ToV3/types/v3.ts +27 -0
- package/src/migrations/FromV3ToV4/fixtures/azure-input-v3.json +79 -0
- package/src/migrations/FromV3ToV4/fixtures/azure-output-v4.json +75 -0
- package/src/migrations/FromV3ToV4/fixtures/ollama-input-v3.json +85 -0
- package/src/migrations/FromV3ToV4/fixtures/ollama-output-v4.json +85 -0
- package/src/migrations/FromV3ToV4/fixtures/openai-input-v3.json +77 -0
- package/src/migrations/FromV3ToV4/fixtures/openai-output-v4.json +77 -0
- package/src/migrations/FromV3ToV4/fixtures/openrouter-input-v3.json +82 -0
- package/src/migrations/FromV3ToV4/fixtures/openrouter-output-v4.json +85 -0
- package/src/migrations/FromV3ToV4/fixtures/output-v4-from-v1.json +203 -0
- package/src/migrations/FromV3ToV4/index.ts +102 -0
- package/src/migrations/FromV3ToV4/migrations.test.ts +195 -0
- package/src/migrations/FromV3ToV4/types/v3.ts +52 -0
- package/src/migrations/FromV3ToV4/types/v4.ts +37 -0
- package/src/migrations/FromV4ToV5/fixtures/from-v1-to-v5-output.json +245 -0
- package/src/migrations/FromV4ToV5/fixtures/function-input-v4.json +96 -0
- package/src/migrations/FromV4ToV5/fixtures/function-output-v5.json +120 -0
- package/src/migrations/FromV4ToV5/index.ts +58 -0
- package/src/migrations/FromV4ToV5/migrations.test.ts +49 -0
- package/src/migrations/FromV4ToV5/types/v4.ts +21 -0
- package/src/migrations/FromV4ToV5/types/v5.ts +27 -0
- package/src/migrations/FromV5ToV6/fixtures/from-v1-to-v6-output.json +247 -0
- package/src/migrations/FromV5ToV6/fixtures/session-input-v5.json +81 -0
- package/src/migrations/FromV5ToV6/fixtures/session-output-v6.json +85 -0
- package/src/migrations/FromV5ToV6/index.ts +61 -0
- package/src/migrations/FromV5ToV6/migrations.test.ts +50 -0
- package/src/migrations/FromV5ToV6/types/v5.ts +48 -0
- package/src/migrations/FromV5ToV6/types/v6.ts +60 -0
- package/src/migrations/FromV6ToV7/fixtures/output-v7-from-v1.json +203 -0
- package/src/migrations/FromV6ToV7/fixtures/provider-input-v6.json +103 -0
- package/src/migrations/FromV6ToV7/fixtures/provider-output-v7.json +118 -0
- package/src/migrations/FromV6ToV7/index.ts +101 -0
- package/src/migrations/FromV6ToV7/migrations.test.ts +64 -0
- package/src/migrations/FromV6ToV7/types/v6.ts +61 -0
- package/src/migrations/FromV6ToV7/types/v7.ts +71 -0
- package/src/{utils → migrations}/VersionController.test.ts +1 -3
- package/src/{utils → migrations}/VersionController.ts +6 -3
- package/src/migrations/index.ts +55 -7
- package/src/server/context.ts +51 -0
- package/src/server/files/s3.ts +78 -0
- package/src/server/globalConfig/index.ts +132 -0
- package/src/server/globalConfig/parseDefaultAgent.test.ts +195 -0
- package/src/server/globalConfig/parseDefaultAgent.ts +47 -0
- package/src/server/globalConfig/parseSystemAgent.test.ts +95 -0
- package/src/server/globalConfig/parseSystemAgent.ts +39 -0
- package/src/server/keyVaultsEncrypt/index.test.ts +62 -0
- package/src/server/keyVaultsEncrypt/index.ts +93 -0
- package/src/server/ld.ts +218 -0
- package/src/server/metadata.ts +96 -0
- package/src/server/mock.ts +8 -0
- package/src/server/routers/edge/config/__snapshots__/index.test.ts.snap +134 -0
- package/src/server/routers/edge/config/index.test.ts +195 -0
- package/src/server/routers/edge/config/index.ts +12 -0
- package/src/server/routers/edge/index.ts +15 -0
- package/src/server/routers/edge/upload.ts +16 -0
- package/src/server/routers/lambda/file.ts +49 -0
- package/src/server/routers/lambda/importer.ts +54 -0
- package/src/server/routers/lambda/index.ts +28 -0
- package/src/server/routers/lambda/message.ts +165 -0
- package/src/server/routers/lambda/plugin.ts +100 -0
- package/src/server/routers/lambda/session.ts +194 -0
- package/src/server/routers/lambda/sessionGroup.ts +77 -0
- package/src/server/routers/lambda/topic.ts +134 -0
- package/src/server/routers/lambda/user.ts +57 -0
- package/src/server/translation.ts +44 -0
- package/src/services/__tests__/__snapshots__/chat.test.ts.snap +116 -0
- package/src/services/__tests__/__snapshots__/tool.test.ts.snap +204 -0
- package/src/services/__tests__/chat.test.ts +959 -0
- package/src/services/__tests__/global.test.ts +100 -0
- package/src/services/__tests__/ollama.test.ts +28 -0
- package/src/services/__tests__/openai/OpenAPI_V3.json +245 -0
- package/src/services/__tests__/openai/plugin.json +22 -0
- package/src/services/__tests__/share.test.ts +131 -0
- package/src/services/__tests__/sync.test.ts +56 -0
- package/src/services/__tests__/tool.test.ts +268 -0
- package/src/services/__tests__/upload.test.ts +72 -0
- package/src/services/_auth.test.ts +175 -0
- package/src/services/_auth.ts +75 -0
- package/src/services/_header.ts +20 -0
- package/src/services/_url.ts +46 -0
- package/src/services/chat.ts +524 -0
- package/src/services/config.ts +159 -0
- package/src/services/debug.ts +40 -0
- package/src/services/file/client.test.ts +160 -0
- package/src/services/file/client.ts +65 -0
- package/src/services/file/index.ts +6 -0
- package/src/services/file/server.ts +45 -0
- package/src/services/file/type.ts +9 -0
- package/src/services/github.ts +42 -0
- package/src/services/global.ts +29 -0
- package/src/services/import/client.ts +74 -0
- package/src/services/import/index.ts +6 -0
- package/src/services/import/server.ts +115 -0
- package/src/services/market.ts +22 -0
- package/src/services/message/client.test.ts +349 -0
- package/src/services/message/client.ts +83 -0
- package/src/services/message/index.test.ts +48 -0
- package/src/services/message/index.ts +8 -0
- package/src/services/message/server.ts +93 -0
- package/src/services/message/type.ts +46 -0
- package/src/services/models.ts +37 -0
- package/src/services/ollama.ts +83 -0
- package/src/services/plugin/client.test.ts +162 -0
- package/src/services/plugin/client.ts +42 -0
- package/src/services/plugin/index.ts +6 -0
- package/src/services/plugin/server.ts +46 -0
- package/src/services/plugin/type.ts +21 -0
- package/src/services/session/client.test.ts +439 -0
- package/src/services/session/client.ts +180 -0
- package/src/services/session/index.ts +6 -0
- package/src/services/session/server.ts +148 -0
- package/src/services/session/type.ts +65 -0
- package/src/services/share.ts +61 -0
- package/src/services/sync.ts +19 -0
- package/src/services/textToImage.ts +36 -0
- package/src/services/tool.ts +144 -0
- package/src/services/topic/client.test.ts +245 -0
- package/src/services/topic/client.ts +70 -0
- package/src/services/topic/index.ts +6 -0
- package/src/services/topic/server.ts +68 -0
- package/src/services/topic/type.ts +34 -0
- package/src/services/trace.ts +28 -0
- package/src/services/upload.ts +99 -0
- package/src/services/user/client.test.ts +102 -0
- package/src/services/user/client.ts +52 -0
- package/src/services/user/index.ts +6 -0
- package/src/services/user/server.ts +28 -0
- package/src/services/user/type.ts +11 -0
- package/src/store/agent/index.ts +2 -0
- package/src/store/agent/initialState.ts +7 -0
- package/src/store/agent/selectors.ts +1 -0
- package/src/store/agent/slices/chat/__snapshots__/selectors.test.ts.snap +30 -0
- package/src/store/agent/slices/chat/action.test.ts +305 -0
- package/src/store/agent/slices/chat/action.ts +176 -0
- package/src/store/agent/slices/chat/index.ts +2 -0
- package/src/store/agent/slices/chat/initialState.ts +20 -0
- package/src/store/agent/slices/chat/selectors.test.ts +227 -0
- package/src/store/agent/slices/chat/selectors.ts +98 -0
- package/src/store/agent/store.ts +22 -0
- package/src/store/chat/helpers.test.ts +109 -0
- package/src/store/chat/helpers.ts +30 -0
- package/src/store/chat/index.ts +3 -0
- package/src/store/chat/initialState.ts +13 -0
- package/src/store/chat/selectors.ts +3 -0
- package/src/store/chat/slices/builtinTool/action.test.ts +104 -0
- package/src/store/chat/slices/builtinTool/action.ts +101 -0
- package/src/store/chat/slices/builtinTool/initialState.ts +7 -0
- package/src/store/chat/slices/builtinTool/selectors.ts +11 -0
- package/src/store/chat/slices/enchance/action.test.ts +126 -0
- package/src/store/chat/slices/enchance/action.ts +124 -0
- package/src/store/chat/slices/message/action.test.ts +1243 -0
- package/src/store/chat/slices/message/action.ts +765 -0
- package/src/store/chat/slices/message/initialState.ts +45 -0
- package/src/store/chat/slices/message/reducer.test.ts +83 -0
- package/src/store/chat/slices/message/reducer.ts +131 -0
- package/src/store/chat/slices/message/selectors.test.ts +293 -0
- package/src/store/chat/slices/message/selectors.ts +161 -0
- package/src/store/chat/slices/message/utils.ts +7 -0
- package/src/store/chat/slices/plugin/action.test.ts +660 -0
- package/src/store/chat/slices/plugin/action.ts +304 -0
- package/src/store/chat/slices/share/action.test.ts +213 -0
- package/src/store/chat/slices/share/action.ts +122 -0
- package/src/store/chat/slices/share/initialState.ts +7 -0
- package/src/store/chat/slices/topic/action.test.ts +540 -0
- package/src/store/chat/slices/topic/action.ts +330 -0
- package/src/store/chat/slices/topic/initialState.ts +28 -0
- package/src/store/chat/slices/topic/reducer.test.ts +139 -0
- package/src/store/chat/slices/topic/reducer.ts +67 -0
- package/src/store/chat/slices/topic/selectors.test.ts +95 -0
- package/src/store/chat/slices/topic/selectors.ts +35 -0
- package/src/store/chat/store.ts +44 -0
- package/src/store/file/index.ts +2 -0
- package/src/store/file/initialState.ts +7 -0
- package/src/store/file/selectors.ts +7 -0
- package/src/store/file/slices/images/action.test.ts +184 -0
- package/src/store/file/slices/images/action.ts +153 -0
- package/src/store/file/slices/images/initialState.ts +13 -0
- package/src/store/file/slices/images/selectors.test.ts +78 -0
- package/src/store/file/slices/images/selectors.ts +40 -0
- package/src/store/file/slices/tts/action.test.ts +141 -0
- package/src/store/file/slices/tts/action.ts +63 -0
- package/src/store/file/slices/tts/index.ts +2 -0
- package/src/store/file/slices/tts/selectors.ts +3 -0
- package/src/store/file/store.ts +23 -0
- package/src/store/global/action.test.ts +183 -0
- package/src/store/global/action.ts +107 -0
- package/src/store/global/index.ts +1 -0
- package/src/store/global/initialState.ts +72 -0
- package/src/store/global/selectors.ts +26 -0
- package/src/store/global/store.ts +26 -0
- package/src/store/market/action.ts +82 -0
- package/src/store/market/index.ts +3 -0
- package/src/store/market/initialState.ts +19 -0
- package/src/store/market/selectors.ts +38 -0
- package/src/store/market/store.ts +48 -0
- package/src/store/middleware/createDevtools.ts +23 -0
- package/src/store/middleware/createHyperStorage/index.test.ts +341 -0
- package/src/store/middleware/createHyperStorage/index.ts +126 -0
- package/src/store/middleware/createHyperStorage/indexedDB.test.ts +64 -0
- package/src/store/middleware/createHyperStorage/indexedDB.ts +26 -0
- package/src/store/middleware/createHyperStorage/keyMapper.ts +57 -0
- package/src/store/middleware/createHyperStorage/localStorage.ts +18 -0
- package/src/store/middleware/createHyperStorage/type.ts +25 -0
- package/src/store/middleware/createHyperStorage/urlStorage.test.ts +84 -0
- package/src/store/middleware/createHyperStorage/urlStorage.ts +81 -0
- package/src/store/serverConfig/Provider.tsx +23 -0
- package/src/store/serverConfig/index.ts +3 -0
- package/src/store/serverConfig/selectors.test.ts +74 -0
- package/src/store/serverConfig/selectors.ts +14 -0
- package/src/store/serverConfig/store.test.ts +53 -0
- package/src/store/serverConfig/store.ts +66 -0
- package/src/store/session/helpers.ts +1 -0
- package/src/store/session/index.ts +1 -32
- package/src/store/session/initialState.ts +4 -6
- package/src/store/session/selectors.ts +2 -3
- package/src/store/session/slices/session/action.test.ts +232 -0
- package/src/store/session/slices/session/action.ts +226 -70
- package/src/store/session/slices/session/helpers.ts +17 -0
- package/src/store/session/slices/session/initialState.ts +18 -19
- package/src/store/session/slices/session/reducers.test.ts +79 -0
- package/src/store/session/slices/session/reducers.ts +61 -0
- package/src/store/session/slices/session/selectors/index.ts +2 -20
- package/src/store/session/slices/session/selectors/list.test.ts +126 -0
- package/src/store/session/slices/session/selectors/list.ts +45 -51
- package/src/store/session/slices/session/selectors/meta.test.ts +108 -0
- package/src/store/session/slices/session/selectors/meta.ts +45 -0
- package/src/store/session/slices/sessionGroup/action.test.ts +133 -0
- package/src/store/session/slices/sessionGroup/action.ts +73 -0
- package/src/store/session/slices/sessionGroup/initialState.ts +12 -0
- package/src/store/session/slices/sessionGroup/reducer.test.ts +86 -0
- package/src/store/session/slices/sessionGroup/reducer.ts +56 -0
- package/src/store/session/slices/sessionGroup/selectors.ts +11 -0
- package/src/store/session/store.ts +25 -9
- package/src/store/tool/helpers.ts +28 -0
- package/src/store/tool/index.ts +2 -0
- package/src/store/tool/initialState.ts +13 -0
- package/src/store/tool/selectors/index.ts +5 -0
- package/src/store/tool/selectors/tool.test.ts +233 -0
- package/src/store/tool/selectors/tool.ts +110 -0
- package/src/store/tool/slices/builtin/action.test.ts +90 -0
- package/src/store/tool/slices/builtin/action.ts +54 -0
- package/src/store/{session/slices/session → tool/slices/builtin}/index.ts +0 -1
- package/src/store/tool/slices/builtin/initialState.ts +12 -0
- package/src/store/tool/slices/builtin/selectors.test.ts +53 -0
- package/src/store/tool/slices/builtin/selectors.ts +20 -0
- package/src/store/tool/slices/customPlugin/action.test.ts +141 -0
- package/src/store/tool/slices/customPlugin/action.ts +88 -0
- package/src/store/{session/slices/chat → tool/slices/customPlugin}/index.ts +1 -1
- package/src/store/tool/slices/customPlugin/initialState.ts +17 -0
- package/src/store/tool/slices/customPlugin/reducers/customPluginList.ts +56 -0
- package/src/store/tool/slices/customPlugin/selectors.test.ts +70 -0
- package/src/store/tool/slices/customPlugin/selectors.ts +9 -0
- package/src/store/tool/slices/plugin/__snapshots__/action.test.ts.snap +15 -0
- package/src/store/tool/slices/plugin/action.test.ts +196 -0
- package/src/store/tool/slices/plugin/action.ts +76 -0
- package/src/store/tool/slices/plugin/index.ts +3 -0
- package/src/store/tool/slices/plugin/initialState.ts +16 -0
- package/src/store/tool/slices/plugin/reducers/manifest.ts +36 -0
- package/src/store/tool/slices/plugin/selectors.test.ts +197 -0
- package/src/store/tool/slices/plugin/selectors.ts +80 -0
- package/src/store/tool/slices/store/action.test.ts +392 -0
- package/src/store/tool/slices/store/action.ts +112 -0
- package/src/store/tool/slices/store/index.ts +3 -0
- package/src/store/tool/slices/store/initialState.ts +17 -0
- package/src/store/tool/slices/store/selectors.test.ts +50 -0
- package/src/store/tool/slices/store/selectors.ts +32 -0
- package/src/store/tool/store.ts +32 -0
- package/src/store/user/helpers.ts +9 -0
- package/src/store/user/index.ts +1 -0
- package/src/store/user/initialState.ts +22 -0
- package/src/store/user/selectors.ts +13 -0
- package/src/store/user/slices/auth/action.test.ts +202 -0
- package/src/store/user/slices/auth/action.ts +63 -0
- package/src/store/user/slices/auth/initialState.ts +28 -0
- package/src/store/user/slices/auth/selectors.test.ts +143 -0
- package/src/store/user/slices/auth/selectors.ts +48 -0
- package/src/store/user/slices/common/action.test.ts +271 -0
- package/src/store/user/slices/common/action.ts +129 -0
- package/src/store/user/slices/common/initialState.ts +15 -0
- package/src/store/user/slices/modelList/action.test.ts +363 -0
- package/src/store/user/slices/modelList/action.ts +209 -0
- package/src/store/user/slices/modelList/initialState.ts +15 -0
- package/src/store/user/slices/modelList/reducers/customModelCard.test.ts +204 -0
- package/src/store/user/slices/modelList/reducers/customModelCard.ts +64 -0
- package/src/store/user/slices/modelList/selectors/index.ts +3 -0
- package/src/store/user/slices/modelList/selectors/keyVaults.test.ts +201 -0
- package/src/store/user/slices/modelList/selectors/keyVaults.ts +45 -0
- package/src/store/user/slices/modelList/selectors/modelConfig.test.ts +179 -0
- package/src/store/user/slices/modelList/selectors/modelConfig.ts +80 -0
- package/src/store/user/slices/modelList/selectors/modelProvider.test.ts +145 -0
- package/src/store/user/slices/modelList/selectors/modelProvider.ts +147 -0
- package/src/store/user/slices/preference/action.test.ts +43 -0
- package/src/store/user/slices/preference/action.ts +35 -0
- package/src/store/user/slices/preference/initialState.ts +13 -0
- package/src/store/user/slices/preference/selectors.test.ts +82 -0
- package/src/store/user/slices/preference/selectors.ts +19 -0
- package/src/store/user/slices/settings/action.test.ts +153 -0
- package/src/store/user/slices/settings/action.ts +109 -0
- package/src/store/user/slices/settings/initialState.ts +15 -0
- package/src/store/user/slices/settings/selectors/__snapshots__/settings.test.ts.snap +109 -0
- package/src/store/user/slices/settings/selectors/general.test.ts +45 -0
- package/src/store/user/slices/settings/selectors/general.ts +40 -0
- package/src/store/user/slices/settings/selectors/index.ts +3 -0
- package/src/store/user/slices/settings/selectors/settings.test.ts +156 -0
- package/src/store/user/slices/settings/selectors/settings.ts +52 -0
- package/src/store/user/slices/settings/selectors/systemAgent.ts +16 -0
- package/src/store/user/slices/sync/action.test.ts +164 -0
- package/src/store/user/slices/sync/action.ts +97 -0
- package/src/store/user/slices/sync/initialState.ts +13 -0
- package/src/store/user/slices/sync/selectors.ts +20 -0
- package/src/store/user/store.ts +42 -0
- package/src/styles/antdOverride.ts +9 -20
- package/src/styles/global.ts +39 -14
- package/src/styles/index.ts +6 -1
- package/src/styles/mobileHeader.ts +15 -0
- package/src/tools/dalle/Render/Item/EditMode.tsx +66 -0
- package/src/tools/dalle/Render/Item/Error.tsx +50 -0
- package/src/tools/dalle/Render/Item/Image.tsx +44 -0
- package/src/tools/dalle/Render/Item/ImageFileItem.tsx +77 -0
- package/src/tools/dalle/Render/Item/index.tsx +88 -0
- package/src/tools/dalle/Render/ToolBar.tsx +55 -0
- package/src/tools/dalle/Render/index.tsx +51 -0
- package/src/tools/dalle/index.ts +92 -0
- package/src/tools/index.ts +11 -0
- package/src/tools/renders.ts +14 -0
- package/src/types/agent/index.ts +83 -0
- package/src/types/exportConfig.ts +121 -14
- package/src/types/fetch.ts +36 -0
- package/src/types/files.ts +42 -0
- package/src/types/i18next.d.ts +1 -1
- package/src/types/importer.ts +128 -0
- package/src/types/llm.ts +70 -12
- package/src/types/locale.ts +4 -6
- package/src/types/market.ts +20 -0
- package/src/types/message/index.ts +82 -0
- package/src/types/message/tools.ts +65 -0
- package/src/types/message/translate.ts +4 -0
- package/src/types/meta.ts +24 -12
- package/src/types/next-auth.d.ts +23 -0
- package/src/types/openai/chat.ts +128 -0
- package/src/types/openai/functionCall.ts +10 -0
- package/src/types/openai/image.ts +34 -0
- package/src/types/openai/plugin.ts +57 -0
- package/src/types/serverConfig.ts +32 -0
- package/src/types/service.ts +7 -0
- package/src/types/session/agentSession.ts +35 -0
- package/src/types/session/index.ts +10 -0
- package/src/types/session/sessionGroup.ts +24 -0
- package/src/types/share.ts +7 -0
- package/src/types/sync.ts +41 -0
- package/src/types/tool/builtin.ts +36 -0
- package/src/types/tool/dalle.ts +12 -0
- package/src/types/tool/index.ts +16 -0
- package/src/types/tool/plugin.ts +35 -0
- package/src/types/tool/tool.ts +10 -0
- package/src/types/topic.ts +9 -0
- package/src/types/trace/action.ts +31 -0
- package/src/types/trace/index.ts +1 -0
- package/src/types/user/index.ts +44 -0
- package/src/types/user/settings/general.ts +12 -0
- package/src/types/user/settings/index.ts +32 -0
- package/src/types/user/settings/keyVaults.ts +37 -0
- package/src/types/user/settings/modelProvider.ts +34 -0
- package/src/types/user/settings/sync.ts +10 -0
- package/src/types/user/settings/systemAgent.ts +9 -0
- package/src/types/user/settings/tool.ts +5 -0
- package/src/types/user/settings/tts.ts +10 -0
- package/src/utils/__snapshots__/parseModels.test.ts.snap +63 -0
- package/src/utils/basePath.ts +3 -0
- package/src/utils/client/switchLang.test.ts +34 -0
- package/src/utils/client/switchLang.ts +10 -0
- package/src/utils/compass.ts +1 -5
- package/src/utils/compressImage.test.ts +59 -0
- package/src/utils/compressImage.ts +29 -0
- package/src/utils/config.ts +108 -0
- package/src/utils/cookie.ts +10 -0
- package/src/utils/difference.test.ts +46 -0
- package/src/utils/difference.ts +26 -0
- package/src/utils/env.ts +3 -0
- package/src/utils/fetch.test.ts +534 -0
- package/src/utils/fetch.ts +371 -105
- package/src/utils/filter.ts +1 -1
- package/src/utils/genOG.ts +20 -0
- package/src/utils/imageToBase64.ts +37 -0
- package/src/utils/jwt.test.ts +27 -0
- package/src/utils/jwt.ts +37 -0
- package/src/utils/keyboard.ts +13 -0
- package/src/utils/localStorage.ts +38 -0
- package/src/utils/locale.ts +16 -0
- package/src/utils/merge.ts +11 -0
- package/src/utils/parseMarkdown.ts +9 -0
- package/src/utils/parseModels.test.ts +290 -0
- package/src/utils/parseModels.ts +156 -0
- package/src/utils/platform.test.ts +83 -0
- package/src/utils/platform.ts +55 -0
- package/src/utils/responsive.ts +40 -0
- package/src/utils/speed.ts +32 -0
- package/src/utils/storeDebug.ts +11 -0
- package/src/utils/tokenizer.ts +5 -0
- package/src/utils/toolCall.ts +21 -0
- package/src/utils/trace.ts +21 -0
- package/src/utils/url.test.ts +51 -0
- package/src/utils/url.ts +23 -0
- package/src/utils/uuid.ts +4 -4
- package/src/utils/zustand.ts +8 -0
- package/tests/setup-db.ts +7 -0
- package/tests/setup.ts +35 -0
- package/tests/utils.tsx +11 -0
- package/tsconfig.json +24 -4
- package/vercel.json +3 -0
- package/vitest.config.ts +27 -3
- package/vitest.server.config.ts +23 -0
- package/.github/ISSUE_TEMPLATE/3_question.yml +0 -15
- package/.github/ISSUE_TEMPLATE/4_other.md +0 -7
- package/.github/dependabot.yml +0 -17
- package/.github/workflows/auto-merge.yml +0 -32
- package/.github/workflows/contributor-help.yml +0 -29
- package/.github/workflows/issue-check-inactive.yml +0 -22
- package/.github/workflows/issue-remove-inactive.yml +0 -25
- package/.gitpod.yml +0 -3
- package/.husky/commit-msg +0 -4
- package/locales/en_US/common.json +0 -40
- package/locales/en_US/setting.json +0 -97
- package/locales/zh_CN/common.json +0 -40
- package/locales/zh_CN/setting.json +0 -98
- package/public/next.svg +0 -1
- package/public/vercel.svg +0 -1
- package/scripts/genDefaultLocale.mjs +0 -12
- package/scripts/toc.mjs +0 -40
- package/src/const/modelTokens.ts +0 -8
- package/src/features/FolderPanel/index.tsx +0 -55
- package/src/helpers/prompt.test.ts +0 -36
- package/src/helpers/prompt.ts +0 -36
- package/src/layout/index.tsx +0 -42
- package/src/layout/style.ts +0 -18
- package/src/locales/index.ts +0 -5
- package/src/locales/resources/en_US.ts +0 -9
- package/src/locales/resources/index.ts +0 -7
- package/src/locales/resources/zh_CN.ts +0 -9
- package/src/pages/Sidebar.tsx +0 -36
- package/src/pages/_app.page.tsx +0 -13
- package/src/pages/_document.page.tsx +0 -70
- package/src/pages/api/LangChainStream.ts +0 -95
- package/src/pages/api/chain.api.ts +0 -17
- package/src/pages/api/openai.api.ts +0 -31
- package/src/pages/chat/SessionList/Header.tsx +0 -56
- package/src/pages/chat/SessionList/List/SessionItem.tsx +0 -90
- package/src/pages/chat/SessionList/List/index.tsx +0 -31
- package/src/pages/chat/SessionList/List/style.ts +0 -77
- package/src/pages/chat/SessionList/index.tsx +0 -18
- package/src/pages/chat/[id]/Config/ConfigCell.tsx +0 -68
- package/src/pages/chat/[id]/Config/ReadMode.tsx +0 -63
- package/src/pages/chat/[id]/Config/index.tsx +0 -79
- package/src/pages/chat/[id]/Conversation/ChatList.tsx +0 -36
- package/src/pages/chat/[id]/Conversation/Input.tsx +0 -61
- package/src/pages/chat/[id]/Conversation/index.tsx +0 -32
- package/src/pages/chat/[id]/Header.tsx +0 -86
- package/src/pages/chat/[id]/edit/AgentConfig.tsx +0 -95
- package/src/pages/chat/[id]/edit/AgentMeta.tsx +0 -117
- package/src/pages/chat/[id]/edit/FormItem.tsx +0 -26
- package/src/pages/chat/[id]/edit/Prompt.tsx +0 -68
- package/src/pages/chat/[id]/edit/index.page.tsx +0 -62
- package/src/pages/chat/[id]/edit/style.ts +0 -42
- package/src/pages/chat/[id]/index.page.tsx +0 -40
- package/src/pages/chat/index.page.tsx +0 -1
- package/src/pages/chat/layout.tsx +0 -51
- package/src/pages/index.page.tsx +0 -1
- package/src/pages/setting/Header.tsx +0 -27
- package/src/pages/setting/SettingForm.tsx +0 -42
- package/src/pages/setting/index.page.tsx +0 -41
- package/src/prompts/agent.ts +0 -65
- package/src/services/chatModel.ts +0 -34
- package/src/services/langChain.ts +0 -18
- package/src/services/url.ts +0 -8
- package/src/store/middleware/createHashStorage.ts +0 -49
- package/src/store/session/slices/agentConfig/action.ts +0 -226
- package/src/store/session/slices/agentConfig/initialState.ts +0 -34
- package/src/store/session/slices/agentConfig/selectors.ts +0 -54
- package/src/store/session/slices/chat/action.ts +0 -210
- package/src/store/session/slices/chat/initialState.ts +0 -12
- package/src/store/session/slices/chat/messageReducer.test.ts +0 -70
- package/src/store/session/slices/chat/messageReducer.ts +0 -84
- package/src/store/session/slices/chat/selectors.ts +0 -83
- package/src/store/session/slices/session/reducers/session.test.ts +0 -456
- package/src/store/session/slices/session/reducers/session.ts +0 -113
- package/src/store/session/slices/session/selectors/chat.ts +0 -4
- package/src/store/settings/action.ts +0 -31
- package/src/store/settings/index.ts +0 -23
- package/src/store/settings/initialState.ts +0 -25
- package/src/store/settings/selectors.ts +0 -9
- package/src/store/settings/store.ts +0 -13
- package/src/types/chatMessage.ts +0 -46
- package/src/types/langchain.ts +0 -34
- package/src/types/openai.ts +0 -62
- package/src/types/session.ts +0 -59
- /package/src/store/{session/slices/agentConfig → file/slices/images}/index.ts +0 -0
@@ -0,0 +1,75 @@
|
|
1
|
+
---
|
2
|
+
title: ChatGPT 模型指南:参数概念与应用
|
3
|
+
description: >-
|
4
|
+
了解 ChatGPT 模型的不同版本及参数概念,包括 temperature、top_p、presence_penalty 和
|
5
|
+
frequency_penalty。
|
6
|
+
tags:
|
7
|
+
- ChatGPT
|
8
|
+
- 模型指南
|
9
|
+
- 参数概念
|
10
|
+
- LLM
|
11
|
+
- 生成模型
|
12
|
+
---
|
13
|
+
|
14
|
+
# 模型指南
|
15
|
+
|
16
|
+
## ChatGPT
|
17
|
+
|
18
|
+
- **gpt-3.5-turbo**:目前最生成速度最快的 chatgpt 模型更快,但可能会牺牲一些生成文本的质量,上下文长度为 4k。
|
19
|
+
- **gpt-3.5-turbo-16k**:同 gpt-4,上下文限制增加到 16k token,同时费率更高。
|
20
|
+
- **gpt-4**:ChatGPT 4.0 在语言理解和生成能力方面相对于 3.5 有所提升。它可以更好地理解上下文和语境,并生成更准确、自然的回答。这得益于 GPT-4 模型的改进,包括更好的语言建模和更深入的语义理解,但它的速度可能比其他模型慢,上下文长度为 8k。
|
21
|
+
- **gpt-4-32k**:同 gpt-4,上下文限制增加到 32k token,同时费率更高。
|
22
|
+
|
23
|
+
## 模型参数概念
|
24
|
+
|
25
|
+
LLM 看似很神奇,但本质还是一个概率问题,神经网络根据输入的文本,从预训练的模型里面生成一堆候选词,选择概率高的作为输出,相关的参数,大多都是跟采样有关(也就是要如何从候选词里选择输出)。
|
26
|
+
|
27
|
+
### `temperature`
|
28
|
+
|
29
|
+
用于控制模型输出的结果的随机性,这个值越大随机性越大。一般我们多次输入相同的 prompt 之后,模型的每次输出都不一样。
|
30
|
+
|
31
|
+
- 设置为 0,对每个 prompt 都生成固定的输出
|
32
|
+
- 较低的值,输出更集中,更有确定性
|
33
|
+
- 较高的值,输出更随机(更有创意 )
|
34
|
+
|
35
|
+
<Callout>
|
36
|
+
一般来说,prompt 越长,描述得越清楚,模型生成的输出质量就越好,置信度越高,这时可以适当调高
|
37
|
+
temperature 的值;反过来,如果 prompt 很短,很含糊,这时再设置一个比较高的 temperature
|
38
|
+
值,模型的输出就很不稳定了。
|
39
|
+
</Callout>
|
40
|
+
|
41
|
+
<br />
|
42
|
+
|
43
|
+
### `top_p`
|
44
|
+
|
45
|
+
核采样 top_p 也是采样参数,跟 temperature 不一样的采样方式。模型在输出之前,会生成一堆 token,这些 token 根据质量高低排名,核采样模式中候选词列表是动态的,从 tokens 里按百分比选择候选词。 top_p 为选择 token 引入了随机性,让其他高分的 token 有被选择的机会,不会总是选最高分的。
|
46
|
+
|
47
|
+
<Callout>top\_p 与随机性类似,一般来说不建议和随机性 temperature 一起更改</Callout>
|
48
|
+
|
49
|
+
<br />
|
50
|
+
|
51
|
+
### `presence_penalty`
|
52
|
+
|
53
|
+
Presence Penalty 参数可以看作是对生成文本中重复内容的一种惩罚。当该参数设置较高时,生成模型会尽量避免产生重复的词语、短语或句子。相反,如果 Presence Penalty 参数较低,则生成的文本可能会包含更多重复的内容。通过调整 Presence Penalty 参数的值,可以实现对生成文本的原创性和多样性的控制。参数的重要性主要体现在以下几个方面:
|
54
|
+
|
55
|
+
- 提高生成文本的独创性和多样性:在某些应用场景下,如创意写作、生成新闻标题等,需要生成的文本具有较高的独创性和多样性。通过增加 Presence Penalty 参数的值,可以有效减少生成文本中的重复内容,从而提高文本的独创性和多样性。
|
56
|
+
- 防止生成循环和无意义的内容:在某些情况下,生成模型可能会产生循环、重复的文本,这些文本通常无法传达有效的信息。通过适当增加 Presence Penalty 参数的值,可以降低生成这类无意义内容的概率,提高生成文本的可读性和实用性。
|
57
|
+
|
58
|
+
<Callout>
|
59
|
+
值得注意的是,Presence Penalty 参数与其他参数(如 Temperature 和
|
60
|
+
top-p)共同影响着生成文本的质量。对比其他参数,Presence Penalty
|
61
|
+
参数主要关注文本的独创性和重复性,而 Temperature 和 top-p
|
62
|
+
参数则更多地影响着生成文本的随机性和确定性。通过合理地调整这些参数,可以实现对生成文本质量的综合控制
|
63
|
+
</Callout>
|
64
|
+
|
65
|
+
<br />
|
66
|
+
|
67
|
+
### `frequency_penalty`
|
68
|
+
|
69
|
+
是一种机制,通过对文本中频繁出现的新词汇施加惩罚,以减少模型重复同一词语的可能性,值越大,越有可能降低重复字词。
|
70
|
+
|
71
|
+
- `-2.0` 当早间新闻开始播出,我发现我家电视现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在 _(频率最高的词是 “现在”,占比 44.79%)_
|
72
|
+
- `-1.0` 他总是在清晨看新闻,在电视前看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看 _(频率最高的词是 “看”,占比 57.69%)_
|
73
|
+
- `0.0` 当清晨的阳光洒进小餐馆时,一名疲倦的邮递员出现在门口,他的手中提着一袋信件。店主热情地为他准备了一份早餐,他在享用早餐的同时开始整理邮件。**(频率最高的词是 “的”,占比 8.45%)**
|
74
|
+
- `1.0` 一个深度睡眠的女孩被一阵温暖的阳光唤醒,她看到了早晨的第一缕阳光,周围是鸟语花香,一切都充满了生机。_(频率最高的词是 “的”,占比 5.45%)_
|
75
|
+
- `2.0` 每天早上,他都会在阳台上坐着吃早餐。在柔和的夕阳照耀下,一切看起来都非常宁静。然而有一天,当他准备端起早餐的时候,一只乐观的小鸟飞过,给他带来了一天的好心情。 _(频率最高的词是 “的”,占比 4.94%)_
|
@@ -0,0 +1,110 @@
|
|
1
|
+
---
|
2
|
+
title: >-
|
3
|
+
Guide to Using Prompts in LobeChat - How to Write Effective Instructions for
|
4
|
+
Generative AI
|
5
|
+
description: >-
|
6
|
+
Learn the basic concepts of prompts and how to write well-structured and
|
7
|
+
effective instructions for generative AI. Improve the quality and
|
8
|
+
effectiveness of prompts to guide AI models accurately.
|
9
|
+
tags:
|
10
|
+
- Generative AI
|
11
|
+
- Prompts
|
12
|
+
- Writing Instructions
|
13
|
+
- Structured Prompts
|
14
|
+
- Improving AI Output
|
15
|
+
---
|
16
|
+
|
17
|
+
# Guide to Using Prompts
|
18
|
+
|
19
|
+
## Basic Concepts of Prompts
|
20
|
+
|
21
|
+
Generative AI is very useful, but it requires human guidance. In most cases, generative AI can be as capable as a new intern at a company, but it needs clear instructions to perform well. The ability to guide generative AI correctly is a very powerful skill. You can guide generative AI by sending a prompt, which is usually a text instruction. A prompt is the input provided to the assistant, and it will affect the output. A good prompt should be structured, clear, concise, and directive.
|
22
|
+
|
23
|
+
## How to Write a Well-Structured Prompt
|
24
|
+
|
25
|
+
<Callout type={'important'}>
|
26
|
+
A structured prompt refers to the construction of the prompt having a clear logic and structure.
|
27
|
+
For example, if you want the model to generate an article, your prompt may need to include the
|
28
|
+
article's topic, outline, and style.
|
29
|
+
</Callout>
|
30
|
+
|
31
|
+
Let's look at a basic discussion prompt example:
|
32
|
+
|
33
|
+
> _"What are the most urgent environmental issues facing our planet, and what actions can individuals take to help address these issues?"_
|
34
|
+
|
35
|
+
We can convert it into a simple prompt for the assistant to answer the following questions: placed at the front.
|
36
|
+
|
37
|
+
```prompt
|
38
|
+
Answer the following questions:
|
39
|
+
What are the most urgent environmental issues facing our planet, and what actions can individuals take to help address these issues?
|
40
|
+
```
|
41
|
+
|
42
|
+
Since the results generated by this prompt are not consistent, some are only one or two sentences. A typical discussion response should have multiple paragraphs, so these results are not ideal. A good prompt should provide **specific formatting and content instructions**. You need to eliminate ambiguity in the language to improve consistency and quality. Here is a better prompt.
|
43
|
+
|
44
|
+
```prompt
|
45
|
+
Write a highly detailed paper, including an introduction, body, and conclusion, to answer the following questions:
|
46
|
+
What are the most urgent environmental issues facing our planet,
|
47
|
+
and what actions can individuals take to help address these issues?
|
48
|
+
```
|
49
|
+
|
50
|
+
The second prompt generates longer output and better structure. The use of the term "paper" in the prompt is intentional, as the assistant can understand the definition of a paper, making it more likely to generate coherent, structured responses.
|
51
|
+
|
52
|
+
## How to Improve Quality and Effectiveness
|
53
|
+
|
54
|
+
<Callout type={'tip'}>
|
55
|
+
There are several ways to improve the quality and effectiveness of prompts:
|
56
|
+
|
57
|
+
- **Be Clear About Your Needs:** The model's output will strive to meet your needs, so if your needs are not clear, the output may not meet expectations.
|
58
|
+
- **Use Correct Grammar and Spelling:** The model will try to mimic your language style, so if your language style is problematic, the output may also be problematic.
|
59
|
+
- **Provide Sufficient Contextual Information:** The model will generate output based on the contextual information you provide, so if the information is insufficient, it may not produce the desired results.
|
60
|
+
|
61
|
+
</Callout>
|
62
|
+
|
63
|
+
After formulating effective prompts for discussing issues, you now need to refine the generated results. This may involve adjusting the output to fit constraints such as word count or combining concepts from different generated results.
|
64
|
+
|
65
|
+
A simple method of iteration is to generate multiple outputs and review them to understand the concepts and structures being used. Once the outputs have been evaluated, you can select the most suitable ones and combine them into a coherent response. Another iterative method is to start small and **gradually expand**. This requires more than one prompt: an initial prompt for drafting the initial one or two paragraphs, followed by additional prompts to expand on the content already written. Here is a potential philosophical discussion prompt:
|
66
|
+
|
67
|
+
> _"Is mathematics an invention or a discovery? Use careful reasoning to explain your answer."_
|
68
|
+
|
69
|
+
Add it to a simple prompt as follows:
|
70
|
+
|
71
|
+
```prompt
|
72
|
+
Write an opening paragraph to answer the following question:
|
73
|
+
Is mathematics an invention or a discovery? Use careful reasoning to explain your answer.
|
74
|
+
```
|
75
|
+
|
76
|
+
After generating some responses, we found one that we like:
|
77
|
+
|
78
|
+
```prompt
|
79
|
+
Philosophers and mathematicians have long debated whether mathematics is an invention or a discovery.
|
80
|
+
Some argue that the concepts and principles of mathematics exist independently of human thought, and therefore can be considered discovered rather than invented.
|
81
|
+
For example, the concepts of numbers, ratios, and geometric shapes are observed in the natural world and can be abstracted and systematically studied.
|
82
|
+
```
|
83
|
+
|
84
|
+
It's a good start. Then, use another prompt to expand:
|
85
|
+
|
86
|
+
```prompt
|
87
|
+
I am writing a detailed essay to answer the following prompt:
|
88
|
+
Is mathematics an invention or a discovery? Use careful reasoning to explain your answer. Here is my current situation: Philosophers and mathematicians have long debated whether mathematics is an invention or a discovery.
|
89
|
+
Some argue that the concepts and principles of mathematics exist independently of human thought, and therefore can be considered discovered rather than invented.
|
90
|
+
For example, the concepts of numbers, ratios, and geometric shapes are observed in the natural world and can be abstracted and systematically studied. Write the next paragraph of my essay.
|
91
|
+
```
|
92
|
+
|
93
|
+
I used this prompt to generate several extensions and selected one that I liked, resulting in the following:
|
94
|
+
|
95
|
+
```prompt
|
96
|
+
Philosophers and mathematicians have long debated whether mathematics is invented or discovered.
|
97
|
+
Some argue that the concepts and principles of mathematics exist independently of human thought, and therefore can be considered to be discovered rather than invented.
|
98
|
+
For example, the concepts of numbers, ratios, and geometric shapes are observed in the natural world and can be abstracted and systematically studied.
|
99
|
+
On the other hand, some believe that mathematics is largely an invention of human thought.
|
100
|
+
Mathematical principles are based on logical reasoning, which is a characteristic of human thought.
|
101
|
+
For instance, Euclidean geometry is based on abstract axioms and premises, accepted as true without the need for proof.
|
102
|
+
Therefore, geometry can be considered an invention of human thought rather than a discovery.
|
103
|
+
Similarly, mathematical formulas and equations are used to model and predict physical phenomena, which are the result of human reasoning.
|
104
|
+
```
|
105
|
+
|
106
|
+
Using the prompt extensions, we can iteratively write and iterate at each step. This is very useful for situations that require **generating higher quality output and incremental modifications**.
|
107
|
+
|
108
|
+
## Further Reading
|
109
|
+
|
110
|
+
- **Learn Prompting**: [https://learnprompting.org/en-US/docs/intro](https://learnprompting.org/en-US/docs/intro)
|
@@ -0,0 +1,106 @@
|
|
1
|
+
---
|
2
|
+
title: 如何通过 LobeChat 写好结构化 Prompt - 提高生成式 AI 输出质量的关键
|
3
|
+
description: 学习如何撰写结构化 Prompt 可以提高生成式 AI 输出的质量和效果。本文介绍了撰写有效 Prompt 的方法和技巧,以及如何逐步扩展和优化生成的结果。
|
4
|
+
tags:
|
5
|
+
- 结构化 Prompt
|
6
|
+
- 生成式AI
|
7
|
+
- 提高输出质量
|
8
|
+
- 撰写技巧
|
9
|
+
- 逐步扩展
|
10
|
+
---
|
11
|
+
|
12
|
+
# Prompt 使用指南
|
13
|
+
|
14
|
+
## Prompt 基本概念
|
15
|
+
|
16
|
+
生成式 AI 非常有用,但它需要人类指导。通常情况下,生成式 AI 能就像公司新来的实习生一样,非常有能力,但需要清晰的指示才能做得好。能够正确地指导生成式 AI 是一项非常强大的技能。你可以通过发送一个 prompt 来指导生成式 AI,这通常是一个文本指令。Prompt 是向助手提供的输入,它会影响输出结果。一个好的 Prompt 应该是结构化的,清晰的,简洁的,并且具有指向性。
|
17
|
+
|
18
|
+
## 如何写好一个结构化 prompt
|
19
|
+
|
20
|
+
<Callout type={'important'}>
|
21
|
+
结构化 prompt 是指 prompt 的构造应该有明确的逻辑和结构。例如,如果你想让模型生成一篇文章,你的
|
22
|
+
prompt 可能需要包括文章的主题,文章的大纲,文章的风格等信息。
|
23
|
+
</Callout>
|
24
|
+
|
25
|
+
让我们看一个基本的讨论问题的例子:
|
26
|
+
|
27
|
+
> _"我们星球面临的最紧迫的环境问题是什么,个人可以采取哪些措施来帮助解决这些问题?"_
|
28
|
+
|
29
|
+
我们可以将其转化为简单的助手提示,将回答以下问题:放在前面。
|
30
|
+
|
31
|
+
```prompt
|
32
|
+
回答以下问题:
|
33
|
+
我们星球面临的最紧迫的环境问题是什么,个人可以采取哪些措施来帮助解决这些问题?
|
34
|
+
```
|
35
|
+
|
36
|
+
由于这个提示生成的结果并不一致,有些只有一两个句子。一个典型的讨论回答应该有多个段落,因此这些结果并不理想。一个好的提示应该给出**具体的格式和内容指令**。您需要消除语言中的歧义以提高一致性和质量。这是一个更好的提示。
|
37
|
+
|
38
|
+
```prompt
|
39
|
+
写一篇高度详细的论文,包括引言、正文和结论段,回答以下问题:
|
40
|
+
我们星球面临的最紧迫的环境问题是什么,
|
41
|
+
个人可以采取哪些措施来帮助解决这些问题?
|
42
|
+
```
|
43
|
+
|
44
|
+
第二个提示生成了更长的输出和更好的结构。提示中使用 “论文” 一词是有意的,因为助手可以理解论文的定义,因此更有可能生成连贯的、结构化的回答。
|
45
|
+
|
46
|
+
<br />
|
47
|
+
|
48
|
+
## 如何提升其质量和效果
|
49
|
+
|
50
|
+
<Callout type={'tip'}>
|
51
|
+
提升 prompt 质量和效果的方法主要有以下几点:
|
52
|
+
|
53
|
+
- **尽量明确你的需求:** 模型的输出会尽可能满足你的需求,所以如果你的需求不明确,输出可能会不如预期。
|
54
|
+
- **使用正确的语法和拼写:** 模型会尽可能模仿你的语言风格,所以如果你的语言风格有问题,输出可能也会有问题。
|
55
|
+
- **提供足够的上下文信息:** 模型会根据你提供的上下文信息生成输出,所以如果你提供的上下文信息不足,可能无法生成你想要的结果。
|
56
|
+
|
57
|
+
</Callout>
|
58
|
+
|
59
|
+
在为讨论问题制定有效的提示后,您现在需要细化生成的结果。这可能涉及到调整输出以符合诸如字数等限制,或将不同生成的结果的概念组合在一起。
|
60
|
+
|
61
|
+
迭代的一个简单方法是生成多个输出并查看它们,以了解正在使用的概念和结构。一旦评估了输出,您就可以选择最合适的输出并将它们组合成一个连贯的回答。另一种迭代的方法是逐步开始,然后**逐步扩展**。这需要不止一个提示:一个起始提示,用于撰写最初的一两段,然后是其他提示,以扩展已经写过的内容。以下是一个潜在的哲学讨论问题:
|
62
|
+
|
63
|
+
> _"数学是发明还是发现?用仔细的推理来解释你的答案。"_
|
64
|
+
|
65
|
+
将其添加到一个简单的提示中,如下所示:
|
66
|
+
|
67
|
+
```prompt
|
68
|
+
写一个起始段回答以下问题:
|
69
|
+
数学是发明还是发现?用仔细的推理来解释你的答案。
|
70
|
+
```
|
71
|
+
|
72
|
+
生成了一些回答,找到了一个我们喜欢的:
|
73
|
+
|
74
|
+
```prompt
|
75
|
+
哲学家和数学家之间争论不休,数学是发明还是发现。
|
76
|
+
一些人认为,数学的概念和原则独立于人类思维存在,因此可以被认为是被发现而不是被发明的。
|
77
|
+
例如,数字、比率和几何形状的概念在自然界中被观察到,可以被抽象化和系统化地研究。
|
78
|
+
```
|
79
|
+
|
80
|
+
是一个不错的开端。然后使用另一个提示来扩展:
|
81
|
+
|
82
|
+
```prompt
|
83
|
+
我正在撰写一篇详细的短文,回答以下提示:
|
84
|
+
数学是发明还是发现?用仔细的推理来解释你的答案。这是我目前的情况: 哲学家和数学家之间争论不休,数学是发明还是发现。
|
85
|
+
一些人认为,数学的概念和原则独立于人类思维存在,因此可以被认为是被发现而不是被发明的。
|
86
|
+
例如,数字、比率和几何形状的概念在自然界中被观察到,可以被抽象化和系统化地研究。写下我文章的下一段。
|
87
|
+
```
|
88
|
+
|
89
|
+
使用此提示生成了几个扩展,并选择了一个我喜欢的,最终得到了以下结果:
|
90
|
+
|
91
|
+
```prompt
|
92
|
+
哲学家和数学家之间争论不休,数学是发明还是发现。
|
93
|
+
一些人认为,数学的概念和原则独立于人类思维存在,因此可以被认为是被发现而不是被发明的。
|
94
|
+
例如,数字、比率和几何形状的概念在自然界中被观察到,可以被抽象化和系统化地研究。
|
95
|
+
另一方面,有人认为数学在很大程度上是人类思维的发明。
|
96
|
+
数学原理基于逻辑推理,这是人类思维的一个特征。
|
97
|
+
例如,欧几里德几何基于抽象的公理和前提,被接受为真实而无需证明。
|
98
|
+
因此,可以认为几何是人类思维的发明,而不是一种发现。
|
99
|
+
同样,数学公式和方程用于模拟和预测物理现象,这又是人类推理的结果。
|
100
|
+
```
|
101
|
+
|
102
|
+
使用扩展提示,我们可以逐步地写作并在每个步骤上进行迭代。这对于需要**生成更高质量的输出并希望逐步修改**的情况非常有用。
|
103
|
+
|
104
|
+
## 扩展阅读
|
105
|
+
|
106
|
+
- **Learn Prompting**: [https://learnprompting.org/zh-Hans/docs/intro](https://learnprompting.org/zh-Hans/docs/intro)
|
@@ -0,0 +1,27 @@
|
|
1
|
+
---
|
2
|
+
title: LobeChat Topic Usage Guide
|
3
|
+
description: >-
|
4
|
+
Learn how to save and manage topics during conversations in LobeChat,
|
5
|
+
including saving topics, accessing the topic list, and pinning favorite
|
6
|
+
topics.
|
7
|
+
tags:
|
8
|
+
- Topic Usage
|
9
|
+
- Conversation Management
|
10
|
+
- Save Topic
|
11
|
+
- Topic List
|
12
|
+
- Favorite Topics
|
13
|
+
---
|
14
|
+
|
15
|
+
# Topic Usage Guide
|
16
|
+
|
17
|
+
<Image
|
18
|
+
alt={'Topic Usage Guide'}
|
19
|
+
borderless
|
20
|
+
cover
|
21
|
+
src={
|
22
|
+
'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279602496-fd72037a-735e-4cc2-aa56-2994bceaba81.png'
|
23
|
+
}
|
24
|
+
/>
|
25
|
+
|
26
|
+
- **Save Topic:** During a conversation, if you want to save the current context and start a new topic, you can click the save button next to the send button.
|
27
|
+
- **Topic List:** Clicking on a topic in the list allows for quick switching of historical conversation records and continuing the conversation. You can also use the star icon <kbd>⭐️</kbd> to pin favorite topics to the top, or use the more button on the right to rename or delete topics.
|
@@ -0,0 +1,25 @@
|
|
1
|
+
---
|
2
|
+
title: LobeChat 话题使用指南 - 保存话题、快速切换历史记录
|
3
|
+
description: 学习如何在 LobeChat 中保存话题、快速切换历史记录,并对话题进行收藏、重命名和删除操作。
|
4
|
+
tags:
|
5
|
+
- 话题使用指南
|
6
|
+
- 保存话题
|
7
|
+
- 快速切换历史记录
|
8
|
+
- 话题收藏
|
9
|
+
- 话题重命名
|
10
|
+
- 话题删除
|
11
|
+
---
|
12
|
+
|
13
|
+
# 话题使用指南
|
14
|
+
|
15
|
+
<Image
|
16
|
+
alt={'话题使用指南'}
|
17
|
+
borderless
|
18
|
+
cover
|
19
|
+
src={
|
20
|
+
'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279602496-fd72037a-735e-4cc2-aa56-2994bceaba81.png'
|
21
|
+
}
|
22
|
+
/>
|
23
|
+
|
24
|
+
- **保存话题:** 在聊天过程中,如果想要保存当前上下文并开启新的话题,可以点击发送按钮旁边的保存按钮。
|
25
|
+
- **话题列表:** 点击列表中的话题可以快速切换历史对话记录,并继续对话。你还可以通过点击星标图标 <kbd>⭐️</kbd> 将话题收藏置顶,或者通过右侧更多按钮对话题进行重命名和删除操作。
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
title: Find best Assistants in LobeChat Assistant Market
|
3
|
+
description: >-
|
4
|
+
Explore a vibrant community of carefully designed assistants in LobeChat's
|
5
|
+
Assistant Market. Contribute your wisdom and share your personally developed
|
6
|
+
assistants in this collaborative space.
|
7
|
+
tags:
|
8
|
+
- LobeChat
|
9
|
+
- Assistant Market
|
10
|
+
- Community
|
11
|
+
- Collaboration
|
12
|
+
- Assistants
|
13
|
+
---
|
14
|
+
|
15
|
+
# Assistant Market
|
16
|
+
|
17
|
+
<Image
|
18
|
+
alt={'Assistant Market'}
|
19
|
+
borderless
|
20
|
+
cover
|
21
|
+
src={
|
22
|
+
'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/268670869-f1ffbf66-42b6-42cf-a937-9ce1f8328514.png'
|
23
|
+
}
|
24
|
+
/>
|
25
|
+
|
26
|
+
In LobeChat's Assistant Market, creators can discover a vibrant and innovative community that brings together numerous carefully designed assistants. These assistants not only play a crucial role in work scenarios but also provide great convenience in the learning process. Our market is not just a showcase platform, but also a collaborative space. Here, everyone can contribute their wisdom and share their personally developed assistants.
|
27
|
+
|
28
|
+
<Callout type={'tip'}>
|
29
|
+
By [🤖/🏪 submitting agents](https://github.com/lobehub/lobe-chat-agents), you can easily submit
|
30
|
+
your assistant works to our platform. We particularly emphasize that LobeChat has established a
|
31
|
+
sophisticated automated internationalization (i18n) workflow, which excels in seamlessly
|
32
|
+
converting your assistants into multiple language versions. This means that regardless of the
|
33
|
+
language your users are using, they can seamlessly experience your assistant.
|
34
|
+
</Callout>
|
35
|
+
|
36
|
+
<Callout type={'important'}>
|
37
|
+
We welcome all users to join this ever-growing ecosystem and participate in the iteration and
|
38
|
+
optimization of assistants. Together, let's create more interesting, practical, and innovative
|
39
|
+
assistants, further enriching the diversity and practicality of assistants.
|
40
|
+
</Callout>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
---
|
2
|
+
title: 在 LobeChat 助手市场找到创新 AI 助手
|
3
|
+
description: >-
|
4
|
+
LobeChat助手市场是一个充满活力和创新的社区,汇聚了众多精心设计的助手,为工作场景和学习提供便利。欢迎提交你的助手作品,共同创造更多有趣、实用且具有创新性的助手。
|
5
|
+
tags:
|
6
|
+
- LobeChat
|
7
|
+
- 助手市场
|
8
|
+
- 创新社区
|
9
|
+
- 协作空间
|
10
|
+
- 助手作品
|
11
|
+
- 自动化国际化
|
12
|
+
- 多语言版本
|
13
|
+
---
|
14
|
+
|
15
|
+
# 助手市场
|
16
|
+
|
17
|
+
<Image
|
18
|
+
alt={'助手市场'}
|
19
|
+
cover
|
20
|
+
src={
|
21
|
+
'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/268670869-f1ffbf66-42b6-42cf-a937-9ce1f8328514.png'
|
22
|
+
}
|
23
|
+
/>
|
24
|
+
|
25
|
+
在 LobeChat 的助手市场中,创作者们可以发现一个充满活力和创新的社区,它汇聚了众多精心设计的助手,这些助手不仅在工作场景中发挥着重要作用,也在学习过程中提供了极大的便利。我们的市场不仅是一个展示平台,更是一个协作的空间。在这里,每个人都可以贡献自己的智慧,分享个人开发的助手。
|
26
|
+
|
27
|
+
<Callout type={'tip'}>
|
28
|
+
通过 [🤖/🏪 提交助手](https://github.com/lobehub/lobe-chat-agents)
|
29
|
+
,你可以轻松地将你的助手作品提交到我们的平台。我们特别强调的是,LobeChat
|
30
|
+
建立了一套精密的自动化国际化(i18n)工作流程,
|
31
|
+
它的强大之处在于能够无缝地将你的助手转化为多种语言版本。这意味着,不论你的用户使用何种语言,他们都能无障碍地体验到你的助手。
|
32
|
+
</Callout>
|
33
|
+
|
34
|
+
<Callout type={'important'}>
|
35
|
+
我们欢迎所有用户加入这个不断成长的生态系统,共同参与到助手的迭代与优化中来。共同创造出更多有趣、实用且具有创新性的助手,进一步丰富助手的多样性和实用性。
|
36
|
+
</Callout>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
---
|
2
|
+
title: Using Local LLM in LobeChat
|
3
|
+
description: >-
|
4
|
+
Experience groundbreaking AI support with a local LLM in LobeChat powered by
|
5
|
+
Ollama AI. Start conversations effortlessly and enjoy unprecedented
|
6
|
+
interaction speed!
|
7
|
+
tags:
|
8
|
+
- Local Large Language Model
|
9
|
+
- Ollama AI
|
10
|
+
- LobeChat
|
11
|
+
- AI communication
|
12
|
+
- Natural Language Processing
|
13
|
+
- Docker deployment
|
14
|
+
---
|
15
|
+
|
16
|
+
# Local Large Language Model (LLM) Support
|
17
|
+
|
18
|
+
<Image
|
19
|
+
alt={'Ollama Local Large Language Model (LLM) Support'}
|
20
|
+
borderless
|
21
|
+
cover
|
22
|
+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/ca9a21bc-ea6c-4c90-bf4a-fa53b4fb2b5c'}
|
23
|
+
/>
|
24
|
+
|
25
|
+
<Callout>Available in >=0.127.0, currently only supports Docker deployment</Callout>
|
26
|
+
|
27
|
+
With the release of LobeChat v0.127.0, we are excited to introduce a groundbreaking feature - Ollama AI support! 🤯 With the powerful infrastructure of [Ollama AI](https://ollama.ai/) and the [community's collaborative efforts](https://github.com/lobehub/lobe-chat/pull/1265), you can now engage in conversations with a local LLM (Large Language Model) in LobeChat! 🤩
|
28
|
+
|
29
|
+
We are thrilled to introduce this revolutionary feature to all LobeChat users at this special moment. The integration of Ollama AI not only signifies a significant technological leap for us but also reaffirms our commitment to continuously pursue more efficient and intelligent communication.
|
30
|
+
|
31
|
+
### How to Start a Conversation with Local LLM?
|
32
|
+
|
33
|
+
The startup process is exceptionally simple! By running the following Docker command, you can experience conversations with a local LLM in LobeChat:
|
34
|
+
|
35
|
+
```bash
|
36
|
+
docker run -d -p 3210:3210 -e OLLAMA_PROXY_URL=http://host.docker.internal:11434/v1 lobehub/lobe-chat
|
37
|
+
```
|
38
|
+
|
39
|
+
Yes, it's that simple! 🤩 You don't need to go through complicated configurations or worry about a complex installation process. We have prepared everything for you. With just one command, you can engage in deep conversations with a local AI.
|
40
|
+
|
41
|
+
### Experience Unprecedented Interaction Speed
|
42
|
+
|
43
|
+
With the powerful capabilities of Ollama AI, LobeChat has greatly improved its efficiency in natural language processing. Both processing speed and response time have reached new heights. This means that your conversational experience will be smoother, without any waiting, and with instant responses.
|
44
|
+
|
45
|
+
### Why Choose a Local LLM?
|
46
|
+
|
47
|
+
Compared to cloud-based solutions, a local LLM provides higher privacy and security. All your conversations are processed locally, without passing through any external servers, ensuring the security of your data. Additionally, local processing can reduce network latency, providing you with a more immediate communication experience.
|
48
|
+
|
49
|
+
### Embark on Your LobeChat & Ollama AI Journey
|
50
|
+
|
51
|
+
Now, let's embark on this exciting journey together! Through the collaboration of LobeChat and Ollama AI, explore the endless possibilities brought by AI. Whether you are a tech enthusiast or simply curious about AI communication, LobeChat will offer you an unprecedented experience.
|
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
title: 在 LobeChat 中使用本地大语言模型(LLM)
|
3
|
+
description: LobeChat 支持本地 LLM,使用 Ollama AI集成带来高效智能沟通。体验本地大语言模型的隐私性、安全性和即时交流
|
4
|
+
tags:
|
5
|
+
- '本地大语言模型,LLM,LobeChat v0.127.0,Ollama AI,Docker 部署'
|
6
|
+
---
|
7
|
+
|
8
|
+
# 支持本地大语言模型(LLM)
|
9
|
+
|
10
|
+
<Image
|
11
|
+
alt={'Ollama 支持本地大语言模型'}
|
12
|
+
borderless
|
13
|
+
cover
|
14
|
+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/ca9a21bc-ea6c-4c90-bf4a-fa53b4fb2b5c'}
|
15
|
+
/>
|
16
|
+
|
17
|
+
<Callout>在 >=v0.127.0 版本中可用,目前仅支持 Docker 部署</Callout>
|
18
|
+
|
19
|
+
随着 LobeChat v0.127.0 的发布,我们迎来了一个激动人心的特性 —— Ollama AI 支持!🤯 在 [Ollama AI](https://ollama.ai/) 强大的基础设施和 [社区的共同努力](https://github.com/lobehub/lobe-chat/pull/1265) 下,现在您可以在 LobeChat 中与本地 LLM (Large Language Model) 进行交流了!🤩
|
20
|
+
|
21
|
+
我们非常高兴能在这个特别的时刻,向所有 LobeChat 用户介绍这项革命性的特性。Ollama AI 的集成不仅标志着我们技术上的一个巨大飞跃,更是向用户承诺,我们将不断追求更高效、更智能的沟通方式。
|
22
|
+
|
23
|
+
### 如何启动与本地 LLM 的对话?
|
24
|
+
|
25
|
+
启动过程异常简单!您只需运行以下 Docker 命令行,就可以在 LobeChat 中体验与本地 LLM 的对话了:
|
26
|
+
|
27
|
+
```bash
|
28
|
+
docker run -d -p 3210:3210 -e OLLAMA_PROXY_URL=http://host.docker.internal:11434/v1 lobehub/lobe-chat
|
29
|
+
```
|
30
|
+
|
31
|
+
是的,就是这么简单!🤩 您不需要进行繁杂的配置,也不必担心复杂的安装过程。我们已经为您准备好了一切,只需一行命令,即可开启与本地 AI 的深度对话。
|
32
|
+
|
33
|
+
### 体验前所未有的交互速度
|
34
|
+
|
35
|
+
借助 Ollama AI 的强大能力,LobeChat 在进行自然语言处理方面的效率得到了极大的提升。无论是处理速度还是响应时间,都达到了新的高度。这意味着您的对话体验将更加流畅,无需等待,即时得到回应。
|
36
|
+
|
37
|
+
### 为什么选择本地 LLM?
|
38
|
+
|
39
|
+
与基于云的解决方案相比,本地 LLM 提供了更高的隐私性和安全性。您的所有对话都在本地处理,不经过任何外部服务器,确保了您的数据安全性。此外,本地处理还能减少网络延迟,为您带来更加即时的交流体验。
|
40
|
+
|
41
|
+
### 开启您的 LobeChat & Ollama AI 之旅
|
42
|
+
|
43
|
+
现在,就让我们一起开启这段激动人心的旅程吧!通过 LobeChat 与 Ollama AI 的协作,探索 AI 带来的无限可能。无论您是技术爱好者,还是对 AI 交流充满好奇,LobeChat 都将为您提供一场前所未有的体验。
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
title: LobeChat with Mobile Device Adaptation
|
3
|
+
description: >-
|
4
|
+
Explore the enhanced mobile user experience at LobeChat with optimized designs
|
5
|
+
for smoother interactions. Share your feedback on GitHub!
|
6
|
+
tags:
|
7
|
+
- Mobile Device Adaptation
|
8
|
+
- User Experience
|
9
|
+
- Optimized Designs
|
10
|
+
- Feedback
|
11
|
+
- GitHub
|
12
|
+
---
|
13
|
+
|
14
|
+
# Mobile Device Adaptation
|
15
|
+
|
16
|
+
<Image
|
17
|
+
alt={'Mobile Device Adaptation'}
|
18
|
+
cover
|
19
|
+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/11110732-8d5a-4049-b556-c2561cb66182'}
|
20
|
+
/>
|
21
|
+
|
22
|
+
LobeChat has undergone a series of optimized designs for mobile devices to enhance the user's mobile experience.
|
23
|
+
|
24
|
+
Currently, we are iterating on the user experience for mobile devices to achieve a smoother and more intuitive interaction. If you have any suggestions or ideas, we warmly welcome your feedback through GitHub Issues or Pull Requests.
|
@@ -0,0 +1,23 @@
|
|
1
|
+
---
|
2
|
+
title: LobeChat 移动设备适配 - 提升用户移动体验
|
3
|
+
description: LobeChat针对移动设备进行优化设计,版本迭代以实现更流畅直观的交互。欢迎通过GitHub Issues或Pull Requests提供反馈。
|
4
|
+
tags:
|
5
|
+
- LobeChat
|
6
|
+
- 移动设备适配
|
7
|
+
- 用户体验
|
8
|
+
- 版本迭代
|
9
|
+
- GitHub
|
10
|
+
- 反馈
|
11
|
+
---
|
12
|
+
|
13
|
+
# 移动设备适配
|
14
|
+
|
15
|
+
<Image
|
16
|
+
alt={'移动端设备适配'}
|
17
|
+
cover
|
18
|
+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/11110732-8d5a-4049-b556-c2561cb66182'}
|
19
|
+
/>
|
20
|
+
|
21
|
+
LobeChat 针对移动设备进行了一系列的优化设计,以提升用户的移动体验。
|
22
|
+
|
23
|
+
目前,我们正在对移动端的用户体验进行版本迭代,以实现更加流畅和直观的交互。如果您有任何建议或想法,我们非常欢迎您通过 GitHub Issues 或者 Pull Requests 提供反馈。
|
@@ -0,0 +1,33 @@
|
|
1
|
+
---
|
2
|
+
title: More Features in LobeChat - Enhancing Design and Technical Capabilities
|
3
|
+
description: >-
|
4
|
+
Explore the additional features offered, including exquisite UI design, smooth
|
5
|
+
conversation experience, fast deployment options, privacy and security
|
6
|
+
measures, and custom domain support.
|
7
|
+
tags:
|
8
|
+
- UI Design
|
9
|
+
- Conversation Experience
|
10
|
+
- Deployment
|
11
|
+
- Privacy
|
12
|
+
- Custom Domain
|
13
|
+
---
|
14
|
+
|
15
|
+
# More Features
|
16
|
+
|
17
|
+
In addition to the above features, our design and technical capabilities will provide you with more assurance in usage:
|
18
|
+
|
19
|
+
- [x] 💎 **Exquisite UI Design**: Carefully designed interface with elegant appearance and smooth interaction effects, supporting light and dark themes, and adaptable to mobile devices. Supports PWA, providing an experience closer to native applications.
|
20
|
+
- [x] 🗣️ **Smooth Conversation Experience**: Responsive design brings a smooth conversation experience and supports full Markdown rendering, including code highlighting, LaTex formulas, Mermaid flowcharts, and more.
|
21
|
+
- [x] 💨 **Fast Deployment**: Use the Vercel platform or our Docker image, simply click the deploy button, and deployment can be completed within 1 minute without complex configuration processes.
|
22
|
+
- [x] 🔒 **Privacy and Security**: All data is stored locally in the user's browser, ensuring user privacy and security.
|
23
|
+
- [x] 🌐 **Custom Domain**: If users have their own domain, they can bind it to the platform for quick access to the chat assistant from anywhere.
|
24
|
+
|
25
|
+
> ✨ As the product continues to iterate, we will bring more exciting features!
|
26
|
+
|
27
|
+
---
|
28
|
+
|
29
|
+
<Callout>
|
30
|
+
You can find our upcoming [Roadmap][github-project-link] plans in the Projects section.
|
31
|
+
</Callout>
|
32
|
+
|
33
|
+
[github-project-link]: https://github.com/lobehub/lobe-chat/projects
|
@@ -0,0 +1,28 @@
|
|
1
|
+
---
|
2
|
+
title: 更多 LobeChat 特性 - 提供精致 UI 设计和流畅的对话体验
|
3
|
+
description: 了解更多产品特性,包括精致 UI 设计、流畅的对话体验和快速部署功能,为用户带来更好的体验。
|
4
|
+
tags:
|
5
|
+
- 精致 UI 设计
|
6
|
+
- 流畅对话体验
|
7
|
+
- 快速部署
|
8
|
+
- 隐私安全
|
9
|
+
- 自定义域名
|
10
|
+
---
|
11
|
+
|
12
|
+
# 更多特性
|
13
|
+
|
14
|
+
除了上述功能特性以外,我们的所具有的设计和技术能力将为你带来了更多使用保障:
|
15
|
+
|
16
|
+
- [x] 💎 **精致 UI 设计**:经过精心设计的界面,具有优雅的外观和流畅的交互效果,支持亮暗色主题,适配移动端。支持 PWA,提供更加接近原生应用的体验。
|
17
|
+
- [x] 🗣️ **流畅的对话体验**:流式响应带来流畅的对话体验,并且支持完整的 Markdown 渲染,包括代码高亮、LaTex 公式、Mermaid 流程图等。
|
18
|
+
- [x] 💨 **快速部署**:使用 Vercel 平台或者我们的 Docker 镜像,只需点击一键部署按钮,即可在 1 分钟内完成部署,无需复杂的配置过程。
|
19
|
+
- [x] 🔒 **隐私安全**:所有数据保存在用户浏览器本地,保证用户的隐私安全。
|
20
|
+
- [x] 🌐 **自定义域名**:如果用户拥有自己的域名,可以将其绑定到平台上,方便在任何地方快速访问对话助手。
|
21
|
+
|
22
|
+
> ✨ 随着产品迭代持续更新,我们将会带来更多更多令人激动的功能!
|
23
|
+
|
24
|
+
---
|
25
|
+
|
26
|
+
<Callout>你可以在 Projects 中找到我们后续的 [Roadmap][github-project-link] 计划</Callout>
|
27
|
+
|
28
|
+
[github-project-link]: https://github.com/lobehub/lobe-chat/projects
|