Commit Graph

453 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
ed68087fbf fix(settings): make Save draft real, and stop losing edits on navigation
Save Draft and Apply were the same write. Both persisted to the live files
and both invalidated the runtime caches, so nothing but their labels told
them apart — and Save Draft only ever wrote the model catalog, while half
the settings pages (memory, starting points, network, attachments,
document parsing) keep their state outside it.

The result was silent data loss, reproducible in four steps: open Starting
points, change 20 to 44, press Save Draft, read "Draft saved" — the server
still had 20, and navigating away lost the edit with no warning. The
button was enabled, because `hasUnsavedChanges` counted extension state
that `saveCatalog` never touched.

So a draft is now a place rather than a label. One envelope holding the
catalog and a payload per page, stored beside the live settings and read
by nothing else:

    Save draft  → envelope written, runtime untouched
    Apply       → live files written, envelope cleared
    Discard     → envelope dropped, back to what is live

Two other losses closed along the way. Unsaved page state now lives on the
provider instead of the page, so moving around inside Settings keeps it —
a settings page unmounts on every navigation, which is why the edit
vanished. And an edit that exists nowhere else warns before the tab is
closed or reloaded.

The toolbar had no way to say "there is a draft waiting", so a draft saved
yesterday would have sat there unexplained; it now reports which of the
three states you are in. The storage path moved into that line's tooltip —
self-hosted users occasionally want to know which file backs a page, but
it is a developer fact and was on screen for everyone.
2026-08-29 20:27:33 +08:00
Bingxi Zhao (Frank)
a9f67eb3aa feat(settings): connections layer + per-task model pinning
Model configuration was one layer replicated seven times: every service
stored its own profile with its own credentials, so a single OpenRouter
key had to be pasted into five separate pages. Every comparable product
(Dify, Open WebUI, Cherry Studio, RAGFlow) splits this in two — a
credential entered once, then a per-purpose assignment — so this adds
that split without disturbing what already works.

Connections
  A connection holds one vendor credential (api_key / api_version /
  extra_headers, plus an optional endpoint override). Linking creates one
  ordinary profile per service that can use it, and the credential is
  mirrored down on save rather than resolved on read — so every consumer
  of the catalog keeps reading self-contained profiles and a linked
  profile resolves exactly like a hand-typed one. Rotating the key in one
  place reaches every linked profile; deleting a connection unlinks
  rather than wipes. Anyone wanting a different key per service simply
  never makes a connection.

  Which services a vendor can serve is derived from the six provider
  tables that already exist (new `connection_targets` in GET /settings),
  so the web app keeps no second copy and adding a vendor to a service
  table is enough to make it connectable.

Task models
  Naming a conversation and writing the three home-screen starting points
  are LLM calls nobody asked for — short, frequent, and fine on a small
  fast model. Both can now be pinned to their own configured model from
  Settings > Models > Task models. Unpinned is the default and a true
  no-op: the title still follows the turn's own model and the starters
  the active one, exactly as before. A pin at a deleted profile reverts
  to inheriting rather than stranding the call.
2026-08-29 11:50:10 +08:00
Bingxi Zhao (Frank)
9e54429426 Merge codex/immersive-reading-v2 into dev
# Conflicts:
#	deeptutor/api/routers/mastery_path.py
#	tests/services/session/test_sqlite_store.py
#	web/app/(workspace)/home/[[...sessionId]]/page.tsx
#	web/components/sidebar/SidebarShell.tsx
2026-08-28 15:01:39 +08:00
Bingxi Zhao (Frank)
97a4d0eeef feat(reading): add immersive reading workspace 2026-08-28 14:58:48 +08:00
Bingxi Zhao (Frank)
d57d2983ef feat(mastery): complete v2 learning workflows 2026-08-28 14:58:43 +08:00
Bingxi Zhao (Frank)
bd9f6a7625 release: v1.6.0 — connected learning workspaces
Release notes: assets/releases/ver1-6-0.md

Ship source-faithful reading, Courses and Little Tutor, Ask Questions,
bounded web-source sync, and shared Books with private reader state.
2026-08-27 22:03:09 +08:00
Bingxi Zhao
8e281c6e27 Merge pull request #996 from zhou2030109-glitch/codex/selection-tutor-learning-spaces
feat: add selection tutor and course workspaces
2026-08-26 02:41:02 +08:00
Bingxi Zhao
91e1f32b20 Merge pull request #904 from evan188199-tech/codex/split-web-source-sync
feat: add bounded web source sync
2026-08-26 02:35:55 +08:00
Bingxi Zhao (Frank)
5684e6eab4 fix(knowledge): secure and reconcile web source sync 2026-08-26 02:26:58 +08:00
Bingxi Zhao (Frank)
48c39084cf fix(ci): validate release tags and protect latest 2026-08-26 02:26:58 +08:00
XZH
e12d97b58f fix(knowledge): enforce web source sync bounds 2026-08-26 02:26:58 +08:00
XZH
40e35a79b3 test(ci): cover release tag classification 2026-08-26 02:26:58 +08:00
XZH
0d8b734a76 feat(knowledge): add web source sync 2026-08-26 02:26:58 +08:00
Bingxi Zhao (Frank)
69b472b109 fix(courses): enforce organization and tutor grounding integrity 2026-08-26 02:25:23 +08:00
diffaudit-review
cdbcacace4 fix: ground selection tutor in source message
Short selections such as rc carried only the raw token and an opaque parent session id. Capture the containing message id, resolve it from the parent session, and provide both the source message and exact selection to the tutor prompt.
2026-08-26 02:25:23 +08:00
diffaudit-review
3709c9e854 feat: add selection tutor and course workspaces 2026-08-26 02:25:23 +08:00
Bingxi Zhao (Frank)
693772a542 fix(chat): integrate guarded output with ask questions 2026-08-26 02:10:58 +08:00
Bingxi Zhao (Frank)
11c0a1ed68 fix(chat): preserve ask-user protocol across fallbacks and history 2026-08-26 02:08:46 +08:00
SeleiXi
213508b526 fix(session): place ask_user clarifications before assistant answer
Resolved ask_user exchanges happened before the assistant produced the
row's answer, so they must precede the row's content in both
_build_history() and format_messages_as_transcript(). The previous order
(assistant content first, clarification second) made later turns see the
answer before the user supplied the missing context, confusing the model
and polluting rolling summaries.

Update the test that had locked in the wrong order.
2026-08-26 02:08:33 +08:00
SeleiXi
81e9830452 fix: rehydrate ask_user answers into later-turn context
get_messages_for_context only loaded role/content, so extract_ask_user_clarifications always saw empty events and the model forgot prior card Q&A.
2026-08-26 02:08:33 +08:00
SeleiXi
5c45c38e4a fix: make ask questions card deterministic 2026-08-26 02:08:33 +08:00
SeleiXi
4c9df02a97 feat: add context-aware ask questions mode 2026-08-26 02:07:39 +08:00
Bingxi Zhao (Frank)
ce3532b7f8 fix(mastery): validate guarded finishes before streaming 2026-08-26 01:52:26 +08:00
XZH
b4bbe20e87 fix(mastery): redirect plain-text quizzes to cards 2026-08-26 01:52:26 +08:00
Bingxi Zhao
2620180ea1 Merge pull request #1007 from ZQR1101/fix/mastery-composer-clarifying
fix(mastery): don't freeze choice gates on clarifying composer text
2026-08-26 01:52:16 +08:00
Bingxi Zhao
3016e1575d Merge pull request #772 from KevinXia69/codex/fix-context-compaction-budgets
fix: bound conversation compaction budgets
2026-08-26 01:40:08 +08:00
Bingxi Zhao
e56bc10b3e Merge pull request #977 from aiheluo/fix/kimi-k3-temperature
fix(llm): drop temperature for bare Kimi model ids (k3) on the coding endpoint
2026-08-26 01:39:17 +08:00
Bingxi Zhao (Frank)
8525527836 fix(mastery): require explicit choice answer intent 2026-08-26 01:33:31 +08:00
ZQR1101
85602ca161 fix(mastery): don't freeze choice gates on clarifying composer text
Composer clarifying questions on a choice card were persisted as the formal
answer, after which mastery_grade could never map them to an option and the
gate stalled. Skip unreadable commits and allow a later readable pick to
recover already-stuck interactions.
2026-08-26 01:31:31 +08:00
Kevin Xia
5c6b1d5c8d fix: bound conversation compaction budgets 2026-08-26 01:30:42 +08:00
Bingxi Zhao
437efd5aa2 Merge pull request #1003 from ningkaikok/feat/native-web-search-responses
feat(llm): map web_search to native Responses tools for server-side search
2026-08-26 01:29:52 +08:00
Bingxi Zhao
1db94abc1c Merge pull request #1006 from googio/feat/serply-search
feat(search): add Serply provider with web, news and scholar modes
2026-08-26 01:28:51 +08:00
Bingxi Zhao (Frank)
d80dee48a3 fix(llm): scope bare Kimi model overrides exactly 2026-08-26 01:28:16 +08:00
Bingxi Zhao (Frank)
159edefaac fix(llm): make native web search terminal and model-scoped 2026-08-26 01:22:30 +08:00
宁凯
d9962666a8 feat(llm): map web_search to native Responses tools for server-side search
Providers whose Responses API performs web_search server-side (DeepSeek
V4, #846) declare the tool as {"type": "web_search"} instead of a
function schema, run the search mid-generation, and return web_search_call
output items with url_citation annotations.

- convert_tools(): map the web_search function tool to the native schema
  when the provider spec sets native_web_search
- parsing: synthesize a server_executed-marked web_search ToolCallRequest
  from web_search_call items and url_citation annotations across all three
  consumers (SSE, SDK stream, non-streaming), with tail-merge for
  annotations that stream after the search item completes
- convert_messages(): replay server-executed calls as web_search_call
  items and skip their function_call_output pairing
- assistant_message_with_tool_calls(): keep provider_specific_fields so
  the server_executed marker survives into the conversation history
- tool_dispatch: short-circuit server-executed calls with a stub result
  carrying the citations as sources — the local web_search tool never
  re-runs a search the provider already performed
2026-08-26 01:22:30 +08:00
Bingxi Zhao
22b70c3ab3 Merge pull request #1008 from ZQR1101/fix/tool-schema-fallback-matcher
fix(llm): stop matching bare 'tool' in schema-fallback detector
2026-08-26 01:21:54 +08:00
Bingxi Zhao (Frank)
57a2631804 fix(search): align Serply requests with documented API 2026-08-26 01:06:36 +08:00
serply
6c1a615ed1 feat(search): add Serply provider with web, news and scholar modes 2026-08-26 01:05:03 +08:00
Bingxi Zhao (Frank)
1f6fe858f1 fix(reading): isolate timed-out extension workers 2026-08-26 01:04:12 +08:00
Bingxi Zhao (Frank)
6d596df19d fix(llm): require schema context for 404 fallback 2026-08-26 01:03:51 +08:00
ZQR1101
ee7cbd7b52 fix(llm): stop matching bare 'tool' in schema-fallback detector
The chat loop silently strips tools whenever a provider 400 mentions
the word tool. Narrow the matcher to schema/parameter rejection phrases
so unrelated errors no longer disable tool calling for the turn.
2026-08-26 01:03:12 +08:00
XZH
88777a4421 fix(reading): bound extension action execution 2026-08-26 01:00:05 +08:00
XZH
27700d4a48 feat(reading): add safe extension protocol 2026-08-26 01:00:05 +08:00
Bingxi Zhao
f78ff1abdc Merge pull request #979 from evan188199-tech/codex/epub-bilingual-pairing
feat(reading): add explicit bilingual EPUB pairing
2026-08-26 00:58:08 +08:00
Bingxi Zhao
37e9aeb2af Merge pull request #972 from evan188199-tech/codex/upstream-reading-selectors
feat(reading): persist W3C text selectors
2026-08-26 00:48:51 +08:00
Bingxi Zhao (Frank)
5de30246bd fix(reading): make EPUB pairings durable and explicit 2026-08-26 00:43:15 +08:00
XZH
410711bf7b feat(reading): add explicit bilingual EPUB pairing 2026-08-26 00:40:50 +08:00
Bingxi Zhao (Frank)
ebe8e147f4 fix(reading): keep selector anchors coherent 2026-08-26 00:39:05 +08:00
XZH
2b09789182 fix(reading): validate selector text bounds 2026-08-26 00:36:30 +08:00
XZH
4f94c6f1f9 feat(reading): persist W3C text selectors 2026-08-26 00:35:59 +08:00