mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 03:55:55 +00:00
fix: update documentation links and translations for knowledge engine
This commit is contained in:
@@ -422,12 +422,12 @@ export default function HomeSidebar({
|
|||||||
const language = localStorage.getItem('langbot_language');
|
const language = localStorage.getItem('langbot_language');
|
||||||
if (language === 'zh-Hans' || language === 'zh-Hant') {
|
if (language === 'zh-Hans' || language === 'zh-Hant') {
|
||||||
window.open(
|
window.open(
|
||||||
'https://docs.langbot.app/zh/insight/guide.html',
|
'https://docs.langbot.app/zh/insight/guide',
|
||||||
'_blank',
|
'_blank',
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
window.open(
|
window.open(
|
||||||
'https://docs.langbot.app/en/insight/guide.html',
|
'https://docs.langbot.app/en/insight/guide',
|
||||||
'_blank',
|
'_blank',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ export const sidebarConfigList = [
|
|||||||
route: '/home/bots',
|
route: '/home/bots',
|
||||||
description: t('bots.description'),
|
description: t('bots.description'),
|
||||||
helpLink: {
|
helpLink: {
|
||||||
en_US: 'https://docs.langbot.app/en/usage/platforms/readme.html',
|
en_US: 'https://docs.langbot.app/en/usage/platforms/readme',
|
||||||
zh_Hans: 'https://docs.langbot.app/zh/usage/platforms/readme.html',
|
zh_Hans: 'https://docs.langbot.app/zh/usage/platforms/readme',
|
||||||
ja_JP: 'https://docs.langbot.app/ja/usage/platforms/readme.html',
|
ja_JP: 'https://docs.langbot.app/ja/usage/platforms/readme',
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
new SidebarChildVO({
|
new SidebarChildVO({
|
||||||
@@ -44,9 +44,9 @@ export const sidebarConfigList = [
|
|||||||
route: '/home/pipelines',
|
route: '/home/pipelines',
|
||||||
description: t('pipelines.description'),
|
description: t('pipelines.description'),
|
||||||
helpLink: {
|
helpLink: {
|
||||||
en_US: 'https://docs.langbot.app/en/usage/pipelines/readme.html',
|
en_US: 'https://docs.langbot.app/en/usage/pipelines/readme',
|
||||||
zh_Hans: 'https://docs.langbot.app/zh/usage/pipelines/readme.html',
|
zh_Hans: 'https://docs.langbot.app/zh/usage/pipelines/readme',
|
||||||
ja_JP: 'https://docs.langbot.app/ja/usage/pipelines/readme.html',
|
ja_JP: 'https://docs.langbot.app/ja/usage/pipelines/readme',
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
new SidebarChildVO({
|
new SidebarChildVO({
|
||||||
@@ -65,8 +65,8 @@ export const sidebarConfigList = [
|
|||||||
route: '/home/monitoring',
|
route: '/home/monitoring',
|
||||||
description: t('monitoring.description'),
|
description: t('monitoring.description'),
|
||||||
helpLink: {
|
helpLink: {
|
||||||
en_US: 'https://docs.langbot.app/en/features/monitoring.html',
|
en_US: '',
|
||||||
zh_Hans: 'https://docs.langbot.app/zh/features/monitoring.html',
|
zh_Hans: '',
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
new SidebarChildVO({
|
new SidebarChildVO({
|
||||||
@@ -84,9 +84,9 @@ export const sidebarConfigList = [
|
|||||||
route: '/home/knowledge',
|
route: '/home/knowledge',
|
||||||
description: t('knowledge.description'),
|
description: t('knowledge.description'),
|
||||||
helpLink: {
|
helpLink: {
|
||||||
en_US: 'https://docs.langbot.app/en/usage/knowledge/readme.html',
|
en_US: 'https://docs.langbot.app/en/usage/knowledge/readme',
|
||||||
zh_Hans: 'https://docs.langbot.app/zh/usage/knowledge/readme.html',
|
zh_Hans: 'https://docs.langbot.app/zh/usage/knowledge/readme',
|
||||||
ja_JP: 'https://docs.langbot.app/ja/usage/knowledge/readme.html',
|
ja_JP: 'https://docs.langbot.app/ja/usage/knowledge/readme',
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
new SidebarChildVO({
|
new SidebarChildVO({
|
||||||
@@ -105,9 +105,9 @@ export const sidebarConfigList = [
|
|||||||
route: '/home/plugins',
|
route: '/home/plugins',
|
||||||
description: t('plugins.description'),
|
description: t('plugins.description'),
|
||||||
helpLink: {
|
helpLink: {
|
||||||
en_US: 'https://docs.langbot.app/en/usage/plugin/plugin-intro.html',
|
en_US: 'https://docs.langbot.app/en/usage/plugin/plugin-intro',
|
||||||
zh_Hans: 'https://docs.langbot.app/zh/usage/plugin/plugin-intro.html',
|
zh_Hans: 'https://docs.langbot.app/zh/usage/plugin/plugin-intro',
|
||||||
ja_JP: 'https://docs.langbot.app/ja/usage/plugin/plugin-intro.html',
|
ja_JP: 'https://docs.langbot.app/ja/usage/plugin/plugin-intro',
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -36,11 +36,11 @@ export default function NewVersionDialog({
|
|||||||
const getUpdateDocsUrl = () => {
|
const getUpdateDocsUrl = () => {
|
||||||
const language = i18n.language;
|
const language = i18n.language;
|
||||||
if (language === 'zh-Hans' || language === 'zh-Hant') {
|
if (language === 'zh-Hans' || language === 'zh-Hant') {
|
||||||
return 'https://docs.langbot.app/zh/deploy/update.html';
|
return 'https://docs.langbot.app/zh/deploy/update';
|
||||||
} else if (language === 'ja-JP') {
|
} else if (language === 'ja-JP') {
|
||||||
return 'https://docs.langbot.app/ja/deploy/update.html';
|
return 'https://docs.langbot.app/ja/deploy/update';
|
||||||
} else {
|
} else {
|
||||||
return 'https://docs.langbot.app/en/deploy/update.html';
|
return 'https://docs.langbot.app/en/deploy/update';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
import Link from 'next/link';
|
||||||
import { useForm } from 'react-hook-form';
|
import { useForm } from 'react-hook-form';
|
||||||
import { zodResolver } from '@hookform/resolvers/zod';
|
import { zodResolver } from '@hookform/resolvers/zod';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
@@ -264,9 +265,12 @@ export default function KBForm({
|
|||||||
<p className="text-muted-foreground">
|
<p className="text-muted-foreground">
|
||||||
{t('knowledge.noEnginesAvailable')}
|
{t('knowledge.noEnginesAvailable')}
|
||||||
</p>
|
</p>
|
||||||
<p className="text-sm text-muted-foreground">
|
<Link
|
||||||
|
href="/home/plugins"
|
||||||
|
className="text-sm text-primary hover:underline"
|
||||||
|
>
|
||||||
{t('knowledge.installEngineHint')}
|
{t('knowledge.installEngineHint')}
|
||||||
</p>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
.knowledgeListContainer {
|
.knowledgeListContainer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 2rem;
|
|
||||||
padding-left: 0.8rem;
|
padding-left: 0.8rem;
|
||||||
padding-right: 0.8rem;
|
padding-right: 0.8rem;
|
||||||
display: grid;
|
display: grid;
|
||||||
|
|||||||
@@ -562,8 +562,7 @@ function MarketPageContent({
|
|||||||
{/* Recommendation Lists */}
|
{/* Recommendation Lists */}
|
||||||
{!searchQuery &&
|
{!searchQuery &&
|
||||||
componentFilter === 'all' &&
|
componentFilter === 'all' &&
|
||||||
selectedTags.length === 0 &&
|
selectedTags.length === 0 && (
|
||||||
currentPage === 1 && (
|
|
||||||
<div className="pt-4">
|
<div className="pt-4">
|
||||||
<RecommendationLists
|
<RecommendationLists
|
||||||
lists={recommendationLists}
|
lists={recommendationLists}
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import { PluginMarketCardVO } from './PluginMarketCardVO';
|
import { PluginMarketCardVO } from './PluginMarketCardVO';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Badge } from '@/components/ui/badge';
|
import { Badge } from '@/components/ui/badge';
|
||||||
|
import {
|
||||||
|
Tooltip,
|
||||||
|
TooltipContent,
|
||||||
|
TooltipProvider,
|
||||||
|
TooltipTrigger,
|
||||||
|
} from '@/components/ui/tooltip';
|
||||||
import {
|
import {
|
||||||
Wrench,
|
Wrench,
|
||||||
AudioWaveform,
|
AudioWaveform,
|
||||||
@@ -9,6 +15,7 @@ import {
|
|||||||
ExternalLink,
|
ExternalLink,
|
||||||
Book,
|
Book,
|
||||||
FileText,
|
FileText,
|
||||||
|
Info,
|
||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
@@ -46,6 +53,13 @@ export default function PluginMarketCardComponent({
|
|||||||
Parser: <FileText className="w-4 h-4" />,
|
Parser: <FileText className="w-4 h-4" />,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Plugins that only contain KnowledgeRetriever components are deprecated
|
||||||
|
const isDeprecated = (() => {
|
||||||
|
if (!cardVO.components) return false;
|
||||||
|
const keys = Object.keys(cardVO.components);
|
||||||
|
return keys.length > 0 && keys.every((k) => k === 'KnowledgeRetriever');
|
||||||
|
})();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="w-[100%] h-auto min-h-[8rem] sm:min-h-[9rem] bg-white rounded-[10px] shadow-[0px_0px_4px_0_rgba(0,0,0,0.2)] p-3 sm:p-[1rem] hover:shadow-[0px_3px_6px_0_rgba(0,0,0,0.12)] transition-all duration-200 hover:scale-[1.005] dark:bg-[#1f1f22] relative"
|
className="w-[100%] h-auto min-h-[8rem] sm:min-h-[9rem] bg-white rounded-[10px] shadow-[0px_0px_4px_0_rgba(0,0,0,0.2)] p-3 sm:p-[1rem] hover:shadow-[0px_3px_6px_0_rgba(0,0,0,0.12)] transition-all duration-200 hover:scale-[1.005] dark:bg-[#1f1f22] relative"
|
||||||
@@ -66,9 +80,35 @@ export default function PluginMarketCardComponent({
|
|||||||
<div className="text-[0.65rem] sm:text-[0.7rem] text-[#666] dark:text-[#999] truncate w-full">
|
<div className="text-[0.65rem] sm:text-[0.7rem] text-[#666] dark:text-[#999] truncate w-full">
|
||||||
{cardVO.pluginId}
|
{cardVO.pluginId}
|
||||||
</div>
|
</div>
|
||||||
<div className="text-base sm:text-[1.2rem] text-black dark:text-[#f0f0f0] truncate w-full">
|
<div className="flex items-center gap-1.5 w-full min-w-0">
|
||||||
|
<div className="text-base sm:text-[1.2rem] text-black dark:text-[#f0f0f0] truncate">
|
||||||
{cardVO.label}
|
{cardVO.label}
|
||||||
</div>
|
</div>
|
||||||
|
{isDeprecated && (
|
||||||
|
<TooltipProvider delayDuration={200}>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger
|
||||||
|
asChild
|
||||||
|
onClick={(e) => e.preventDefault()}
|
||||||
|
>
|
||||||
|
<Badge
|
||||||
|
variant="outline"
|
||||||
|
className="text-[0.6rem] px-1.5 py-0 h-4 flex-shrink-0 border-red-400 text-red-500 dark:border-red-500 dark:text-red-400 gap-0.5 cursor-help"
|
||||||
|
>
|
||||||
|
{t('market.deprecated')}
|
||||||
|
<Info className="w-2.5 h-2.5" />
|
||||||
|
</Badge>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent
|
||||||
|
side="top"
|
||||||
|
className="max-w-[240px] text-xs"
|
||||||
|
>
|
||||||
|
{t('market.deprecatedTooltip')}
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="text-[0.7rem] sm:text-[0.8rem] text-[#666] dark:text-[#999] line-clamp-2 overflow-hidden">
|
<div className="text-[0.7rem] sm:text-[0.8rem] text-[#666] dark:text-[#999] line-clamp-2 overflow-hidden">
|
||||||
|
|||||||
@@ -483,6 +483,9 @@ const enUS = {
|
|||||||
allComponents: 'All Components',
|
allComponents: 'All Components',
|
||||||
requestPlugin: 'Request Plugin',
|
requestPlugin: 'Request Plugin',
|
||||||
viewDetails: 'View Details',
|
viewDetails: 'View Details',
|
||||||
|
deprecated: 'Deprecated',
|
||||||
|
deprecatedTooltip:
|
||||||
|
'Please install the corresponding Knowledge Engine plugin.',
|
||||||
tags: {
|
tags: {
|
||||||
filterByTags: 'Filter by Tags',
|
filterByTags: 'Filter by Tags',
|
||||||
selected: 'selected',
|
selected: 'selected',
|
||||||
@@ -757,7 +760,7 @@ const enUS = {
|
|||||||
engineSettingsReadonly: 'read-only in edit mode',
|
engineSettingsReadonly: 'read-only in edit mode',
|
||||||
retrievalSettings: 'Retrieval Settings',
|
retrievalSettings: 'Retrieval Settings',
|
||||||
noEnginesAvailable: 'No knowledge base engines available',
|
noEnginesAvailable: 'No knowledge base engines available',
|
||||||
installEngineHint: 'Please install a knowledge base plugin first',
|
installEngineHint: 'Please install a "Knowledge Engine" plugin first',
|
||||||
createKnowledgeBaseFailed: 'Failed to create knowledge base: ',
|
createKnowledgeBaseFailed: 'Failed to create knowledge base: ',
|
||||||
loadKnowledgeBaseFailed: 'Failed to load knowledge base: ',
|
loadKnowledgeBaseFailed: 'Failed to load knowledge base: ',
|
||||||
deleteKnowledgeBaseFailed: 'Failed to delete knowledge base: ',
|
deleteKnowledgeBaseFailed: 'Failed to delete knowledge base: ',
|
||||||
|
|||||||
@@ -491,6 +491,9 @@ const jaJP = {
|
|||||||
noTags: 'タグがありません',
|
noTags: 'タグがありません',
|
||||||
},
|
},
|
||||||
viewDetails: '詳細を表示',
|
viewDetails: '詳細を表示',
|
||||||
|
deprecated: '非推奨',
|
||||||
|
deprecatedTooltip:
|
||||||
|
'対応する「ナレッジエンジン」プラグインをインストールしてください。',
|
||||||
},
|
},
|
||||||
mcp: {
|
mcp: {
|
||||||
title: 'MCP',
|
title: 'MCP',
|
||||||
@@ -749,6 +752,9 @@ const jaJP = {
|
|||||||
fileName: 'ファイル名',
|
fileName: 'ファイル名',
|
||||||
noResults: '検索結果がありません',
|
noResults: '検索結果がありません',
|
||||||
retrieveError: '検索に失敗しました:',
|
retrieveError: '検索に失敗しました:',
|
||||||
|
noEnginesAvailable: '利用可能なナレッジエンジンがありません',
|
||||||
|
installEngineHint:
|
||||||
|
'先に「ナレッジエンジン」プラグインをインストールしてください',
|
||||||
unknownEngine: '不明なエンジン',
|
unknownEngine: '不明なエンジン',
|
||||||
loadKnowledgeBaseFailed: 'ナレッジベースの読み込みに失敗しました:',
|
loadKnowledgeBaseFailed: 'ナレッジベースの読み込みに失敗しました:',
|
||||||
deleteKnowledgeBaseFailed: 'ナレッジベースの削除に失敗しました:',
|
deleteKnowledgeBaseFailed: 'ナレッジベースの削除に失敗しました:',
|
||||||
|
|||||||
@@ -468,6 +468,8 @@ const zhHans = {
|
|||||||
noTags: '暂无标签',
|
noTags: '暂无标签',
|
||||||
},
|
},
|
||||||
viewDetails: '查看详情',
|
viewDetails: '查看详情',
|
||||||
|
deprecated: '已弃用',
|
||||||
|
deprecatedTooltip: '请安装对应「知识引擎」插件',
|
||||||
},
|
},
|
||||||
mcp: {
|
mcp: {
|
||||||
title: 'MCP',
|
title: 'MCP',
|
||||||
@@ -726,7 +728,7 @@ const zhHans = {
|
|||||||
engineSettingsReadonly: '编辑模式下不可修改',
|
engineSettingsReadonly: '编辑模式下不可修改',
|
||||||
retrievalSettings: '检索设置',
|
retrievalSettings: '检索设置',
|
||||||
noEnginesAvailable: '没有可用的知识库引擎',
|
noEnginesAvailable: '没有可用的知识库引擎',
|
||||||
installEngineHint: '请先安装知识库插件',
|
installEngineHint: '请先安装「知识引擎」插件',
|
||||||
createKnowledgeBaseFailed: '知识库创建失败:',
|
createKnowledgeBaseFailed: '知识库创建失败:',
|
||||||
loadKnowledgeBaseFailed: '知识库加载失败:',
|
loadKnowledgeBaseFailed: '知识库加载失败:',
|
||||||
deleteKnowledgeBaseFailed: '知识库删除失败:',
|
deleteKnowledgeBaseFailed: '知识库删除失败:',
|
||||||
|
|||||||
@@ -461,6 +461,8 @@ const zhHant = {
|
|||||||
noTags: '暫無標籤',
|
noTags: '暫無標籤',
|
||||||
},
|
},
|
||||||
viewDetails: '查看詳情',
|
viewDetails: '查看詳情',
|
||||||
|
deprecated: '已棄用',
|
||||||
|
deprecatedTooltip: '請安裝對應「知識引擎」插件',
|
||||||
},
|
},
|
||||||
mcp: {
|
mcp: {
|
||||||
title: 'MCP',
|
title: 'MCP',
|
||||||
@@ -709,6 +711,8 @@ const zhHant = {
|
|||||||
fileName: '文檔名稱',
|
fileName: '文檔名稱',
|
||||||
noResults: '暫無結果',
|
noResults: '暫無結果',
|
||||||
retrieveError: '檢索失敗:',
|
retrieveError: '檢索失敗:',
|
||||||
|
noEnginesAvailable: '沒有可用的知識庫引擎',
|
||||||
|
installEngineHint: '請先安裝「知識引擎」插件',
|
||||||
unknownEngine: '未知引擎',
|
unknownEngine: '未知引擎',
|
||||||
loadKnowledgeBaseFailed: '知識庫載入失敗:',
|
loadKnowledgeBaseFailed: '知識庫載入失敗:',
|
||||||
deleteKnowledgeBaseFailed: '知識庫刪除失敗:',
|
deleteKnowledgeBaseFailed: '知識庫刪除失敗:',
|
||||||
|
|||||||
Reference in New Issue
Block a user