Files
keyboard/keyBoard/Class/AiTalk/V/PopView/KBAIPersonaSidebarView.h
2026-02-03 16:54:38 +08:00

52 lines
1.4 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.

//
// KBAIPersonaSidebarView.h
// keyBoard
//
// Created by Codex on 2026/2/3.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class KBPersonaModel;
@class KBAIPersonaSidebarView;
@protocol KBAIPersonaSidebarViewDelegate <NSObject>
@optional
/// 侧边栏请求人设数据
/// page 从 1 开始
- (void)personaSidebarView:(KBAIPersonaSidebarView *)view
requestPersonasAtPage:(NSInteger)page;
/// 选择某个人设
- (void)personaSidebarView:(KBAIPersonaSidebarView *)view
didSelectPersona:(KBPersonaModel *)persona;
@end
/// 人设侧边栏LSTPopView 内容视图)
@interface KBAIPersonaSidebarView : UIView
@property (nonatomic, weak) id<KBAIPersonaSidebarViewDelegate> delegate;
@property (nonatomic, assign) NSInteger selectedPersonaId;
@property (nonatomic, assign, readonly) NSInteger currentPage;
/// 更新人设列表
/// reset=YES 表示重置并替换数据reset=NO 表示追加
/// currentPage 为当前已加载页数(从 1 开始)
- (void)updatePersonas:(NSArray<KBPersonaModel *> *)personas
reset:(BOOL)reset
hasMore:(BOOL)hasMore
currentPage:(NSInteger)currentPage;
/// 请求数据(若为空)
- (void)requestPersonasIfNeeded;
/// 更新选中态
- (void)updateSelectedPersonaId:(NSInteger)personaId;
/// 结束加载更多
- (void)endLoadingMore;
/// 重置加载更多状态
- (void)resetLoadMore;
@end
NS_ASSUME_NONNULL_END