2 Commits

Author SHA1 Message Date
meconopscsh
877606fc2f feat: let learners turn off the chat composer's next-message hint
After each reply the chat composer shows a predicted next line as its
placeholder, and Tab accepts it. When the assistant has just asked a
question, such as a quiz in chat, the likeliest next line is the answer,
so the hint gives it away. There was no way to turn it off.

Add an `ask_hint_enabled` switch to the per-user starter settings
(Settings -> Conversation -> Composer), on by default. When it is off,
`get_ask_hint` returns an empty hint before reading the session or the
cache, so no LLM call is made and no line cached while it was on leaks
through.

A PUT that omits the field keeps the stored value, so an older client or
a settings draft saved before this change cannot turn the hint back on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 12:18:54 +09:00
Bingxi Zhao (Frank)
37723d1db3 feat(home): build the starting points from L3 plus the last k activities
Two inputs, which is what this always should have been.

**L3.** The consolidated read on the learner — and in particular the
familiar/practising/unsure split in ``scope`` — is the single most useful thing
to know when proposing what to look at next, and it was not being read at all.
Now rendered through the memory parser (so footnote markers and their HTML
comments never reach the prompt) and bounded, with each slot's unspent budget
carried to the next: ``preferences`` is two lines, and its leftover is what
lets ``scope`` be shown in full. Section names pass through untranslated
because the consolidator writes them in the deployment's own language
("不确定" / "Unsure") and reading them is exactly the model's job.

**The last k activities, flat.** The per-surface quota and round-robin are
gone. What someone touched most recently is the signal; which surface it
happened on says nothing about whether they are in the middle of it. Noise is
still dropped, but now *before* the cut rather than after — placeholder titles
are the newest rows by definition, so "take k then filter" returns nothing on
an install where someone just opened three blank chats.

k defaults to 20 and is adjustable in Settings → Chat → Starting points. Per
user, not admin-gated: it changes the size of one prompt built from the
caller's own memory, not a resource anyone else shares.

**Language comes from the setting, not the caller.** The endpoint no longer
takes a language parameter; the service reads the learner's model-output
setting (Settings → Appearance), the same one the chat agent answers in. The
UI locale could resolve before settings loaded, and with one cache per user the
two would overwrite each other on every visit. This also retires the
scope+language throttle key — there is one language now, so one key.

On a real install this took the material from 5 traces to 18 plus 6k of
profile, and the proposals from "DeepTutor 这种 AI 助教如何实现启发式引导" to
"LangGraph 状态共享与竞争条件处理".
2026-08-17 09:57:56 +08:00