mirror of
https://github.com/run-llama/chat-ui.git
synced 2026-07-21 03:15:21 -04:00
[PR #86] [MERGED] fix: using language props to add editor extensions #108
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/run-llama/chat-ui/pull/86
Author: @thucpn
Created: 5/13/2025
Status: ✅ Merged
Merged: 5/14/2025
Merged by: @thucpn
Base:
main← Head:tp/using-language-props-to-add-language-extension📝 Commits (4)
7de78e7fix: using language props to add editor extensions07f5d20Create rich-feet-drive.md8bba796fix: formatb094d98testing fallback📊 Changes
6 files changed (+450 additions, -5 deletions)
View changed files
➕
.changeset/rich-feet-drive.md(+5 -0)➕
apps/web/app/examples/code-editor/data.ts(+335 -0)➕
apps/web/app/examples/code-editor/page.tsx(+66 -0)📝
packages/chat-ui/src/chat/canvas/artifacts/code.tsx(+6 -1)📝
packages/chat-ui/src/widgets/code-editor.tsx(+37 -3)📝
packages/chat-ui/src/widgets/index.tsx(+1 -1)📄 Description
CodeMirror cannot automatically apply the correct language extension based on the code content. That’s why we need to explicitly provide a language prop to set up the appropriate language extension.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.