添加发送ai文本埋点

This commit is contained in:
2026-01-13 17:37:34 +08:00
parent 85dcd72a5d
commit da62d4f411

View File

@@ -360,7 +360,6 @@ static inline NSString *KBTrimRight(NSString *s) {
contextAfter = proxy.documentContextAfterInput ?: @""; contextAfter = proxy.documentContextAfterInput ?: @"";
} }
} }
NSString *contextBefore = proxy.documentContextBeforeInput ?: @""; NSString *contextBefore = proxy.documentContextBeforeInput ?: @"";
while (contextBefore.length > 0) { while (contextBefore.length > 0) {
for (NSUInteger i = 0; i < contextBefore.length; i++) { for (NSUInteger i = 0; i < contextBefore.length; i++) {
@@ -372,6 +371,16 @@ static inline NSString *KBTrimRight(NSString *s) {
if (rawText.length > 0) { if (rawText.length > 0) {
[proxy insertText:rawText]; [proxy insertText:rawText];
} }
NSMutableDictionary *extra = [NSMutableDictionary dictionary];
extra[@"send_text"] = rawText ? rawText : @"";
extra[@"index"] = index ? rawText : 0;
[[KBMaiPointReporter sharedReporter]
reportClickWithEventName:@"send_stream_text_action"
pageId:@"keyboard_StreamTextView"
elementId:@"handle_label"
extra:extra.copy
completion:nil];
[[KBInputBufferManager shared] resetWithText:rawText ?: @""]; [[KBInputBufferManager shared] resetWithText:rawText ?: @""];
} }
} }