分类移动文件

This commit is contained in:
2026-01-29 13:44:52 +08:00
parent 4392296616
commit 25fbe9b64e
25 changed files with 72 additions and 30 deletions

View File

@@ -56,7 +56,6 @@
046086732F191B6900757C95 /* KBAiMainVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 046086722F191B6900757C95 /* KBAiMainVC.m */; };
046086752F191CC700757C95 /* AI技术分析.txt in Resources */ = {isa = PBXBuildFile; fileRef = 046086742F191CC700757C95 /* AI技术分析.txt */; };
0460869A2F19238500757C95 /* KBAiWaveformView.m in Sources */ = {isa = PBXBuildFile; fileRef = 046086992F19238500757C95 /* KBAiWaveformView.m */; };
0460869B2F19238500757C95 /* KBAiChatView.m in Sources */ = {isa = PBXBuildFile; fileRef = 046086952F19238500757C95 /* KBAiChatView.m */; };
0460869C2F19238500757C95 /* KBAiRecordButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 046086972F19238500757C95 /* KBAiRecordButton.m */; };
046086B12F19239B00757C95 /* SubtitleSync.m in Sources */ = {isa = PBXBuildFile; fileRef = 046086AC2F19239B00757C95 /* SubtitleSync.m */; };
046086B22F19239B00757C95 /* TTSServiceClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 046086B02F19239B00757C95 /* TTSServiceClient.m */; };
@@ -389,8 +388,6 @@
046086712F191B6900757C95 /* KBAiMainVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KBAiMainVC.h; sourceTree = "<group>"; };
046086722F191B6900757C95 /* KBAiMainVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KBAiMainVC.m; sourceTree = "<group>"; };
046086742F191CC700757C95 /* AI技术分析.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = "AI技术分析.txt"; sourceTree = "<group>"; };
046086942F19238500757C95 /* KBAiChatView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KBAiChatView.h; sourceTree = "<group>"; };
046086952F19238500757C95 /* KBAiChatView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KBAiChatView.m; sourceTree = "<group>"; };
046086962F19238500757C95 /* KBAiRecordButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KBAiRecordButton.h; sourceTree = "<group>"; };
046086972F19238500757C95 /* KBAiRecordButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KBAiRecordButton.m; sourceTree = "<group>"; };
046086982F19238500757C95 /* KBAiWaveformView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KBAiWaveformView.h; sourceTree = "<group>"; };
@@ -1056,39 +1053,17 @@
0460866D2F191A5100757C95 /* V */ = {
isa = PBXGroup;
children = (
046086942F19238500757C95 /* KBAiChatView.h */,
046086952F19238500757C95 /* KBAiChatView.m */,
048FFD3D2F2B2A14005D62AE /* PopView */,
048FFD3C2F2B2905005D62AE /* Chat */,
048FFD3B2F2B289C005D62AE /* Comment */,
048FFD3A2F2B2869005D62AE /* Message */,
046086962F19238500757C95 /* KBAiRecordButton.h */,
046086972F19238500757C95 /* KBAiRecordButton.m */,
046086982F19238500757C95 /* KBAiWaveformView.h */,
046086992F19238500757C95 /* KBAiWaveformView.m */,
046086BB2F1A039F00757C95 /* KBAICommentView.h */,
046086BC2F1A039F00757C95 /* KBAICommentView.m */,
046086CE2F1A093400757C95 /* KBAICommentFooterView.h */,
046086CF2F1A093400757C95 /* KBAICommentFooterView.m */,
046086D02F1A093400757C95 /* KBAICommentHeaderView.h */,
046086D12F1A093400757C95 /* KBAICommentHeaderView.m */,
046086D22F1A093400757C95 /* KBAICommentInputView.h */,
046086D32F1A093400757C95 /* KBAICommentInputView.m */,
046086D42F1A093400757C95 /* KBAIReplyCell.h */,
046086D52F1A093400757C95 /* KBAIReplyCell.m */,
04E039422F236E75002CA5A0 /* KBChatAssistantMessageCell.h */,
04E039432F236E75002CA5A0 /* KBChatAssistantMessageCell.m */,
04E039442F236E75002CA5A0 /* KBChatTableView.h */,
04E039452F236E75002CA5A0 /* KBChatTableView.m */,
04E039462F236E75002CA5A0 /* KBChatTableView_Usage.md */,
04E039472F236E75002CA5A0 /* KBChatTimeCell.h */,
04E039482F236E75002CA5A0 /* KBChatTimeCell.m */,
04E039492F236E75002CA5A0 /* KBChatUserMessageCell.h */,
04E0394A2F236E75002CA5A0 /* KBChatUserMessageCell.m */,
048FFD122F274342005D62AE /* KBPersonaChatCell.h */,
048FFD132F274342005D62AE /* KBPersonaChatCell.m */,
048FFD162F2763A5005D62AE /* KBVoiceInputBar.h */,
048FFD172F2763A5005D62AE /* KBVoiceInputBar.m */,
048FFD222F28A836005D62AE /* KBChatLimitPopView.h */,
048FFD232F28A836005D62AE /* KBChatLimitPopView.m */,
048FFD382F29F410005D62AE /* KBAIMessageCell.h */,
048FFD392F29F410005D62AE /* KBAIMessageCell.m */,
);
path = V;
sourceTree = "<group>";
@@ -1374,6 +1349,58 @@
path = UICollectionViewLeftAlignedLayout;
sourceTree = "<group>";
};
048FFD3A2F2B2869005D62AE /* Message */ = {
isa = PBXGroup;
children = (
048FFD382F29F410005D62AE /* KBAIMessageCell.h */,
048FFD392F29F410005D62AE /* KBAIMessageCell.m */,
);
path = Message;
sourceTree = "<group>";
};
048FFD3B2F2B289C005D62AE /* Comment */ = {
isa = PBXGroup;
children = (
046086BB2F1A039F00757C95 /* KBAICommentView.h */,
046086BC2F1A039F00757C95 /* KBAICommentView.m */,
046086CE2F1A093400757C95 /* KBAICommentFooterView.h */,
046086CF2F1A093400757C95 /* KBAICommentFooterView.m */,
046086D02F1A093400757C95 /* KBAICommentHeaderView.h */,
046086D12F1A093400757C95 /* KBAICommentHeaderView.m */,
046086D22F1A093400757C95 /* KBAICommentInputView.h */,
046086D32F1A093400757C95 /* KBAICommentInputView.m */,
046086D42F1A093400757C95 /* KBAIReplyCell.h */,
046086D52F1A093400757C95 /* KBAIReplyCell.m */,
);
path = Comment;
sourceTree = "<group>";
};
048FFD3C2F2B2905005D62AE /* Chat */ = {
isa = PBXGroup;
children = (
048FFD122F274342005D62AE /* KBPersonaChatCell.h */,
048FFD132F274342005D62AE /* KBPersonaChatCell.m */,
04E039442F236E75002CA5A0 /* KBChatTableView.h */,
04E039452F236E75002CA5A0 /* KBChatTableView.m */,
04E039492F236E75002CA5A0 /* KBChatUserMessageCell.h */,
04E0394A2F236E75002CA5A0 /* KBChatUserMessageCell.m */,
04E039422F236E75002CA5A0 /* KBChatAssistantMessageCell.h */,
04E039432F236E75002CA5A0 /* KBChatAssistantMessageCell.m */,
04E039472F236E75002CA5A0 /* KBChatTimeCell.h */,
04E039482F236E75002CA5A0 /* KBChatTimeCell.m */,
);
path = Chat;
sourceTree = "<group>";
};
048FFD3D2F2B2A14005D62AE /* PopView */ = {
isa = PBXGroup;
children = (
048FFD222F28A836005D62AE /* KBChatLimitPopView.h */,
048FFD232F28A836005D62AE /* KBChatLimitPopView.m */,
);
path = PopView;
sourceTree = "<group>";
};
0498BD5F2EDFFBFC006CC1D5 /* VM */ = {
isa = PBXGroup;
children = (
@@ -2500,7 +2527,6 @@
0477BDFD2EBC6A170055D639 /* HomeHotVC.m in Sources */,
04E039522F2387D2002CA5A0 /* KBAiChatMessage.m in Sources */,
0460869A2F19238500757C95 /* KBAiWaveformView.m in Sources */,
0460869B2F19238500757C95 /* KBAiChatView.m in Sources */,
0460869C2F19238500757C95 /* KBAiRecordButton.m in Sources */,
04122FAA2EC73C0100EF7AB3 /* KBVipPayHeaderView.m in Sources */,
0498BD622EDFFC12006CC1D5 /* KBMyVM.m in Sources */,

View File

@@ -194,6 +194,18 @@ static const NSTimeInterval kTimestampInterval = 5 * 60; // 5 分钟
}
}
- (void)markLastUserMessageLoadingComplete {
for (NSInteger i = self.messages.count - 1; i >= 0; i--) {
KBAiChatMessage *message = self.messages[i];
if (message.type == KBAiChatMessageTypeUser) {
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:i inSection:0];
[self.tableView reloadRowsAtIndexPaths:@[indexPath]
withRowAnimation:UITableViewRowAnimationNone];
return;
}
}
}
- (void)clearMessages {
[self.messages removeAllObjects];
[self.tableView reloadData];

View File

@@ -453,6 +453,10 @@ static NSString * const KBChatSessionDidResetNotification = @"KBChatSessionDidRe
[self.chatView addMessage:message autoScroll:YES];
}
- (void)markLastUserMessageLoadingComplete {
// [self.chatView markLastUserMessageLoadingComplete];
}
- (void)appendAssistantMessage:(NSString *)text
audioId:(NSString *)audioId {
if (text.length == 0) {