feat(knowledge): expose bounded web sources in detail view

This commit is contained in:
XZH
2026-08-24 07:07:21 -07:00
committed by Bingxi Zhao (Frank)
parent 0d8b734a76
commit 32f82dcfb8
6 changed files with 9 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@@ -173,7 +173,7 @@ export default function KbWebSourcesSection({
type="url"
value={urlInput}
onChange={(e) => setUrlInput(e.target.value)}
placeholder={t("https://example.com/docs/")}
placeholder={t("https://docs.deeptutor.info/")}
className="w-full rounded-md border border-[var(--border)] bg-[var(--card)] px-2.5 py-1.5 text-[12.5px] text-[var(--foreground)] outline-none focus:border-[var(--primary)]"
/>
</label>

View File

@@ -7,6 +7,7 @@ import {
Database,
FileText,
Github,
Globe,
Layers,
Loader2,
RefreshCw,
@@ -33,6 +34,7 @@ import KbDocumentsSection from "./KbDocumentsSection";
import KbIndexVersionsSection from "./KbIndexVersionsSection";
import KbSettingsSection from "./KbSettingsSection";
import KbGitHubSourcesSection from "./KbGitHubSourcesSection";
import KbWebSourcesSection from "./KbWebSourcesSection";
import KbMarginNoteDevicesSection from "./KbMarginNoteDevicesSection";
interface KnowledgeBaseDetailProps {
@@ -61,6 +63,7 @@ const SECTION_CHROME: Record<
files: { label: "Files", Icon: FileText },
add: { label: "Add documents", Icon: Upload },
github: { label: "GitHub", Icon: Github },
web: { label: "Web", Icon: Globe },
versions: { label: "Index versions", Icon: Layers },
devices: { label: "Devices", Icon: Smartphone },
settings: { label: "Settings", Icon: SettingsIcon },
@@ -284,6 +287,9 @@ export default function KnowledgeBaseDetail({
{activeSection === "github" && (
<KbGitHubSourcesSection kbName={kb.name} />
)}
{activeSection === "web" && (
<KbWebSourcesSection kbName={kb.name} />
)}
{activeSection === "devices" && (
<KbMarginNoteDevicesSection key={kb.name} kb={kb} />
)}

View File

@@ -229,6 +229,7 @@ export const KB_DETAIL_SECTIONS = [
"files",
"add",
"github",
"web",
"versions",
"devices",
"settings",

View File

@@ -219,6 +219,7 @@ test("an ordinary knowledge base has no devices section", () => {
"files",
"add",
"github",
"web",
"versions",
"settings",
]);