Files
keyboard/keyBoard/Class/AiTalk/V/KBChatAssistantMessageCell.h
2026-01-23 21:51:37 +08:00

48 lines
1.1 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// 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