fix(app): native iOS text selection in assistant messages via UITextView
Fixes #238 Fixes #648 Refs #21
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
type ViewStyle,
|
||||
} from "react-native";
|
||||
import { StyleSheet } from "react-native-unistyles";
|
||||
import { MarkdownTextSpan } from "@/components/markdown-text";
|
||||
import * as Clipboard from "expo-clipboard";
|
||||
import { Check, Copy } from "lucide-react-native";
|
||||
import { highlightCode, type HighlightToken } from "@getpaseo/highlight";
|
||||
@@ -119,7 +120,7 @@ export const HighlightedCodeBlock = React.memo(function HighlightedCodeBlock({
|
||||
onPointerLeave={handlePointerLeave}
|
||||
>
|
||||
{keyedLines ? (
|
||||
<Text style={innerTextStyle}>
|
||||
<MarkdownTextSpan style={innerTextStyle}>
|
||||
{keyedLines.map((line, lineIndex) => (
|
||||
<React.Fragment key={line.key}>
|
||||
{lineIndex > 0 ? "\n" : null}
|
||||
@@ -128,9 +129,9 @@ export const HighlightedCodeBlock = React.memo(function HighlightedCodeBlock({
|
||||
))}
|
||||
</React.Fragment>
|
||||
))}
|
||||
</Text>
|
||||
</MarkdownTextSpan>
|
||||
) : (
|
||||
<Text style={innerTextStyle}>{code}</Text>
|
||||
<MarkdownTextSpan style={innerTextStyle}>{code}</MarkdownTextSpan>
|
||||
)}
|
||||
<CopyButton getCode={getCode} visible={controlsVisible} />
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user