]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
server: (UI) add syntax highlighting and latex math rendering (#10808)
authorVinesh Janarthanan <redacted>
Sun, 15 Dec 2024 11:55:54 +0000 (05:55 -0600)
committerGitHub <redacted>
Sun, 15 Dec 2024 11:55:54 +0000 (12:55 +0100)
commit5478bbcd173e7027af7689493c7421719f5c43df
treef7732fad2e88df4fe6a9326461032ca65a6c669a
parentb5ae1ddff93403300fc79c7ab5ee73b8cfbb3457
server: (UI) add syntax highlighting and latex math rendering (#10808)

* add code highlighting and math formatting

* code cleanup

* build public/index.html

* rebuild public/index.html

* fixed coding style

* fixed coding style

* style fixes

* highlight: smaller bundle size, fix light & dark theme

* remove katex

* add bundle size check

* add more languages

* add php

* reuse some langs

* use gzip

* Revert "remove katex"

This reverts commit c0e5046accd10be3f83018cffdc29a652849fc61.

* use better maintained @vscode/markdown-it-katex

* fix gzip non deterministic

* ability to add a demo conversation for dev

* fix latex rendering

* add comment

* latex codeblock as code

---------

Co-authored-by: Xuan Son Nguyen <redacted>
14 files changed:
examples/server/CMakeLists.txt
examples/server/public/index.html [deleted file]
examples/server/public/index.html.gz [new file with mode: 0644]
examples/server/server.cpp
examples/server/webui/index.html
examples/server/webui/package-lock.json
examples/server/webui/package.json
examples/server/webui/public/demo-conversation.json [new file with mode: 0644]
examples/server/webui/src/highlight-config.js [new file with mode: 0644]
examples/server/webui/src/katex-gpt.js [new file with mode: 0644]
examples/server/webui/src/main.js
examples/server/webui/src/styles.css [deleted file]
examples/server/webui/src/styles.scss [new file with mode: 0644]
examples/server/webui/vite.config.js