feat(chatui): reuse Shiki for workspace code previews - #10023
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. The preview now inserts generated markup with v-html; if the Shiki rendering path fails to escape workspace-file contents, a malicious file could execute script in the dashboard and expose data before the change is reverted. Reverting removes the new execution path, but any data exposed during the affected sessions cannot be recovered.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
astrbot-docs | f0c9fda | Commit Preview URL Branch Preview URL |
Sep 10 2026, 03:00 PM |
Soulter
added this pull request to stack #10032
September 10, 2026 14:07
Soulter
removed this pull request from stack #10032
September 10, 2026 14:48
Soulter
force-pushed
the
codex/chatui-workspace-syntax-highlighting
branch
from
September 10, 2026 14:57
d07b56b to
f0c9fda
Compare
Soulter
changed the base branch from
codex/chatui-workspace-preview
to
master
September 10, 2026 14:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Workspace source files currently appear as plain text. Reuse the existing shared Shiki highlighter in both the sidebar preview and the larger preview dialog, with language detection from filenames and GitHub light/dark themes.
This PR is based directly on
masterand can be merged independently of #10022. It adds no workspace tabs, PDF support, dependencies, or additional language bundles. Plain text remains available while highlighting loads or fails, unsupported languages use the shared text fallback, and stale results are ignored when files or themes change.Validation:
pnpm buildandpnpm exec vue-tsc --noEmitpassed on the independent master-based branch.ruff format .,ruff check ., andgit diff --checkpassed.