Compare commits

..

12 Commits

Author SHA1 Message Date
Junyan Qin
2e061a8713 feat: update version to 4.9.0 in pyproject.toml, __init__.py, and uv.lock 2026-03-09 20:09:00 +08:00
Junyan Qin
2cd8c56fe8 feat: update migration messages for knowledge base in multiple languages 2026-03-09 19:57:13 +08:00
youhuanghe
e09ae8f1a8 feat: add external plugin auto download 2026-03-09 09:55:12 +00:00
youhuanghe
aa7b0deb2b fix: show 2026-03-09 09:26:29 +00:00
youhuanghe
1c9a800f9d wq
Merge branch 'master' into feat/dbm20-rag
2026-03-09 08:26:05 +00:00
youhuanghe
96f24d73d5 feat: add external migration 2026-03-09 08:18:23 +00:00
youhuanghe
14ea8ca7b6 fix ruff lint 2026-03-09 01:26:39 +00:00
youhuanghe
f0093dab69 fix lint 2026-03-09 01:23:56 +00:00
youhuanghe
c29e6586b3 refactor: to red and no more 2026-03-09 01:08:56 +00:00
youhuanghe
1b37dababa feat(rag): add data-only migration option and fix dialog width
Add option to migrate knowledge base data without auto-installing
the LangRAG plugin (for offline/intranet environments). Also
narrow the migration dialog to match other confirmation dialogs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 15:05:05 +00:00
youhuanghe
8da52b6dc7 fix(rag): query marketplace for actual plugin version instead of 'latest'
The marketplace API does not support 'latest' as a version string.
Fetch the plugin info first to get latest_version, then use that
concrete version for installation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 14:41:43 +00:00
youhuanghe
67c5c3af20 feat(rag): add knowledge base migration from v4.9.0 to plugin architecture
Rewrite dbm020 to backup old knowledge_bases data and preserve
external_knowledge_bases table. Add migration API endpoints and
frontend dialog so users can opt-in to auto-install LangRAG plugin
and restore their knowledge bases with original UUIDs preserved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 14:17:34 +00:00
11 changed files with 28 additions and 85 deletions

View File

@@ -422,12 +422,12 @@ export default function HomeSidebar({
const language = localStorage.getItem('langbot_language');
if (language === 'zh-Hans' || language === 'zh-Hant') {
window.open(
'https://docs.langbot.app/zh/insight/guide',
'https://docs.langbot.app/zh/insight/guide.html',
'_blank',
);
} else {
window.open(
'https://docs.langbot.app/en/insight/guide',
'https://docs.langbot.app/en/insight/guide.html',
'_blank',
);
}

View File

@@ -23,9 +23,9 @@ export const sidebarConfigList = [
route: '/home/bots',
description: t('bots.description'),
helpLink: {
en_US: 'https://docs.langbot.app/en/usage/platforms/readme',
zh_Hans: 'https://docs.langbot.app/zh/usage/platforms/readme',
ja_JP: 'https://docs.langbot.app/ja/usage/platforms/readme',
en_US: 'https://docs.langbot.app/en/usage/platforms/readme.html',
zh_Hans: 'https://docs.langbot.app/zh/usage/platforms/readme.html',
ja_JP: 'https://docs.langbot.app/ja/usage/platforms/readme.html',
},
}),
new SidebarChildVO({
@@ -44,9 +44,9 @@ export const sidebarConfigList = [
route: '/home/pipelines',
description: t('pipelines.description'),
helpLink: {
en_US: 'https://docs.langbot.app/en/usage/pipelines/readme',
zh_Hans: 'https://docs.langbot.app/zh/usage/pipelines/readme',
ja_JP: 'https://docs.langbot.app/ja/usage/pipelines/readme',
en_US: 'https://docs.langbot.app/en/usage/pipelines/readme.html',
zh_Hans: 'https://docs.langbot.app/zh/usage/pipelines/readme.html',
ja_JP: 'https://docs.langbot.app/ja/usage/pipelines/readme.html',
},
}),
new SidebarChildVO({
@@ -65,8 +65,8 @@ export const sidebarConfigList = [
route: '/home/monitoring',
description: t('monitoring.description'),
helpLink: {
en_US: '',
zh_Hans: '',
en_US: 'https://docs.langbot.app/en/features/monitoring.html',
zh_Hans: 'https://docs.langbot.app/zh/features/monitoring.html',
},
}),
new SidebarChildVO({
@@ -84,9 +84,9 @@ export const sidebarConfigList = [
route: '/home/knowledge',
description: t('knowledge.description'),
helpLink: {
en_US: 'https://docs.langbot.app/en/usage/knowledge/readme',
zh_Hans: 'https://docs.langbot.app/zh/usage/knowledge/readme',
ja_JP: 'https://docs.langbot.app/ja/usage/knowledge/readme',
en_US: 'https://docs.langbot.app/en/usage/knowledge/readme.html',
zh_Hans: 'https://docs.langbot.app/zh/usage/knowledge/readme.html',
ja_JP: 'https://docs.langbot.app/ja/usage/knowledge/readme.html',
},
}),
new SidebarChildVO({
@@ -105,9 +105,9 @@ export const sidebarConfigList = [
route: '/home/plugins',
description: t('plugins.description'),
helpLink: {
en_US: 'https://docs.langbot.app/en/usage/plugin/plugin-intro',
zh_Hans: 'https://docs.langbot.app/zh/usage/plugin/plugin-intro',
ja_JP: 'https://docs.langbot.app/ja/usage/plugin/plugin-intro',
en_US: 'https://docs.langbot.app/en/usage/plugin/plugin-intro.html',
zh_Hans: 'https://docs.langbot.app/zh/usage/plugin/plugin-intro.html',
ja_JP: 'https://docs.langbot.app/ja/usage/plugin/plugin-intro.html',
},
}),
];

View File

@@ -36,11 +36,11 @@ export default function NewVersionDialog({
const getUpdateDocsUrl = () => {
const language = i18n.language;
if (language === 'zh-Hans' || language === 'zh-Hant') {
return 'https://docs.langbot.app/zh/deploy/update';
return 'https://docs.langbot.app/zh/deploy/update.html';
} else if (language === 'ja-JP') {
return 'https://docs.langbot.app/ja/deploy/update';
return 'https://docs.langbot.app/ja/deploy/update.html';
} else {
return 'https://docs.langbot.app/en/deploy/update';
return 'https://docs.langbot.app/en/deploy/update.html';
}
};

View File

@@ -1,5 +1,4 @@
import { useEffect, useState } from 'react';
import Link from 'next/link';
import { useForm } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import { z } from 'zod';
@@ -265,12 +264,9 @@ export default function KBForm({
<p className="text-muted-foreground">
{t('knowledge.noEnginesAvailable')}
</p>
<Link
href="/home/plugins"
className="text-sm text-primary hover:underline"
>
<p className="text-sm text-muted-foreground">
{t('knowledge.installEngineHint')}
</Link>
</p>
</div>
);
}

View File

@@ -5,6 +5,7 @@
.knowledgeListContainer {
width: 100%;
margin-top: 2rem;
padding-left: 0.8rem;
padding-right: 0.8rem;
display: grid;

View File

@@ -562,7 +562,8 @@ function MarketPageContent({
{/* Recommendation Lists */}
{!searchQuery &&
componentFilter === 'all' &&
selectedTags.length === 0 && (
selectedTags.length === 0 &&
currentPage === 1 && (
<div className="pt-4">
<RecommendationLists
lists={recommendationLists}

View File

@@ -1,12 +1,6 @@
import { PluginMarketCardVO } from './PluginMarketCardVO';
import { useTranslation } from 'react-i18next';
import { Badge } from '@/components/ui/badge';
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from '@/components/ui/tooltip';
import {
Wrench,
AudioWaveform,
@@ -15,7 +9,6 @@ import {
ExternalLink,
Book,
FileText,
Info,
} from 'lucide-react';
import { useState } from 'react';
import { Button } from '@/components/ui/button';
@@ -53,13 +46,6 @@ export default function PluginMarketCardComponent({
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 (
<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"
@@ -80,34 +66,8 @@ export default function PluginMarketCardComponent({
<div className="text-[0.65rem] sm:text-[0.7rem] text-[#666] dark:text-[#999] truncate w-full">
{cardVO.pluginId}
</div>
<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}
</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 className="text-base sm:text-[1.2rem] text-black dark:text-[#f0f0f0] truncate w-full">
{cardVO.label}
</div>
</div>

View File

@@ -483,9 +483,6 @@ const enUS = {
allComponents: 'All Components',
requestPlugin: 'Request Plugin',
viewDetails: 'View Details',
deprecated: 'Deprecated',
deprecatedTooltip:
'Please install the corresponding Knowledge Engine plugin.',
tags: {
filterByTags: 'Filter by Tags',
selected: 'selected',
@@ -760,7 +757,7 @@ const enUS = {
engineSettingsReadonly: 'read-only in edit mode',
retrievalSettings: 'Retrieval Settings',
noEnginesAvailable: 'No knowledge base engines available',
installEngineHint: 'Please install a "Knowledge Engine" plugin first',
installEngineHint: 'Please install a knowledge base plugin first',
createKnowledgeBaseFailed: 'Failed to create knowledge base: ',
loadKnowledgeBaseFailed: 'Failed to load knowledge base: ',
deleteKnowledgeBaseFailed: 'Failed to delete knowledge base: ',

View File

@@ -491,9 +491,6 @@ const jaJP = {
noTags: 'タグがありません',
},
viewDetails: '詳細を表示',
deprecated: '非推奨',
deprecatedTooltip:
'対応する「ナレッジエンジン」プラグインをインストールしてください。',
},
mcp: {
title: 'MCP',
@@ -752,9 +749,6 @@ const jaJP = {
fileName: 'ファイル名',
noResults: '検索結果がありません',
retrieveError: '検索に失敗しました:',
noEnginesAvailable: '利用可能なナレッジエンジンがありません',
installEngineHint:
'先に「ナレッジエンジン」プラグインをインストールしてください',
unknownEngine: '不明なエンジン',
loadKnowledgeBaseFailed: 'ナレッジベースの読み込みに失敗しました:',
deleteKnowledgeBaseFailed: 'ナレッジベースの削除に失敗しました:',

View File

@@ -468,8 +468,6 @@ const zhHans = {
noTags: '暂无标签',
},
viewDetails: '查看详情',
deprecated: '已弃用',
deprecatedTooltip: '请安装对应「知识引擎」插件',
},
mcp: {
title: 'MCP',
@@ -728,7 +726,7 @@ const zhHans = {
engineSettingsReadonly: '编辑模式下不可修改',
retrievalSettings: '检索设置',
noEnginesAvailable: '没有可用的知识库引擎',
installEngineHint: '请先安装知识引擎」插件',
installEngineHint: '请先安装知识插件',
createKnowledgeBaseFailed: '知识库创建失败:',
loadKnowledgeBaseFailed: '知识库加载失败:',
deleteKnowledgeBaseFailed: '知识库删除失败:',

View File

@@ -461,8 +461,6 @@ const zhHant = {
noTags: '暫無標籤',
},
viewDetails: '查看詳情',
deprecated: '已棄用',
deprecatedTooltip: '請安裝對應「知識引擎」插件',
},
mcp: {
title: 'MCP',
@@ -711,8 +709,6 @@ const zhHant = {
fileName: '文檔名稱',
noResults: '暫無結果',
retrieveError: '檢索失敗:',
noEnginesAvailable: '沒有可用的知識庫引擎',
installEngineHint: '請先安裝「知識引擎」插件',
unknownEngine: '未知引擎',
loadKnowledgeBaseFailed: '知識庫載入失敗:',
deleteKnowledgeBaseFailed: '知識庫刪除失敗:',