Onboarding now uses a multi-step wizard:
Sessions
Agent Settings
Migration
The current visible step order is:
SessionsSkillsMCP ServersCommandsAGENTS.mdMigration{HOME}/.claude/projects/**/*.jsonl (also tries os.homedir() and ZCODE_DATA_BASE_DIR as HOME candidates).packages/services/src/session/claude-native/claudeNativeSessionImportRepo.ts, wired through IZCodeTaskService.scanImportableClaudeSessions.provider: "claude" and migrationSource: "claudeCode". ZCode Agent task lists filter to glm by default but also include rows with migration_source = claudeCode, so migrated history appears in the sidebar without mixing in stale non-migrated Claude index rows.Claude Code 原生 .jsonl 与 ZCode 协议 snapshot 不是同一格式,导入时会在 services 层做归一化:
claudeNativeSessionImportParser.ts 读取 jsonl,过滤 sidechain / synthetic assistant,把多段 assistant 聚合成「用户一轮 + 助手一轮」的 ZCodePersistedMessage[]。session/create 支持 importedHistory,导入服务会创建真实 ZCode Protocol session,并把归一后的历史消息写入 zcode-cli session store。导入后的 taskId 就是真实 sessionId,因此后续 sendPrompt、setModel、setMode 都继续命中同一个 runtime。buildImportedClaudeTaskFile.ts 仍会生成迁移备份 snapshot;生成前会按属性路径清洗来源端运行态字段,默认过滤 meta.mode、meta.model、meta.provider、messages[].model,避免 Claude Code 的模型/模式/provider 污染 ZCode 当前 workspace 的运行时选择。persistImportedClaudeTask.ts 写入 ~/.zcode/v2/sessions/{workspaceHash}/{taskId}.json(legacy snapshot 备份),并同步 sqlite task index + workspace_task_list_changed 广播。新导入路径的列表元数据来自真实 ZCode session,同时保留 migrationSource: "claudeCode"。~/.zcode/v2/agent-config/claude/{workspaceHash}/projects/...,供后续 Claude 续聊链路使用。打开迁移后的任务时,优先按真实 ZCode session 恢复;只有旧数据没有对应 protocol session 时,才 fallback 到 legacy session JSON 只读历史恢复。
AGENTS.md step checks the Claude user memory file at {HOME}/.claude/CLAUDE.md.{HOME}/.zcode/AGENTS.md.~/.zcode/AGENTS.md is the user-level default instruction file. The runtime reads it when present and merges it before the workspace AGENTS.md resolved from the current working directory up to the project root.Migration step, selecting this copy action must open a confirmation dialog. The copy action may replace an existing {HOME}/.zcode/AGENTS.md, so the dialog must clearly say that the default AGENTS configuration will be overwritten.workspacePath / workspaceIdentity are only carried for logging / request correlation and must not be used as the target filesystem path.packages/ui/src/onboarding/OnboardingDialog.tsx
packages/ui/src/onboarding/useOnboardingAgentsFileMigration.ts
packages/ui/src/onboarding/OnboardingDialogParts.tsx
packages/ui/src/onboarding/OnboardingFlowParts.tsx
packages/services/src/settings-sync/settingsSyncService.ts
{HOME}/.claude/CLAUDE.md to {HOME}/.zcode/AGENTS.md.apps/zcode-cli/packages/adapters/src/context/index.ts
{HOME}/.zcode/AGENTS.md and workspace AGENTS.md, then merges both when both exist.Migration.AGENTS.md step is also a selection step. It must not copy files until the user starts migration and confirms the overwrite dialog.Migration step owns both the running state and the completed result state.General.Open Workspace screen, and adds lightweight migration copy on top so the right side still communicates purpose instead of being purely decorative.