Commit Graph

303 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
8ab4ecfee9 feat(books): review and undo scoped chapter and section edits
Fixes #2571
2026-11-15 01:42:47 +08:00
Bingxi Zhao (Frank)
18e491d346 fix(rag): surface IMA content restrictions and seed retrieval failures 2026-11-15 01:04:25 +08:00
Bingxi Zhao (Frank)
b266d1a14d fix(chat): preserve sent history snapshots for prompt cache reuse 2026-11-15 01:00:14 +08:00
Bingxi Zhao (Frank)
2ea5292f9f fix(visualize): inherit the application color scheme in HTML widgets
Local dev repairs for #2600.

Theme changes and explicit widget themes tested. Web typecheck, 1407 Node tests, eslint and i18n passed.
2026-11-15 00:50:31 +08:00
Bingxi Zhao (Frank)
e0872716f0 fix(runtime): announce input waits and reject oversized history plans
Local dev repairs for #2387, #2433, #2496. Regression checks cover reported symptoms and compatibility boundaries.
2026-11-15 00:44:09 +08:00
Bingxi Zhao (Frank)
6c1e3b6e60 Merge PR #2549: fix(llm): map Anthropic context-window, refusal and stop_sequence stop reasons
Move the context-full finish reason into the shared LLM protocol and add English and Chinese notices; test both localized warnings and provider mappings (186 passed).
2026-11-14 23:09:35 +08:00
Bingxi Zhao (Frank)
68106fb79a Merge PR #2670: fix(loop): keep the workspace system note byte-stable across turns (#2621)
Sort the regression-test imports and apply targeted formatting; integrated workspace-note suite passed.
2026-11-14 23:04:53 +08:00
Bingxi Zhao (Frank)
47e4c33c90 Merge PR #2493: fix(runtime): separate indexless streamed tool calls 2026-11-14 23:00:46 +08:00
Bingxi Zhao (Frank)
dc537c9367 Merge PR #2527: fix: keep first-chat tokenizer acquisition local and nonwaiting 2026-11-14 23:00:45 +08:00
Bingxi Zhao (Frank)
16cc590b63 Merge PR #2564: feat(chat): per-conversation reasoning-effort selector in the composer (#641) 2026-11-14 23:00:04 +08:00
Bingxi Zhao (Frank)
a76b429dcb Merge PR #2530: fix(agents): a math animator visual review with no verdict says so (#1202) 2026-11-14 22:58:00 +08:00
Bingxi Zhao (Frank)
abb81a9e3e Merge PR #2517: fix(question): retry tool summarizer without stream_options when provider rejects it 2026-11-14 22:58:00 +08:00
Bingxi Zhao (Frank)
a76c661bd6 Merge PR #2614: fix(tools): keep web_search/web_fetch mounted in exclusive knowledge turns 2026-11-14 22:52:57 +08:00
Bingxi Zhao (Frank)
b2a28aed1c Merge PR #2677: fix(agents): reject JSON drafts inside unfinished reasoning 2026-11-14 22:52:56 +08:00
Pengyi
113b697f19 fix(agents): reject JSON drafts inside unfinished reasoning
Signed-off-by: Pengyi <pengpengyi92@users.noreply.github.com>
2026-11-14 02:54:22 +08:00
mpichini1
6bf7c631e4 fix: preserve PageIndex sources in report citations 2026-11-13 19:49:05 +01:00
wmym
d4a9f88292 fix(loop): keep the workspace system note byte-stable across turns (#2621)
The chat loop replays the workspace note as the "workspace" runtime
snapshot, which lives inside the cached prompt prefix. The note embedded
workspace.logical_output_dir — outputs/chat/<session>/<turn>/ — so its
bytes changed on every turn: the snapshot-replace logic cut the old copy
out of the middle of the rebuilt history and appended a fresh one,
invalidating the provider prompt cache on every multi-turn request
(cached-token hit rate <1%; single-turn tool loops were unaffected).

- workspace_system_note(state_turn_path=False) keeps the replayed chat
  snapshot byte-identical for the whole session and points at the current
  user message for the exact path instead.
- new workspace_turn_note() delivers the per-turn output folder in the
  trailing user message — fresh bytes each turn, so cache-safe by
  construction.
- phase-built prompts (question/research pipelines) keep embedding the
  exact path via the default state_turn_path=True; their behavior is
  unchanged.
- model-history reconstruction keeps an exact prefix once snapshots are
  stable; new multi-turn replay tests assert byte-level prefix extension
  across three consecutive turns, plus the second factor named in the
  issue turns out to be a consequence of the turn-scoped snapshot and
  needs no separate change.

Verified: tests/agents/chat 273 passed; tests/capabilities 739 passed;
tests/services/workspace+session 709 passed (8 failures pre-exist on the
clean tree and are unrelated); remaining tests/agents failures pre-exist.
2026-11-14 00:48:42 +08:00
evan188199-tech
9782043ab3 fix(tools): keep web_search/web_fetch mounted in exclusive knowledge turns
Exclusive knowledge capabilities (obsidian, marginnote4, subagent) dropped
the whole chat built-in surface, including web_search (still shown on in
settings) and the always-on web_fetch. Add a coexisting_tools declaration
to KnowledgeCapability (default empty; the product KBs declare the web
pair), honoured in compose_enabled_tools' exclusive branch under each
tool's usual gate (user toggle / always-on / conditional flag) and the
partner builtin_whitelist, mirroring the #650 KB coexistence. The
capability's system prompt now also names what actually mounted via
coexisting_tools_block, so the model no longer disclaims mounted tools.

Fixes #2612

Signed-off-by: evan188199-tech <238371241+evan188199-tech@users.noreply.github.com>
2026-11-11 11:18:04 +08:00
Alex Castillo
f4566a3769 fix(llm): keep a full input context out of the output-truncation recovery
model_context_window_exceeded mapped to "length", which the agent loop
treats as an output cap and answers with continue_truncated, resending the
same full history. Report it as context_length_exceeded instead, and have
the loop end the round with a notice.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 11:52:13 -04: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
ZQR1101
17d05d6514 fix(agents): a math animator visual review with no verdict says so (#1202) 2026-11-09 10:28:24 +08:00
evan188199-tech
5177b4d48f fix: keep first-chat tokenizer acquisition local and nonwaiting 2026-11-09 00:42:38 +08:00
Alex Castillo
354c01f43e fix(question): retry tool summarizer without stream_options when provider rejects it
The tool-result summarizer always sent stream_options and, on providers
that reject it, only logged a warning and dropped the summary. Retry once
without stream_options, as agent_loop and labeled_step already do.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 14:54:00 -04:00
KaiChan
fefa6c0437 fix(runtime): isolate indexless streamed tool calls 2026-11-06 19:16:02 +08:00
Bingxi Zhao (Frank)
978017c36e Merge #2444 from rudycelekli 2026-11-06 01:56:26 +08:00
Bingxi Zhao (Frank)
b25a092aae Merge #2413 from pcbeingused333 2026-11-06 01:56:26 +08:00
Bingxi Zhao (Frank)
c68cd03bd5 Merge #2388 from Adithya1331 2026-11-06 01:56:25 +08:00
Bingxi Zhao (Frank)
687f698950 Merge #2384 from stefanielizeth73-art 2026-11-06 01:56:25 +08:00
Bingxi Zhao (Frank)
b680f1d208 Merge #2296 from tanishqbaweja 2026-11-06 01:56:22 +08:00
Bingxi Zhao (Frank)
46624fa4a8 Merge #2270 from Plastic-time 2026-11-06 01:56:20 +08:00
Rudy Celekli
c35eb72660 fix(video_lesson): match the Settings Edge voice against the lesson language
_configured_voice compared the voice locale with _lang(language), which
folds every non-Chinese language to "en". A French lesson therefore
rejected a configured fr-FR voice and accepted an en-US one.
2026-11-04 22:09:53 -05:00
Alex Castillo
15a6864a64 fix(research): price dated gpt-4o-mini names with the mini rates
get_model_pricing returned the first dict key found inside the model
name, so gpt-4o-mini-2024-07-18 and openai/gpt-4o-mini matched gpt-4o
and were billed at the full model's rates. Pick the longest matching
key instead.
2026-11-03 16:06:19 -05:00
Adithya
4dd10949b7 fix: add chat context summary prompt resources 2026-11-02 22:06:17 +05:30
stefanielizeth73-art
3f943e14c8 feat(agent-loop): configure bounded reasoning-budget recovery 2026-11-03 00:12:00 +08:00
Tanishq
aa4b6ec252 fix(question): keep a quiz question whose Markdown carries a fenced code sample
_parse_quiz_payload swapped the reply for the body of its first ``` fence
before parsing anything. The quiz FINISH schema asks for a bare JSON object
whose `question` is Markdown and whose coding answer is code, so that fence
is usually a code sample inside a string value. The parser decoded the
sample instead, got {}, and the question was lost: after one repair round
that hit the same parser, the learner got "[Generation failed] <topic>"
with N/A as the answer and the explanation.

Take a reply that is one complete JSON object as it is first, the order
parse_json_response already uses for the same case (#825). Wrapped replies
still go through the fence; when a fence inside a field cuts the wrapper's
body short, the first object in the whole reply is used instead.
2026-11-01 11:38:02 +05:30
RRFZ
ee678ec8c6 fix(video_lesson): read the layout check's browser output as UTF-8
check_layout ran headless Chrome with text=True and no encoding, so the
server decoded --dump-dom with its ANSI code page. The report quotes the
lesson's own text; on a cp936/cp932 server running outside UTF-8 mode
(as under `deeptutor start`) a lesson with non-ASCII text came back as
mojibake, the JSON no longer parsed, and the check returned None, which
callers treat as "no browser available". The layout QA silently never
ran for those lessons.

Decode the browser's output as UTF-8.
2026-10-31 21:05:32 -04:00
RRFZ
bd5c2854a3 fix(question): let mimic mode parse an uploaded exam PDF on Windows
Mimic mode wrote the uploaded paper into a NamedTemporaryFile with
delete=True and handed its name to the parse service while the handle
was still open. The parse service reopens the file by path to hash it
for the parse cache, and on Windows a file held with delete-on-close
cannot be reopened, so every uploaded paper failed with
PermissionError before any engine ran. The error is not a MinerUError,
so it escaped the capability's handler.

Write the paper into a TemporaryDirectory and close it before parsing.
The directory is removed afterwards, as the temporary file was.
2026-10-31 20:49:41 -04:00
Bingxi Zhao (Frank)
9724cb551b Merge commit '3f027d9437f56b6cccbf0cf61265b0c7cd7467cd' into codex/validate-reviewed-integration 2026-10-31 18:53:15 +08:00
Bingxi Zhao (Frank)
ce4c39d6a3 Merge commit '0095956fb4639757e632c1b6187a3065c6dd33a4' into codex/validate-reviewed-integration
# Conflicts:
#	tests/agents/math_animator/test_retry_manager.py
2026-10-31 18:53:14 +08:00
Bingxi Zhao (Frank)
4a3dbff59c Merge commit '732064f43dfab590ab538268a955ca40e5b4a5a1' into codex/validate-reviewed-integration 2026-10-31 18:52:55 +08:00
Bingxi Zhao (Frank)
def8bdc8c6 Merge commit '1876207b5c248eb4ee4375e34779ed332a11d284' into codex/validate-reviewed-integration 2026-10-31 18:52:30 +08:00
Bingxi Zhao
4b695016d4 Merge pull request #2192 from amartinawi/feat/task-model-repairs
feat: run Math Animator repairs and Video Lesson fixes on the task model
2026-10-31 18:34:55 +08:00
Bingxi Zhao
7db39b4b03 Merge pull request #2142 from 1akashkalita/fix/animation-visual-review-option
Expose opt-in visual review for generated animations
2026-10-31 18:31:15 +08:00
Bingxi Zhao
13933a2c2c Merge pull request #2160 from kevin9327/fix/duration-unit-word-boundary
fix: read duration units only at a word boundary in the math animator
2026-10-31 18:28:25 +08:00
Bingxi Zhao (Frank)
0095956fb4 fix(math-animator): keep unavailable geometry checks advisory 2026-10-31 17:22:25 +08:00
Bingxi Zhao (Frank)
3f027d9437 fix(video): discover browsers cross-platform and distinguish unavailable reviews 2026-10-31 16:57:19 +08:00
Bingxi Zhao (Frank)
4d2678954d fix(manim): preserve review failures and reap cancelled geometry probes 2026-10-31 16:56:47 +08:00
Bingxi Zhao (Frank)
732064f43d fix(narration): retain PCM metadata and reap cancelled audio conversions 2026-10-31 16:54:27 +08:00
Amar Tinawi
32372c7916 feat(video_lesson): narrate with the Settings TTS provider
Video Lesson narration only ever used edge-tts, whatever TTS provider the
user configured. When the Settings provider is not Edge, speak each
sentence through synthesize_speech (so every catalog provider works:
OpenAI, a local OpenAI-compatible Kokoro/Piper server, MiniMax, ...),
decode it to PCM with ffmpeg for exact per-sentence caption offsets, join
the sentences with a short pause and encode the mp3 the player expects.
Any failure falls back to Edge for that line, then to silent captions.
Needs ffmpeg on PATH; without it the Settings path is skipped.
2026-10-30 15:29:17 +04:00
Amar Tinawi
645a54c621 fix(video_lesson): narrate with the Edge voice chosen in Settings
Narration always used the hard-coded VOICES default (en-US-AvaNeural /
zh-CN-XiaoxiaoNeural), ignoring Settings > Text-to-Speech. When the TTS
provider is Edge and its voice speaks the lesson's language, use it;
otherwise keep the default.
2026-10-30 15:18:45 +04:00