mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 00:59:48 +08:00
feat(knowledge): expose bounded web sources in detail view
This commit is contained in:
BIN
assets/figs/webui/web-source-sync-files.jpg
Normal file
BIN
assets/figs/webui/web-source-sync-files.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
BIN
assets/figs/webui/web-source-sync.jpg
Normal file
BIN
assets/figs/webui/web-source-sync.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
@@ -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>
|
||||
|
||||
@@ -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} />
|
||||
)}
|
||||
|
||||
@@ -229,6 +229,7 @@ export const KB_DETAIL_SECTIONS = [
|
||||
"files",
|
||||
"add",
|
||||
"github",
|
||||
"web",
|
||||
"versions",
|
||||
"devices",
|
||||
"settings",
|
||||
|
||||
@@ -219,6 +219,7 @@ test("an ordinary knowledge base has no devices section", () => {
|
||||
"files",
|
||||
"add",
|
||||
"github",
|
||||
"web",
|
||||
"versions",
|
||||
"settings",
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user