Skip to content

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

fix bugs, and enforce math video length

zzhtx258f04851e53670
diff --git a/deeptutor/agents/math_animator/agents/code_generator_agent.py b/deeptutor/agents/math_animator/agents/code_generator_agent.py
index a87299322..265c3c7ae 100644
--- a/deeptutor/agents/math_animator/agents/code_generator_agent.py
+++ b/deeptutor/agents/math_animator/agents/code_generator_agent.py
@@ -35,6 +35,7 @@ class CodeGeneratorAgent(BaseAgent):
output_mode: str,
analysis: ConceptAnalysis,
design: SceneDesign,
+ duration_target_seconds: float | None = None,
) -> GeneratedCode:
"""BaseAgent-compatible entrypoint for the default generation path."""
return await self.generate(
@@ -42,6 +43,7 @@ class CodeGeneratorAgent(BaseAgent):
output_mode=output_mode,
analysis=analysis,
design=design,
+ duration_target_seconds=duration_target_seconds,
)
async def generate(
@@ -51,6 +53,7 @@ class CodeGeneratorAgent(BaseAgent):
output_mode: str,
analysis: ConceptAnalysis,
design: SceneDesign,
+ duration_target_seconds: float | None = None,
) -> GeneratedCode:
system_prompt = self.get_prompt("generate_system")
user_template = self.get_prompt("generate_user_template")
@@ -60,6 +63,11 @@ class CodeGeneratorAgent(BaseAgent):
user_prompt = user_template.format(
user_input=user_input.strip(),
output_mode=output_mode,
+ duration_requirement=(
+ f"用户明确目标时长约 {duration_target_seconds:.1f} 秒,生成代码必须围绕该时长做节奏预算。"
+ if duration_target_seconds is not None
+ else "用户未给出明确秒数时长,可按标准教学节奏生成。"
+ ),
analysis_json=json.dumps(analysis.model_dump(), ensure_ascii=False, indent=2),
design_json=json.dumps(design.model_dump(), ensure_ascii=False, indent=2),
)
@@ -90,6 +98,7 @@ class CodeGeneratorAgent(BaseAgent):
current_code: str,
error_message: str,
attempt: int,
+ duration_target_seconds: float | None = None,
) -> GeneratedCode:
system_prompt = self.get_prompt("retry_system")
user_template = self.get_prompt("retry_user_template")
@@ -100,6 +109,11 @@ class CodeGeneratorAgent(BaseAgent):
user_input=user_input.strip(),
output_mode=output_mode,
attempt=attempt,
+ duration_requirement=(
+ f"目标时长约 {duration_target_seconds:.1f} 秒,修复后仍需保持接近该时长。"
+ if duration_target_seconds is not None
+ else "无明确目标时长。"
+ ),
error_message=build_repair_error_message(error_message),
current_code=current_code,
)
diff --git a/deeptutor/agents/math_animator/duration_utils.py b/deeptutor/agents/math_animator/duration_utils.py
new file mode 100644
index 000000000..3b186edaf
--- /dev/null
+++ b/deeptutor/agents/math_animator/duration_utils.py
@@ -0,0 +1,37 @@
+"""Duration helpers for math animator prompts."""
+
+from __future__ import annotations
+
+import re
+
+_SECOND_PATTERN = re.compile(
+ r"(?P<value>\d+(?:\.\d+)?)\s*(?:s|sec|secs|second|seconds|秒(?:钟)?)",
+ re.IGNORECASE,
+)
+_MINUTE_PATTERN = re.compile(
+ r"(?P<value>\d+(?:\.\d+)?)\s*(?:m|min|mins|minute|minutes|分钟)",
+ re.IGNORECASE,
+)
+
+
+def parse_target_duration_seconds(text: str) -> float | None:
+ """Parse explicit duration target from user text."""
+ raw = str(text or "").strip()
+ if not raw:
+ return None
+
+ candidates: list[float] = []
+ for match in _SECOND_PATTERN.finditer(raw):
+ try:
+ candidates.append(float(match.group("value")))
+ except (TypeError, ValueError):
+ continue
+ for match in _MINUTE_PATTERN.finditer(raw):
+ try:
+ candidates.append(float(match.group("value")) * 60.0)
+ except (TypeError, ValueError):
+ continue
+ if not candidates:
+ return None
+ return max(candidates)
+
diff --git a/deeptutor/agents/math_animator/pipeline.py b/deeptutor/agents/math_animator/pipeline.py
index 35c58fa2a..88907230e 100644
--- a/deeptutor/agents/math_animator/pipeline.py
+++ b/deeptutor/agents/math_animator/pipeline.py
@@ -14,6 +14,7 @@ from .agents import (
SummaryAgent,
VisualReviewAgent,
)
+from .duration_utils import parse_target_duration_seconds
from .models import RenderResult, VisualReviewResult
from .renderer import ManimRenderService
from .request_config import MathAnimatorRequestConfig
@@ -118,11 +119,19 @@ class MathAnimatorPipeline:
analysis,
design,
):
+ duration_target_seconds = parse_target_duration_seconds(
+ " ".join(
+ part.strip()
+ for part in (user_input, request_config.style_hint)
+ if isinstance(part, str) and part.strip()
+ )
+ )
return await self.code_agent.generate(
user_input=user_input,
output_mode=request_config.output_mode,
analysis=analysis,
design=design,
+ duration_target_seconds=duration_target_seconds,
)
async def run_render(
@@ -137,6 +146,13 @@ class MathAnimatorPipeline:
on_retry_status: Callable[[str], Any] | None = None,
) -> tuple[str, RenderResult]:
renderer = ManimRenderService(turn_id, progress_callback=on_render_progress)
+ duration_target_seconds = parse_target_duration_seconds(
+ " ".join(
+ part.strip()
+ for part in (user_input, request_config.style_hint)
+ if isinstance(part, str) and part.strip()
+ )
+ )
review_callback: Callable[[str, RenderResult], Any] | None = None
if self.enable_visual_review and self.visual_review_agent is not None:
review_service = VisualReviewService(turn_id, progress_callback=on_render_progress)
@@ -165,6 +181,7 @@ class MathAnimatorPipeline:
current_code=current_code,
error_message=error_message,
attempt=attempt,
+ duration_target_seconds=duration_target_seconds,
),
)
final_code, render_result = await retry_manager.render_with_retries(
diff --git a/deeptutor/agents/math_animator/prompts/en/code_generator_agent.yaml b/deeptutor/agents/math_animator/prompts/en/code_generator_agent.yaml
index a643882dd..0f8b6dd1d 100644
--- a/deeptutor/agents/math_animator/prompts/en/code_generator_agent.yaml
+++ b/deeptutor/agents/math_animator/prompts/en/code_generator_agent.yaml
@@ -18,12 +18,18 @@ generate_system: |
- Important teaching beats should not use only tiny instant timings; main explanation beats should usually spend about 1.2-2.5 seconds of `run_time`, plus about 0.6-1.5 seconds of `self.wait(...)` where needed.
- After the final important conclusion appears, keep a stable hold of roughly 1.5-3 seconds so the viewer can actually read it.
- If the resulting code would likely feel shorter than about 10 seconds, extend the pacing unless the user explicitly requested a short clip.
+ - If the user gives an explicit target duration (for example, 10 seconds), this requirement has highest priority: explicitly budget enough `run_time` and `self.wait(...)` in code so total runtime stays close to target (recommended >= 90% of target).
+ - Assume local LaTeX may be unavailable. By default, do NOT use `Tex`, `MathTex`, `SingleStringMathTex`, or any LaTeX-dependent rendering path.
+ - Prefer non-LaTeX math presentation with `Text`, `DecimalNumber`, tables, labels, and geometric visualization; avoid requiring a local `latex` executable.
+ - Camera movement rule: only use `self.camera.frame` when the scene class inherits `MovingCameraScene`. If the class is plain `Scene`, `self.camera.frame` must not appear.
+ - If camera capability is uncertain, skip camera pan/zoom code and prioritize render stability.
generate_user_template: |
User request:
{user_input}
Output mode: {output_mode}
+ Duration requirement: {duration_requirement}
Analysis:
{analysis_json}
@@ -44,6 +50,11 @@ retry_system: |
If the failure is related to layout, sizing, or broken references, also clean up obvious overlap and readability issues, but do not rewrite the whole animation unless necessary.
While repairing, do not shorten the animation just to make it run. Preserve complete teaching pacing and the necessary pauses whenever possible.
If the original animation is obviously too short, you may also add the necessary waits, extra beats, or ending hold while repairing.
+ If the user gave an explicit duration target, the repaired code should remain close to that target instead of becoming shorter.
+ Also avoid introducing `Tex` / `MathTex` by default unless LaTeX is explicitly required and available.
+ If the error mentions `self.camera.frame`, repair by either:
+ 1) changing the scene base class to `MovingCameraScene`, or
+ 2) removing camera-frame animation while keeping the teaching flow.
retry_user_template: |
User request:
@@ -51,6 +62,7 @@ retry_user_template: |
Output mode: {output_mode}
Repair attempt: {attempt}
+ Duration requirement: {duration_requirement}
Render error:
{error_message}
diff --git a/deeptutor/agents/math_animator/prompts/zh/code_generator_agent.yaml b/deeptutor/agents/math_animator/prompts/zh/code_generator_agent.yaml
index 26b74076c..e5e0b6e19 100644
--- a/deeptutor/agents/math_animator/prompts/zh/code_generator_agent.yaml
+++ b/deeptutor/agents/math_animator/prompts/zh/code_generator_agent.yaml
@@ -18,12 +18,18 @@ generate_system: |
- 关键 beat 的单次 `run_time` 通常不应只有极短瞬时值;正文讲解步骤通常应在约 1.2-2.5 秒,并配合 0.6-1.5 秒 `self.wait(...)`。
- 最后一个关键结论出现后,默认再保留约 1.5-3 秒稳定停留,避免观众还没看清动画就结束。
- 如果最终代码的体感时长可能低于约 10 秒,除非用户明确要求短视频,否则必须继续补充步骤、停顿或收尾。
+ - 如果用户明确给出了目标时长(例如 10 秒),这条约束优先级最高:请在代码中显式安排足够的 `run_time` 与 `self.wait(...)`,让总时长尽量贴近目标(建议不低于目标的 90%)。
+ - 当前运行环境可能没有本地 LaTeX。默认禁止使用 `Tex`、`MathTex`、`SingleStringMathTex` 与任何 LaTeX 依赖渲染链。
+ - 数学表达优先用 `Text`、`DecimalNumber`、`MathTable`(非 LaTeX 方案)或直接几何可视化来表达;不要依赖 `latex` 可执行程序。
+ - 相机移动规则:只有在类继承 `MovingCameraScene` 时,才允许使用 `self.camera.frame`。若类是普通 `Scene`,严禁出现 `self.camera.frame`。
+ - 若不确定相机能力,默认不要写相机缩放/平移代码,优先保证可渲染稳定性。
generate_user_template: |
用户需求:
{user_input}
输出模式:{output_mode}
+ 时长要求:{duration_requirement}
概念分析:
{analysis_json}
@@ -45,6 +51,11 @@ retry_system: |
如果错误与布局、对象尺寸、引用失配有关,也要顺手修正明显的重叠与遮挡问题,但不要无谓重写整段动画。
修复时不要为了“快点能跑”而把动画压缩得更短;尽量保留完整讲解节奏和必要停顿。
若原代码明显过短,也允许在修复时顺手补足必要的等待、展开步骤和结尾停留。
+ 若用户给了明确时长,修复后也必须保持接近该时长,不要因为修错而把视频缩短。
+ 默认也禁止引入 `Tex` / `MathTex`,除非用户明确要求 LaTeX 且环境已具备 LaTeX。
+ 若报错与 `self.camera.frame` 相关,必须二选一修复:
+ 1) 把场景类改为 `MovingCameraScene`;或
+ 2) 删除相机动画语句并保留原教学逻辑。
retry_user_template: |
用户需求:
@@ -52,6 +63,7 @@ retry_user_template: |
输出模式:{output_mode}
当前是第 {attempt} 次修复。
+ 时长要求:{duration_requirement}
渲染错误:
{error_message}
diff --git a/deeptutor/agents/math_animator/renderer.py b/deeptutor/agents/math_animator/renderer.py
index ef549c9a7..32c06dd22 100644
--- a/deeptutor/agents/math_animator/renderer.py
+++ b/deeptutor/agents/math_animator/renderer.py
@@ -194,10 +194,18 @@ class ManimRenderService:
await self.progress_callback(message, raw)
def _find_rendered_file(self, suffix: str) -> Path:
- matches = sorted(self.media_dir.rglob(f"*{suffix}"))
+ # Manim stores many transient chunks under ``partial_movie_files``.
+ # We only want the final exported artifact for the scene.
+ matches = [
+ path
+ for path in self.media_dir.rglob(f"*{suffix}")
+ if "partial_movie_files" not in path.parts
+ ]
+ if not matches:
+ matches = list(self.media_dir.rglob(f"*{suffix}"))
if not matches:
raise ManimRenderError(f"Rendered {suffix} artifact not found.")
- return matches[-1]
+ return max(matches, key=lambda path: path.stat().st_mtime)
@staticmethod
def _extract_scene_name(code: str) -> str:
diff --git a/deeptutor/agents/math_animator/retry_manager.py b/deeptutor/agents/math_animator/retry_manager.py
index 43ac558d1..d08e1537d 100644
--- a/deeptutor/agents/math_animator/retry_manager.py
+++ b/deeptutor/agents/math_animator/retry_manager.py
@@ -9,6 +9,15 @@ from .models import GeneratedCode, RetryAttempt, VisualReviewResult
from .renderer import ManimRenderError, ManimRenderService
+def _is_non_retriable_environment_error(message: str) -> bool:
+ lowered = (message or "").lower()
+ return (
+ "no such file or directory: 'latex'" in lowered
+ or "no such file or directory: \"latex\"" in lowered
+ or "latex could not be found" in lowered
+ )
+
+
class CodeRetryManager:
def __init__(
self,
@@ -113,6 +122,11 @@ class CodeRetryManager:
render_result.retry_history = retry_history
return code, render_result
except ManimRenderError as exc:
+ if _is_non_retriable_environment_error(str(exc)):
+ raise ManimRenderError(
+ "Render failed because local LaTeX is missing. "
+ "Please avoid Tex/MathTex in generated code or install a LaTeX distribution."
+ ) from exc
if attempt >= self.max_retries:
raise
retry_attempt = RetryAttempt(attempt=attempt + 1, error=str(exc))
diff --git a/deeptutor/api/main.py b/deeptutor/api/main.py
index fdc5b9b46..1a0dc36b0 100644
--- a/deeptutor/api/main.py
+++ b/deeptutor/api/main.py
@@ -7,25 +7,6 @@ from fastapi import HTTPException
from fastapi.middleware.cors import CORSMiddleware
from fastapi.staticfiles import StaticFiles
-from deeptutor.api.routers import (
- agent_config,
- chat,
- co_writer,
- dashboard,
- guide,
- knowledge,
- memory,
- notebook,
- plugins_api,
- question,
- sessions,
- settings,
- solve,
- system,
- tutorbot,
- unified_ws,
- vision_solver,
-)
from deeptutor.logging import get_logger
from deeptutor.services.path_service import get_path_service
@@ -201,6 +182,28 @@ app.mount(
name="outputs",
)
+# Import routers only after runtime settings are initialized.
+# Some router modules load YAML settings at import time.
+from deeptutor.api.routers import (
+ agent_config,
+ chat,
+ co_writer,
+ dashboard,
+ guide,
+ knowledge,
+ memory,
+ notebook,
+ plugins_api,
+ question,
+ sessions,
+ settings,
+ solve,
+ system,
+ tutorbot,
+ unified_ws,
+ vision_solver,
+)
+
# Include routers
app.include_router(solve.router, prefix="/api/v1", tags=["solve"])
app.include_router(chat.router, prefix="/api/v1", tags=["chat"])
diff --git a/deeptutor/services/config/model_catalog.py b/deeptutor/services/config/model_catalog.py
index 34d063d79..55680861b 100644
--- a/deeptutor/services/config/model_catalog.py
+++ b/deeptutor/services/config/model_catalog.py
@@ -59,8 +59,9 @@ class ModelCatalogService:
catalog.update({k: v for k, v in loaded.items() if k != "services"})
catalog["services"].update(loaded.get("services", {}))
hydrated = self._hydrate_missing_services_from_env(catalog)
+ synced = self._sync_active_services_from_env(catalog)
self._normalize(catalog)
- if hydrated:
+ if hydrated or synced:
self.save(catalog)
return catalog
@@ -174,6 +175,202 @@ class ModelCatalogService:
return changed
+ def _sync_active_services_from_env(self, catalog: dict[str, Any]) -> bool:
+ """
+ Sync active profile/model from `.env` when keys are present.
+
+ This makes `.env` the default source of truth so users do not need to
+ manually edit or delete `model_catalog.json` after changing env values.
+ """
+ env_values = get_env_store().load()
+ if not env_values:
+ return False
+
+ summary = get_env_store().as_summary()
+ services = catalog.setdefault("services", {})
+ changed = False
+
+ def ensure_llm_profile() -> tuple[dict[str, Any], dict[str, Any]]:
+ service = services.setdefault("llm", _service_shell())
+ profiles = service.setdefault("profiles", [])
+ if not profiles:
+ profile_id = "llm-profile-default"
+ model_id = "llm-model-default"
+ profile = {
+ "id": profile_id,
+ "name": "Default LLM Endpoint",
+ "binding": "openai",
+ "base_url": "",
+ "api_key": "",
+ "api_version": "",
+ "extra_headers": {},
+ "models": [{"id": model_id, "name": "Default Model", "model": ""}],
+ }
+ service["profiles"] = [profile]
+ service["active_profile_id"] = profile_id
+ service["active_model_id"] = model_id
+ profile = self.get_active_profile(catalog, "llm") or service["profiles"][0]
+ model = self.get_active_model(catalog, "llm") or (profile.setdefault("models", [{}])[0])
+ return profile, model
+
+ def ensure_embedding_profile() -> tuple[dict[str, Any], dict[str, Any]]:
+ service = services.setdefault("embedding", _service_shell())
+ profiles = service.setdefault("profiles", [])
+ if not profiles:
+ profile_id = "embedding-profile-default"
+ model_id = "embedding-model-default"
+ profile = {
+ "id": profile_id,
+ "name": "Default Embedding Endpoint",
+ "binding": "openai",
+ "base_url": "",
+ "api_key": "",
+ "api_version": "",
+ "extra_headers": {},
+ "models": [
+ {
+ "id": model_id,
+ "name": "Default Embedding Model",
+ "model": "",
+ "dimension": "3072",
+ }
+ ],
+ }
+ service["profiles"] = [profile]
+ service["active_profile_id"] = profile_id
+ service["active_model_id"] = model_id
+ profile = self.get_active_profile(catalog, "embedding") or service["profiles"][0]
+ model = self.get_active_model(catalog, "embedding") or (profile.setdefault("models", [{}])[0])
+ return profile, model
+
+ def ensure_search_profile() -> dict[str, Any]:
+ service = services.setdefault("search", _search_shell())
+ profiles = service.setdefault("profiles", [])
+ if not profiles:
+ profile_id = "search-profile-default"
+ profile = {
+ "id": profile_id,
+ "name": "Default Search Provider",
+ "provider": "brave",
+ "base_url": "",
+ "api_key": "",
+ "api_version": "",
+ "proxy": "",
+ "models": [],
+ }
+ service["profiles"] = [profile]
+ service["active_profile_id"] = profile_id
+ return self.get_active_profile(catalog, "search") or service["profiles"][0]
+
+ llm_keys = {
+ "LLM_BINDING",
+ "LLM_MODEL",
+ "LLM_API_KEY",
+ "LLM_HOST",
+ "LLM_API_VERSION",
+ }
+ if llm_keys.intersection(env_values.keys()):
+ profile, model = ensure_llm_profile()
+ if "LLM_BINDING" in env_values and profile.get("binding") != summary.llm["binding"]:
+ profile["binding"] = summary.llm["binding"]
+ changed = True
+ if "LLM_API_KEY" in env_values and profile.get("api_key") != summary.llm["api_key"]:
+ profile["api_key"] = summary.llm["api_key"]
+ changed = True
+ if "LLM_HOST" in env_values and profile.get("base_url") != summary.llm["host"]:
+ profile["base_url"] = summary.llm["host"]
+ changed = True
+ if "LLM_API_VERSION" in env_values and profile.get("api_version") != summary.llm["api_version"]:
+ profile["api_version"] = summary.llm["api_version"]
+ changed = True
+ if "LLM_MODEL" in env_values:
+ if model.get("model") != summary.llm["model"]:
+ model["model"] = summary.llm["model"]
+ changed = True
+ if summary.llm["model"] and model.get("name") != summary.llm["model"]:
+ model["name"] = summary.llm["model"]
+ changed = True
+
+ embedding_keys = {
+ "EMBEDDING_BINDING",
+ "EMBEDDING_MODEL",
+ "EMBEDDING_API_KEY",
+ "EMBEDDING_HOST",
+ "EMBEDDING_DIMENSION",
+ "EMBEDDING_API_VERSION",
+ }
+ if embedding_keys.intersection(env_values.keys()):
+ profile, model = ensure_embedding_profile()
+ if (
+ "EMBEDDING_BINDING" in env_values
+ and profile.get("binding") != summary.embedding["binding"]
+ ):
+ profile["binding"] = summary.embedding["binding"]
+ changed = True
+ if (
+ "EMBEDDING_API_KEY" in env_values
+ and profile.get("api_key") != summary.embedding["api_key"]
+ ):
+ profile["api_key"] = summary.embedding["api_key"]
+ changed = True
+ if (
+ "EMBEDDING_HOST" in env_values
+ and profile.get("base_url") != summary.embedding["host"]
+ ):
+ profile["base_url"] = summary.embedding["host"]
+ changed = True
+ if (
+ "EMBEDDING_API_VERSION" in env_values
+ and profile.get("api_version") != summary.embedding["api_version"]
+ ):
+ profile["api_version"] = summary.embedding["api_version"]
+ changed = True
+ if "EMBEDDING_MODEL" in env_values:
+ if model.get("model") != summary.embedding["model"]:
+ model["model"] = summary.embedding["model"]
+ changed = True
+ if summary.embedding["model"] and model.get("name") != summary.embedding["model"]:
+ model["name"] = summary.embedding["model"]
+ changed = True
+ if (
+ "EMBEDDING_DIMENSION" in env_values
+ and model.get("dimension") != summary.embedding["dimension"]
+ ):
+ model["dimension"] = summary.embedding["dimension"]
+ changed = True
+
+ search_keys = {
+ "SEARCH_PROVIDER",
+ "SEARCH_API_KEY",
+ "SEARCH_BASE_URL",
+ "SEARCH_PROXY",
+ }
+ if search_keys.intersection(env_values.keys()):
+ profile = ensure_search_profile()
+ if (
+ "SEARCH_PROVIDER" in env_values
+ and profile.get("provider") != summary.search["provider"]
+ ):
+ profile["provider"] = summary.search["provider"]
+ changed = True
+ if (
+ "SEARCH_API_KEY" in env_values
+ and profile.get("api_key") != summary.search["api_key"]
+ ):
+ profile["api_key"] = summary.search["api_key"]
+ changed = True
+ if (
+ "SEARCH_BASE_URL" in env_values
+ and profile.get("base_url") != summary.search["base_url"]
+ ):
+ profile["base_url"] = summary.search["base_url"]
+ changed = True
+ if "SEARCH_PROXY" in env_values and profile.get("proxy") != summary.search["proxy"]:
+ profile["proxy"] = summary.search["proxy"]
+ changed = True
+
+ return changed
+
def _normalize(self, catalog: dict[str, Any]) -> None:
services = catalog.setdefault("services", {})
services.setdefault("llm", _service_shell())
diff --git a/deeptutor/services/session/turn_runtime.py b/deeptutor/services/session/turn_runtime.py
index 3897c1ece..ce9767f28 100644
--- a/deeptutor/services/session/turn_runtime.py
+++ b/deeptutor/services/session/turn_runtime.py
@@ -593,7 +593,20 @@ class TurnRuntimeManager:
event.metadata = {**event.metadata, "status": "completed"}
event.session_id = execution.session_id
event.turn_id = execution.turn_id
- persisted = await self.store.append_turn_event(execution.turn_id, event.to_dict())
+ payload = event.to_dict()
+ try:
+ persisted = await self.store.append_turn_event(execution.turn_id, payload)
+ except ValueError as exc:
+ # A turn can disappear when the session is deleted while the turn task
+ # is still draining events. Avoid cascading failures in the error path.
+ if "Turn not found:" not in str(exc):
+ raise
+ logger.warning(
+ "Skip persisting event for missing turn %s (%s)",
+ execution.turn_id,
+ event.type.value,
+ )
+ persisted = payload
self._mirror_event_to_workspace(execution, persisted)
async with self._lock:
subscribers = list(self._executions.get(execution.turn_id, execution).subscribers)
diff --git a/pyproject.toml b/pyproject.toml
index 51ee5c14b..e14249b10 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -220,6 +220,10 @@ max-complexity = 10
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
+markers = [
+ "asyncio: mark async tests that require pytest-asyncio",
+]
+asyncio_default_fixture_loop_scope = "function"
addopts = [
"--strict-markers",
"--strict-config",
diff --git a/requirements/dev.txt b/requirements/dev.txt
index 2d2d8cda0..856f0053b 100644
--- a/requirements/dev.txt
+++ b/requirements/dev.txt
@@ -7,6 +7,7 @@
-r server.txt
pytest>=7.0.0
+pytest-asyncio>=0.23.0
pre-commit>=3.0.0
safety<3.0.0
bandit>=1.8.0
diff --git a/requirements/math-animator.txt b/requirements/math-animator.txt
index 6c08a9f14..4d92bde22 100644
--- a/requirements/math-animator.txt
+++ b/requirements/math-animator.txt
@@ -3,5 +3,10 @@
# ============================================
# Install: pip install -r requirements/math-animator.txt
# Addon for `deeptutor animate`. Install alongside cli.txt or server.txt.
+#
+# System prerequisites (installed outside pip):
+# - LaTeX runtime (`latex`) for Tex/MathTex rendering
+# - pkg-config, cairo, cmake (for pycairo/manimpango build paths)
+# - ffmpeg (video encoding)
manim>=0.19.0
diff --git a/scripts/start_tour.py b/scripts/start_tour.py
index d5af721cb..312b8dfcf 100644
--- a/scripts/start_tour.py
+++ b/scripts/start_tour.py
@@ -99,6 +99,7 @@ PROFILE_ALIASES: dict[str, str] = {
}
CACHE_PATH = PROJECT_ROOT / "data" / "user" / "settings" / ".tour_cache.json"
+MATH_ANIMATOR_REQUIREMENTS = "requirements/math-animator.txt"
# ---------------------------------------------------------------------------
# Cache helpers
@@ -163,6 +164,78 @@ def _node_install_cmd() -> list[str] | None:
return mapping.get(_node_strategy())
+def _has_cairo_pkgconfig() -> bool:
+ pkg_config = shutil.which("pkg-config")
+ if not pkg_config:
+ return False
+ check = subprocess.run(
+ [pkg_config, "--exists", "cairo"],
+ cwd=str(PROJECT_ROOT),
+ stdout=subprocess.DEVNULL,
+ stderr=subprocess.DEVNULL,
+ check=False,
+ )
+ return check.returncode == 0
+
+
+def _missing_math_animator_system_deps() -> list[str]:
+ missing: list[str] = []
+ for tool in ("latex", "pkg-config", "cmake", "ffmpeg"):
+ if not shutil.which(tool):
+ missing.append(tool)
+ if not _has_cairo_pkgconfig():
+ missing.append("cairo")
+ return missing
+
+
+def _math_animator_install_cmd(dep: str) -> list[str] | None:
+ system = platform.system().lower()
+ if system == "darwin" and shutil.which("brew"):
+ mapping = {
+ "latex": ["brew", "install", "--cask", "basictex"],
+ "pkg-config": ["brew", "install", "pkgconf"],
+ "cmake": ["brew", "install", "cmake"],
+ "ffmpeg": ["brew", "install", "ffmpeg"],
+ "cairo": ["brew", "install", "cairo"],
+ }
+ return mapping.get(dep)
+ return None
+
+
+def _ensure_math_animator_system_deps() -> None:
+ missing = _missing_math_animator_system_deps()
+ if not missing:
+ return
+
+ pretty_names = {
+ "latex": "LaTeX executable",
+ "pkg-config": "pkg-config",
+ "cmake": "CMake",
+ "ffmpeg": "FFmpeg",
+ "cairo": "Cairo development library",
+ }
+ details = ", ".join(pretty_names.get(item, item) for item in missing)
+ log_warn(f"Math animator system dependencies missing: {details}")
+
+ installable = [dep for dep in missing if _math_animator_install_cmd(dep) is not None]
+ if installable and confirm("Install missing system dependencies automatically?", default=True):
+ for dep in installable:
+ cmd = _math_animator_install_cmd(dep)
+ if cmd:
+ _run_cmd(cmd, PROJECT_ROOT)
+
+ still_missing = _missing_math_animator_system_deps()
+ if still_missing:
+ commands = []
+ for dep in still_missing:
+ cmd = _math_animator_install_cmd(dep)
+ commands.append(" ".join(cmd) if cmd else f"install {dep} manually")
+ log_warn(
+ "Math animator may fail until these are installed: "
+ + " | ".join(commands)
+ )
+
+
# ---------------------------------------------------------------------------
# Provider detection (providers are now bundled in cli.txt)
# ---------------------------------------------------------------------------
@@ -188,7 +261,12 @@ def _needs_providers(catalog: dict[str, Any]) -> bool:
# Dependency installation
# ---------------------------------------------------------------------------
-def _install_commands(profile: str, catalog: dict[str, Any]) -> list[tuple[list[str], Path]]:
+def _install_commands(
+ profile: str,
+ catalog: dict[str, Any],
+ *,
+ include_math_animator: bool = False,
+) -> list[tuple[list[str], Path]]:
profile = PROFILE_ALIASES.get(profile, profile)
if profile not in PROFILE_COMMANDS:
raise ValueError(f"Unknown install profile: {profile}")
@@ -196,6 +274,8 @@ def _install_commands(profile: str, catalog: dict[str, Any]) -> list[tuple[list[
cmds: list[tuple[list[str], Path]] = []
for req in PROFILE_COMMANDS[profile]:
cmds.append(([sys.executable, "-m", "pip", "install", "-r", req], PROJECT_ROOT))
+ if include_math_animator:
+ cmds.append(([sys.executable, "-m", "pip", "install", "-r", MATH_ANIMATOR_REQUIREMENTS], PROJECT_ROOT))
cmds.append(([sys.executable, "-m", "pip", "install", "-e", ".", "--no-deps"], PROJECT_ROOT))
if profile.startswith("web"):
cmds.append((["npm", "install"], PROJECT_ROOT / "web"))
@@ -435,6 +515,7 @@ def _run_web_tour() -> None:
step(3, total, "Install dependencies")
if confirm("Install dependencies now?", default=True):
+ install_math_animator = confirm("Install Math Animator addon (Manim) now?", default=True)
if not (shutil.which("node") and shutil.which("npm")):
cmd = _node_install_cmd()
if cmd:
@@ -442,8 +523,14 @@ def _run_web_tour() -> None:
_run_cmd(cmd, PROJECT_ROOT)
else:
log_warn("No automatic Node.js installer found for this platform.")
-
- for cmd, cwd in _install_commands(profile, catalog):
+ if install_math_animator:
+ _ensure_math_animator_system_deps()
+
+ for cmd, cwd in _install_commands(
+ profile,
+ catalog,
+ include_math_animator=install_math_animator,
+ ):
_run_cmd(cmd, cwd)
log_success("Dependencies installed.")
else:
diff --git a/test/test_llm_minimax.py b/test/test_llm_minimax.py
new file mode 100644
index 000000000..afb3bfd7b
--- /dev/null
+++ b/test/test_llm_minimax.py
@@ -0,0 +1,42 @@
+import os
+
+from openai import OpenAI
+
+
+# 阿里云 DashScope 兼容 OpenAI 接口地址
+BASE_URL = "https://dashscope.aliyuncs.com/compatible-mode/v1"
+MODEL = "MiniMax/MiniMax-M2.5"
+
+# 优先读取环境变量;未设置时使用你提供的 key(建议后续改为纯环境变量)
+API_KEY = os.getenv("DASHSCOPE_API_KEY", "sk-6a8bef38384749e485f2be7909ce0bee")
+
+
+def main() -> int:
+ if not API_KEY:
+ print("未检测到 API Key,请设置 DASHSCOPE_API_KEY")
+ return 1
+
+ client = OpenAI(api_key=API_KEY, base_url=BASE_URL)
+
+ try:
+ response = client.chat.completions.create(
+ model=MODEL,
+ messages=[
+ {"role": "system", "content": "你是一个简洁的助手。"},
+ {"role": "user", "content": "请用一句话介绍你自己。"},
+ ],
+ temperature=0.7,
+ max_tokens=256,
+ )
+ except Exception as exc:
+ print(f"调用失败: {exc}")
+ return 1
+
+ content = response.choices[0].message.content if response.choices else ""
+ print("调用成功,模型回复:")
+ print(content or "<空回复>")
+ return 0
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/tests/core/test_math_animator_capability.py b/tests/core/test_math_animator_capability.py
index 11a6d166c..515f5a875 100644
--- a/tests/core/test_math_animator_capability.py
+++ b/tests/core/test_math_animator_capability.py
@@ -32,6 +32,12 @@ async def _collect_events(run_coro) -> list[StreamEvent]:
async def test_math_animator_capability_emits_summary_and_result(
monkeypatch: pytest.MonkeyPatch,
) -> None:
+ # Unit test should not require real optional dependency installation.
+ monkeypatch.setattr(
+ "deeptutor.capabilities.math_animator.importlib.util.find_spec",
+ lambda name: object() if name == "manim" else None,
+ )
+
class FakePipeline:
def __init__(self, **_kwargs) -> None:
pass
diff --git a/tests/services/test_model_catalog.py b/tests/services/test_model_catalog.py
index d3b19f44e..a872a18db 100644
--- a/tests/services/test_model_catalog.py
+++ b/tests/services/test_model_catalog.py
@@ -51,3 +51,99 @@ def test_load_hydrates_empty_catalog_from_env(tmp_path: Path, monkeypatch):
assert catalog["services"]["embedding"]["profiles"][0]["models"][0]["dimension"] == "3072"
assert catalog["services"]["search"]["profiles"][0]["provider"] == "perplexity"
assert catalog["services"]["search"]["profiles"][0]["proxy"] == ""
+
+
+def test_load_syncs_existing_active_profiles_from_env(tmp_path: Path, monkeypatch):
+ env_path = tmp_path / ".env"
+ env_path.write_text(
+ "\n".join(
+ [
+ "LLM_BINDING=dashscope",
+ "LLM_MODEL=qwen3.5-plus",
+ "LLM_API_KEY=new-llm-key",
+ "LLM_HOST=https://dashscope.aliyuncs.com/compatible-mode/v1",
+ "EMBEDDING_BINDING=dashscope",
+ "EMBEDDING_MODEL=text-embedding-v4",
+ "EMBEDDING_API_KEY=new-emb-key",
+ "EMBEDDING_HOST=https://dashscope.aliyuncs.com/compatible-mode/v1",
+ "EMBEDDING_DIMENSION=2048",
+ ]
+ )
+ + "\n",
+ encoding="utf-8",
+ )
+ catalog_path = tmp_path / "model_catalog.json"
+ catalog_path.write_text(
+ """{
+ "version": 1,
+ "services": {
+ "llm": {
+ "active_profile_id": "llm-profile-default",
+ "active_model_id": "llm-model-default",
+ "profiles": [
+ {
+ "id": "llm-profile-default",
+ "name": "Default LLM Endpoint",
+ "binding": "openai",
+ "base_url": "https://old-llm.example/v1",
+ "api_key": "old-llm-key",
+ "api_version": "",
+ "extra_headers": {},
+ "models": [
+ {"id": "llm-model-default", "name": "old-model", "model": "old-model"}
+ ]
+ }
+ ]
+ },
+ "embedding": {
+ "active_profile_id": "embedding-profile-default",
+ "active_model_id": "embedding-model-default",
+ "profiles": [
+ {
+ "id": "embedding-profile-default",
+ "name": "Default Embedding Endpoint",
+ "binding": "openai",
+ "base_url": "https://old-emb.example/v1",
+ "api_key": "old-emb-key",
+ "api_version": "",
+ "extra_headers": {},
+ "models": [
+ {
+ "id": "embedding-model-default",
+ "name": "old-embedding",
+ "model": "old-embedding",
+ "dimension": "3072"
+ }
+ ]
+ }
+ ]
+ },
+ "search": {"active_profile_id": null, "profiles": []}
+ }
+}
+""",
+ encoding="utf-8",
+ )
+
+ env_store = EnvStore(path=env_path)
+ monkeypatch.setattr("deeptutor.services.config.model_catalog.get_env_store", lambda: env_store)
+
+ service = ModelCatalogService(path=catalog_path)
+ catalog = service.load()
+
+ llm_profile = catalog["services"]["llm"]["profiles"][0]
+ llm_model = llm_profile["models"][0]
+ emb_profile = catalog["services"]["embedding"]["profiles"][0]
+ emb_model = emb_profile["models"][0]
+
+ assert llm_profile["binding"] == "dashscope"
+ assert llm_profile["base_url"] == "https://dashscope.aliyuncs.com/compatible-mode/v1"
+ assert llm_profile["api_key"] == "new-llm-key"
+ assert llm_model["model"] == "qwen3.5-plus"
+ assert llm_model["name"] == "qwen3.5-plus"
+ assert emb_profile["binding"] == "dashscope"
+ assert emb_profile["base_url"] == "https://dashscope.aliyuncs.com/compatible-mode/v1"
+ assert emb_profile["api_key"] == "new-emb-key"
+ assert emb_model["model"] == "text-embedding-v4"
+ assert emb_model["name"] == "text-embedding-v4"
+ assert emb_model["dimension"] == "2048"
diff --git a/web/components/math-animator/MathAnimatorViewer.tsx b/web/components/math-animator/MathAnimatorViewer.tsx
index 990caf9bb..963464537 100644
--- a/web/components/math-animator/MathAnimatorViewer.tsx
+++ b/web/components/math-animator/MathAnimatorViewer.tsx
@@ -1,6 +1,6 @@
"use client";
-import { useCallback, useMemo, useState } from "react";
+import { useEffect, useMemo, useRef, useState } from "react";
import { Code2, Expand, Image as ImageIcon, Timer, Video } from "lucide-react";
import { apiUrl } from "@/lib/api";
import type { MathAnimatorResult } from "@/lib/math-animator-types";
@@ -11,6 +11,7 @@ export default function MathAnimatorViewer({
result: MathAnimatorResult;
}) {
const [fullscreenUrl, setFullscreenUrl] = useState<string | null>(null);
+ const rootRef = useRef<HTMLDivElement>(null);
const images = useMemo(
() => result.artifacts.filter((item) => item.type === "image"),
[result.artifacts],
@@ -20,20 +21,65 @@ export default function MathAnimatorViewer({
[result.artifacts],
);
const resolveAssetUrl = (url: string) => (url.startsWith("http://") || url.startsWith("https://") ? url : apiUrl(url));
- const forwardWheelToChatScroll = useCallback((event: React.WheelEvent<HTMLElement>) => {
- const scrollRoot = event.currentTarget.closest("[data-chat-scroll-root='true']") as HTMLElement | null;
- if (!scrollRoot || Math.abs(event.deltaY) < 1) return;
- event.preventDefault();
- scrollRoot.scrollBy({ top: event.deltaY, behavior: "auto" });
+
+ useEffect(() => {
+ const el = rootRef.current;
+ if (!el) return;
+
+ const handler = (e: WheelEvent) => {
+ if (Math.abs(e.deltaY) < 1) return;
+
+ // Don't intercept if the event target is inside a scrollable child
+ // (e.g. the code <pre> block) that can still scroll in this direction.
+ let node = e.target as HTMLElement | null;
+ while (node && node !== el) {
+ if (node.scrollHeight > node.clientHeight + 2) {
+ const style = window.getComputedStyle(node);
+ if (style.overflowY === "auto" || style.overflowY === "scroll") {
+ const atBottom = node.scrollTop + node.clientHeight >= node.scrollHeight - 2;
+ const atTop = node.scrollTop <= 2;
+ if ((e.deltaY > 0 && !atBottom) || (e.deltaY < 0 && !atTop)) {
+ return;
+ }
+ }
+ }
+ node = node.parentElement;
+ }
+
+ let scrollRoot: HTMLElement | null =
+ el.closest("[data-chat-scroll-root='true']") as HTMLElement | null;
+ if (!scrollRoot) {
+ let parent: HTMLElement | null = el.parentElement;
+ while (parent) {
+ const style = window.getComputedStyle(parent);
+ if (
+ (style.overflowY === "auto" || style.overflowY === "scroll") &&
+ parent.scrollHeight > parent.clientHeight + 2
+ ) {
+ scrollRoot = parent;
+ break;
+ }
+ parent = parent.parentElement;
+ }
+ }
+
+ if (scrollRoot) {
+ e.preventDefault();
+ scrollRoot.scrollBy({ top: e.deltaY, behavior: "auto" });
+ }
+ };
+
+ el.addEventListener("wheel", handler, { passive: false });
+ return () => el.removeEventListener("wheel", handler);
}, []);
return (
- <div className="mb-3 space-y-3 rounded-2xl border border-[var(--border)] bg-[var(--card)]/70 p-3">
+ <div ref={rootRef} className="mb-3 space-y-3 rounded-2xl border border-[var(--border)] bg-[var(--card)]/70 p-3">
{videos.length > 0 ? (
<section className="space-y-2">
<Header icon={Video} title="Video Output" />
{videos.map((item) => (
- <div key={item.url} onWheelCapture={forwardWheelToChatScroll}>
+ <div key={item.url}>
<video
controls
playsInline
diff --git a/web/hooks/useChatAutoScroll.ts b/web/hooks/useChatAutoScroll.ts
index 8d70c1221..e2193e9e5 100644
--- a/web/hooks/useChatAutoScroll.ts
+++ b/web/hooks/useChatAutoScroll.ts
@@ -76,6 +76,39 @@ export function useChatAutoScroll({
return () => window.cancelAnimationFrame(raf);
}, [composerHeight, hasMessages, scrollToBottom]);
+ // After streaming ends, dynamically-loaded components (e.g. MathAnimatorViewer
+ // via next/dynamic) may render and grow the content height. Detect that and
+ // scroll to bottom so the user can see the full result.
+ useEffect(() => {
+ if (isStreaming) return;
+
+ const container = containerRef.current;
+ if (!container) return;
+
+ let prevHeight = container.scrollHeight;
+ let rafId = 0;
+
+ const check = () => {
+ if (rafId) return;
+ rafId = requestAnimationFrame(() => {
+ rafId = 0;
+ const curHeight = container.scrollHeight;
+ if (curHeight > prevHeight && shouldAutoScrollRef.current) {
+ scrollToBottom("instant");
+ }
+ prevHeight = curHeight;
+ });
+ };
+
+ const mo = new MutationObserver(check);
+ mo.observe(container, { childList: true, subtree: true });
+
+ return () => {
+ mo.disconnect();
+ if (rafId) cancelAnimationFrame(rafId);
+ };
+ }, [isStreaming, scrollToBottom]);
+
const handleScroll = useCallback(() => {
const container = containerRef.current;
if (!container) return;
diff --git a/web/package-lock.json b/web/package-lock.json
index c3ccff247..8c124187c 100644
--- a/web/package-lock.json
+++ b/web/package-lock.json
@@ -99,6 +99,7 @@
"integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@babel/code-frame": "^7.27.1",
"@babel/generator": "^7.28.5",
@@ -1356,6 +1357,7 @@
"integrity": "sha512-6TyEnHgd6SArQO8UO2OMTxshln3QMWBtPGrOCgs3wVEmQmwyuNtB10IZMfmYDE0riwNR1cu4q+pPcxMVtaG3TA==",
"devOptional": true,
"license": "Apache-2.0",
+ "peer": true,
"dependencies": {
"playwright": "1.57.0"
},
@@ -1754,6 +1756,7 @@
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.7.tgz",
"integrity": "sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"csstype": "^3.2.2"
}
@@ -1836,6 +1839,7 @@
"integrity": "sha512-iIACsx8pxRnguSYhHiMn2PvhvfpopO9FXHyn1mG5txZIsAaB6F0KwbFnUQN3KCiG3Jcuad/Cao2FAs1Wp7vAyg==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@typescript-eslint/scope-manager": "8.52.0",
"@typescript-eslint/types": "8.52.0",
@@ -2340,6 +2344,7 @@
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"license": "MIT",
+ "peer": true,
"bin": {
"acorn": "bin/acorn"
},
@@ -2777,6 +2782,7 @@
}
],
"license": "MIT",
+ "peer": true,
"dependencies": {
"baseline-browser-mapping": "^2.9.0",
"caniuse-lite": "^1.0.30001759",
@@ -3181,6 +3187,7 @@
"resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.33.1.tgz",
"integrity": "sha512-iJc4TwyANnOGR1OmWhsS9ayRS3s+XQ185FmuHObThD+5AeJCakAAbWv8KimMTt08xCCLNgneQwFp+JRJOr9qGQ==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=0.10"
}
@@ -3581,6 +3588,7 @@
"resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz",
"integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",
"license": "ISC",
+ "peer": true,
"engines": {
"node": ">=12"
}
@@ -4139,6 +4147,7 @@
"integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.8.0",
"@eslint-community/regexpp": "^4.12.1",
@@ -4324,6 +4333,7 @@
"integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@rtsao/scc": "^1.1.0",
"array-includes": "^3.1.9",
@@ -4797,6 +4807,7 @@
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+ "dev": true,
"hasInstallScript": true,
"license": "MIT",
"optional": true,
@@ -5399,6 +5410,7 @@
}
],
"license": "MIT",
+ "peer": true,
"dependencies": {
"@babel/runtime": "^7.28.4"
},
@@ -6018,6 +6030,7 @@
"integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==",
"dev": true,
"license": "MIT",
+ "peer": true,
"bin": {
"jiti": "bin/jiti.js"
}
@@ -7934,6 +7947,7 @@
}
],
"license": "MIT",
+ "peer": true,
"dependencies": {
"nanoid": "^3.3.11",
"picocolors": "^1.1.1",
@@ -8164,6 +8178,7 @@
"resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz",
"integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=0.10.0"
}
@@ -8173,6 +8188,7 @@
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz",
"integrity": "sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"scheduler": "^0.27.0"
},
@@ -9336,6 +9352,7 @@
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
"dev": true,
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=12"
},
@@ -9534,6 +9551,7 @@
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
"devOptional": true,
"license": "Apache-2.0",
+ "peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -10078,6 +10096,7 @@
"integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==",
"dev": true,
"license": "MIT",
+ "peer": true,
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
diff --git a/web/package.json b/web/package.json
index eb698f673..475d793f4 100644
--- a/web/package.json
+++ b/web/package.json
@@ -3,7 +3,7 @@
"version": "0.2.0",
"private": true,
"scripts": {
- "dev": "node --max-old-space-size=4096 ./node_modules/next/dist/bin/next dev --webpack",
+ "dev": "node --max-old-space-size=4096 ./node_modules/next/dist/bin/next dev",
"dev:turbo": "node --max-old-space-size=6144 ./node_modules/next/dist/bin/next dev --turbopack",
"build": "next build",
"start": "next start",