This commit is contained in:
2026-01-23 21:51:37 +08:00
parent 6ad9783bcb
commit 77fd46aa34
26 changed files with 3681 additions and 199 deletions

View File

@@ -6,24 +6,10 @@
//
#import <UIKit/UIKit.h>
#import "KBAiChatMessage.h"
NS_ASSUME_NONNULL_BEGIN
/// 消息类型
typedef NS_ENUM(NSInteger, KBAiChatMessageType) {
KBAiChatMessageTypeUser, // 用户消息
KBAiChatMessageTypeAssistant // AI 回复
};
/// 聊天消息模型
@interface KBAiChatMessage : NSObject
@property(nonatomic, assign) KBAiChatMessageType type;
@property(nonatomic, copy) NSString *text;
@property(nonatomic, assign) BOOL isComplete; // 是否完成(用于打字机效果)
+ (instancetype)userMessageWithText:(NSString *)text;
+ (instancetype)assistantMessageWithText:(NSString *)text;
@end
/// 聊天视图
/// 显示用户消息和 AI 回复的气泡列表
@interface KBAiChatView : UIView