Skip to content

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

fic

Pancakeb81cecdc2c9d
diff --git a/scripts/start_web.py b/scripts/start_web.py
index 3269dc811..e0830396a 100644
--- a/scripts/start_web.py
+++ b/scripts/start_web.py
@@ -210,7 +210,7 @@ def start_frontend():
env["PYTHONUTF8"] = "1"
if os.name == "nt":
env["PYTHONLEGACYWINDOWSSTDIO"] = "0"
-
+
frontend_process = subprocess.Popen(
f"npm run dev -- -p {frontend_port}",
cwd=web_dir,
diff --git a/src/core/setup.py b/src/core/setup.py
index f6572aec5..ecdf63eca 100644
--- a/src/core/setup.py
+++ b/src/core/setup.py
@@ -153,11 +153,7 @@ def init_user_directories(project_root: Path | None = None) -> None:
# Create settings.json if it doesn't exist (default to English)
settings_file = user_data_dir / "settings.json"
if not settings_file.exists():
- initial_settings = {
- "theme": "light",
- "language": "en",
- "output_language": "en"
- }
+ initial_settings = {"theme": "light", "language": "en", "output_language": "en"}
try:
with open(settings_file, "w", encoding="utf-8") as f:
json.dump(initial_settings, f, indent=2, ensure_ascii=False)
@@ -199,11 +195,7 @@ def init_user_directories(project_root: Path | None = None) -> None:
# Ensure settings.json exists (default to English)
settings_file = user_data_dir / "settings.json"
if not settings_file.exists():
- initial_settings = {
- "theme": "light",
- "language": "en",
- "output_language": "en"
- }
+ initial_settings = {"theme": "light", "language": "en", "output_language": "en"}
try:
with open(settings_file, "w", encoding="utf-8") as f:
json.dump(initial_settings, f, indent=2, ensure_ascii=False)
diff --git a/web/app/page.tsx b/web/app/page.tsx
index f9f9de9bb..8f53b2044 100644
--- a/web/app/page.tsx
+++ b/web/app/page.tsx
@@ -234,7 +234,9 @@ export default function DashboardPage() {
<div className="text-2xl font-bold">
{notebookStats.total_notebooks}
</div>
- <div className="text-xs text-white/70">{t("Notebooks")}</div>
+ <div className="text-xs text-white/70">
+ {t("Notebooks")}
+ </div>
</div>
<div className="bg-white/10 rounded-xl p-3">
<div className="text-2xl font-bold">
diff --git a/web/app/settings/page.tsx b/web/app/settings/page.tsx
index fcf5f5619..03a7f1acd 100644
--- a/web/app/settings/page.tsx
+++ b/web/app/settings/page.tsx
@@ -481,7 +481,9 @@ export default function SettingsPage() {
{["light", "dark"].map((themeOption) => (
<button
key={themeOption}
- onClick={() => handleUIChange("theme", themeOption as any)}
+ onClick={() =>
+ handleUIChange("theme", themeOption as any)
+ }
className={`flex-1 py-2 px-4 rounded-lg text-sm font-medium flex items-center justify-center gap-2 transition-all ${
editedUI.theme === themeOption
? "bg-white dark:bg-slate-600 text-blue-600 dark:text-blue-400 shadow-sm"
@@ -493,7 +495,11 @@ export default function SettingsPage() {
) : (
<Moon className="w-4 h-4" />
)}
- <span>{themeOption === "light" ? t("Light Mode") : t("Dark Mode")}</span>
+ <span>
+ {themeOption === "light"
+ ? t("Light Mode")
+ : t("Dark Mode")}
+ </span>
</button>
))}
</div>
@@ -787,13 +793,19 @@ export default function SettingsPage() {
<div className="mb-4 p-3 bg-blue-50 dark:bg-blue-900/20 border border-blue-100 dark:border-blue-800 rounded-lg text-xs text-blue-700 dark:text-blue-300 flex items-start gap-2">
<Info className="w-4 h-4 mt-0.5 flex-shrink-0" />
<div>
- <p className="font-medium mb-1">{t("Runtime Configuration")}</p>
+ <p className="font-medium mb-1">
+ {t("Runtime Configuration")}
+ </p>
<p className="text-blue-600 dark:text-blue-400">
{t("Environment variables are loaded from")}{" "}
<code className="bg-blue-100 dark:bg-blue-800 px-1 rounded">
.env
</code>{" "}
- {t("file on startup")}. {t("Changes made here take effect immediately but are not saved to file")}. {t("On restart, values will be reloaded from")} .env.
+ {t("file on startup")}.{" "}
+ {t(
+ "Changes made here take effect immediately but are not saved to file",
+ )}
+ . {t("On restart, values will be reloaded from")} .env.
</p>
</div>
</div>
diff --git a/web/lib/i18n.ts b/web/lib/i18n.ts
index c10c1f539..923e38312 100644
--- a/web/lib/i18n.ts
+++ b/web/lib/i18n.ts
@@ -23,11 +23,12 @@ export const translations = {
Success: "Success",
"View All": "View All",
Refresh: "Refresh",
- "Create": "Create",
+ Create: "Create",
// Settings Page
"System Settings": "System Settings",
- "Manage system configuration and preferences": "Manage system configuration and preferences",
+ "Manage system configuration and preferences":
+ "Manage system configuration and preferences",
"General Settings": "General Settings",
"Environment Variables": "Environment Variables",
"Interface Preferences": "Interface Preferences",
@@ -39,7 +40,8 @@ export const translations = {
Chinese: "Chinese",
"System Configuration": "System Configuration",
"System Language": "System Language",
- "Default language for system operations": "Default language for system operations",
+ "Default language for system operations":
+ "Default language for system operations",
"Research Tools": "Research Tools",
"Web Search": "Web Search",
"Max Results": "Max Results",
@@ -53,29 +55,35 @@ export const translations = {
Status: "Status",
"Active LLM Model": "Active LLM Model",
"Not configured": "Not configured",
- "Configure in Environment Variables tab": "Configure in Environment Variables tab",
+ "Configure in Environment Variables tab":
+ "Configure in Environment Variables tab",
"Save All Changes": "Save All Changes",
"Configuration Saved": "Configuration Saved",
"Configuration Status": "Configuration Status",
"Refresh Status": "Refresh Status",
"Runtime Configuration": "Runtime Configuration",
- "Environment variables are loaded from": "Environment variables are loaded from",
+ "Environment variables are loaded from":
+ "Environment variables are loaded from",
"file on startup": "file on startup",
- "Changes made here take effect immediately but are not saved to file": "Changes made here take effect immediately but are not saved to file",
- "On restart, values will be reloaded from": "On restart, values will be reloaded from",
+ "Changes made here take effect immediately but are not saved to file":
+ "Changes made here take effect immediately but are not saved to file",
+ "On restart, values will be reloaded from":
+ "On restart, values will be reloaded from",
"Apply Environment Changes": "Apply Environment Changes",
"Environment Updated!": "Environment Updated!",
- "REQUIRED": "REQUIRED",
+ REQUIRED: "REQUIRED",
"Error loading data": "Error loading data",
"Failed to load settings": "Failed to load settings",
"Failed to connect to backend": "Failed to connect to backend",
// Dashboard Page
- "Overview of your recent learning activities": "Overview of your recent learning activities",
+ "Overview of your recent learning activities":
+ "Overview of your recent learning activities",
"Recent Activity": "Recent Activity",
"Loading activities...": "Loading activities...",
"No recent activity found": "No recent activity found",
- "Start solving problems or generating questions!": "Start solving problems or generating questions!",
+ "Start solving problems or generating questions!":
+ "Start solving problems or generating questions!",
"Problem Solved": "Problem Solved",
"Question Generated": "Question Generated",
"Research Report": "Research Report",
@@ -116,7 +124,7 @@ export const translations = {
Success: "成功",
"View All": "查看全部",
Refresh: "刷新",
- "Create": "创建",
+ Create: "创建",
// Settings Page
"System Settings": "系统设置",
@@ -154,11 +162,13 @@ export const translations = {
"Runtime Configuration": "运行时配置",
"Environment variables are loaded from": "环境变量从",
"file on startup": "文件加载于启动时",
- "Changes made here take effect immediately but are not saved to file": "此处的更改立即生效但不会保存到文件",
- "On restart, values will be reloaded from": "重启后,值将从以下文件重新加载",
+ "Changes made here take effect immediately but are not saved to file":
+ "此处的更改立即生效但不会保存到文件",
+ "On restart, values will be reloaded from":
+ "重启后,值将从以下文件重新加载",
"Apply Environment Changes": "应用环境变量更改",
"Environment Updated!": "环境变量已更新!",
- "REQUIRED": "必填",
+ REQUIRED: "必填",
"Error loading data": "加载数据出错",
"Failed to load settings": "加载设置失败",
"Failed to connect to backend": "连接后端失败",