Files
Jyotisha/frontend/tests/home-surface.ts
T

44 lines
1.9 KiB
TypeScript

import { existsSync, readFileSync } from "node:fs";
const homeSurfaceFiles = [
"../src/app/(app)/page.tsx",
"../src/lib/home-types.ts",
// 原值:含 onboarding-chat-message.tsx。新值:含三屏用的 onboarding-birth-time-fields.tsx。原因:BUG-2144 删掉逐字打出的聊天气泡。
"../src/components/onboarding-birth-time-fields.tsx",
"../src/components/home-onboarding-shell.tsx",
"../src/components/home-bootstrap-error.tsx",
"../src/lib/home-profile.ts",
"../src/lib/home-cloud-sync.ts",
"../src/components/birth-location-fields.tsx",
"../src/components/profile-fields.tsx",
"../src/components/people/people-page.tsx",
"../src/components/chart-profile-form.tsx",
"../src/components/profile-panel.tsx",
"../src/components/starter-home.tsx",
] as const;
const optionalHomeHookFiles = [
"../src/hooks/use-session-management.ts",
"../src/hooks/use-consultation-run.ts",
"../src/hooks/use-profile-onboarding.ts",
"../src/hooks/use-session-list.ts",
"../src/hooks/use-home-shell-registration.ts",
// issue #116:会话行的重命名、删除、收藏、转发、排序和删除确认框搬进共用外壳。
"../src/hooks/use-shell-session-actions.ts",
"../src/components/session-delete-dialog.tsx",
"../src/lib/session-list-context.tsx",
"../src/lib/session-list-filter.ts",
"../src/lib/home-bootstrap-run.ts",
"../src/lib/consultation-recovery-poll.ts",
"../src/lib/self-profile-save.ts",
// BUG-2127:账户弹窗(个人资料/账户与点数/通用设置/退出)从首页搬到 (app) 外壳,每页原地打开。
"../src/components/account-dialog-provider.tsx",
] as const;
export const homeSurface = [
...homeSurfaceFiles,
...optionalHomeHookFiles.filter((relativePath) => existsSync(new URL(relativePath, import.meta.url))),
]
.map((relativePath) => readFileSync(new URL(relativePath, import.meta.url), "utf8"))
.join("\n");