Files
keyboard/keyBoard/Class/AiTalk/V/Chat/KBChatAssistantMessageCell.h

48 lines
1.1 KiB
C
Raw Normal View History

2026-01-23 21:51:37 +08:00
//
// KBChatAssistantMessageCell.h
// keyBoard
//
// Created by Kiro on 2026/1/23.
//
#import <UIKit/UIKit.h>
@class KBAiChatMessage;
@class KBChatAssistantMessageCell;
NS_ASSUME_NONNULL_BEGIN
/// AI 消息 Cell 代理
@protocol KBChatAssistantMessageCellDelegate <NSObject>
/// 点击语音播放按钮
- (void)assistantMessageCell:(KBChatAssistantMessageCell *)cell
didTapVoiceButtonForMessage:(KBAiChatMessage *)message;
@end
/// AI 消息 Cell左侧气泡 + 语音按钮)
@interface KBChatAssistantMessageCell : UITableViewCell
@property (nonatomic, weak) id<KBChatAssistantMessageCellDelegate> delegate;
@property (nonatomic, strong, readonly) UILabel *messageLabel; // 暴露 messageLabel 供外部访问
/// 配置 Cell
- (void)configureWithMessage:(KBAiChatMessage *)message;
/// 更新语音播放状态
- (void)updateVoicePlayingState:(BOOL)isPlaying;
/// 显示加载动画
- (void)showLoadingAnimation;
/// 隐藏加载动画
- (void)hideLoadingAnimation;
/// 停止打字机效果
- (void)stopTypewriterEffect;
@end
NS_ASSUME_NONNULL_END