bugfix(GUI): broken Chinese input w/ codeblock

This commit is contained in:
Test 2024-12-30 16:47:34 -06:00
parent 35cf0e1245
commit ddf19053b1

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