uncloseai.com/public
russell@unturf.com 889c02fccb
chat: lazy-render reasoning_content into a collapsible thinking block
Qwen3.x / Deepseek-R1 / o1 stream model thinking via
delta.reasoning_content during SSE; the final answer arrives later via
delta.content. Previously chat.js parsed only delta.content, so any
thinking time appeared to the user as a long empty pause followed by a
sudden answer.

Both generator functions (sendMessage, sendMessageWithCustomHistory)
gain an opts.onThinking(text) callback that fires only when the server
actually streams reasoning_content. Backward compatible: existing
callers ignore the option, see no behaviour change.

handleUserInput now passes an onThinking callback that lazy-creates a
<details class="chat-thinking"> block above the answer span on the
first reasoning delta. When the first content delta arrives, the
thinking block auto-collapses into a "thinking (click to expand)"
summary so the answer is the visible focus.

If a response never thinks (thinking off, simple prompt, etc.), no
thinking DOM element is ever created — no visual artefact at all.

Existing enable_thinking:false request bodies kept for now; this change
is rendering-only and activates automatically the moment any caller
flips thinking on.
2026-05-25 14:49:33 -04:00
..
css add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
downloads bump firefox zip to 4.2.1 2026-03-19 18:45:58 -04:00
languages add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
src chat: lazy-render reasoning_content into a collapsible thinking block 2026-05-25 14:49:33 -04:00
tts add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
browser-toys.html rebuild all extension zips with unminified bundle, update size labels 2026-03-19 18:44:30 -04:00
c-examples.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
cli.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
crawler.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
csharp-examples.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
dart-examples.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
demo.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
elixir-examples.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
favicon.ico Reorganize project structure: move public files to public/ directory 2025-10-24 13:23:42 -04:00
go-examples.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
google2dd95a728d9c0d9f.html Add Google site verification 2026-01-26 13:02:46 -05:00
index.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
inference.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
java-examples.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
kotlin-examples.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
nodejs-examples.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
php-examples.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
privacy-policy.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
python-examples.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
reverse-rag.pdf update Reverse RAG PDF with modular architecture description 2026-02-24 23:19:22 -05:00
reverse-retrieval-augmented-generation-whitepaper-rag.pdf add Reverse RAG whitepaper PDF with full keyword slug, link GitLab source repo 2026-03-07 20:06:53 -05:00
reverse-retrieval-augmented-generations-rag.html add Reverse RAG whitepaper PDF with full keyword slug, link GitLab source repo 2026-03-07 20:06:53 -05:00
ruby-examples.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
rust-examples.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
sitemap.xml Add sitemap.xml for Google indexing 2026-01-26 13:04:14 -05:00
swift-examples.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
terms-of-use.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
text-to-speech.html text-to-speech.html: F5-TTS is the live engine, not Qwen3-TTS 2026-05-25 06:57:40 -04:00
uncloseai-js-styleguide.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
uncloseai-js.html add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00
uncloseai.js add canonical permacomputer preamble to all source files 2026-02-25 17:39:59 -05:00