添加发送ai文本埋点
This commit is contained in:
@@ -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 ?: @""];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user