Skip to content

DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.

Merge pull request #573: user profile page with avatar

Bingxi Zhao (Frank)2729b75ddecc
diff --cc web/app/(utility)/profile/page.tsx
index 000000000,7182ca076..c5f5456f2
mode 000000,100644..100644
--- a/web/app/(utility)/profile/page.tsx
+++ b/web/app/(utility)/profile/page.tsx
@@@ -1,0 -1,406 +1,406 @@@
+ "use client";
+
+ import { useCallback, useEffect, useRef, useState } from "react";
+ import Link from "next/link";
+ import { useRouter } from "next/navigation";
+ import { createElement } from "react";
+ import { ArrowLeft, ImageUp, LogOut, ShieldCheck, Trash2 } from "lucide-react";
+ import { useTranslation } from "react-i18next";
-import { AUTH_ENABLED, fetchAuthStatus, logout } from "@/lib/auth";
++import { fetchAuthStatus, logout } from "@/lib/auth";
+ import {
+ getProfile,
+ removeAvatarImage,
+ setAvatarMarker,
+ uploadAvatarImage,
+ type ProfileInfo,
+ } from "@/lib/profile-api";
+ import {
+ AVATAR_COLOR_NAMES,
+ AVATAR_COLORS,
+ AVATAR_ICON_NAMES,
+ AVATAR_ICONS,
+ fallbackAvatarFor,
+ UserAvatar,
+ } from "@/components/UserAvatar";
+ import { parseAvatarMarker } from "@/lib/avatar";
+ import { formatDate, type Language } from "@/lib/datetime";
+
+ const AVATAR_OUTPUT_SIZE = 256;
+ // Decoding a huge photo just to throw away most pixels wastes memory; the
+ // server enforces its own 1 MB cap on the (much smaller) cropped result.
+ const MAX_SOURCE_BYTES = 20 * 1024 * 1024;
+
+ /** Center-crop to a square and downscale; canvas re-encode also strips EXIF. */
+ async function cropToSquareBlob(file: File): Promise<Blob> {
+ let source: CanvasImageSource;
+ let width: number;
+ let height: number;
+ try {
- const bitmap = await createImageBitmap(file);
++ const bitmap = await createImageBitmap(file, {
++ imageOrientation: "from-image",
++ });
+ source = bitmap;
+ width = bitmap.width;
+ height = bitmap.height;
+ } catch {
+ // Older Safari: fall back to decoding via an <img> element.
+ const url = URL.createObjectURL(file);
+ try {
+ const image = await new Promise<HTMLImageElement>((resolve, reject) => {
+ const el = new Image();
+ el.onload = () => resolve(el);
+ el.onerror = () => reject(new Error("Could not decode image"));
+ el.src = url;
+ });
+ source = image;
+ width = image.naturalWidth;
+ height = image.naturalHeight;
+ } finally {
+ URL.revokeObjectURL(url);
+ }
+ }
+ if (!width || !height) throw new Error("Could not decode image");
+
+ const side = Math.min(width, height);
+ const canvas = document.createElement("canvas");
+ canvas.width = AVATAR_OUTPUT_SIZE;
+ canvas.height = AVATAR_OUTPUT_SIZE;
+ const ctx = canvas.getContext("2d");
+ if (!ctx) throw new Error("Could not decode image");
+ ctx.drawImage(
+ source,
+ (width - side) / 2,
+ (height - side) / 2,
+ side,
+ side,
+ 0,
+ 0,
+ AVATAR_OUTPUT_SIZE,
+ AVATAR_OUTPUT_SIZE,
+ );
+ // Release the decoder/GPU memory now instead of waiting for GC.
+ if (typeof ImageBitmap !== "undefined" && source instanceof ImageBitmap) {
+ source.close();
+ }
+
+ const toBlob = (type: string, quality?: number) =>
+ new Promise<Blob | null>((resolve) =>
+ canvas.toBlob(resolve, type, quality),
+ );
+ // WebP keeps avatars tiny; browsers without a WebP encoder return null.
+ const blob =
+ (await toBlob("image/webp", 0.85)) ?? (await toBlob("image/png"));
+ if (!blob) throw new Error("Could not encode image");
+ return blob;
+ }
+
+ export default function ProfilePage() {
+ const router = useRouter();
+ const { t, i18n } = useTranslation();
+ const [profile, setProfile] = useState<ProfileInfo | null>(null);
+ const [loading, setLoading] = useState(true);
+ const [busy, setBusy] = useState(false);
+ const [error, setError] = useState<string | null>(null);
+ const fileInputRef = useRef<HTMLInputElement>(null);
+
+ useEffect(() => {
- if (!AUTH_ENABLED) {
- router.replace("/");
- return;
- }
+ let cancelled = false;
+ (async () => {
+ const status = await fetchAuthStatus();
+ if (cancelled) return;
- if (!status?.authenticated) {
++ if (!status?.enabled) {
++ router.replace("/");
++ return;
++ }
++ if (!status.authenticated) {
+ router.replace("/login");
+ return;
+ }
+ try {
+ const info = await getProfile();
+ if (!cancelled) setProfile(info);
+ } catch {
+ if (!cancelled) setError(t("Failed to load profile"));
+ } finally {
+ if (!cancelled) setLoading(false);
+ }
+ })();
+ return () => {
+ cancelled = true;
+ };
+ }, [router, t]);
+
+ const applyMarker = useCallback(async (marker: string) => {
+ setBusy(true);
+ setError(null);
+ try {
+ const saved = await setAvatarMarker(marker);
+ setProfile((prev) => (prev ? { ...prev, avatar: saved } : prev));
+ } catch (err) {
+ setError(err instanceof Error ? err.message : String(err));
+ } finally {
+ setBusy(false);
+ }
+ }, []);
+
+ const handleUpload = useCallback(
+ async (file: File) => {
+ setBusy(true);
+ setError(null);
+ try {
+ if (file.size > MAX_SOURCE_BYTES) {
+ throw new Error(t("Image is too large"));
+ }
+ const blob = await cropToSquareBlob(file);
+ const marker = await uploadAvatarImage(blob);
+ setProfile((prev) => (prev ? { ...prev, avatar: marker } : prev));
+ } catch (err) {
+ setError(err instanceof Error ? err.message : String(err));
+ } finally {
+ setBusy(false);
+ if (fileInputRef.current) fileInputRef.current.value = "";
+ }
+ },
+ [t],
+ );
+
+ const handleRemoveImage = useCallback(async () => {
+ setBusy(true);
+ setError(null);
+ try {
+ await removeAvatarImage();
+ setProfile((prev) => (prev ? { ...prev, avatar: "" } : prev));
+ } catch (err) {
+ setError(err instanceof Error ? err.message : String(err));
+ } finally {
+ setBusy(false);
+ }
+ }, []);
+
+ const handleSignOut = useCallback(async () => {
+ await logout();
+ router.replace("/login");
+ }, [router]);
+
- if (!AUTH_ENABLED) return null;
-
+ const descriptor = parseAvatarMarker(profile?.avatar);
+ const hasImage = descriptor.kind === "image";
+ const fallback = fallbackAvatarFor(profile?.username ?? "");
+ const selectedIcon =
+ descriptor.kind === "icon"
+ ? descriptor.icon
+ : hasImage
+ ? null
+ : fallback.icon;
+ const selectedColor =
+ descriptor.kind === "icon"
+ ? descriptor.color
+ : hasImage
+ ? null
+ : fallback.color;
+ const isAdmin = profile?.role === "admin";
+ const lang: Language = i18n.language?.startsWith("zh") ? "zh" : "en";
+ const joinedDate = profile?.created_at ? new Date(profile.created_at) : null;
+ const joined =
+ joinedDate && !Number.isNaN(joinedDate.getTime())
+ ? formatDate(joinedDate, lang)
+ : null;
+
+ return (
+ <div className="h-screen overflow-y-auto bg-[var(--background)] px-4 py-10 [scrollbar-gutter:stable]">
+ <div className="mx-auto max-w-2xl">
+ {/* Header */}
+ <div className="mb-8 flex items-center gap-4">
+ <Link
+ href="/"
+ className="flex items-center gap-1.5 text-sm text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors"
+ >
+ <ArrowLeft size={15} />
+ {t("Back")}
+ </Link>
+ <div className="flex-1">
+ <h1 className="text-xl font-semibold text-[var(--foreground)]">
+ {t("My profile")}
+ </h1>
+ <p className="mt-0.5 text-sm text-[var(--muted-foreground)]">
+ {t("View your account and personalize your avatar")}
+ </p>
+ </div>
+ </div>
+
+ {error && (
+ <div className="mb-4 rounded-lg border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-600 dark:text-red-400">
+ {error}
+ </div>
+ )}
+
+ {loading ? (
+ <div className="flex items-center justify-center rounded-2xl border border-[var(--border)] bg-[var(--card)] py-16 text-sm text-[var(--muted-foreground)] shadow-sm">
+ {t("Loading…")}
+ </div>
+ ) : !profile ? null : (
+ <>
+ {/* Account card */}
+ <div className="rounded-2xl border border-[var(--border)] bg-[var(--card)] p-6 shadow-sm">
+ <div className="flex items-center gap-5">
+ <UserAvatar
+ username={profile.username}
+ userId={profile.id}
+ avatar={profile.avatar}
+ role={profile.role}
+ size={72}
+ />
+ <div className="min-w-0">
+ <div className="flex items-center gap-2.5">
+ <span className="truncate text-lg font-semibold text-[var(--foreground)]">
+ {profile.username}
+ </span>
+ <span
+ className={`inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-medium ${
+ isAdmin
+ ? "bg-amber-500/15 text-amber-600 dark:text-amber-400"
+ : "bg-[var(--muted)]/70 text-[var(--muted-foreground)]"
+ }`}
+ >
+ {isAdmin && <ShieldCheck size={11} strokeWidth={2} />}
+ {isAdmin ? t("Administrator") : t("User")}
+ </span>
+ </div>
+ {joined && (
+ <p className="mt-1 text-sm text-[var(--muted-foreground)]">
+ {t("Joined")}: {joined}
+ </p>
+ )}
+ </div>
+ </div>
+ </div>
+
+ {/* Avatar card */}
+ <div className="mt-4 rounded-2xl border border-[var(--border)] bg-[var(--card)] p-6 shadow-sm">
+ <h2 className="text-sm font-semibold text-[var(--foreground)]">
+ {t("Avatar")}
+ </h2>
+ <p className="mt-0.5 text-sm text-[var(--muted-foreground)]">
+ {t("Upload a picture or pick an icon")}
+ </p>
+
+ <div className="mt-4 flex flex-wrap items-center gap-2.5">
+ <input
+ ref={fileInputRef}
+ type="file"
+ accept="image/png,image/jpeg,image/webp"
+ className="hidden"
+ onChange={(event) => {
+ const file = event.target.files?.[0];
+ if (file) void handleUpload(file);
+ }}
+ />
+ <button
+ onClick={() => fileInputRef.current?.click()}
+ disabled={busy}
+ className="flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm
+ border border-[var(--border)] text-[var(--foreground)]
+ hover:bg-[var(--background)]/60 disabled:opacity-50 transition-colors"
+ >
+ <ImageUp size={14} />
+ {t("Upload image")}
+ </button>
+ {hasImage && (
+ <button
+ onClick={() => void handleRemoveImage()}
+ disabled={busy}
+ className="flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm
+ border border-[var(--border)] text-[var(--muted-foreground)]
+ hover:text-red-500 disabled:opacity-50 transition-colors"
+ >
+ <Trash2 size={14} />
+ {t("Remove photo")}
+ </button>
+ )}
+ </div>
+
+ {/* Icon grid */}
+ <div className="mt-5">
+ <p className="mb-2 text-xs font-medium uppercase tracking-wider text-[var(--muted-foreground)]">
+ {t("Or pick an icon")}
+ </p>
+ <div className="flex flex-wrap gap-2">
+ {AVATAR_ICON_NAMES.map((name) => {
+ const active = !hasImage && name === selectedIcon;
+ const color = selectedColor ?? fallback.color;
+ return (
+ <button
+ key={name}
+ onClick={() =>
+ void applyMarker(`icon:${name}:${color}`)
+ }
+ disabled={busy}
+ aria-label={name}
+ aria-pressed={active}
+ className={`flex h-10 w-10 items-center justify-center rounded-full text-white transition-all disabled:opacity-50 ${
+ active
+ ? "ring-2 ring-[var(--foreground)] ring-offset-2 ring-offset-[var(--card)]"
+ : "opacity-75 hover:opacity-100"
+ }`}
+ style={{ backgroundColor: AVATAR_COLORS[color] }}
+ >
+ {createElement(AVATAR_ICONS[name], {
+ size: 18,
+ strokeWidth: 1.8,
+ })}
+ </button>
+ );
+ })}
+ </div>
+ <p className="mb-2 mt-4 text-xs font-medium uppercase tracking-wider text-[var(--muted-foreground)]">
+ {t("Color")}
+ </p>
+ <div className="flex flex-wrap gap-2">
+ {AVATAR_COLOR_NAMES.map((name) => {
+ const active = !hasImage && name === selectedColor;
+ const icon = selectedIcon ?? fallback.icon;
+ return (
+ <button
+ key={name}
+ onClick={() => void applyMarker(`icon:${icon}:${name}`)}
+ disabled={busy}
+ aria-label={name}
+ aria-pressed={active}
+ className={`h-7 w-7 rounded-full transition-all disabled:opacity-50 ${
+ active
+ ? "ring-2 ring-[var(--foreground)] ring-offset-2 ring-offset-[var(--card)]"
+ : "opacity-75 hover:opacity-100"
+ }`}
+ style={{ backgroundColor: AVATAR_COLORS[name] }}
+ />
+ );
+ })}
+ </div>
+ </div>
+ </div>
+
+ {/* Sign out card */}
+ <div className="mt-4 flex items-center justify-between rounded-2xl border border-[var(--border)] bg-[var(--card)] p-6 shadow-sm">
+ <div>
+ <h2 className="text-sm font-semibold text-[var(--foreground)]">
+ {t("Sign out")}
+ </h2>
+ <p className="mt-0.5 text-sm text-[var(--muted-foreground)]">
+ {t("End your session on this device")}
+ </p>
+ </div>
+ <button
+ onClick={() => void handleSignOut()}
+ className="flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm
+ border border-red-500/40 text-red-600 dark:text-red-400
+ hover:bg-red-500/10 transition-colors"
+ >
+ <LogOut size={14} />
+ {t("Sign out")}
+ </button>
+ </div>
+ </>
+ )}
+ </div>
+ </div>
+ );
+ }
diff --cc web/components/auth/ProfileLink.tsx
index 000000000,c5d2e926d..421c6bb90
mode 000000,100644..100644
--- a/web/components/auth/ProfileLink.tsx
+++ b/web/components/auth/ProfileLink.tsx
@@@ -1,0 -1,71 +1,71 @@@
+ "use client";
+
+ import { useEffect, useState } from "react";
+ import Link from "next/link";
+ import { usePathname } from "next/navigation";
+ import { useTranslation } from "react-i18next";
-import { fetchAuthStatus, AUTH_ENABLED, type AuthStatus } from "@/lib/auth";
++import { fetchAuthStatus, type AuthStatus } from "@/lib/auth";
+ import { UserAvatar } from "@/components/UserAvatar";
+
+ interface ProfileLinkProps {
+ collapsed?: boolean;
+ }
+
+ export function ProfileLink({ collapsed = false }: ProfileLinkProps) {
+ const pathname = usePathname();
+ const { t } = useTranslation();
+ const [status, setStatus] = useState<AuthStatus | null>(null);
+
+ useEffect(() => {
- if (!AUTH_ENABLED) return;
+ fetchAuthStatus().then((next) => {
- if (next?.authenticated) setStatus(next);
++ // Only surface the link when auth is on AND the user is signed in.
++ if (next?.enabled && next?.authenticated) setStatus(next);
+ });
+ }, []);
+
- if (!AUTH_ENABLED || !status?.username) return null;
++ if (!status?.username) return null;
+
+ const active = pathname.startsWith("/profile");
+ const avatar = (
+ <UserAvatar
+ username={status.username}
+ userId={status.user_id}
+ avatar={status.avatar}
+ size={collapsed ? 18 : 16}
+ />
+ );
+
+ if (collapsed) {
+ return (
+ <Link
+ href="/profile"
+ className={`rounded-lg p-2 transition-colors
+ ${
+ active
+ ? "bg-[var(--primary)]/10 text-[var(--primary)]"
+ : "text-[var(--muted-foreground)] hover:bg-[var(--background)]/50 hover:text-[var(--foreground)]"
+ }`}
+ aria-label={t("My profile")}
+ title={`${t("My profile")} — ${status.username}`}
+ >
+ {avatar}
+ </Link>
+ );
+ }
+
+ return (
+ <Link
+ href="/profile"
+ className={`flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13.5px] transition-colors
+ ${
+ active
+ ? "bg-[var(--primary)]/10 text-[var(--primary)]"
+ : "text-[var(--muted-foreground)] hover:bg-[var(--background)]/50 hover:text-[var(--foreground)]"
+ }`}
+ title={t("My profile")}
+ >
+ {avatar}
+ <span className="truncate">{status.username}</span>
+ </Link>
+ );
+ }
diff --cc web/locales/en/app.json
index 59daaeb96,acf946182..395001bda
--- a/web/locales/en/app.json
+++ b/web/locales/en/app.json
@@@ -2415,231 -2359,17 +2415,244 @@@
"Edited — your version becomes this partner's soul. The original template is untouched.": "Edited — your version becomes this partner's soul. The original template is untouched.",
"Mastery-based tutoring with a hard gate": "Mastery-based tutoring with a hard gate",
"Mastery Path tooltip": "Mastery-based learning with a hard gate",
+ "Index engine": "Index engine",
+ "Needs key": "Needs key",
+ "This engine needs an API key. Configure it before creating.": "This engine needs an API key. Configure it before creating.",
+ "PDF and Markdown only": "PDF and Markdown only",
+ "PageIndex settings": "PageIndex settings",
+ "Get an API key": "Get an API key",
+ "PageIndex is a hosted, vectorless retrieval engine. Documents in a PageIndex knowledge base are uploaded to PageIndex's servers for processing. One key is shared by all your PageIndex knowledge bases.": "PageIndex is a hosted, vectorless retrieval engine. Documents in a PageIndex knowledge base are uploaded to PageIndex's servers for processing. One key is shared by all your PageIndex knowledge bases.",
+ "API key": "API key",
+ "•••••••• (configured — leave blank to keep)": "•••••••• (configured — leave blank to keep)",
+ "Enter your PageIndex API key": "Enter your PageIndex API key",
+ "Remove stored key": "Remove stored key",
+ "Manage your knowledge bases and retrieval engines.": "Manage your knowledge bases and retrieval engines.",
+ "Retrieval engines": "Retrieval engines",
+ "Configure key": "Configure key",
+ "Manage key": "Manage key",
+ "Obsidian": "Obsidian",
+ "Connect vault": "Connect vault",
+ "Connect": "Connect",
+ "Connect Obsidian vault": "Connect Obsidian vault",
+ "{{count}} connected": "{{count}} connected",
+ "Vault path": "Vault path",
+ "e.g. My Vault": "e.g. My Vault",
+ "Connect your Obsidian vault. The tutor navigates and writes notes in place — no upload, no index. Local / self-hosted only.": "Connect your Obsidian vault. The tutor navigates and writes notes in place — no upload, no index. Local / self-hosted only.",
+ "Point DeepTutor at a folder that is your Obsidian vault. Nothing is uploaded or copied — DeepTutor reads (and, when you ask, writes) the notes in place. The path must be reachable by the server, so this works on a local / self-hosted DeepTutor.": "Point DeepTutor at a folder that is your Obsidian vault. Nothing is uploaded or copied — DeepTutor reads (and, when you ask, writes) the notes in place. The path must be reachable by the server, so this works on a local / self-hosted DeepTutor.",
+ "The absolute path to the vault folder on this machine.": "The absolute path to the vault folder on this machine.",
+ "Create new": "Create new",
+ "Link existing": "Link existing",
+ "Upload documents and build a fresh index.": "Upload documents and build a fresh index.",
+ "Reuse an index you already built — read in place, no upload or re-index.": "Reuse an index you already built — read in place, no upload or re-index.",
+ "This engine's index lives in the cloud and can't be linked.": "This engine's index lives in the cloud and can't be linked.",
+ "Cloud index": "Cloud index",
+ "A live Obsidian vault — browsed and edited in place, no index.": "A live Obsidian vault — browsed and edited in place, no index.",
+ "Folder path": "Folder path",
+ "The absolute path to a knowledge base folder on this machine — nothing is copied.": "The absolute path to a knowledge base folder on this machine — nothing is copied.",
+ "Check folder": "Check folder",
+ "This folder can't be linked": "This folder can't be linked",
+ "Ready index found": "Ready index found",
+ "{{count}} documents": "{{count}} documents",
+ "Embedding model matches": "Embedding model matches",
+ "Create one to upload documents and retrieve grounded context in chat.": "Create one to upload documents and retrieve grounded context in chat.",
+ "docs": "docs",
+ "Exit fullscreen": "Exit fullscreen",
+ "Move to…": "Move to…",
+ "Move to": "Move to",
+ "Root": "Root",
+ "No folders yet": "No folders yet",
+ "New folder": "New folder",
+ "Folder name": "Folder name",
+ "Or select an entire folder": "Or select an entire folder",
+ "Unsupported files are skipped; the rest will be indexed.": "Unsupported files are skipped; the rest will be indexed.",
+ "{{ready}} ready, {{skip}} will be skipped": "{{ready}} ready, {{skip}} will be skipped",
+ "Allow automatic model download": "Allow automatic model download",
+ "Describe images with the vision model": "Describe images with the vision model",
+ "Docling": "Docling",
+ "Docling isn't installed.": "Docling isn't installed.",
+ "Document Parsing": "Document Parsing",
+ "Engine": "Engine",
+ "Failed to load document parsing settings.": "Failed to load document parsing settings.",
+ "Failed to save document parsing settings.": "Failed to save document parsing settings.",
+ "Forwarded to MinerU for each document.": "Forwarded to MinerU for each document.",
+ "How uploaded documents are converted into text for knowledge bases and question generation. Pick an engine and its options. Local model downloads are off by default — they only happen when you explicitly allow them.": "How uploaded documents are converted into text for knowledge bases and question generation. Pick an engine and its options. Local model downloads are off by default — they only happen when you explicitly allow them.",
+ "Lightweight Markdown conversion with broad format support. No model downloads.": "Lightweight Markdown conversion with broad format support. No model downloads.",
+ "Local parsing needs ~1-2 GB of model weights. By default they are NOT downloaded automatically — download them explicitly below, or allow automatic download on first parse.": "Local parsing needs ~1-2 GB of model weights. By default they are NOT downloaded automatically — download them explicitly below, or allow automatic download on first parse.",
+ "Model status": "Model status",
+ "Not installed": "Not installed",
+ "Text-only": "Text-only",
+ "Built-in plain text extraction for PDF, Office, and text files. No optional parser package, model download, OCR, or layout reconstruction.": "Built-in plain text extraction for PDF, Office, and text files. No optional parser package, model download, OCR, or layout reconstruction.",
+ "Knowledge Center": "Knowledge Center",
+ "Retrieval profile": "Retrieval profile",
+ "Credentials": "Credentials",
+ "Requirements": "Requirements",
+ "Save changes": "Save changes",
+ "Open catalog": "Open catalog",
+ "Chunk size": "Chunk size",
+ "Chunk overlap": "Chunk overlap",
+ "Results per query": "Results per query",
+ "Vector candidate ×": "Vector candidate ×",
+ "Keyword candidate ×": "Keyword candidate ×",
+ "Used by hybrid only": "Used by hybrid only",
+ "Applies on the next re-index": "Applies on the next re-index",
+ "Retrieval & chunking": "Retrieval & chunking",
+ "No knowledge bases use this engine yet.": "No knowledge bases use this engine yet.",
+ "This engine uses your active chat and embedding models. Manage them in the model catalog.": "This engine uses your active chat and embedding models. Manage them in the model catalog.",
+ "This engine ships as an optional dependency. Install it, then restart DeepTutor to enable it.": "This engine ships as an optional dependency. Install it, then restart DeepTutor to enable it.",
+ "The default for new searches. A knowledge base can still override it per-KB.": "The default for new searches. A knowledge base can still override it per-KB.",
+ "BM25 keyword + vector semantic retrieval, fused and re-ranked. More robust recall.": "BM25 keyword + vector semantic retrieval, fused and re-ranked. More robust recall.",
+ "Vector semantic retrieval only. Faster, but leans entirely on embedding quality.": "Vector semantic retrieval only. Faster, but leans entirely on embedding quality.",
+ "Entity-focused retrieval over the relevant local subgraph — fast and economical.": "Entity-focused retrieval over the relevant local subgraph — fast and economical.",
+ "Map-reduce over global community summaries — best for broad, thematic questions.": "Map-reduce over global community summaries — best for broad, thematic questions.",
+ "Local retrieval with dynamic follow-ups — balances precision and coverage.": "Local retrieval with dynamic follow-ups — balances precision and coverage.",
+ "Plain vector retrieval — the lightest option.": "Plain vector retrieval — the lightest option.",
+ "Plain vector retrieval, without the knowledge graph.": "Plain vector retrieval, without the knowledge graph.",
+ "Local context focused on the most relevant entities.": "Local context focused on the most relevant entities.",
+ "Theme-level retrieval over global relationships.": "Theme-level retrieval over global relationships.",
+ "Combines local and global retrieval — a solid general default.": "Combines local and global retrieval — a solid general default.",
+ "Fuses knowledge-graph and vector retrieval.": "Fuses knowledge-graph and vector retrieval.",
+ "Retrieval parameters": "Retrieval parameters",
+ "Response style": "Response style",
+ "Community level": "Community level",
+ "Graph traversal granularity (local / drift)": "Graph traversal granularity (local / drift)",
+ "Dynamic community selection": "Dynamic community selection",
+ "Global mode only": "Global mode only",
+ "Chat model": "Chat model",
+ "Embedding model": "Embedding model",
+ "No models configured — open catalog": "No models configured — open catalog",
+ "Multimodal documents need a vision-capable chat model.": "Multimodal documents need a vision-capable chat model.",
+ "Requirements & environment": "Requirements & environment",
+ "Check environment": "Check environment",
+ "Ready to use": "Ready to use",
+ "Not ready": "Not ready",
+ "Active embedding model": "Active embedding model",
+ "BM25 hybrid retrieval": "BM25 hybrid retrieval",
+ "API key configured": "API key configured",
+ "GraphRAG package installed": "GraphRAG package installed",
+ "Active chat model": "Active chat model",
+ "RAG-Anything package installed": "RAG-Anything package installed",
+ "Vision model for multimodal": "Vision model for multimodal",
+ "Local vector engine — works out of the box. Retrieval uses your active embedding model; install the optional BM25 package to enable hybrid retrieval.": "Local vector engine — works out of the box. Retrieval uses your active embedding model; install the optional BM25 package to enable hybrid retrieval.",
+ "Hosted engine: documents are uploaded to PageIndex's servers for processing. Requires an API key; PDF / Markdown only.": "Hosted engine: documents are uploaded to PageIndex's servers for processing. Requires an API key; PDF / Markdown only.",
+ "Local knowledge-graph retrieval. Needs the optional dependency installed; indexing is LLM-heavy. Requires an active chat model and embedding model.": "Local knowledge-graph retrieval. Needs the optional dependency installed; indexing is LLM-heavy. Requires an active chat model and embedding model.",
+ "Graph + vector retrieval with multimodal parsing. Needs the optional dependency installed; indexing is LLM-heavy. Requires active chat and embedding models; multimodal also needs a vision model.": "Graph + vector retrieval with multimodal parsing. Needs the optional dependency installed; indexing is LLM-heavy. Requires active chat and embedding models; multimodal also needs a vision model.",
+ "OCR scanned pages": "OCR scanned pages",
+ "Off by default. When off, a local parse fails with guidance instead of silently downloading multi-GB weights on first run. Turn on to let the first parse fetch models, or use the explicit download below.": "Off by default. When off, a local parse fails with guidance instead of silently downloading multi-GB weights on first run. Turn on to let the first parse fetch models, or use the explicit download below.",
+ "Off by default. When off, parsing fails with guidance instead of silently downloading models. Or pre-fetch with `docling-tools models download`.": "Off by default. When off, parsing fails with guidance instead of silently downloading models. Or pre-fetch with `docling-tools models download`.",
+ "Ready to parse.": "Ready to parse.",
+ "Recognize tables": "Recognize tables",
+ "Reserved — uses DeepTutor's vision model to caption images during conversion.": "Reserved — uses DeepTutor's vision model to caption images during conversion.",
+ "Slower; enable for image-only PDFs.": "Slower; enable for image-only PDFs.",
+ "Structured conversion of PDF/Office/HTML/images. Downloads layout/table models on first run.": "Structured conversion of PDF/Office/HTML/images. Downloads layout/table models on first run.",
+ "The active engine handles all parsing. markitdown is lightweight and needs no model downloads; MinerU and Docling produce richer structure but download local models (gated below) or use a hosted API.": "The active engine handles all parsing. markitdown is lightweight and needs no model downloads; MinerU and Docling produce richer structure but download local models (gated below) or use a hosted API.",
+ "The active engine handles all parsing. Text-only is built in and extracts plain text; markitdown is lightweight and optional; MinerU and Docling produce richer structure but may need local models or a hosted API.": "The active engine handles all parsing. Text-only is built in and extracts plain text; markitdown is lightweight and optional; MinerU and Docling produce richer structure but may need local models or a hosted API.",
+ "markitdown": "markitdown",
+ "markitdown isn't installed.": "markitdown isn't installed.",
+ "Retrieval mode": "Retrieval mode",
+ "Imported Chats": "Imported Chats",
+ "Conversations imported from Claude Code and Codex.": "Conversations imported from Claude Code and Codex.",
+ "Bring your Claude Code and Codex history into your space, then keep the conversation going.": "Bring your Claude Code and Codex history into your space, then keep the conversation going.",
+ "Import": "Import",
+ "Search imported chats...": "Search imported chats...",
+ "Delete this imported chat?": "Delete this imported chat?",
+ "No imported conversations yet": "No imported conversations yet",
+ "Pick your local .claude or .codex folder — DeepTutor finds each project and brings the chats in.": "Pick your local .claude or .codex folder — DeepTutor finds each project and brings the chats in.",
+ "Import conversations": "Import conversations",
+ "Reading your folder…": "Reading your folder…",
+ "Finding projects and conversations.": "Finding projects and conversations.",
+ "No conversations found": "No conversations found",
+ "This folder has no readable chat history. Pick your .claude or .codex folder.": "This folder has no readable chat history. Pick your .claude or .codex folder.",
+ "Select your local .claude or .codex folder. DeepTutor reads it right here in your browser — nothing leaves your machine until you choose what to import.": "Select your local .claude or .codex folder. DeepTutor reads it right here in your browser — nothing leaves your machine until you choose what to import.",
+ "It auto-detects the tool, groups conversations by project, and lets you pick exactly what to bring in.": "It auto-detects the tool, groups conversations by project, and lets you pick exactly what to bring in.",
+ "Your browser doesn't support folder access. Please use a Chromium-based browser (Chrome, Edge, Arc).": "Your browser doesn't support folder access. Please use a Chromium-based browser (Chrome, Edge, Arc).",
+ "Tip: in the folder picker, press ⌘⇧. (Mac) to reveal hidden folders like .claude.": "Tip: in the folder picker, press ⌘⇧. (Mac) to reveal hidden folders like .claude.",
+ "{{projects}} projects · {{sessions}} conversations": "{{projects}} projects · {{sessions}} conversations",
+ "Select project": "Select project",
+ "{{count}} chats": "{{count}} chats",
+ "Select conversation": "Select conversation",
+ "Untitled conversation": "Untitled conversation",
+ "Reading conversations…": "Reading conversations…",
+ "Saving to your space…": "Saving to your space…",
+ "{{done}} / {{total}}": "{{done}} / {{total}}",
+ "Almost there.": "Almost there.",
+ "Imported {{count}} conversations": "Imported {{count}} conversations",
+ "{{count}} skipped (already imported or empty).": "{{count}} skipped (already imported or empty).",
+ "They're ready in your space — open one to keep chatting.": "They're ready in your space — open one to keep chatting.",
+ "This folder doesn't look like a .claude or .codex home. Please select the right folder.": "This folder doesn't look like a .claude or .codex home. Please select the right folder.",
+ "Your browser doesn't support folder access. Please use a Chromium-based browser.": "Your browser doesn't support folder access. Please use a Chromium-based browser.",
+ "Something went wrong while importing. Please try again.": "Something went wrong while importing. Please try again.",
+ "Couldn't import": "Couldn't import",
+ "Select folder": "Select folder",
+ "Import {{count}} conversations": "Import {{count}} conversations",
+ "Done": "Done",
+ "Try again": "Try again",
+ "My Agents": "My Agents",
+ "Imported conversations": "Imported conversations",
+ "Agent": "Agent",
+ "Select a connected agent": "Select a connected agent",
+ "Consult Subagent": "Consult Subagent",
+ "DeepTutor asks": "DeepTutor asks",
+ "Max rounds DeepTutor may ask": "Max rounds DeepTutor may ask",
+ "Talk to an agent": "Talk to an agent",
+ "No connected agents — connect one in My Agents.": "No connected agents — connect one in My Agents.",
+ "No matching agent": "No matching agent",
+ "Fewer rounds": "Fewer rounds",
+ "More rounds": "More rounds",
+ "Add agent": "Add agent",
+ "No agents yet": "No agents yet",
+ "Your Claude Code and Codex sessions, organized by source — open one to keep chatting, or refresh to pull in new conversations.": "Your Claude Code and Codex sessions, organized by source — open one to keep chatting, or refresh to pull in new conversations.",
+ "Add your Claude Code or Codex folder to bring its conversations in — then chat with them or refresh anytime.": "Add your Claude Code or Codex folder to bring its conversations in — then chat with them or refresh anytime.",
+ "Search conversations...": "Search conversations...",
+ "Delete this conversation?": "Delete this conversation?",
+ "Synced {{time}}": "Synced {{time}}",
+ "Not synced yet": "Not synced yet",
+ "Refresh history": "Refresh history",
+ "Added {{count}} new conversations": "Added {{count}} new conversations",
+ "Already up to date": "Already up to date",
+ "Refresh failed — try re-adding the agent.": "Refresh failed — try re-adding the agent.",
+ "Hidden folders like .claude won't show by default — press ⌘⇧. (Command-Shift-Period) in the picker to reveal them.": "Hidden folders like .claude won't show by default — press ⌘⇧. (Command-Shift-Period) in the picker to reveal them.",
+ "My Agents Reference": "My Agents Reference",
+ "Select agent conversations": "Select agent conversations",
+ "Bring conversations from your imported agents into this turn.": "Bring conversations from your imported agents into this turn.",
+ "Search conversations by title or last message": "Search conversations by title or last message",
+ "No imported conversations found.": "No imported conversations found.",
+ "1 conversation selected": "1 conversation selected",
+ "{{n}} conversations selected": "{{n}} conversations selected",
+ "Use Selected ({{n}})": "Use Selected ({{n}})",
+ "Reference imported Claude Code / Codex conversations.": "Reference imported Claude Code / Codex conversations.",
+ "Agent name": "Agent name",
+ "More": "More",
+ "Select": "Select",
+ "Edit scope": "Edit scope",
+ "Save scope": "Save scope",
+ "Delete agent": "Delete agent",
+ "Ungrouped": "Ungrouped",
+ "All conversations": "All conversations",
+ "{{count}} conversations": "{{count}} conversations",
+ "{{count}} projects": "{{count}} projects",
+ "{{count}} days": "{{count}} days",
+ "{{days}} days · {{sessions}} conversations": "{{days}} days · {{sessions}} conversations",
+ "Couldn't read this folder": "Couldn't read this folder",
+ "Pick an agent, then choose the conversations to bring in.": "Pick an agent, then choose the conversations to bring in.",
+ "Pick the days to bring in. Refreshing later re-syncs these days and pulls in new conversations on them.": "Pick the days to bring in. Refreshing later re-syncs these days and pulls in new conversations on them.",
+ "Pick the projects to bring in. Refreshing later re-syncs these projects and pulls in their new conversations.": "Pick the projects to bring in. Refreshing later re-syncs these projects and pulls in their new conversations.",
+ "Your Claude Code and Codex conversations as named agents — open one to keep chatting, edit what each imports, or refresh to pull in new conversations.": "Your Claude Code and Codex conversations as named agents — open one to keep chatting, edit what each imports, or refresh to pull in new conversations.",
+ "{{count}} conversations are no longer in scope. Remove them from your space?": "{{count}} conversations are no longer in scope. Remove them from your space?",
+ "Delete “{{name}}” and its {{count}} conversations? This removes them from your space and can't be undone.": "Delete “{{name}}” and its {{count}} conversations? This removes them from your space and can't be undone.",
+ "Delete “{{name}}”?": "Delete “{{name}}”?",
+ "Selected": "Selected",
- "This conversation has no readable messages.": "This conversation has no readable messages."
++ "This conversation has no readable messages.": "This conversation has no readable messages.",
+ "My profile": "My profile",
+ "View your account and personalize your avatar": "View your account and personalize your avatar",
+ "Administrator": "Administrator",
+ "Joined": "Joined",
+ "Avatar": "Avatar",
+ "Upload a picture or pick an icon": "Upload a picture or pick an icon",
+ "Upload image": "Upload image",
+ "Remove photo": "Remove photo",
+ "Or pick an icon": "Or pick an icon",
+ "Sign out": "Sign out",
+ "End your session on this device": "End your session on this device",
+ "Failed to load profile": "Failed to load profile",
+ "Image is too large": "Image is too large"
}
diff --cc web/locales/zh/app.json
index ed7b609cd,5c0d729fa..5dd43a717
--- a/web/locales/zh/app.json
+++ b/web/locales/zh/app.json
@@@ -2415,231 -2359,17 +2415,244 @@@
"Edited — your version becomes this partner's soul. The original template is untouched.": "已编辑——你的版本将成为这个伙伴的 soul,原模板保持不变。",
"Mastery-based tutoring with a hard gate": "掌握式辅导:硬门槛 + 间隔复习",
"Mastery Path tooltip": "掌握式学习:硬门槛与间隔复习",
+ "Index engine": "索引引擎",
+ "Needs key": "需配置密钥",
+ "This engine needs an API key. Configure it before creating.": "该引擎需要 API 密钥,请先配置再创建。",
+ "PDF and Markdown only": "仅支持 PDF 和 Markdown",
+ "PageIndex settings": "PageIndex 设置",
+ "Get an API key": "获取 API 密钥",
+ "PageIndex is a hosted, vectorless retrieval engine. Documents in a PageIndex knowledge base are uploaded to PageIndex's servers for processing. One key is shared by all your PageIndex knowledge bases.": "PageIndex 是托管的无向量检索引擎。PageIndex 知识库中的文档会上传到 PageIndex 服务器进行处理。同一个密钥由你所有的 PageIndex 知识库共用。",
+ "API key": "API 密钥",
+ "•••••••• (configured — leave blank to keep)": "•••••••• (已配置,留空则保留)",
+ "Enter your PageIndex API key": "输入你的 PageIndex API 密钥",
+ "Remove stored key": "移除已存密钥",
+ "Manage your knowledge bases and retrieval engines.": "管理你的知识库与检索引擎。",
+ "Retrieval engines": "检索引擎",
+ "Configure key": "配置密钥",
+ "Manage key": "管理密钥",
+ "Obsidian": "Obsidian",
+ "Connect vault": "连接 Vault",
+ "Connect": "连接",
+ "Connect Obsidian vault": "连接 Obsidian 库",
+ "{{count}} connected": "已连接 {{count}} 个",
+ "Vault path": "Vault 路径",
+ "e.g. My Vault": "例如 我的库",
+ "Connect your Obsidian vault. The tutor navigates and writes notes in place — no upload, no index. Local / self-hosted only.": "连接你的 Obsidian 库。导师直接在原文件上浏览并写入笔记——不上传、不索引。仅限本地 / 自托管。",
+ "Point DeepTutor at a folder that is your Obsidian vault. Nothing is uploaded or copied — DeepTutor reads (and, when you ask, writes) the notes in place. The path must be reachable by the server, so this works on a local / self-hosted DeepTutor.": "把 DeepTutor 指向作为你 Obsidian 库的文件夹。不上传、不复制——DeepTutor 直接在原文件上读取(并在你要求时写入)笔记。该路径必须是服务器能访问到的,因此仅适用于本地 / 自托管的 DeepTutor。",
+ "The absolute path to the vault folder on this machine.": "本机上 vault 文件夹的绝对路径。",
+ "Create new": "新建",
+ "Link existing": "关联已有",
+ "Upload documents and build a fresh index.": "上传文档并建立全新索引。",
+ "Reuse an index you already built — read in place, no upload or re-index.": "复用你已建好的索引——就地读取,不上传、不重新索引。",
+ "This engine's index lives in the cloud and can't be linked.": "该引擎的索引在云端,无法关联。",
+ "Cloud index": "云端索引",
+ "A live Obsidian vault — browsed and edited in place, no index.": "实时的 Obsidian 库——就地浏览与编辑,不建索引。",
+ "Folder path": "文件夹路径",
+ "The absolute path to a knowledge base folder on this machine — nothing is copied.": "本机上某个知识库文件夹的绝对路径——不会复制任何内容。",
+ "Check folder": "检查文件夹",
+ "This folder can't be linked": "该文件夹无法关联",
+ "Ready index found": "找到可用索引",
+ "{{count}} documents": "{{count}} 篇文档",
+ "Embedding model matches": "embedding 模型匹配",
+ "Create one to upload documents and retrieve grounded context in chat.": "创建一个知识库,上传文档,在对话中检索有依据的内容。",
+ "docs": "篇文档",
+ "Exit fullscreen": "退出全屏",
+ "Move to…": "移动到…",
+ "Move to": "移动到",
+ "Root": "根目录",
+ "No folders yet": "暂无文件夹",
+ "New folder": "新建文件夹",
+ "Folder name": "文件夹名称",
+ "Or select an entire folder": "或选择整个文件夹",
+ "Unsupported files are skipped; the rest will be indexed.": "不支持的文件将被跳过,其余照常索引。",
+ "{{ready}} ready, {{skip}} will be skipped": "{{ready}} 个就绪,{{skip}} 个将跳过",
+ "Allow automatic model download": "允许自动下载模型",
+ "Describe images with the vision model": "用视觉模型描述图片",
+ "Docling": "Docling",
+ "Docling isn't installed.": "未安装 Docling。",
+ "Document Parsing": "文档解析",
+ "Engine": "引擎",
+ "Failed to load document parsing settings.": "加载文档解析设置失败。",
+ "Failed to save document parsing settings.": "保存文档解析设置失败。",
+ "Forwarded to MinerU for each document.": "对每个文档转发给 MinerU。",
+ "How uploaded documents are converted into text for knowledge bases and question generation. Pick an engine and its options. Local model downloads are off by default — they only happen when you explicitly allow them.": "上传的文档如何被转换为文本,供知识库和出题使用。选择一个引擎及其选项。本地模型默认不下载——只有在你显式允许时才会下载。",
+ "Lightweight Markdown conversion with broad format support. No model downloads.": "轻量级 Markdown 转换,支持多种格式,无需下载模型。",
+ "Local parsing needs ~1-2 GB of model weights. By default they are NOT downloaded automatically — download them explicitly below, or allow automatic download on first parse.": "本地解析需要约 1-2 GB 的模型权重。默认不会自动下载——可在下方显式下载,或允许首次解析时自动下载。",
+ "Model status": "模型状态",
+ "Not installed": "未安装",
+ "Text-only": "仅文本",
+ "Built-in plain text extraction for PDF, Office, and text files. No optional parser package, model download, OCR, or layout reconstruction.": "内置纯文本提取,支持 PDF、Office 和文本文件。无需可选解析包、模型下载、OCR 或版面重建。",
+ "Knowledge Center": "知识中心",
+ "Retrieval profile": "检索画像",
+ "Credentials": "凭证",
+ "Requirements": "环境要求",
+ "Save changes": "保存更改",
+ "Open catalog": "打开模型目录",
+ "Chunk size": "分块大小",
+ "Chunk overlap": "分块重叠",
+ "Results per query": "每次查询返回结果数",
+ "Vector candidate ×": "向量候选倍率",
+ "Keyword candidate ×": "关键词候选倍率",
+ "Used by hybrid only": "仅 hybrid 模式使用",
+ "Applies on the next re-index": "下次重新索引时生效",
+ "Retrieval & chunking": "检索与分块",
+ "No knowledge bases use this engine yet.": "暂无知识库使用此引擎。",
+ "This engine uses your active chat and embedding models. Manage them in the model catalog.": "此引擎使用你当前启用的对话与嵌入模型,可在模型目录中管理。",
+ "This engine ships as an optional dependency. Install it, then restart DeepTutor to enable it.": "此引擎作为可选依赖发布。安装后重启 DeepTutor 即可启用。",
+ "The default for new searches. A knowledge base can still override it per-KB.": "新检索的默认模式。单个知识库仍可各自覆盖。",
+ "BM25 keyword + vector semantic retrieval, fused and re-ranked. More robust recall.": "BM25 关键词 + 向量语义检索,融合重排,召回更稳健。",
+ "Vector semantic retrieval only. Faster, but leans entirely on embedding quality.": "仅向量语义检索,更快,但完全依赖嵌入质量。",
+ "Entity-focused retrieval over the relevant local subgraph — fast and economical.": "以实体为中心,在相关局部子图上检索——更快、更省。",
+ "Map-reduce over global community summaries — best for broad, thematic questions.": "对全局社区摘要做 map-reduce——最适合宽泛的主题型问题。",
+ "Local retrieval with dynamic follow-ups — balances precision and coverage.": "局部检索 + 动态跟进——兼顾精确与覆盖。",
+ "Plain vector retrieval — the lightest option.": "朴素向量检索——最轻量的选项。",
+ "Plain vector retrieval, without the knowledge graph.": "朴素向量检索,不使用知识图谱。",
+ "Local context focused on the most relevant entities.": "聚焦最相关实体的局部上下文。",
+ "Theme-level retrieval over global relationships.": "基于全局关系的主题级检索。",
+ "Combines local and global retrieval — a solid general default.": "结合局部与全局检索——稳妥的通用默认。",
+ "Fuses knowledge-graph and vector retrieval.": "融合知识图谱与向量检索。",
+ "Retrieval parameters": "检索参数",
+ "Response style": "回答样式",
+ "Community level": "社区层级",
+ "Graph traversal granularity (local / drift)": "图谱遍历粒度(local / drift)",
+ "Dynamic community selection": "动态社区选择",
+ "Global mode only": "仅 global 模式",
+ "Chat model": "对话模型",
+ "Embedding model": "嵌入模型",
+ "No models configured — open catalog": "未配置模型 — 打开模型目录",
+ "Multimodal documents need a vision-capable chat model.": "多模态文档需要支持视觉的对话模型。",
+ "Requirements & environment": "环境要求",
+ "Check environment": "检查环境",
+ "Ready to use": "可以使用",
+ "Not ready": "尚不可用",
+ "Active embedding model": "已启用嵌入模型",
+ "BM25 hybrid retrieval": "BM25 混合检索",
+ "API key configured": "已配置 API 密钥",
+ "GraphRAG package installed": "已安装 GraphRAG 依赖包",
+ "Active chat model": "已启用对话模型",
+ "RAG-Anything package installed": "已安装 RAG-Anything 依赖包",
+ "Vision model for multimodal": "用于多模态的视觉模型",
+ "Local vector engine — works out of the box. Retrieval uses your active embedding model; install the optional BM25 package to enable hybrid retrieval.": "本地向量引擎,开箱即用。检索使用你当前启用的嵌入模型;可选安装 BM25 包以启用混合检索。",
+ "Hosted engine: documents are uploaded to PageIndex's servers for processing. Requires an API key; PDF / Markdown only.": "托管引擎:文档会上传到 PageIndex 服务器处理。需配置 API 密钥;仅支持 PDF / Markdown。",
+ "Local knowledge-graph retrieval. Needs the optional dependency installed; indexing is LLM-heavy. Requires an active chat model and embedding model.": "本地知识图谱检索。需要安装可选依赖;索引为 LLM 密集型操作。需启用对话模型与嵌入模型。",
+ "Graph + vector retrieval with multimodal parsing. Needs the optional dependency installed; indexing is LLM-heavy. Requires active chat and embedding models; multimodal also needs a vision model.": "图 + 向量检索,支持多模态解析。需要安装可选依赖;索引为 LLM 密集型操作。需启用对话与嵌入模型;多模态还需视觉模型。",
+ "OCR scanned pages": "对扫描页做 OCR",
+ "Off by default. When off, a local parse fails with guidance instead of silently downloading multi-GB weights on first run. Turn on to let the first parse fetch models, or use the explicit download below.": "默认关闭。关闭时,本地解析会给出提示并失败,而不是在首次运行时静默下载数 GB 的权重。开启后首次解析会自动获取模型,或使用下方的显式下载。",
+ "Off by default. When off, parsing fails with guidance instead of silently downloading models. Or pre-fetch with `docling-tools models download`.": "默认关闭。关闭时,解析会给出提示并失败,而不是静默下载模型。也可用 `docling-tools models download` 预先下载。",
+ "Ready to parse.": "已就绪,可解析。",
+ "Recognize tables": "识别表格",
+ "Reserved — uses DeepTutor's vision model to caption images during conversion.": "预留功能 — 转换时用 DeepTutor 的视觉模型为图片生成描述。",
+ "Slower; enable for image-only PDFs.": "较慢;仅对纯图片 PDF 启用。",
+ "Structured conversion of PDF/Office/HTML/images. Downloads layout/table models on first run.": "对 PDF/Office/HTML/图片做结构化转换。首次运行会下载版面/表格模型。",
+ "The active engine handles all parsing. markitdown is lightweight and needs no model downloads; MinerU and Docling produce richer structure but download local models (gated below) or use a hosted API.": "当前引擎负责所有解析。markitdown 轻量且无需下载模型;MinerU 和 Docling 能产出更丰富的结构,但需下载本地模型(受下方开关控制)或使用托管 API。",
+ "The active engine handles all parsing. Text-only is built in and extracts plain text; markitdown is lightweight and optional; MinerU and Docling produce richer structure but may need local models or a hosted API.": "当前引擎负责所有解析。仅文本为内置引擎,只提取纯文本;markitdown 轻量但为可选依赖;MinerU 和 Docling 能产出更丰富结构,但可能需要本地模型或托管 API。",
+ "markitdown": "markitdown",
+ "markitdown isn't installed.": "未安装 markitdown。",
+ "Retrieval mode": "检索模式",
+ "Imported Chats": "导入的对话",
+ "Conversations imported from Claude Code and Codex.": "从 Claude Code 与 Codex 导入的对话。",
+ "Bring your Claude Code and Codex history into your space, then keep the conversation going.": "把你的 Claude Code 与 Codex 历史带入空间,并继续对话。",
+ "Import": "导入",
+ "Search imported chats...": "搜索导入的对话…",
+ "Delete this imported chat?": "删除这条导入的对话?",
+ "No imported conversations yet": "还没有导入的对话",
+ "Pick your local .claude or .codex folder — DeepTutor finds each project and brings the chats in.": "选择本地的 .claude 或 .codex 文件夹——DeepTutor 会找出每个项目并导入其中的对话。",
+ "Import conversations": "导入对话",
+ "Reading your folder…": "正在读取文件夹…",
+ "Finding projects and conversations.": "正在查找项目与对话。",
+ "No conversations found": "未找到对话",
+ "This folder has no readable chat history. Pick your .claude or .codex folder.": "该文件夹中没有可读取的聊天记录。请选择你的 .claude 或 .codex 文件夹。",
+ "Select your local .claude or .codex folder. DeepTutor reads it right here in your browser — nothing leaves your machine until you choose what to import.": "选择本地的 .claude 或 .codex 文件夹。DeepTutor 直接在浏览器中读取——在你选择导入内容之前,数据不会离开你的设备。",
+ "It auto-detects the tool, groups conversations by project, and lets you pick exactly what to bring in.": "它会自动识别工具、按项目归类对话,并让你精确选择要导入的内容。",
+ "Your browser doesn't support folder access. Please use a Chromium-based browser (Chrome, Edge, Arc).": "你的浏览器不支持文件夹访问。请使用基于 Chromium 的浏览器(Chrome、Edge、Arc)。",
+ "Tip: in the folder picker, press ⌘⇧. (Mac) to reveal hidden folders like .claude.": "提示:在文件夹选择器中按 ⌘⇧.(Mac)可显示 .claude 等隐藏文件夹。",
+ "{{projects}} projects · {{sessions}} conversations": "{{projects}} 个项目 · {{sessions}} 条对话",
+ "Select project": "选择项目",
+ "{{count}} chats": "{{count}} 条对话",
+ "Select conversation": "选择对话",
+ "Untitled conversation": "未命名对话",
+ "Reading conversations…": "正在读取对话…",
+ "Saving to your space…": "正在保存到你的空间…",
+ "{{done}} / {{total}}": "{{done}} / {{total}}",
+ "Almost there.": "马上就好。",
+ "Imported {{count}} conversations": "已导入 {{count}} 条对话",
+ "{{count}} skipped (already imported or empty).": "已跳过 {{count}} 条(已导入或为空)。",
+ "They're ready in your space — open one to keep chatting.": "它们已就绪——打开任意一条即可继续对话。",
+ "This folder doesn't look like a .claude or .codex home. Please select the right folder.": "该文件夹看起来不是 .claude 或 .codex 目录。请选择正确的文件夹。",
+ "Your browser doesn't support folder access. Please use a Chromium-based browser.": "你的浏览器不支持文件夹访问。请使用基于 Chromium 的浏览器。",
+ "Something went wrong while importing. Please try again.": "导入时出现问题,请重试。",
+ "Couldn't import": "无法导入",
+ "Select folder": "选择文件夹",
+ "Import {{count}} conversations": "导入 {{count}} 条对话",
+ "Done": "完成",
+ "Try again": "重试",
+ "My Agents": "我的智能体",
+ "Imported conversations": "导入的对话",
+ "Agent": "智能体",
+ "Select a connected agent": "选择已连接的智能体",
+ "Consult Subagent": "咨询子代理",
+ "DeepTutor asks": "DeepTutor 问",
+ "Max rounds DeepTutor may ask": "DeepTutor 最多提问轮数",
+ "Talk to an agent": "与智能体对话",
+ "No connected agents — connect one in My Agents.": "尚未连接智能体 —— 请在「我的智能体」中连接。",
+ "No matching agent": "没有匹配的智能体",
+ "Fewer rounds": "减少",
+ "More rounds": "增加",
+ "Add agent": "添加智能体",
+ "No agents yet": "还没有智能体",
+ "Your Claude Code and Codex sessions, organized by source — open one to keep chatting, or refresh to pull in new conversations.": "你的 Claude Code 与 Codex 对话,按来源归类——打开任意一条继续聊,或刷新以拉取新对话。",
+ "Add your Claude Code or Codex folder to bring its conversations in — then chat with them or refresh anytime.": "添加你的 Claude Code 或 Codex 文件夹以导入其对话——之后随时可以与它们对话或刷新。",
+ "Search conversations...": "搜索对话…",
+ "Delete this conversation?": "删除这条对话?",
+ "Synced {{time}}": "已同步 {{time}}",
+ "Not synced yet": "尚未同步",
+ "Refresh history": "刷新历史",
+ "Added {{count}} new conversations": "新增了 {{count}} 条对话",
+ "Already up to date": "已是最新",
+ "Refresh failed — try re-adding the agent.": "刷新失败——请尝试重新添加该智能体。",
+ "Hidden folders like .claude won't show by default — press ⌘⇧. (Command-Shift-Period) in the picker to reveal them.": "默认不显示 .claude 这类隐藏文件夹——在选择器中按 ⌘⇧.(Command-Shift-句号)即可显示。",
+ "My Agents Reference": "我的智能体引用",
+ "Select agent conversations": "选择智能体对话",
+ "Bring conversations from your imported agents into this turn.": "把导入智能体的对话带入这一轮。",
+ "Search conversations by title or last message": "按标题或最后一条消息搜索对话",
+ "No imported conversations found.": "未找到导入的对话。",
+ "1 conversation selected": "已选择 1 条对话",
+ "{{n}} conversations selected": "已选择 {{n}} 条对话",
+ "Use Selected ({{n}})": "使用所选({{n}})",
+ "Reference imported Claude Code / Codex conversations.": "引用导入的 Claude Code / Codex 对话。",
+ "Agent name": "智能体名称",
+ "More": "更多",
+ "Select": "选择",
+ "Edit scope": "编辑范围",
+ "Save scope": "保存范围",
+ "Delete agent": "删除智能体",
+ "Ungrouped": "未分组",
+ "All conversations": "全部对话",
+ "{{count}} conversations": "{{count}} 条对话",
+ "{{count}} projects": "{{count}} 个项目",
+ "{{count}} days": "{{count}} 天",
+ "{{days}} days · {{sessions}} conversations": "{{days}} 天 · {{sessions}} 条对话",
+ "Couldn't read this folder": "无法读取该文件夹",
+ "Pick an agent, then choose the conversations to bring in.": "先选一个智能体,再挑选要带入的对话。",
+ "Pick the days to bring in. Refreshing later re-syncs these days and pulls in new conversations on them.": "选择要带入的日期。之后刷新会重新同步这些日期,并拉取其中的新对话。",
+ "Pick the projects to bring in. Refreshing later re-syncs these projects and pulls in their new conversations.": "选择要带入的项目。之后刷新会重新同步这些项目,并拉取其中的新对话。",
+ "Your Claude Code and Codex conversations as named agents — open one to keep chatting, edit what each imports, or refresh to pull in new conversations.": "把你的 Claude Code 与 Codex 对话做成命名智能体——打开任意一个继续聊、编辑各自导入的范围,或刷新以拉取新对话。",
+ "{{count}} conversations are no longer in scope. Remove them from your space?": "有 {{count}} 条对话已不在范围内。要从你的空间中移除它们吗?",
+ "Delete “{{name}}” and its {{count}} conversations? This removes them from your space and can't be undone.": "删除“{{name}}”及其 {{count}} 条对话?这会从你的空间中移除它们,且无法撤销。",
+ "Delete “{{name}}”?": "删除“{{name}}”?",
+ "Selected": "已选",
- "This conversation has no readable messages.": "这条对话没有可读消息。"
++ "This conversation has no readable messages.": "这条对话没有可读消息。",
+ "My profile": "个人资料",
+ "View your account and personalize your avatar": "查看账户信息并个性化你的头像",
+ "Administrator": "管理员",
+ "Joined": "注册时间",
+ "Avatar": "头像",
+ "Upload a picture or pick an icon": "上传图片或选择一个图标",
+ "Upload image": "上传图片",
+ "Remove photo": "移除照片",
+ "Or pick an icon": "或选择一个图标",
+ "Sign out": "退出登录",
+ "End your session on this device": "结束此设备上的会话",
+ "Failed to load profile": "加载个人资料失败",
+ "Image is too large": "图片过大"
}