feat: 拆分左侧栏、中间聊天区、右侧栏组件, Hooks 提取
This commit is contained in:
34
src/views/AgentChat/hooks/index.ts
Normal file
34
src/views/AgentChat/hooks/index.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
// src/views/AgentChat/hooks/index.ts
|
||||
// 自定义 Hooks 统一导出
|
||||
|
||||
/**
|
||||
* 自定义 Hooks 统一入口
|
||||
*
|
||||
* 使用示例:
|
||||
* ```typescript
|
||||
* // 方式 1: 从统一入口导入(推荐)
|
||||
* import { useAgentChat, useAgentSessions, useFileUpload, useAutoScroll } from './hooks';
|
||||
*
|
||||
* // 方式 2: 从单个文件导入
|
||||
* import { useAgentChat } from './hooks/useAgentChat';
|
||||
* ```
|
||||
*/
|
||||
|
||||
export { useAutoScroll } from './useAutoScroll';
|
||||
export { useFileUpload } from './useFileUpload';
|
||||
export type { UploadedFile, UseFileUploadReturn } from './useFileUpload';
|
||||
|
||||
export { useAgentSessions } from './useAgentSessions';
|
||||
export type {
|
||||
Session,
|
||||
User,
|
||||
UseAgentSessionsParams,
|
||||
UseAgentSessionsReturn,
|
||||
} from './useAgentSessions';
|
||||
|
||||
export { useAgentChat } from './useAgentChat';
|
||||
export type {
|
||||
ToastFunction,
|
||||
UseAgentChatParams,
|
||||
UseAgentChatReturn,
|
||||
} from './useAgentChat';
|
||||
Reference in New Issue
Block a user