Merge pull request #3571 from continuedev/pe/chinese-input-bugfix

bugfix(GUI): broken Chinese input w/ codeblock
This commit is contained in:
Patrick Erichsen 2024-12-30 16:54:37 -06:00 • committed by GitHub
commit 442a88f767
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,4 @@
import { NodeViewWrapper } from "@tiptap/react";
import { NodeViewWrapper, NodeViewWrapperProps } from "@tiptap/react";
import { ContextItemWithId } from "core";
import { vscBadgeBackground } from "..";
import CodeSnippetPreview from "../markdown/CodeSnippetPreview";
@ -13,8 +13,15 @@ export const CodeBlockComponent = (props: any) => {
// const isFirstContextItem = item.id === contextItems[0]?.id;
const isFirstContextItem = false; // TODO: fix this, decided not worth the insane renders for now
// Not setting this as a "p" will cause issues with foreign keyboards
// See https://github.com/continuedev/continue/issues/3199
const nodeViewWrapperTag: NodeViewWrapperProps["as"] = "p";
return (
<NodeViewWrapper className="code-block-with-content" as="div">
<NodeViewWrapper
className="code-block-with-content"
as={nodeViewWrapperTag}
>
<CodeSnippetPreview
borderColor={
isFirstContextItem