20 Commits

Author SHA1 Message Date
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
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
Bingxi Zhao (Frank)
e347c0c2e0 fix: preserve tutoring replies and stabilize preview runtime
Keep learner-facing explanations visible across finish checks, persistence, and replay. Remove mastery prose heuristics and prioritize learner objections.

Coordinate service shutdown and descendant cleanup, and preserve video lesson identity and playable results across chat completion and reload.
2026-10-27 17:58:46 +08:00
Bingxi Zhao (Frank)
28c11e2ae8 feat: update notes, chat interactions and workspace UI on preview
Remove course pages, APIs and the course_study capability. Add anchored note
threads and reviewed learning-block generation, queued and withdrawable chat
messages, quote attachments, side chats, and the calendar/favorites/navigation
updates.

Keep preview's existing backend architecture. Wire the new features through
its Python application and existing chat engine, retain legacy selected-text
requests, persist mid-turn messages in replay, and restore note context when
regenerating. Leave stored user data intact.

Validate frontend contracts, dependency boundaries, types, 1290 node tests,
840 rendered tests, lint, localization and the production build. Exercise
session/notes/API regressions, 53 chat-engine tests and 20 Python/native
integration tests with isolated runtime data.
2026-10-26 22:13:34 +08:00
Bingxi Zhao (Frank)
399297e7f0 feat: preserve TypeScript engine migration and workspace updates 2026-10-18 23:09:10 +08:00
Bingxi Zhao (Frank)
da856ad670 release: v1.6.9
Ship folder-based workspaces and data migration, daily practice, redesigned
provider and model settings, and streaming conversation improvements.
Synchronize README translations and document the archive/permanent-delete
upgrade behavior in assets/releases/ver1-6-9.md.

Reduce initial JavaScript by deduplicating English resources and loading
animation features after hydration. Keep the existing route size budgets.
Update regression fixtures and browser audits for scoped URLs and the new
settings and learning interfaces.
2026-09-21 02:30:40 +08:00
Bingxi Zhao (Frank)
c547a5a31c fix: resolve verified learning, ingestion and delivery regressions
Bind mastery drafts before their opening turn and preserve stored session modes.
Track chat duration from submission through terminal completion. Run async reading
extensions on their event loop and allow retries after cancellable timeouts.
Allow first uploads into empty LlamaIndex knowledge bases, preserve Telegram
thread routing, parse embedding Retry-After dates, and enforce robots rules and
host pacing during documentation crawls, including redirects.

Fixes #1461
Fixes #1458
Fixes #1451
Fixes #1448
Fixes #1392
Fixes #1429
Refs #1435, #1412

Reuses contributions from PRs #1462, #1452 and #1403.

Co-authored-by: sjagadee <srini.jagadeesh@gmail.com>
Co-authored-by: AoHanBei <dongaohan21@gmail.com>
Co-authored-by: Gao-Chenkai <DevChenkai@outlook.com>
2026-09-15 20:06:57 +08:00
Bingxi Zhao (Frank)
42d793839b Merge branch 'dev' into worktree-chat-engine-interleaved 2026-09-15 13:25:06 +08:00
Gao Chenkai
3192757d45 fix: handle DeepSeek reasoning budget exhaustion (#1331)
* fix: handle DeepSeek reasoning budget exhaustion

* style: satisfy ruff format, the one thing CI was red on

`ruff format --check` on agent_loop.py, the Responses parser and the test
file that came with them. No behaviour change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 01:43:40 +08:00
Bingxi Zhao (Frank)
34d7be0827 fix(chat): keep a just-finished turn's reasoning where the reader left it
Opening the trace on a turn that had only just finished showed its tool rows
with every line of reasoning missing, hitched, and then repainted with them
all present. The duration also read a second longer open than closed.

One cause. A turn settles by trading its events for a compact preview, and
the preview drops ``thinking`` — so the rows the reader had been watching a
second earlier were no longer in memory and had to come back from the server.
The fetch then replaced the message's trace metadata with the page's own,
which carries no span, leaving the duration to be re-derived from whatever
events had arrived: past a rounding boundary, 11s became 12s.

So the compaction is deferred by one turn. The newest turn keeps its events —
the one the reader is most likely to open, for the cost of one turn's events —
and the turn before it is compacted in its place, which is what bounds the
memory. Opening it now costs nothing: no fetch, no repaint, no missing rows.

The span is carried across the fetch as well, so a turn reloaded from the
server keeps one duration too, rather than changing it on the way open.
2026-09-11 22:37:49 +08:00
Bingxi Zhao (Frank)
3f706e9844 refactor(chat): one disclosure vocabulary for the folded working-out
The two-layer turn gave the activity header a second job — it is now the
control that puts a whole turn's working-out away — but the header had been
written for a line that is read, not clicked, and deliberately showed no
affordance at all. Once a settled turn folds everything behind it, that
leaves nothing saying the reasoning still exists: it reads as discarded.

So the header ends in a caret whenever it is expandable, at the weight of
the metadata beside it, and the run-level fold below a card echoes the same
shape (label first, caret after) instead of leading with its own chevron.

Both folds now share one primitive rather than repeating the grid-rows
trick, and move on the sidebar disclosure's curve, so a header and the
content hanging from it settle on the same beat.
2026-09-11 17:56:08 +08:00
Bingxi Zhao (Frank)
a37cb93947 feat(chat): fold a turn's working-out away once it reaches the answer
Interleaving the commentary with the steps it introduced made a turn readable
while it ran, and left the finished message carrying its whole working-out
above the answer. Watching the work happen and re-reading it afterwards are
different needs, and only the first is served by keeping it in the flow.

So the two become layers. The working-out streams open, exactly as before,
then folds itself into the activity header the moment a round completes as the
turn's terminal one. The header already times the turn and already is a
disclosure, so it now says what it folded — "2 tool calls · 2 notes" — and one
click brings it all back. Cards are not folded: a question the reader was
asked is part of the exchange, not working-out, so it keeps its place and
breaks the process into runs around itself.

The rhythm inside that layer is fixed too. Markdown carries a bottom margin
and the trace rows carried only a top one, so a row sat 24px under the
sentence that introduced it and flush against the one that followed — reading
as a heading for the next paragraph rather than the step between them. One gap
now governs the column, which hangs from a guide line so it reads as one unit.

A call the reader already sees as a card no longer draws a row of its own: the
card is that call's presentation, and the row landed below the very question
it had asked.
2026-09-11 17:19:02 +08:00
Bingxi Zhao (Frank)
541b7f4f16 feat(chat): let a turn read as a running account instead of an answer with hidden working
Every round already streamed its text to the reader. The loop then took it
back: a round that called tools was marked narration, and the client moved
that prose out of the answer and into a collapsed block pinned to the top of
the message. The reader watched a sentence appear and vanish, and what was
left was an answer with no account of how it was reached.

That behaviour came from one field doing two jobs. ``call_role`` said both
where the turn was and whether the text counted, so "more work follows" and
"hide this" could not be told apart — and three separate exceptions had grown
to say "actually, show this one" for DSML, truncation and mastery.

Split the two facts. ``call_role`` keeps the phase. A new ``answer_visible``
carries visibility, true for every ordinary round, false only where a
capability's finish guard retracts a round it rejected. The three exceptions
disappear with the default they were fighting.

The client then lays the message out in the order it was written: the sentence
that introduced a step, the step's own row beneath it, what the next round
said below that. A settled turn is restored from an event preview that carries
no text, so tool calls now record how much of the answer had been written when
they ran, and the stored body is laid back out around them.

The prompt asks for the commentary this depends on, and says the closing
answer should not replay it.
2026-09-11 16:49:40 +08:00
Bingxi Zhao (Frank)
04040a2c06 release: v1.6.5
Ship a content workspace you choose, one exec tool for every language,
Mastery Path modes that gate its tools, and Settings that grades
readiness instead of listing faults.

Release notes: assets/releases/ver1-6-5.md
2026-09-06 13:46:29 +08:00
evan188199-tech
f9721b61c4 perf(session): lazily load turn event traces (#1191)
* perf(session): lazily load turn event traces

* fix(session): bound trace previews at the storage layer

---------

Co-authored-by: XZH <cto@xzh.ai>
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
2026-09-03 15:46:04 +08:00
Bingxi Zhao (Frank)
93df3d48b7 release: v1.6.4
Ship lighter isolated runtimes, richer Books and Mastery flows,
Reading/session polish, and explicit model API capabilities.

Release notes: assets/releases/ver1-6-4.md
2026-09-03 01:38:54 +08:00
Bingxi Zhao (Frank)
6e6e56aedb release: v1.6.3
Ship the breaking front- and back-end runtime and route refactor,
learner and guardian flows, grounded reading, knowledge and parser
updates, and recoverable long-running streams.

Release notes: assets/releases/ver1-6-3.md
2026-09-02 04:09:11 +08:00
Bingxi Zhao (Frank)
bfdf874a10 refactor(web): remove v1 chat transport and legacy surfaces 2026-09-01 20:16:46 +08:00
Bingxi Zhao (Frank)
f63e29c7c5 refactor(web): split chat message and trace presentation 2026-09-01 18:23:31 +08:00