feat: 拆分左侧栏、中间聊天区、右侧栏组件, Hooks 提取

This commit is contained in:
zdl
2025-11-24 15:23:22 +08:00
parent 41f1bbab1b
commit 5183473557
6 changed files with 740 additions and 238 deletions

View 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';