157 Commits

Author SHA1 Message Date
欧八同学
a345d44aef fix: remember the selected consult partner per chat (#2775) 2026-11-29 14:52:34 +08:00
Benjamin Schwing
648443b5dd fix(chat): don't open the quiz settings sheet when a quiz session loads (#2950)
* fix(chat): open quiz settings only when the learner picks the mode

The Activity panel auto-open watched the active capability, so loading or
reloading a session that was already in Quiz / Visualize / Research mode
counted as a switch into that mode. On a phone the panel is a full-screen
sheet, so every reopened quiz session started covered by its settings.

Open the config card from handleSelectCapability instead, the only path
for an explicit mode change (composer picker, slash command, launch
intent). Session hydration no longer opens it; restored per-session
settings are untouched.

Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>

* test(chat): record viewer panel props through a spy

Assigning to the hoisted fixture inside the forwardRef stub trips
react-hooks/immutability; capture the props with a mock call instead.

Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>

* fix(quiz): translate question badges and the German mimic label

The quiz card header printed the raw question type (short_answer,
fill_in_blank) and difficulty ids instead of the labels the quiz
settings already use, and the German catalog left "Mimic Paper"
untranslated.

Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>

---------

Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
2026-11-29 14:52:18 +08:00
Qiu
506cea9d4f feat(desktop): finish Windows chat file actions (#3051)
Continues #2978 and closes #2887. Includes the original Windows file actions, integrates the changes with dev, and adds an explicit default-app action.

Co-authored-by: Botong Wu <2048400180@qq.com>
2026-11-28 13:09:15 -03:00
Qiuner
67deec1070 feat(mobile): scaffold React Native chat client 2026-11-24 04:08:27 -03:00
Bingxi Zhao (Frank)
719e2a8e30 fix(chat): inherit ready workspace knowledge bases for untouched sessions 2026-11-15 01:00:49 +08:00
Bingxi Zhao (Frank)
af403550ce Merge PR #2639: fix: explain missing LLM access in chat
Retain admission error text and localized model-access guidance; allow explicit retry to revalidate access instead of permanently blocking stored messages. No automatic retry on reload. Backend tests and both manual retry paths passed.
2026-11-14 23:19:09 +08:00
Bingxi Zhao (Frank)
a3dde93ffa Merge PR #2664: fix: admission rejections carry the server's text into the submission banner 2026-11-14 23:01:20 +08:00
Bingxi Zhao (Frank)
4c67b87018 Merge PR #2529: feat: add SpecStream as a web search provider
Register both independently added search providers and preserve both provider test cases and display labels.
2026-11-14 23:00:45 +08:00
Bingxi Zhao (Frank)
006b369008 Merge PR #2533: feat(search): add DeepSeek standalone SERP provider 2026-11-14 23:00:23 +08:00
Bingxi Zhao (Frank)
e6897249be Merge PR #2541: fix(web): language-aware CJK font stacks for chat prose 2026-11-14 23:00:05 +08:00
dach-a
09f2de1b1f fix: admission rejections carry the server's text into the submission banner
A start_turn_rejected terminal error already carries the server's own
explanation ("No LLM model is assigned to your account. Please contact
an administrator.", #2637; "This learning account cannot use this
mode...", the mastery case in #2638). The client toasted it for ten
seconds and then dispatched STREAM_END without it, so the persistent
composer-adjacent banner — the text users actually read — hardcoded the
transport copy "Couldn't reach the server..." for every rejection.

Carry the server text onto the flagged unsent row
(failedSubmissionMessage) and render it in the banner, falling back to
the connection copy only when the server provided no text. The toast
stays; the unsent row + Resend semantics from #1594 are unchanged.

Not persisted across reload: a reloaded unsent row shows the generic
fallback (its durable record keeps the exact request for retry); a
follow-up can extend the durable record if wanted.
2026-11-13 11:20:50 +00:00
Junlin Li
560a80a17f fix: explain missing LLM access in chat 2026-11-12 16:58:52 +08:00
evan188199-tech
e837f0a1d9 fix(chat): never forward an unsupported reasoning-effort override (#641)
A persisted override the selected model no longer supports (e.g. a saved
xhigh after the catalog restricts the model to low/high) could reach the
provider: the selector re-listed the stale value, and the send path
forwarded the restored llm_selection.reasoning_effort unchecked.

- lib/reasoning-effort.ts: supportedReasoningEffortValues() returns the
  model's supported wire values (catalog list, else provider/model tables
  honouring declared_reasoning) without ever re-adding the stored value;
  effectiveReasoningEffort() resolves an override to null when the model
  does not support it; dropUnvalidatedReasoningEffort() strips it from an
  outgoing llm_selection — including when the option is unresolved, where
  the override is omitted (falls back to the configured default) rather
  than forwarded unvalidated.
- ReasoningEffortSelector: computeReasoningOptions uses the helper; a
  stale value is not offered and Auto renders as selected instead.
- ChatComposer: once the model options are loaded, a detected-unsupported
  persisted override is reset through the selector's onChange persist
  path; nothing is cleared while the option is still unresolved.
- ChatStateAdapter: outgoing llm_selection (live send and failed-turn
  resend) is sanitized via the last-known option catalog, which
  listLLMOptions now records (readLastKnownLLMOptions, synchronous).
- tests: helper/selector/restore-path coverage in
  reasoning-effort.test.ts, reasoning-effort-selector.spec.tsx and the
  new reasoning-effort-restore.spec.ts.
2026-11-09 22:36:10 +08:00
evan188199-tech
3b1730d758 feat(chat): per-conversation reasoning-effort selector in the composer (#641)
Carry the #958 service-layer reasoning_effort override through the whole
turn contract: the core TurnRequest LLMSelection accepts the field
(validated against VALID_REASONING_EFFORTS, old two-ID payloads unchanged),
the generated web contracts are regenerated, and ChatStateAdapter's
asLLMSelection restores a legal override instead of dropping it.

The composer gains a selector beside the model picker, offering only the
levels the selected model supports (live supported_reasoning_efforts or
the provider/model tables) narrowed to the wire vocabulary, hidden when
the model has none. The choice persists on the conversation's
llm_selection, so the next send uses it without a backend restart and
other conversations are unaffected; switching models resets the override.
Precedence stays conversation override -> profile/model default ->
provider default, and the context-budget readout reports the effective
effort beside the model when one was used.
2026-11-09 20:47:08 +08:00
evan188199-tech
a7df05f739 fix(web): tag assistant prose with the turn's recorded language (#2143)
AssistantMessage derived its lang attribute from the session-wide
language prop, so switching the reply language re-tagged every past
reply (zh->ja gave old Chinese replies Japanese fonts). Derive the
per-message language from the turn's request snapshot, recorded when
the turn was sent, and fall back to the session language only for
legacy messages without one. Add a behavior test covering two replies
with different recorded languages and the legacy fallback.
2026-11-09 14:53:24 +08:00
evan188199-tech
0a54ec76af feat(search): add DeepSeek standalone SERP provider (POST /v1/tools/search)
Engine-level search provider backed by DeepSeek's /v1/tools/search endpoint,
distinct from the model-side web_search tool mapping: works with any
configured LLM. Rows carry no model-written answer, so consolidation still
supplies it.

- providers/deepseek.py: Bearer auth, count capped 1-50, need_content
  default False (page Markdown kept in SearchResult.content only when
  requested), summary preferred over snippet as the model-facing blurb,
  authority/rerank_score in attributes, proxy honored, base_url used
  verbatim with the documented endpoint as fallback. No new dependency.
- SEARCH_PROVIDERS: label DeepSeek, requires_api_key=True,
  soft_fallback=False (billed per request; a missing key raises instead
  of landing on DuckDuckGo).
- Init wizard entry with DEEPSEEK_API_KEY/SEARCH_API_KEY env keys, keeping
  the wizard set equal to the backend table.
- TracePresentation PROVIDER_LABELS: deepseek -> DeepSeek (titleCase would
  render "Deepseek").
- Tests: row mapping, 401/402/429 paths, missing key fails before network,
  and the base_url/proxy/max_results contract via _NEW_PROVIDERS.
2026-11-09 11:52:03 +08:00
evan188199-tech
7117594329 fix: register SpecStream in wizard and branding for CI 2026-11-09 11:24:08 +08:00
evan188199-tech
5e46c4f32d fix(web): recover from synchronous socket construction failures (#2405) 2026-11-06 02:27:50 +08:00
evan188199-tech
aad58b82f8 feat: choose the model before a MasteryPath outline starts (#2407) 2026-11-06 02:27:50 +08:00
Bingxi Zhao (Frank)
064b2aa133 Merge #2420 onto the shared speech player 2026-11-06 02:04:52 +08:00
Bingxi Zhao (Frank)
b52aed6f70 Merge #2321 from FSOTM 2026-11-06 01:56:23 +08:00
wangkai
475714cadd feat: add per-conversation chat read-aloud speed 2026-11-04 11:08:44 +08:00
FSOTM
4fb9d78c99 fix(chat): confirm cancelled turn ownership before enabling another send 2026-11-01 22:55:21 +08:00
FSOTM
70031420a6 feat(voice): read selected passages in chat, mastery and reading 2026-11-01 22:52:30 +08:00
Bingxi Zhao (Frank)
bc75a93a5e Merge commit '0cfbaf738093ab1aa2a3f1b5499acc925baa2b0c' into codex/validate-reviewed-integration 2026-10-31 18:52:54 +08:00
Bingxi Zhao (Frank)
6c4218eb89 Merge commit '584472fb427ac84d739d315885da1525832f913c' into codex/validate-reviewed-integration
# Conflicts:
#	web/features/chat/messages/ChatMessageList.tsx
2026-10-31 18:52:47 +08:00
Bingxi Zhao (Frank)
def8bdc8c6 Merge commit '1876207b5c248eb4ee4375e34779ed332a11d284' into codex/validate-reviewed-integration 2026-10-31 18:52:30 +08:00
Bingxi Zhao
883a6d9ec1 Merge pull request #2162 from hongthana/codex/chat-header-refresh-20261029-102519-375714
fix(web): prevent long chat titles from overlapping header actions
2026-10-31 18:16:08 +08:00
Bingxi Zhao (Frank)
88b45d524d Integrate account typography with shared reply languages and current settings validation 2026-10-31 17:59:13 +08:00
Bingxi Zhao (Frank)
d002053ab9 Merge dev and refresh the API routing index 2026-10-31 17:26:35 +08:00
Bingxi Zhao (Frank)
0cfbaf7380 fix(chat): hide generated previews only for embedded images 2026-10-31 16:42:56 +08:00
x-labb
72a5a172a8 feat(web): render right-to-left text correctly with per-block dir=auto 2026-10-30 22:27:33 +01:00
x-labb
799714e0f3 fix(web): don't repeat a generated image as a card when the reply embeds it 2026-10-30 22:21:12 +01:00
x-labb
6aee33b228 fix(mastery): show a presented source page at the call that presented it 2026-10-30 21:52:29 +01:00
yuanyyt
19760d5ded fix: refresh tutor threads after deleting a source message
Return the detached thread ids from deleteMessage and have deleteTurn
notify the session-change bus, so useSessionThreads and the viewer refresh
immediately instead of keeping a stale marker.

ChatWorkspace clears only the tabs still pointing at one of the deleted
message rows; a newer passage selected but not yet sent survives the delete.
2026-10-30 23:15:37 +08:00
yuanyyt
67fc8b3317 fix: keep side-chat anchors in sync with the message entry
Detaching a thread from its message cleared only the server preference, so an open tab still sent the old quoted_message_id and filed the thread back under the message. Clear the tab's anchor once the server confirms, unless a newer selection already moved it. A new side chat is matched through its live thread state too: its first send binds a session before the tab records a followupSessionId.

A selection whose message is still optimistic has no persisted id; it now leaves the thread unattached instead of keeping the previous message.
2026-10-30 14:23:28 +08:00
yuanyyt
14292b808f feat: clear or move a tutor thread's source message
quoted_message_id now follows the create_target rule: the key's presence
is authoritative. A value moves the thread, an explicit null clears it,
and omitting the key leaves the stored anchor untouched. A new selection
moves the thread to the passage just asked about.

The message-level popover gains a detach action that clears the anchor
through the organization PATCH without deleting the conversation, and a
deliberate clear also stops the legacy backfill from re-attaching it.
2026-10-30 13:55:30 +08:00
yuanyyt
43b66ac1ad feat: add a message-level Little Tutor entry
Side chats are filed under the message their quoted passage came from:
the turn carries quoted_message_id, the backend stores it as
tutor_source_message_id, and the chat list shows "Little Tutor x N"
under that message with a popover to open or delete each thread.

Threads are read once per conversation and shared with the viewer, only
side-chat turns refresh the session lists, and a turn that omits the
field leaves the stored anchor untouched.

Refs #2118
2026-10-30 13:55:29 +08:00
hongthana
98cfb501a5 feat(web): add account-scoped learning typography 2026-10-30 07:41:44 +07:00
hongthana
8246b84d79 fix(web): prevent chat titles from overlapping header actions 2026-10-29 18:07:00 +07:00
Bingxi Zhao (Frank)
e495fd6002 Merge origin/dev and reconcile creation contracts and replay tests 2026-10-29 18:13:47 +08:00
Bingxi Zhao (Frank)
01d7c0ed55 feat: add conversational creation drafts and refresh local dev UI 2026-10-29 18:11:52 +08:00
Bingxi Zhao (Frank)
adf99ad8aa Merge pull request #2122: resend with live model and response language 2026-10-29 01:12:05 +08:00
Bingxi Zhao (Frank)
f50ab3afb0 Merge pull request #2050: inspect and clean generated files 2026-10-29 01:10:37 +08:00
Bingxi Zhao (Frank)
6d72cfe1f6 Merge pull request #2120 into validated PR integration 2026-10-29 00:56:10 +08:00
ZQR1101
9fd2e88e14 fix(web): edited questions pick up the live model and reply language
Editing a saved question copies its request snapshot and replaces only the
content, and sendMessage treats any supplied snapshot as an exact replay, so
the model picker and the explicit reply language of the moment lose to the
ones the original turn ran with.

An edit opens a new branch: it keeps the turn's material context (attachments,
tools, knowledge bases, references, capability, parent) but resolves generation
settings from the session, the way a fresh send does. Unsent drafts keep
replaying their exact reserved request, which is what the submission-replacement
protocol requires.

Adds a regression case for the persisted-message edit, and lets the mocked
PATCH /api/sessions/{id}/reply-language echo the language back like the real
endpoint does.
2026-10-28 15:49:49 +00:00
sjagadee
99303f9df7 fix: use the current model and reply language when editing or resending
Editing a persisted message and resending a saved failed turn both replayed
the failed turn's saved request verbatim, so the new turn silently ran on
the previous model and the previous reply language.

- An edit keeps the original request's context (attachments, references,
  parent, capability, tools, config) but takes the model and the reply
  language from the current session state (#2106).
- A Resend of a saved failed turn sends the current model and reply
  language in the regenerate overrides. The backend already prefers those
  over the saved snapshot, and the recovered model is now written back to
  the conversation, so the choice survives a reload (#2105).
- An unconfirmed submission is still retried with its own parameters: the
  server may already hold that submission id, and a changed request would
  no longer match it.
2026-10-28 09:08:22 -05:00
newye
a3fc1fa95a fix: preserve request identity when retrying unsent messages 2026-10-28 21:31:30 +08:00
Bingxi Zhao (Frank)
d02fb9850b pre-releas 2026-10-28 21:21:34 +08:00
Bingxi Zhao (Frank)
e99d632de5 fix: prepare modular installs and align dev documentation 2026-10-28 19:02:44 +08:00