koboldcpp/tools
Pascal c1304d7b28
ui: add source toggle to mermaid and svg blocks (#24652)
* ui: add source toggle to mermaid and svg blocks

Add a toggle button next to copy and preview that switches a rendered
mermaid or svg block to its source code and back. The button is shared by
both block types and the rendered view stays the default.

The source view reuses the code block scroll container and the highlighted
code element captured at transform time, so it matches the app code blocks
without highlighting again.

Make tall diagrams scroll like text code blocks: safe centering keeps the
diagram centered when it fits and falls back to start alignment when it
overflows, so the top stays reachable instead of clipping above.

Keep the block header opaque and layered above the scrolled diagram, and
ignore header clicks in the zoom handler, so a button click never falls
through to the zoom dialog.

* ui: transparent diagram block header, address review from @allozaur
2026-06-16 14:14:22 +02:00
..
batched-bench cmake : add install() for impl libraries + fix apple builds (#23511) 2026-05-22 11:46:26 +03:00
cli cli : fix not copying preserved tokens (#24258) 2026-06-14 11:52:15 +02:00
completion completion : remove useless statics (#24226) 2026-06-06 12:16:16 +02:00
cvector-generator libs : rename libcommon -> libllama-common (#21936) 2026-04-17 11:11:46 +03:00
export-lora libs : rename libcommon -> libllama-common (#21936) 2026-04-17 11:11:46 +03:00
fit-params cmake : add install() for impl libraries + fix apple builds (#23511) 2026-05-22 11:46:26 +03:00
gguf-split libs : rename libcommon -> libllama-common (#21936) 2026-04-17 11:11:46 +03:00
imatrix Move duplicated imatrix code into single common imatrix-loader.cpp (#22445) 2026-06-04 17:45:40 +02:00
llama-bench bench : add --offline (#24511) 2026-06-16 08:26:05 +02:00
mtmd mtmd: fix miscounting n_tokens (#24656) 2026-06-15 18:07:14 +02:00
parser libs : rename libcommon -> libllama-common (#21936) 2026-04-17 11:11:46 +03:00
perplexity perplexity : fix format specifier in LOG_ERR (#23788) 2026-05-28 10:34:58 +03:00
quantize docs: Update quantization readme (#24133) 2026-06-05 12:21:26 +02:00
results libs : rename libcommon -> libllama-common (#21936) 2026-04-17 11:11:46 +03:00
rpc fix: rpc-server cache may not work in Windows environments (#22394) 2026-04-27 17:25:09 +03:00
server spec: add spec metrics mean acceptance length and acceptance rate per position (#24536) 2026-06-16 10:23:09 +03:00
tokenize libs : rename libcommon -> libllama-common (#21936) 2026-04-17 11:11:46 +03:00
tts logs : reduce (#23021) 2026-05-14 13:05:52 +03:00
ui ui: add source toggle to mermaid and svg blocks (#24652) 2026-06-16 14:14:22 +02:00
CMakeLists.txt cmake: skip cvector-generator and export-lora when CPU backend is disabled (#24053) 2026-06-04 13:13:19 +03:00