Rename, delete with confirmation, pin, share and reorder moved from Home's session hook into the shared (app) shell, so /chart, /ephemeris, /reports and /people rows get the same menu and drag as /. Home only adds its paging cursor, what the open conversation does when deleted, and which local chats are unsaved. BUG-1467. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Ad9rqAB8pXXvyzh7f4X8v
43 lines
1.6 KiB
TypeScript
43 lines
1.6 KiB
TypeScript
import { existsSync, readFileSync } from "node:fs";
|
|
|
|
const homeSurfaceFiles = [
|
|
"../src/app/(app)/page.tsx",
|
|
"../src/lib/home-types.ts",
|
|
"../src/components/onboarding-chat-message.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-rectification-surface.ts",
|
|
"../src/hooks/use-synastry.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",
|
|
] 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");
|