537 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
727d49cf8b release: v1.1.0 — LaTeX parsing overhaul, LLM probe config, extra_headers fix, notebook UUID fix
- Rewrite LaTeX block math normalization with heuristic-based $→$$ promotion
- Move LLM diagnostic probe max_tokens from env var to agents.yaml
- Fix extra_headers merge in LLM factory complete/stream (prevents TypeError)
- Fix SaveToNotebookModal to use notebook UUIDs instead of category IDs (#301)
- Add Docker + local LLM (host.docker.internal) guidance in env/compose files
- Add tests: LaTeX, notebook router, summarize agent, LLM probe, extra_headers
- Add v1.1.0 release notes and update README

Made-with: Cursor
v1.1.0
2026-04-15 02:15:19 +08:00
Bingxi Zhao
df793a52f9 Merge pull request #321 from DarkGenius/feat/llm-test-max-tokens
feat(diagnostics): make LLM probe max_tokens configurable via env
2026-04-15 01:54:34 +08:00
Bingxi Zhao
aca30ca82f Merge pull request #323 from sagnikonly/fix/latex-rendering
merge: latex rendering improvements from #323
2026-04-15 01:40:49 +08:00
sagnikonly
a2808cf7be fix(web): improve robust parsing for LaTeX block math 2026-04-14 20:52:20 +05:30
Roman Barlos
245d6ca160 feat(diagnostics): make LLM probe max_tokens configurable via env
The Settings → LLM diagnostic hardcoded max_tokens=200. Reasoning-capable
models (minimax-m2, o1, Gemini thinking) spend most of that budget on
internal thinking tokens and return empty visible content, which the
probe then reports as "LLM returned an empty response" even though the
API call succeeded.

Read the budget from LLM_TEST_MAX_TOKENS with a 1024 default (falls back
on non-numeric values). Documented in .env.example and plumbed through
docker-compose.yml.
2026-04-14 18:19:45 +03:00
Bingxi Zhao (Frank)
c754d57ae7 Merge branch 'dev' into main for v1.1.0-beta v1.1.0-beta 2026-04-14 22:12:19 +08:00
Bingxi Zhao (Frank)
9544075d60 v1.1.0-beta
URL-based chat routing, Snow theme, WebSocket heartbeat & auto-reconnect,
ChatComposer perf optimization, embedding provider registry overhaul,
Serper search provider, streaming idle timeout, and expanded test suite.

Made-with: Cursor
2026-04-14 22:11:48 +08:00
Bingxi Zhao
18a659e13b Merge pull request #320 from Jah-yee/fix-typo-chinese
Fix typo: Chinses -> Chinese
2026-04-14 22:02:45 +08:00
RoomWithOutRoof
64b2db2a99 Fix typo: Chinses -> Chinese 2026-04-14 20:56:23 +08:00
Bingxi Zhao
14b285d32f perf(web): fix severe input lag in long conversations (#317)
perf(web): fix severe input lag in long conversations (#317)
2026-04-14 20:29:53 +08:00
Bingxi Zhao
83e8b4a796 Merge pull request #309 from pietrondo/fix/windows-npm-cmd
fix: handle npm.cmd correctly on Windows
2026-04-14 20:20:08 +08:00
Bingxi Zhao
5342af3bfd Merge pull request #310 from markjanzer/fix/resolve-python-venv-symlink
fix: prefer unresolved sys.executable to stay inside venv
2026-04-14 20:18:26 +08:00
Bingxi Zhao
dd110e5583 Merge pull request #307 from OldSuns/fix/test-runner-extra-headers
fix: pass extra_headers to llm_complete in config test runner
2026-04-14 20:15:25 +08:00
Bingxi Zhao
98d4f8ebc0 Merge pull request #315 from srinivasrk/fix/oauth-cli-kit-version
fix: oauth-cli-kit>=0.2.0 does not exist, lower to >=0.1.1
2026-04-14 20:12:17 +08:00
jiakeboge
5f0553e3e9 perf(web): fix severe input lag in long conversations (#317)
- Memoize ChatMessageList, UserMessage, and ReferenceChips components.
- Stabilize onRetryMessage callback using useCallback in HomePage.
- Prevent unnecessary re-renders of the entire message history during text input.
2026-04-14 20:10:08 +08:00
Srini
25a3bb3f76 fix: lower oauth-cli-kit version constraint to match available releases
pyproject.toml required oauth-cli-kit>=0.2.0 but the latest available
version on PyPI is 0.1.3, causing dependency resolution to fail with UV
and pip when installing .[all] or .[oauth]. Lowered to >=0.1.1 to match
what requirements/cli.txt already specifies.
2026-04-13 21:57:37 -07:00
Mark Janzer
9010491bfd fix: prefer unresolved sys.executable to stay inside venv
On macOS with Homebrew Python, `Path(sys.executable).resolve()` follows
the venv symlink back to the system interpreter.  PEP 668 then blocks
pip installs with "externally-managed-environment", causing the setup
tour to fail.

Swap the check order so the unresolved venv path is preferred when it
exists, falling back to the resolved path only when necessary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 11:36:05 -07:00
Pietro
d0c7406cb1 fix: use npm.cmd on Windows for proper npm command execution 2026-04-13 17:22:50 +02:00
Pietro
280d14bc0c fix: handle npm.cmd correctly on Windows
- Add _get_npm_command() helper to resolve npm path on Windows
- Use shell=True in _run_cmd() on Windows to support .cmd files
- Fix FileNotFoundError when running npm install on Windows

This fixes the issue where shutil.which('npm') fails to find npm.cmd
on Windows, causing the setup tour to fail during dependency installation.
2026-04-13 17:02:28 +02:00
OldSuns
0868747314 fix: pass extra_headers to llm_complete in config test runner
The _test_llm method in ConfigTestRunner was not forwarding extra_headers to
llm_complete(), causing custom User-Agent and other headers to be ignored
during model connection tests.

This ensures that user-configured extra_headers in model settings are properly
propagated to the LLM API call during connection testing.
2026-04-13 14:15:51 +00:00
Bingxi Zhao
0b180274e4 docs: update roadmap 2026-04-13 03:33:51 +08:00
Bingxi Zhao
337d7a4e97 docs: update readme
Add star history badge to README for DeepTutor.
2026-04-13 03:29:53 +08:00
Bingxi Zhao
b815e4c117 docs: update readme
Removed news section detailing past updates and milestones.
v1.0.3
2026-04-13 03:20:40 +08:00
Bingxi Zhao (Frank)
cf3bd89133 Merge branch 'main' of github.com:HKUDS/DeepTutor
Made-with: Cursor

# Conflicts:
#	README.md
2026-04-13 03:19:27 +08:00
Bingxi Zhao (Frank)
3ef46b9179 Merge branch 'dev' into main for v1.0.3 2026-04-13 03:18:41 +08:00
Bingxi Zhao (Frank)
8659d996f5 v1.0.3
Question Notebook with bookmarks & categories, Mermaid diagram support
in Visualize, embedding mismatch detection refinement, system message
merging for Qwen/vLLM, LM Studio & llama.cpp providers, Glass theme,
reporting agent retry resilience, and docs migration.

Made-with: Cursor
2026-04-13 03:18:26 +08:00
Bingxi Zhao
a3a209534e Merge pull request #292 from cskwork/feat/wrong-answer-note
feat: add wrong-answer note for cross-session quiz review
2026-04-12 21:54:19 +08:00
Bingxi Zhao
68f85f3708 Merge pull request #299 from SuperMarioYL/feat/embedding-model-mismatch-detection
feat: detect embedding model mismatch in knowledge bases
2026-04-12 21:36:46 +08:00
supermario_leo
8255f8bba2 feat: detect embedding model mismatch in knowledge bases
Record the embedding model and dimension used to index each knowledge base
in kb_config.json. On subsequent loads, compare the stored fingerprint
against the currently configured embedding model and flag mismatched KBs
with needs_reindex=True and embedding_mismatch=True.

When a mismatched KB is searched, a warning is included in the search
result so callers know search quality may be degraded and re-indexing
is recommended.

This prevents silent search quality degradation when users switch
embedding models (e.g., from text-embedding-3-large to nomic-embed-text)
without re-indexing their existing knowledge bases.
2026-04-12 18:26:12 +08:00
chaohuang-ai
d1a03ec3c7 Update README.md 2026-04-12 18:21:24 +08:00
Bingxi Zhao
43a4c8bed5 Merge pull request #295 from OlegSob-glitch/fix/history-reference-empty-context
fix: merge system messages and add history reference fallback
2026-04-12 15:34:57 +08:00
chaohuang-ai
128579acdb Update README.md 2026-04-12 10:07:01 +08:00
OlegSob-glitch
6e9ef28db2 fix: merge system messages and add history reference fallback
This PR fixes two related issues:

1. Qwen vLLM 'System message must be at the beginning' error:
   - deeptutor/agents/chat/agentic_pipeline.py: Merge system_prompt and memory_context into single system message, filter out system messages from conversation_history
   - deeptutor/services/session/context_builder.py: Filter out system messages from DB since summary is already added as system
   - deeptutor/agents/chat/chat_agent.py: Merge system prompt and RAG context into single system message

2. History reference (@reference) empty context issue:
   - deeptutor/services/session/turn_runtime.py: Add fallback to raw record content when NotebookAnalysisAgent.analyze() returns empty string

Benefits:
- Fixes Qwen vLLM compatibility issue completely
- Enables history reference feature to work correctly
- Reduces token usage by eliminating duplicate system messages
- Does not break any functionality - system context from DB is already in compressed_summary
- Cleaner message structure with exactly one system message at position 0

Testing:
- Verified with Qwen model via vLLM - no more template errors
- Chat with memory files (PROFILE.md/SUMMARY.md) works correctly
- Chat with conversation history works correctly
- History reference (@reference) now works correctly
- Conversation continuation works without errors
- No regression with other models (GPT-4, etc.)

Closes #294
2026-04-12 02:26:44 +03:00
cskwork
95b0609605 feat: add wrong-answer note for cross-session quiz review
Persist structured quiz mistakes on submission and expose them in a
new review page accessible from the utility sidebar.

Backend:
- New wrong_answers SQLite table (cascade on session delete) with
  add/list/count/update/delete store methods
- Hook POST /api/v1/sessions/{id}/quiz-results to also insert one row
  per incorrect answer, preserving the existing [Quiz Performance]
  text message consumed by the LLM context builder
- New GET /api/v1/wrong-answers (resolved filter + pagination),
  PATCH /{id} (resolved toggle), DELETE /{id}

Frontend:
- New /wrong-answers page under the (utility) route group with
  unresolved/all filter, mark-as-resolved, delete, and session link
- Sidebar nav entry using the NotebookPen icon
- English and Chinese i18n strings for all new UI text

Tests:
- 8 store tests covering filter, cascade, resolved toggle, delete
- 6 router tests including a regression test that record_quiz_results
  still writes the [Quiz Performance] text message
2026-04-12 00:40:06 +09:00
Bingxi Zhao (Frank)
285bee5bb7 Merge branch 'dev' v1.0.2 2026-04-11 16:19:33 +08:00
Bingxi Zhao (Frank)
2734f481d1 fix: resolve Docker build type error in setTimeout return type
Use `setTimeout` instead of `window.setTimeout` to match the
`ReturnType<typeof setTimeout>` generic in retryTimersRef, fixing
the "number is not assignable to Timeout" compilation error.

Made-with: Cursor
2026-04-11 16:19:14 +08:00
Bingxi Zhao
24df900a0a v1.0.2
v1.0.2
2026-04-11 13:07:58 +08:00
Bingxi Zhao (Frank)
9676d88472 docs: add v1.0.2 release notes and update README
Made-with: Cursor
2026-04-11 13:07:27 +08:00
Bingxi Zhao (Frank)
4799aaeef0 fix: improve provider switch 2026-04-11 13:00:54 +08:00
Bingxi Zhao (Frank)
4010a33aa3 fix: simplify search consolidation and use explicit runtime config in test runner
- Remove CONSOLIDATION_TYPES and explicit consolidation parameter;
  auto-consolidate for providers without native answer support.
- Build LLM/Embedding/Search configs directly from resolved runtime
  config in ConfigTestRunner instead of relying on global cache.
- Clean up default settings by removing unused consolidation fields.

Made-with: Cursor
2026-04-11 12:54:38 +08:00
Bingxi Zhao
d94119bf18 Merge pull request #286 from OlegSob-glitch/fix/searxng-template-fallback
fix: add auto-fallback for search providers without templates
2026-04-11 12:36:39 +08:00
Bingxi Zhao (Frank)
5384224932 fix: leakage repair 2026-04-11 12:23:32 +08:00
OlegSob-glitch
9f99dc2992 fix: add auto-fallback for search providers without templates
- Modified _get_template_for_provider() to return None instead of raising ValueError
- Added _format_simple_results() as provider-agnostic fallback formatter
- Modified _consolidate_with_template() to use fallback when no template exists
- Fixes searxng (and other providers) failing with 'no template consolidation available' error
2026-04-11 04:04:09 +03:00
Bingxi Zhao (Frank)
445e7622e9 fix: docker, chat with refs v1.0.1 2026-04-10 22:54:58 +08:00
Bingxi Zhao (Frank)
5a016ad29c release: add v1.0.1 release notes and update README
Add release notes for v1.0.1 covering Visualize capability, quiz
duplicate prevention, o4-mini model support, and server logging
improvements. Update README releases section accordingly.

Made-with: Cursor
2026-04-10 20:57:36 +08:00
Bingxi Zhao (Frank)
525cdf563e Merge branch 'dev'
Made-with: Cursor

# Conflicts:
#	deeptutor/agents/question/agents/generator.py
#	deeptutor/agents/question/coordinator.py
#	deeptutor/agents/question/prompts/en/generator.yaml
#	deeptutor/agents/question/prompts/zh/generator.yaml
2026-04-10 20:50:37 +08:00
Bingxi Zhao (Frank)
a0ce450d80 refactor: separate previous_questions from history_context in quiz generation
Fixes semantic overloading introduced by PR #281 — history_context (conversation
history) is no longer mixed with the generated-questions dedup list.

- Add dedicated `previous_questions` parameter through Generator pipeline
- Extract `_strip_template_knowledge_context()` reused by both generate and repair paths
- Add `_format_previous_questions()` with MAX_PREVIOUS_QUESTIONS=20 cap
- Move language labels into YAML templates (en/zh) to avoid language mixing
- Simplify coordinator to pass raw list instead of string concatenation

Made-with: Cursor
2026-04-10 20:48:47 +08:00
Bingxi Zhao (Frank)
c8ccec4b4f Revert "Merge pull request #281 from Leadernelson/main"
This reverts commit 36c24d73c6, reversing
changes made to fc7b0fed59.
2026-04-10 20:47:14 +08:00
Bingxi Zhao (Frank)
43ea51b08a Merge remote-tracking branch 'origin/main' into dev 2026-04-10 20:43:58 +08:00
Bingxi Zhao
36c24d73c6 Merge pull request #281 from Leadernelson/main
Prevent duplicate quiz questions by removing duplicates and adding history
2026-04-10 20:43:45 +08:00