refactor(chat): remove Unicode placeholder-based mention chip overlay system
All checks were successful
Frontend CI / ota-android (push) Successful in 1m8s
Frontend CI / build-and-push-web (push) Successful in 3m39s
Frontend CI / build-android-apk (push) Successful in 31m33s

Replaced the previous approach of tracking @mentions using private Unicode characters (U+E000-U+F8FF) with a simpler regex-based solution that extracts mention ranges directly from input text. This eliminates the complex overlay rendering logic and corresponding styles/types.
This commit is contained in:
lafay
2026-04-29 11:29:59 +08:00
parent 0f289e3182
commit 490a99ab3c
5 changed files with 192 additions and 219 deletions

View File

@@ -553,33 +553,7 @@ export function createChatScreenStyles(colors: AppColors, dynamicStyles?: {
inputMuted: {
color: colors.chat.iconMuted,
},
inputTransparent: {
color: 'transparent',
},
mentionOverlay: {
...StyleSheet.absoluteFillObject,
flexDirection: 'row',
flexWrap: 'wrap',
alignItems: 'flex-start',
paddingTop: 8,
paddingBottom: 8,
paddingHorizontal: spacing.xs,
},
mentionChipText: {
fontSize: 16,
color: colors.primary.main,
fontWeight: '500',
lineHeight: 20,
backgroundColor: `${colors.primary.main}15`,
borderRadius: 4,
overflow: 'hidden',
},
mentionOverlayText: {
fontSize: 16,
color: colors.chat.textPrimary,
lineHeight: 20,
},
// 输入框@高亮
inputHighlightOverlay: {
...StyleSheet.absoluteFillObject,