mirror of
https://github.com/aiclientproxy/proxycast.git
synced 2026-09-24 23:10:56 +08:00
refactor: 删除无意义包装函数和冗余index文件
## 清理内容 ### 1. 删除无意义的Props包装函数 - `buildWorkspaceMessageListProps`:直接返回输入参数,无实际逻辑 - 简化了 `useWorkspaceConversationScenePresentation` 的使用 ### 2. 删除单导出的冗余index文件 - `src/components/dev/index.ts` - `src/components/automation/index.ts` - `src/components/memory/index.ts` - `src/components/resources/index.ts` - `src/components/tools/image-analysis/index.ts` 这些文件只包含一个export语句,可以直接导入原文件 ## 优化效果 - 减少了不必要的函数调用层级 - 简化了导入路径 - 减少了文件数量 ## 验证通过 - ✅ 契约验证通过 - ✅ 无引用破坏 - ✅ 构建正常 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
3b77b78b4d
commit
3677306483
@@ -44,11 +44,6 @@ export function buildStepProgressProps({
|
||||
};
|
||||
}
|
||||
|
||||
export function buildWorkspaceMessageListProps(
|
||||
params: ComponentProps<typeof MessageList>,
|
||||
): ComponentProps<typeof MessageList> {
|
||||
return params;
|
||||
}
|
||||
|
||||
interface BuildTeamWorkspaceDockPropsParams {
|
||||
enabled: boolean;
|
||||
|
||||
@@ -6,7 +6,6 @@ import { TeamWorkspaceDock } from "../components/TeamWorkspaceDock";
|
||||
import {
|
||||
buildStepProgressProps,
|
||||
buildTeamWorkspaceDockProps,
|
||||
buildWorkspaceMessageListProps,
|
||||
} from "./chatSurfaceProps";
|
||||
import type { TeamWorkbenchSurfaceProps } from "./teamWorkbenchPresentation";
|
||||
|
||||
@@ -24,7 +23,6 @@ interface UseWorkspaceConversationScenePresentationParams {
|
||||
| "projectId"
|
||||
| "canvasWorkbenchLayoutProps"
|
||||
| "stepProgressProps"
|
||||
| "messageListProps"
|
||||
| "teamWorkspaceDockProps"
|
||||
> & {
|
||||
projectId: string | null | undefined;
|
||||
@@ -69,7 +67,6 @@ export function useWorkspaceConversationScenePresentation({
|
||||
canvasWorkbenchLayout,
|
||||
}: UseWorkspaceConversationScenePresentationParams): WorkspaceConversationScenePresentationResult {
|
||||
const stepProgressProps = buildStepProgressProps(stepProgress);
|
||||
const messageListProps = buildWorkspaceMessageListProps(messageList);
|
||||
const teamWorkspaceDockProps = buildTeamWorkspaceDockProps(teamWorkspaceDock);
|
||||
const workspaceAlertVisible = Boolean(
|
||||
workspaceAlert.workspacePathMissing || workspaceAlert.workspaceHealthError,
|
||||
@@ -86,7 +83,7 @@ export function useWorkspaceConversationScenePresentation({
|
||||
<WorkspaceConversationScene
|
||||
{...scene}
|
||||
stepProgressProps={stepProgressProps}
|
||||
messageListProps={messageListProps}
|
||||
messageListProps={messageList}
|
||||
teamWorkspaceDockProps={teamWorkspaceDockProps}
|
||||
workspaceAlertVisible={workspaceAlertVisible}
|
||||
projectId={scene.projectId ?? null}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export { AutomationPage } from "./AutomationPage";
|
||||
@@ -1 +0,0 @@
|
||||
export { ComponentDebugOverlay } from "./ComponentDebugOverlay";
|
||||
@@ -1 +0,0 @@
|
||||
export { MemoryPage } from "./MemoryPage";
|
||||
@@ -1 +0,0 @@
|
||||
export { ResourcesPage } from "./ResourcesPage";
|
||||
@@ -1 +0,0 @@
|
||||
export { ImageAnalysisTool } from "./ImageAnalysisTool";
|
||||
Reference in New Issue
Block a user