A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.
Show the place line only when it helps, and move the data on cards
AdamPlatin1239d034b9c0e69
diff --git a/app/src/first-run.mjs b/app/src/first-run.mjsindex c2c35b84..fc19c1b8 100644--- a/app/src/first-run.mjs+++ b/app/src/first-run.mjs@@ -4,9 +4,10 @@import { app, dialog } from 'electron'import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from 'node:fs'import { homedir } from 'node:os'-import { dirname, join } from 'node:path'+import { dirname, join, resolve } from 'node:path'import { findTeam, newerSessions, teamInUse, userDshHome } from './import.mjs'import { installFolder } from './move-data.mjs'+import { freeSpace } from './place.mjs'import { langOf, t } from './start/text.mjs'// The system dialogs speak the language of the start page (main.mjs gives it the same locale).@@ -98,31 +99,51 @@ async function offerImport(dataDir, signal, ui) {return { offered: true, import: { from, profile } }}-/** Write the chosen places once the first run is finished; quitting before that asks again. */+/**+ * Write the chosen places once the first run is finished; quitting before that asks again. The+ * free space of the data's drive when the data goes to a folder is kept as long as it stays+ * there: a later start shows the place line again once a fifth of it is left (start-window §5).+ */export function saveLocations({ dataDir, workspace }) {const file = locationsFile()mkdirSync(dirname(file), { recursive: true })+ const saved = readSaved(file)+ const kept = saved !== undefined && typeof saved.dataDir === 'string' && resolve(saved.dataDir) === resolve(dataDir) && roomOf(saved.freeAtStart) !== undefined+ // A full drive gives no room to measure a fifth of: the next save measures again.+ const freeAtStart = kept ? saved.freeAtStart : roomOf(freeSpace(dataDir))// A write that fails half way leaves the places that were there.- writeFileSync(`${file}.tmp`, `${JSON.stringify({ dataDir, workspace }, null, 2)}\n`)+ writeFileSync(`${file}.tmp`, `${JSON.stringify({ dataDir, workspace, freeAtStart }, null, 2)}\n`)renameSync(`${file}.tmp`, file)}+const roomOf = bytes => (Number.isFinite(bytes) && bytes > 0 ? bytes : undefined)++function readSaved(file) {+ try {+ return JSON.parse(readFileSync(file, 'utf8'))+ } catch {+ return undefined+ }+}+/*** Where the app keeps its data and the Bots' files: the saved places, or at the first start the* default ones without a question (the start page says where the data goes and offers* 「换个位置…」; windows-onboarding §3). The offer to copy a team is still a dialog that belongs* to `ui.owner()`. A run on throwaway folders (DS_BOT_HOME, for development and tests) asks- * nothing and copies nothing. `offered` says whether the first run offered to copy a team.+ * nothing and copies nothing. `offered` says whether the first run offered to copy a team;+ * `freeAtStart` is the free space of the data's drive that saveLocations() kept, none when it+ * kept none yet.* @param {AbortSignal} signal* @param {{ owner: () => import('electron').BrowserWindow | undefined, asking: <T>(answer: Promise<T>) => Promise<T> }} ui- * @returns {Promise<{ dataDir: string, workspace?: string, import?: { from: string, profile?: string }, offered?: boolean, quit?: true }>}+ * @returns {Promise<{ dataDir: string, workspace?: string, freeAtStart?: number, import?: { from: string, profile?: string }, offered?: boolean, quit?: true }>}*/export async function chooseLocations(signal, ui) {if (process.env.DS_BOT_HOME) return { dataDir: process.env.DS_BOT_HOME, workspace: process.env.DS_BOT_WORKSPACE || undefined }const file = locationsFile()if (existsSync(file)) {const saved = JSON.parse(readFileSync(file, 'utf8'))- return { dataDir: saved.dataDir, workspace: saved.workspace }+ return { dataDir: saved.dataDir, workspace: saved.workspace, freeAtStart: roomOf(saved.freeAtStart) }}const { dataDir, workspace } = defaultPlaces()let offereddiff --git a/app/src/main.mjs b/app/src/main.mjsindex b0e3196a..e920269a 100644--- a/app/src/main.mjs+++ b/app/src/main.mjs@@ -15,7 +15,7 @@ import { fileURLToPath } from 'node:url'import { canonicalExecPath } from './canonical-path.mjs'import { hostPort } from './host-port.mjs'import { captureStdio, LogFile } from './logs.mjs'-import { currentRootOf, driveOf, formatBytes, freeSpace, isEmptyTree, pickFrom, placeOf, rootOf } from './place.mjs'+import { currentRootOf, driveOf, formatBytes, freeSpace, isEmptyTree, pickFrom, placeOf, rootOf, runningLow } from './place.mjs'import { createShell, SHELL_TEXT } from './shell.mjs'import { readStartFrame, writeStartFrame } from './start-frame.mjs'import { explainOf, StartWindow } from './start-window.mjs'@@ -43,6 +43,8 @@ const IPC = {// A cookie export larger than this is not a cookie export.const IMPORT_FILE_MAX = 32 * 1024 * 1024const MOVE_PROBLEMS = { drive: 'dialog.move.drive', nested: 'dialog.move.nested', workspace: 'dialog.move.workspace', program: 'dialog.move.inProgram', notEmpty: 'dialog.move.notEmpty' }+// The same problems as the start page's 「这里放不了」 reasons (reason.place.*).+const MOVE_REASONS = { drive: 'drive', nested: 'nested', workspace: 'workspace', dsh: 'dsh', program: 'program', notEmpty: 'foreign' }const UPDATE_CHECK_WAIT_MS = 15_000const UPDATE_DOWNLOAD_WAIT_MS = 15 * 60_000// Under this, the start page notes the drive's free space for the first 10 s (onboarding §3).@@ -89,6 +91,8 @@ let made = { dataDir: false, workspace: false, root: false }// The folder picker of 「换个位置…」 is open, and the root it proposed on the 「会放在…」 card.let picking = falselet proposed+// The folder a later start's move card asks about.+let moveTo// A retry or a start over is stopping the old engine: no second one starts meanwhile.let restarting = false// The first run's answer to the import; only the first boot copies.@@ -171,8 +175,9 @@ if (canonical !== undefined) {// Closing the start window before the hand-off quits: there is no team window yet to stay in// the tray with.onClose: () => { app.quit() },- onPick: () => { changePlace().catch(fail) },- onAnswer: (value) => { placeAnswer(value).catch(fail) },+ // 「换个位置…」: a first start picks the place again; a later start moves the data there.+ onPick: () => { (startWindow.kind === 'later' ? moveFromStart() : changePlace()).catch(fail) },+ onAnswer: (value) => { (startWindow.kind === 'later' ? moveAnswer(value) : placeAnswer(value)).catch(fail) },})// A second launch shows the window that is showing: the start window until the hand-off// (also after a failed start), then the team window, built anew when it is gone.@@ -331,6 +336,7 @@ async function boot(mine) {setPlaces({ dataDir: where.dataDir, workspace: where.workspace })pendingImport = where.importif (first) startWindow.explain(explainOf({ offered: where.offered === true, team: teamIn(where.dataDir) }))+ else tellLowSpace(where.freeAtStart)}// Also the check that the data folder can be written.mkdirSync(profileDir(), { recursive: true })@@ -369,6 +375,23 @@ function tellPlace(dataDir) {startWindow.hint(drive !== undefined && free !== undefined && free < SHORT_DRIVE_BYTES ? { drive, free: formatBytes(free) } : undefined)}+// A later start shows the line again once the drive is down to a fifth of the free space it had+// when the data went there (start-window §5). Places saved before that was kept keep it from+// now on; a failed write costs only the line.+function tellLowSpace(freeAtStart) {+ if (process.env.DS_BOT_HOME) return+ if (freeAtStart === undefined) {+ try {+ saveLocations(places)+ } catch (error) {+ console.error(error)+ }+ return+ }+ const free = freeSpace(places.dataDir)+ if (runningLow(free, freeAtStart)) startWindow.place(placeOf(places.dataDir, { free }))+}+// 「换个位置…」 on the start page and 〔重新选〕 on its cards: the system picker, then the root rule// (windows-onboarding §3, 一个位置). The root is used at once when it is the folder picked; a// layer the app added is confirmed on the 「会放在…」 card; a place that cannot be used says why.@@ -746,23 +769,110 @@ async function checkTeam(where, signal) {// folder; after a failed copy it starts again on the old one. The old folder stays.async function moveData(workspace) {if (copying !== undefined || stopping || mainWindow === undefined) return false+ const to = await askMove(workspace)+ if (to === undefined) return false+ await runMove(to, workspace)+ return true+}++// 〔换个位置…〕 on a later start's place line (start-window §5): the same move, asked on the start+// page's cards instead of message boxes. Only the folder picker is a system window; while it or+// a card is open, the clock stands still and the hand-off waits.+async function moveFromStart() {+ if (startWindow.kind !== 'later' || places === undefined || copying !== undefined || picking || restarting || stopping || failed) return+ picking = true+ try {+ await startWindow.asking(pickMove())+ } finally {+ picking = false+ }+}++// 「这里放不了」 with the reason, or 「搬到这个文件夹?」. A cancelled picker is no change: the card+// that led here goes, and the start goes on.+async function pickMove() {+ const { canceled, filePaths } = await dialog.showOpenDialog(owner(), { title: tx('dialog.pickMove'), defaultPath: dirname(places.dataDir), properties: ['openDirectory', 'createDirectory', 'promptToCreate'] })+ if (stopping || startWindow.owner() === undefined) return+ moveTo = undefined+ if (canceled || filePaths[0] === undefined) {+ startWindow.card(undefined)+ return+ }+ moveCard(resolve(filePaths[0]))+}++function moveCard(to) {+ const reason = moveReason(to)+ if (reason !== undefined) {+ console.log(`DeepSeek Bot: the data cannot move to ${to} (${reason})`)+ startWindow.card({ kind: 'rejected', reason, path: to })+ return+ }+ moveTo = to+ startWindow.card({ kind: 'move', path: to, dataDir: places.dataDir })+}++// A folder the checks cannot read counts as one without permission, as on a first start.+function moveReason(to) {+ try {+ const problem = moveProblemOf(to, places.workspace)+ return problem === undefined ? undefined : MOVE_REASONS[problem]+ } catch (error) {+ console.error(error)+ return 'permission'+ }+}++// 〔移动并重启〕 checks the folder again (the team workspace can move while the card is open);+// then the start window becomes the move's before a hand-off that waited can go, and the boot it+// showed gives way. 〔取消〕 goes back to the start.+async function moveAnswer(value) {+ if (startWindow.kind !== 'later' || moveTo === undefined || picking || copying !== undefined || stopping || failed) return+ const to = moveTo+ moveTo = undefined+ if (value !== 'move') {+ startWindow.card(undefined)+ return+ }+ if (moveReason(to) !== undefined) {+ moveCard(to)+ return+ }+ attempt += 1+ forgetHost()+ startWindow.moving()+ await runMove(to, places.workspace)+}++// The folder picker, the checks and the question of a move from Settings: the folder, or none.+async function askMove(workspace) {const { canceled, filePaths } = await dialog.showOpenDialog(owner(), { title: tx('dialog.pickMove'), defaultPath: dirname(places.dataDir), properties: ['openDirectory', 'createDirectory', 'promptToCreate'] })- if (canceled || filePaths[0] === undefined) return false+ if (canceled || filePaths[0] === undefined) return undefinedconst to = resolve(filePaths[0])+ if (await moveRefused(to, workspace)) return undefined+ const { response } = await dialog.showMessageBox(owner(), { type: 'question', title: 'DeepSeek Bot', noLink: true, message: tx('dialog.move.confirm', { to }), detail: tx('dialog.move.detail', { from: places.dataDir }), buttons: [tx('btn.move'), tx('btn.cancel')], defaultId: 0, cancelId: 1 })+ if (response !== 0 || stopping || await moveRefused(to, workspace)) return undefined+ return to+}++// The team workspace can move while a dialog is open; the window tells the latest one.+function moveProblemOf(to, workspace) {const dshHome = userDshHome()- // The team workspace can move while a dialog is open; the window tells the latest one.- const refused = async () => {- for (const current of new Set([workspace, places.workspace])) {- const problem = moveProblem({ from: places.dataDir, to, workspace: current, dshHome, program: app.isPackaged ? programFolder() : undefined })- if (problem === undefined) continue- await dialog.showMessageBox(owner(), { type: 'warning', title: 'DeepSeek Bot', message: problem === 'dsh' ? tx('dialog.move.inDsh', { home: dshHome }) : tx(MOVE_PROBLEMS[problem]), buttons: [tx('btn.ok')] })- return true- }- return false+ for (const current of new Set([workspace, places.workspace])) {+ const problem = moveProblem({ from: places.dataDir, to, workspace: current, dshHome, program: app.isPackaged ? programFolder() : undefined })+ if (problem !== undefined) return problem}- if (await refused()) return false- const { response } = await dialog.showMessageBox(owner(), { type: 'question', title: 'DeepSeek Bot', noLink: true, message: tx('dialog.move.confirm', { to }), detail: tx('dialog.move.detail', { from: places.dataDir }), buttons: [tx('btn.move'), tx('btn.cancel')], defaultId: 0, cancelId: 1 })- if (response !== 0 || stopping || await refused()) return false+ return undefined+}++async function moveRefused(to, workspace) {+ const problem = moveProblemOf(to, workspace)+ if (problem === undefined) return false+ await dialog.showMessageBox(owner(), { type: 'warning', title: 'DeepSeek Bot', message: problem === 'dsh' ? tx('dialog.move.inDsh', { home: userDshHome() }) : tx(MOVE_PROBLEMS[problem]), buttons: [tx('btn.ok')] })+ return true+}++async function runMove(to, workspace) {const signal = copyAbort.signalcopying = (async () => {// The settings go away first, so that nothing moves the team workspace from here on; the@@ -772,7 +882,7 @@ async function moveData(workspace) {startWindow.open('moving')await stopHost()// The app may have heard of a team workspace change while the Host stopped.- if (await refused()) {+ if (await moveRefused(to, workspace)) {app.relaunch()return}@@ -804,7 +914,6 @@ async function moveData(workspace) {await copyingcopying = undefinedapp.quit()- return true}// Windows and a Linux AppImage update themselves; macOS and a Linux deb ask to download the newdiff --git a/app/src/place.mjs b/app/src/place.mjsindex cd87b9a9..f6f1caef 100644--- a/app/src/place.mjs+++ b/app/src/place.mjs@@ -1,6 +1,6 @@-// Where a first start puts the data: the line on the start page that says so, and the root rule-// of 「换个位置…」 (windows-onboarding §3, 一个位置; start-window §6). No Electron here, so the-// tests run without it.+// Where a first start puts the data: the line on the start page that says so (and when a later+// start shows it again), and the root rule of 「换个位置…」 (windows-onboarding §3, 一个位置;+// start-window §6). No Electron here, so the tests run without it.import { existsSync, mkdirSync, readdirSync, rmdirSync, rmSync, statfsSync, statSync, writeFileSync } from 'node:fs'import { homedir } from 'node:os'import { basename, dirname, join, parse, resolve, sep } from 'node:path'@@ -38,6 +38,15 @@ export function formatBytes(bytes) {return `${String(Math.floor(bytes / 2 ** 20))} MB`}+// A later start shows the place line again once the drive is down to this share of the free+// space it had when the data went there (start-window §5).+export const LOW_SHARE = 0.2++/** Whether `free` is down to LOW_SHARE of `freeAtStart`; an unknown size is not low. */+export function runningLow(free, freeAtStart) {+ return Number.isFinite(free) && Number.isFinite(freeAtStart) && freeAtStart > 0 && free <= freeAtStart * LOW_SHARE+}+/** The drive letter of a Windows path ('C'), or undefined. */export function driveOf(path) {const match = /^([A-Za-z]):[\\/]/u.exec(resolve(path))diff --git a/app/src/start-window.mjs b/app/src/start-window.mjsindex 8527e7e9..d3801d0e 100644--- a/app/src/start-window.mjs+++ b/app/src/start-window.mjs@@ -286,7 +286,8 @@ export class StartWindow {* }} options `lang` is asked at each open; `program` names the folders of the app's own files;* `onClose` runs when the user closes the start window before the hand-off; `onPick` when* the page asks for the folder picker ('changePlace' from its place line, nothing from a- * card's 〔重新选〕), `onAnswer` with a card's answer ('use' for 〔继续〕 on 「会放在…」).+ * card's 〔重新选〕; on a later start the line's button moves the data), `onAnswer` with a+ * card's answer ('use' for 〔继续〕 on 「会放在…」).*/constructor(options) {this.#o = options@@ -394,8 +395,9 @@ export class StartWindow {}/**- * The line that says where the data goes, with 「换个位置…」 (start-window §2): the drive and its- * free space, or the folder. Undefined takes the line away.+ * The line that says where the data goes, with 「换个位置…」 (start-window §2; a first start, or a+ * later one whose drive runs low, §5): the drive and its free space, or the folder. Undefined+ * takes the line away.* @param {{ drive?: string, path?: string, free?: string } | undefined} place*/place(place) {@@ -409,8 +411,9 @@ export class StartWindow {/*** A card on the sheet while the start boots (the clock stands still), or none: back to the- * boot. Only the cards of a place: 「会放在…」 and a place that cannot be used.- * @param {{ kind: 'picked' | 'rejected', path: string, reason?: string } | undefined} card+ * boot. Only the cards of a place: 「会放在…」, a place that cannot be used, and a later start's+ * 「搬到这个文件夹?」.+ * @param {{ kind: 'picked' | 'rejected' | 'move', path: string, reason?: string, dataDir?: string } | undefined} card*/card(card) {if (!this.#open() || !['boot', 'card', 'watchdog'].includes(this.#state.view)) return@@ -436,6 +439,18 @@ export class StartWindow {this.#update({ view: 'boot', done: [], card: undefined, failure: undefined, celebrate: true, clock: { base: 0, from: Date.now(), running: true } })}+ /**+ * The data moves in the middle of a later start (「换个位置…」 on its place line, §5): the page+ * loads again as the move's start, and a hand-off that waited goes with the start it was for.+ */+ moving() {+ if (!this.#open()) return+ note('the data moves: the start window becomes the move\'s')+ this.#url = startUrl(this.#o.page, 'moving')+ this.#reset('moving')+ void this.#window.loadURL(this.#url).catch((error) => { note(`the start page did not load: ${error instanceof Error ? error.message : String(error)}`) })+ }+/*** The clock stands still while the user answers a dialog: thinking time is not the engine's.* The hand-off and the 20 s check wait for the answer too (see ready()).diff --git a/app/src/start/start.css b/app/src/start/start.cssindex c469612d..28e65baa 100644--- a/app/src/start/start.css+++ b/app/src/start/start.css@@ -210,14 +210,14 @@ html[data-sheet=none] .sheet{pointer-events:none}.disclose svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;transition:rotate var(--spring-tap-ms) var(--spring-tap)}.disclose[aria-expanded=true] svg{rotate:180deg}-/* The footer row: the note at the left, and where the data goes with 「换个位置…」 at the right- (first starts with a place). The note never gives way; the place's text is cut with an- ellipsis where the two would meet (English, a long folder). */-.footrow{position:absolute;left:calc(50% - 312px);right:calc(50% - 312px);top:calc(100% - 36px);display:flex;justify-content:space-between;align-items:baseline;gap:16px;font-size:13px;line-height:18px;color:var(--bt-ink-2)}-.note{flex:none;white-space:nowrap}-.place{flex:0 1 auto;min-width:0;margin:0;display:flex;align-items:baseline;gap:6px;white-space:nowrap}+/* The footer row: where the data goes, centred, with a grey 〔换个位置…〕 (a first start with a+ place, a later start whose drive runs low). The button never gives way; the text is cut with+ an ellipsis when the two do not fit (English, a long folder). It ends 4 px under the sheet. */+.footrow{position:absolute;left:calc(50% - 312px);right:calc(50% - 312px);top:calc(100% - 40px);display:flex;justify-content:center;font-size:13px;line-height:18px;color:var(--bt-ink-2)}+.place{flex:0 1 auto;min-width:0;margin:0;display:flex;align-items:center;gap:8px;white-space:nowrap;transition:opacity .22s ease-out}+@starting-style{.place{opacity:0}}.place-text{min-width:0;overflow:hidden;text-overflow:ellipsis}-html:is([data-start=later],[data-start=moving]) .footrow{display:none}+html[data-start=moving] .footrow{display:none}/* A work area under 588 px gets a 500 px window: the stage rises 8 px and the sheet still endsabove the footer. */@media (max-height:520px){.stage{top:-8px}html[data-frame=system] .stage{top:-32px}.sheet{height:calc(100% - 296px)}}@@ -238,7 +238,7 @@ html[data-start=first]:not([data-resume],[data-settled],[data-tier=quiet]) .ripphtml[data-start=first]:not([data-resume],[data-settled]) .voice{animation:bt-veil .22s ease-out .16s backwards}html:not([data-resume],[data-settled]) .water{animation:bt-veil .22s ease-out .22s backwards}html:not([data-resume],[data-settled]) .arc-base{animation:bt-ring-draw .5s cubic-bezier(.3,.7,.4,1) .18s backwards}-html[data-start=first]:not([data-resume],[data-settled]) :is(.note,.place){animation:bt-veil .22s ease-out .42s backwards}+html[data-start=first]:not([data-resume],[data-settled]) .place{animation:bt-veil .22s ease-out .42s backwards}html:is([data-start=later],[data-start=moving]):not([data-resume],[data-entered]) .whale-move{animation:bt-enter-later var(--spring-tap-ms) var(--spring-tap) backwards}html:is([data-start=later],[data-start=moving]):not([data-resume],[data-settled]) .voice{animation:bt-veil .22s ease-out .06s backwards}@@ -263,7 +263,7 @@ html[data-tail=dash]:not([data-tier=quiet]) #tail{animation:bt-tail-dash .55s ea@keyframes bt-tail-dash{from{transform:rotate(-8deg)}to{transform:rotate(8deg)}}/* hand-off: window-level content fades */-html[data-exit~=caption] .caption,html[data-exit~=all] :is(.voice,.water,.ring,.spout,.sheet,.note,.place){opacity:0;transition:opacity .16s}+html[data-exit~=caption] .caption,html[data-exit~=all] :is(.voice,.water,.ring,.spout,.sheet,.place){opacity:0;transition:opacity .16s}html[data-hidden] *{animation-play-state:paused!important}/* reduced motion (ui-standard 9.6, styles.js:106): static whale, fades only */@@ -273,7 +273,7 @@ html[data-hidden] *{animation-play-state:paused!important}:root[data-eyes=happy] .bt-eye-happy{opacity:1}@media (prefers-reduced-motion:reduce){:root :is(.whale-x,.whale-gaze,.whale,.whale-move,.whale-loop,#tail,#gaze,#eye-pair,.bt-eye,.bt-eye-happy,.ripple,.stage){animation:none!important;transition:none!important}-:root :is(.voice,.water,.note,.place,.arc-base,.arc-glow,.ring){animation:none!important}+:root :is(.voice,.water,.place,.arc-base,.arc-glow,.ring){animation:none!important}:root :is(.arc-fill,.ring-full){transition-duration:.12s!important}:root .voice>span{animation:none!important;background:none!important;color:var(--bt-ink)!important}:root :is(.voice,.caption>*,.card,.miss,.banner,.log,.confirm,.models,[data-u]){filter:none!important;scale:none!important;transition-property:opacity!important;transition-duration:.12s!important;transition-delay:0s!important}diff --git a/app/src/start/start.html b/app/src/start/start.htmlindex 50f6717d..762fff07 100644--- a/app/src/start/start.html+++ b/app/src/start/start.html@@ -35,6 +35,7 @@<section class="card" data-kind="rejected" hidden><div class="card-scroll"><h2 class="card-title" data-t="say.rejected"></h2><p class="lead" data-t="reason.place.{reason}"></p></div><div class="card-actions"><button class="btn" data-look="primary" data-act="pick" data-t="btn.repick"></button><button class="btn" data-look="soft" data-act="answer" data-detail="rec" data-rec data-t="btn.useRec"></button><button class="btn" data-look="soft" data-act="answer" data-detail="keep" data-keep data-t="btn.keepDrive"></button><p class="foot" data-t="note.changeLater"></p></div></section><section class="card" data-kind="missing" hidden><div class="card-scroll"><h2 class="card-title" data-t="say.missing"></h2><p class="lead" data-t="card.missing.lead"></p></div><div class="card-actions"><button class="btn" data-look="primary" data-act="retry" data-t="btn.retry"></button><button class="btn" data-look="soft" data-act="pick" data-t="btn.relocate"></button><button class="btn" data-look="soft" data-act="freshStart" data-t="btn.freshStart"></button></div><p class="miss" data-t="card.missing.retryMissed" hidden></p><p class="foot" data-t="note.changeLater"></p></section><section class="card" data-kind="picked" hidden><div class="card-scroll"><h2 class="card-title" data-t="say.picked"></h2><p class="lead" data-t="card.picked.lead"></p></div><div class="card-actions"><button class="btn" data-look="primary" data-act="answer" data-detail="use" data-t="btn.continue"></button><button class="btn" data-look="soft" data-act="pick" data-t="btn.repick"></button><p class="foot" data-t="note.changeLater"></p></div></section>+<section class="card" data-kind="move" hidden><div class="card-scroll"><h2 class="card-title" data-t="say.move"></h2><p class="lead" data-t="card.move.lead"></p></div><div class="card-actions"><button class="btn" data-look="primary" data-act="answer" data-detail="move" data-t="btn.move"></button><button class="btn" data-look="soft" data-act="pick" data-t="btn.repick"></button><button class="btn" data-look="soft" data-act="answer" data-detail="cancel" data-t="btn.cancel"></button></div></section><section class="card" data-kind="import" hidden><div class="card-scroll"><h2 class="card-title" data-t="say.import"></h2><p class="lead" data-t="card.import.lead"></p><p class="small extra-row"><span data-t="card.import.extra"></span><button class="btn disclose" data-look="link" data-act="toggleMore" aria-expanded="false"><span data-t="btn.more"></span><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 6.2 8 9.7l3.5-3.5"/></svg></button></p><div class="more" hidden><p class="small ink" data-t="card.import.found"></p><p class="small" data-t="card.import.scope"></p><p class="small ink model-row"><span data-t="card.import.model"></span><button class="btn" data-look="link" data-act="toggleModels" aria-expanded="false" data-t="btn.changeModel"></button></p><ul class="models" hidden></ul><div class="opts"><label><input type="checkbox" data-opt="regen"><span data-t="card.import.optRegen"></span></label><label><input type="checkbox" data-opt="skipWork"><span data-t="card.import.optSkipWork"></span></label></div></div></div><div class="card-actions"><button class="btn" data-look="primary" data-act="answer" data-detail="copy" data-t="btn.copy"></button><button class="btn" data-look="soft" data-act="answer" data-detail="skip" data-t="btn.skipCopy"></button><p class="foot" data-t="note.copyLater"></p></div></section><section class="card" data-kind="importSpace" hidden><div class="card-scroll"><h2 class="card-title" data-t="say.importSpace"></h2><p class="lead" data-t="card.importSpace.lead"></p></div><div class="card-actions"><button class="btn" data-look="primary" data-act="pick" data-t="btn.pickPlace"></button><button class="btn" data-look="soft" data-act="answer" data-detail="skip" data-t="btn.skipCopy"></button></div></section><section class="card" data-kind="copying" hidden><div class="card-scroll"><h2 class="card-title" data-t="say.copying"></h2><div class="copy-steps"><ol class="steps"><li data-step="1"><span class="mark" aria-hidden="true"><span class="dot"></span><svg class="check" viewBox="0 0 16 16"><circle cx="8" cy="8" r="8"/><path d="M4.6 8.3 7 10.6l4.4-4.9"/></svg></span><span data-t="card.copying.step1"></span></li><li data-step="2"><span class="mark" aria-hidden="true"><span class="dot"></span><svg class="check" viewBox="0 0 16 16"><circle cx="8" cy="8" r="8"/><path d="M4.6 8.3 7 10.6l4.4-4.9"/></svg></span><span data-t="card.copying.step2"></span></li><li data-step="3"><span class="mark" aria-hidden="true"><span class="dot"></span><svg class="check" viewBox="0 0 16 16"><circle cx="8" cy="8" r="8"/><path d="M4.6 8.3 7 10.6l4.4-4.9"/></svg></span><span data-t="card.copying.step3"></span></li></ol><div class="bar" aria-hidden="true"><span class="bar-fill"></span></div></div><div class="confirm" hidden><p class="lead" data-t="card.copying.stopConfirm"></p></div></div><div class="card-actions"><span class="eta small"></span><button class="btn stop" data-look="soft" data-act="stopCopy" data-t="btn.stopCopy"></button><button class="btn" data-look="primary" data-act="keepCopying" data-confirm data-t="btn.keepCopying"></button><button class="btn danger" data-look="soft" data-act="stopCopy" data-detail="confirm" data-confirm data-t="btn.stopCopy"></button></div></section>@@ -49,7 +50,7 @@</section></main><div class="flight" aria-hidden="true"></div>-<footer class="footrow"><span class="note" data-t="foot.community"></span><p class="place" hidden><span class="place-text"></span><span aria-hidden="true">·</span><button class="btn" data-look="link" data-act="pick" data-detail="changePlace" data-t="btn.changePlace"></button></p></footer>+<footer class="footrow"><p class="place" hidden><span class="place-text"></span><button class="btn" data-look="small" data-act="pick" data-detail="changePlace" data-t="btn.changePlace"></button></p></footer><p class="sr live" aria-live="polite"></p></body></html>diff --git a/app/src/start/start.js b/app/src/start/start.jsindex d5d02c0a..cb06b95c 100644--- a/app/src/start/start.js+++ b/app/src/start/start.js@@ -54,12 +54,13 @@ function renderStatic() {for (const st of document.querySelectorAll('.station')) st.querySelector('.sr').textContent = say(`status.state.${st.dataset.state}`)if (s) { fillBlock(shown); placeUI(s.place); timeUI() }}-// Where the data goes, at the footer's right end with 「换个位置…」 (first starts; the main-// process sends no place on a reinstall or once a copied team lives there). The drive and its-// free space on Windows, the folder elsewhere.+// Where the data goes, centred in the footer with a grey 〔换个位置…〕: on a first start (the main+// process sends no place on a reinstall or once a copied team lives there), and on a later start+// whose drive is down to a fifth of its room at the start. The drive and its free space on+// Windows, the folder elsewhere.function placeUI(place) {// The failure page has its own buttons; the 180 s question still lets the place change.- const on = first && place !== null && typeof place === 'object' && !['failed', 'viewFailed'].includes(s?.view)+ const on = START !== 'moving' && place !== null && typeof place === 'object' && !['failed', 'viewFailed'].includes(s?.view)placeEl.hidden = !onif (!on) returnconst key = place.drive ? (place.free ? 'foot.place.drive' : 'foot.place.driveOnly') : place.free ? 'foot.place.path' : 'foot.place.pathOnly'diff --git a/app/src/start/text.mjs b/app/src/start/text.mjsindex 7a06582c..04c5206f 100644--- a/app/src/start/text.mjs+++ b/app/src/start/text.mjs@@ -40,6 +40,7 @@ export const TEXT = {'say.inUse': 'DeepSeek Harness 还在用这个团队','say.newer': '这些对话比我新','say.copying': '正在搬过来',+ 'say.move': '搬到这个文件夹?',// hint'hint.space': '{drive} 盘只剩 {free}',// card@@ -47,6 +48,7 @@ export const TEXT = {'card.missing.lead': '找不到数据文件夹 {path}。可能是移动硬盘没插上,或者文件夹被移走、删除了。旧数据不会被改动。','card.missing.retryMissed': '还是找不到这个文件夹。','card.picked.lead': '会放在 {path}。',+ 'card.move.lead': '会把数据复制到 {path},然后重新启动。原来的 {dataDir} 原样留着,确认没问题后可以自己删掉。','card.import.lead': 'DeepSeek Harness 里有 {bots} 个 Bot 和 {groups} 个群聊(对话 {chats},工作文件 {work})。复制过来?','card.import.extra': '复制后会多占 {total},DeepSeek Harness 里的原件不动。','card.import.found': '在 {path} 里找到 {bots} 个 Bot({names}等)和 {groups} 个群聊,{sessions} 段对话。',@@ -78,6 +80,8 @@ export const TEXT = {'reason.place.dsh': '{path} 是 DeepSeek Harness 的数据。','reason.place.program': '{path} 在程序文件夹里,卸载时会删掉。','reason.place.nested': '{path} 和现在放数据的位置重叠。',+ 'reason.place.drive': '{path} 是整块磁盘,要选它里面的一个文件夹。',+ 'reason.place.workspace': '{path} 和总工作区互相包含。','reason.start.permission': '没有写入权限。','reason.start.space': '磁盘空间不够。','reason.start.files': '程序文件不完整,可能被杀毒软件拦掉了一部分。',@@ -125,7 +129,6 @@ export const TEXT = {'note.copyLater': '也可以在 设置 → 通用 → 位置 里复制。','note.copyAgain': '以后可以在 设置 → 通用 → 位置 里复制。',// foot- 'foot.community': '社区开源项目,不是 DeepSeek 官方产品','foot.place.drive': '数据放在 {drive} 盘(剩 {free})','foot.place.driveOnly': '数据放在 {drive} 盘','foot.place.path': '数据放在 {path}(剩 {free})',@@ -186,6 +189,7 @@ export const TEXT = {'say.inUse': 'DeepSeek Harness is still using this team','say.newer': 'These chats are newer than me','say.copying': 'Moving your team in',+ 'say.move': 'Move the data here?',// hint'hint.space': 'Only {free} left on drive {drive}',// card@@ -193,6 +197,7 @@ export const TEXT = {'card.missing.lead': 'Can’t find the data folder {path}. The external drive may be unplugged, or the folder was moved or deleted. The old data won’t be changed.','card.missing.retryMissed': 'Still can’t find this folder.','card.picked.lead': 'It will go in {path}.',+ 'card.move.lead': 'DeepSeek Bot copies its data to {path} and starts again. {dataDir} stays as it is; once all is well you can delete it yourself.','card.import.lead': 'DeepSeek Harness has {bots|Bot|Bots} and {groups|group chat|group chats} (chats {chats}, work files {work}). Copy them over?','card.import.extra': 'The copy takes another {total}; the originals in DeepSeek Harness stay untouched.','card.import.found': 'Found {bots|Bot|Bots} ({names} and others), {groups|group chat|group chats} and {sessions|chat|chats} in {path}.',@@ -224,6 +229,8 @@ export const TEXT = {'reason.place.dsh': '{path} is DeepSeek Harness’s data.','reason.place.program': '{path} is in the program folder, which uninstalling removes.','reason.place.nested': '{path} overlaps where the data is now.',+ 'reason.place.drive': '{path} is a whole drive; choose a folder on it.',+ 'reason.place.workspace': '{path} and the team workspace contain each other.','reason.start.permission': 'No permission to write.','reason.start.space': 'Not enough disk space.','reason.start.files': 'Program files are incomplete; antivirus software may have blocked some of them.',@@ -271,7 +278,6 @@ export const TEXT = {'note.copyLater': 'You can also copy the team in Settings → General → Location.','note.copyAgain': 'You can copy the team later in Settings → General → Location.',// foot- 'foot.community': 'A community open-source project, not an official DeepSeek product','foot.place.drive': 'Data on drive {drive}, {free} free','foot.place.driveOnly': 'Data on drive {drive}','foot.place.path': 'Data in {path}, {free} free',diff --git a/app/test/helpers/app-harness.mjs b/app/test/helpers/app-harness.mjsindex 38068884..0dbc8551 100644--- a/app/test/helpers/app-harness.mjs+++ b/app/test/helpers/app-harness.mjs@@ -20,14 +20,15 @@ export const waitFor = async (check, what, timeout = 10_000) => {/*** Start the app on throwaway folders: the places are chosen already and the one-time notice* is answered, so that the app asks nothing. The Host answers when the test lets it.- * @param {{ packaged?: boolean }} options whether the app is a packaged one, with an updater+ * @param {{ packaged?: boolean, saved?: object }} options whether the app is a packaged one, with+ * an updater; what else locations.json keeps beside the places*/-export const startApp = async ({ packaged = true } = {}) => {+export const startApp = async ({ packaged = true, saved = {} } = {}) => {const home = mkdtempSync(join(tmpdir(), 'ds-bot-main-home-'))const workspace = join(home, 'workspace')mkdirSync(workspace, { recursive: true })mkdirSync(paths.userData, { recursive: true })- writeFileSync(join(paths.userData, 'locations.json'), JSON.stringify({ dataDir: home, workspace }))+ writeFileSync(join(paths.userData, 'locations.json'), JSON.stringify({ dataDir: home, workspace, ...saved }))writeFileSync(join(paths.userData, 'tray-close-acknowledged'), '')hold()await import('../../src/main.mjs')@@ -44,6 +45,9 @@ export const startApp = async ({ packaged = true } = {}) => {// The start window, which shows while the Host boots and hands over to the team window.const isStart = win => (win.options.webPreferences?.additionalArguments ?? []).some(arg => arg.startsWith('--ds-bot-start='))+/** The start windows the app opened. */+export const startWindows = () => state.windows.filter(isStart)+/** The team windows the app built, the start window left out. */export const teamWindows = () => state.windows.filter(win => !isStart(win))diff --git a/app/test/helpers/fake-electron.mjs b/app/test/helpers/fake-electron.mjsindex d5e7283d..3211b125 100644--- a/app/test/helpers/fake-electron.mjs+++ b/app/test/helpers/fake-electron.mjs@@ -113,7 +113,8 @@ class FakeWebContents extends EventEmitter {this.isDestroyed = () => this.win.destroyedthis.getURL = () => this.win.urlthis.getTitle = () => 'DeepSeek Bot'- this.send = () => {}+ this.sent = []+ this.send = (...args) => { this.sent.push(args) }this.setWindowOpenHandler = () => {}this.insertCSS = async () => {}this.toggleDevTools = () => {}diff --git a/app/test/main-low-space.test.mjs b/app/test/main-low-space.test.mjsnew file mode 100644index 00000000..bd282aa8--- /dev/null+++ b/app/test/main-low-space.test.mjs@@ -0,0 +1,88 @@+// A later start whose drive is down to a fifth of the free space it had when the data went there+// shows the place line (start-window §5), and its 〔换个位置…〕 moves the data as Settings does,+// asked on the start page's cards instead of message boxes: the folder picker, then 「这里放不了」+// or 「搬到这个文件夹?」 〔移动并重启〕; the start window becomes the move's, the Host stops, the+// data is copied and the app starts again on the new folder. The Electron parts are test+// doubles: no display, no DSH, no data of the user.+import assert from 'node:assert/strict'+import { existsSync, mkdtempSync, readFileSync } from 'node:fs'+import { tmpdir } from 'node:os'+import { join } from 'node:path'+import { test } from 'node:test'+import { paths, state } from './helpers/fake-electron.mjs'+import { HostProcess, state as hostState } from './helpers/fake-host-process.mjs'+import { startApp, startWindows, waitFor, window } from './helpers/app-harness.mjs'+import { installHooks } from './helpers/register.mjs'++await installHooks()++test('a later start on a drive that runs low shows the place line, and its button moves the data on cards', async () => {+ const { home, workspace } = await startApp({ saved: { freeAtStart: Number.MAX_SAFE_INTEGER } })+ await waitFor(() => startWindows().length === 1, 'open the start window')+ const start = startWindows()[0]+ const last = () => start.webContents.sent.filter(([channel]) => channel === 'ds-bot:start-state').at(-1)?.[1]+ const act = async (name, value) => {+ // On a later task than the one that drew the card, as a click is: the pick that drew it+ // finishes first.+ await new Promise((resolve) => { setImmediate(resolve) })+ start.webContents.mainFrame.url = start.url+ return state.ipc.get('ds-bot:start-act')({ sender: start.webContents, senderFrame: start.webContents.mainFrame }, name, value === undefined ? undefined : { value })+ }+ const messageBoxes = () => state.dialogs.filter(options => 'message' in options)+ await waitFor(() => last()?.place !== undefined, 'show the place line')+ assert.equal(last().start, 'later')++ // A folder inside the data: 「这里放不了」 with the reason.+ state.openAnswer = { canceled: false, filePaths: [join(home, 'inside')] }+ assert.equal(await act('pick', 'changePlace'), true)+ await waitFor(() => last().card?.kind === 'rejected', 'say why the folder cannot be used')+ assert.deepEqual(last().card, { kind: 'rejected', reason: 'nested', path: join(home, 'inside') })+ // A folder the checks cannot read is refused for want of permission; the start goes on.+ const unreadable = 'C:\\System Volume Information'+ if (process.platform === 'win32' && existsSync(unreadable)) {+ state.openAnswer = { canceled: false, filePaths: [unreadable] }+ await act('pick')+ await waitFor(() => last().card?.reason === 'permission', 'refuse a folder it cannot read')+ assert.equal(last().view, 'card')+ }+ // 〔重新选…〕 and a cancelled picker: back to the start.+ state.openAnswer = { canceled: true, filePaths: [] }+ await act('pick')+ await waitFor(() => last().view === 'boot' && last().card === undefined, 'go back to the start')++ // A new folder: 「搬到这个文件夹?」, then 〔取消〕.+ const to = join(mkdtempSync(join(tmpdir(), 'ds-bot-move-')), 'data')+ state.openAnswer = { canceled: false, filePaths: [to] }+ await act('pick', 'changePlace')+ await waitFor(() => last().card?.kind === 'move', 'ask about the move')+ assert.deepEqual(last().card, { kind: 'move', path: to, dataDir: home })+ assert.equal(await act('answer', 'cancel'), true)+ await waitFor(() => last().view === 'boot' && last().card === undefined, 'go back to the start')+ assert.equal(state.relaunches.length, 0)+ // The boot goes on: the engine comes up and the team view loads (no ready(), so the start+ // window stays for the rest).+ hostState.release()+ await waitFor(() => window().loaded.some(url => url.startsWith('http://127.0.0.1:')), 'go on with the boot')++ // Whether the copy had begun when the Host stopped.+ const copiedAtStop = []+ const stop = HostProcess.prototype.stop+ HostProcess.prototype.stop = async function (...args) {+ copiedAtStop.push(existsSync(to))+ return stop.apply(this, args)+ }++ // Again, and 〔移动并重启〕.+ await act('pick', 'changePlace')+ await waitFor(() => last().card?.kind === 'move', 'ask about the move again')+ await act('answer', 'move')+ await waitFor(() => start.url.endsWith('?start=moving'), 'turn the start window into the move\'s')+ await waitFor(() => state.relaunches.length === 1, 'start again on the new folder')+ assert.equal(copiedAtStop[0], false, 'the Host stopped before the copy')+ assert.ok(existsSync(to), 'the data was copied')+ const saved = JSON.parse(readFileSync(join(paths.userData, 'locations.json'), 'utf8'))+ assert.equal(saved.dataDir, to)+ assert.equal(saved.workspace, workspace)+ assert.ok(Number.isFinite(saved.freeAtStart) && saved.freeAtStart < Number.MAX_SAFE_INTEGER, 'the new folder keeps its own free space')+ assert.deepEqual(messageBoxes(), [], 'no message box on the way')+})diff --git a/app/test/main-room-left.test.mjs b/app/test/main-room-left.test.mjsnew file mode 100644index 00000000..4a502b80--- /dev/null+++ b/app/test/main-room-left.test.mjs@@ -0,0 +1,48 @@+// A later start whose drive still has more than a fifth of the free space it had when the data+// went there shows no place line (start-window §5). That free space stays with the data's folder+// when the team workspace changes, and the move from Settings (ds-bot:move-data) still asks,+// copies and starts again on the new folder, which keeps its own. The Electron parts are test+// doubles: no display, no DSH, no data of the user.+import assert from 'node:assert/strict'+import { existsSync, mkdtempSync, readFileSync } from 'node:fs'+import { tmpdir } from 'node:os'+import { join } from 'node:path'+import { test } from 'node:test'+import { paths, state } from './helpers/fake-electron.mjs'+import { state as hostState } from './helpers/fake-host-process.mjs'+import { handOff, startApp, startWindows, waitFor, window } from './helpers/app-harness.mjs'+import { installHooks } from './helpers/register.mjs'++await installHooks()++const saved = () => JSON.parse(readFileSync(join(paths.userData, 'locations.json'), 'utf8'))++test('a later start with room to spare shows no place line; Settings still moves the data', async () => {+ const { home } = await startApp({ saved: { freeAtStart: 1 } })+ await waitFor(() => startWindows().length === 1, 'open the start window')+ const start = startWindows()[0]+ await waitFor(() => window() !== undefined, 'build the team window')+ hostState.release()+ await handOff()+ const snapshots = start.webContents.sent.filter(([channel]) => channel === 'ds-bot:start-state').map(([, snapshot]) => snapshot)+ assert.ok(snapshots.length > 0)+ assert.ok(snapshots.every(snapshot => snapshot.place === undefined), 'no place line')+ assert.equal(saved().freeAtStart, 1)++ // A new team workspace keeps the free space the data's folder had.+ const win = window()+ const event = { sender: win.webContents, senderFrame: win.webContents.mainFrame }+ const workspace = join(home, 'other-workspace')+ state.ipc.get('ds-bot:team-workspace')(event, workspace)+ assert.deepEqual({ workspace: saved().workspace, freeAtStart: saved().freeAtStart }, { workspace, freeAtStart: 1 })++ // The move from Settings: its picker and its question.+ const to = join(mkdtempSync(join(tmpdir(), 'ds-bot-move-')), 'data')+ state.openAnswer = { canceled: false, filePaths: [to] }+ state.dialogAnswer = { response: 0 }+ assert.equal(await state.ipc.get('ds-bot:move-data')(event, workspace), true)+ assert.equal(state.relaunches.length, 1)+ assert.ok(existsSync(to), 'the data was copied')+ assert.equal(saved().dataDir, to)+ assert.ok(saved().freeAtStart > 1, 'the new folder keeps its own free space')+})diff --git a/app/test/main.test.mjs b/app/test/main.test.mjsindex 51d3eb38..6d47a449 100644--- a/app/test/main.test.mjs+++ b/app/test/main.test.mjs@@ -2,10 +2,12 @@// back to it, and a window that is gone for good is built anew and talks to the Host that// runs. The Electron parts are test doubles: no display, no DSH, no data of the user.import assert from 'node:assert/strict'+import { readFileSync } from 'node:fs'+import { join } from 'node:path'import { before, test } from 'node:test'-import { state } from './helpers/fake-electron.mjs'+import { paths, state } from './helpers/fake-electron.mjs'import { state as hostState } from './helpers/fake-host-process.mjs'-import { handOff, startApp, teamWindows, trayMenu, waitFor, window } from './helpers/app-harness.mjs'+import { handOff, startApp, startWindows, teamWindows, trayMenu, waitFor, window } from './helpers/app-harness.mjs'import { installHooks } from './helpers/register.mjs'await installHooks()@@ -19,6 +21,13 @@ test('the app starts with a window and a tray', async () => {assert.equal(state.quits, 0, 'the app goes on')})+test('places saved before the free space at the start was kept keep it from this start on', async () => {+ const saved = () => JSON.parse(readFileSync(join(paths.userData, 'locations.json'), 'utf8'))+ await waitFor(() => saved().freeAtStart > 0, 'keep the free space of the data\'s drive')+ // Kept from now on: this start shows no place line.+ assert.ok(startWindows()[0].webContents.sent.every(([channel, snapshot]) => channel !== 'ds-bot:start-state' || snapshot.place === undefined))+})+test('the first window trades the launch URL for the Host\'s cookie', async () => {const win = window()hostState.release()diff --git a/app/test/place.test.mjs b/app/test/place.test.mjsindex 5112d9d1..6b09b420 100644--- a/app/test/place.test.mjs+++ b/app/test/place.test.mjs@@ -3,7 +3,7 @@ import { existsSync, mkdirSync, mkdtempSync, rmSync, symlinkSync, writeFileSyncimport { tmpdir } from 'node:os'import { join, parse, resolve, sep } from 'node:path'import { test } from 'node:test'-import { currentRootOf, DATA_DIR, driveOf, formatBytes, freeSpace, isEmptyTree, LAYER, pickFrom, placeOf, rootOf, shortPath, WORKSPACE_DIR } from '../src/place.mjs'+import { currentRootOf, DATA_DIR, driveOf, formatBytes, freeSpace, isEmptyTree, LAYER, LOW_SHARE, pickFrom, placeOf, rootOf, runningLow, shortPath, WORKSPACE_DIR } from '../src/place.mjs'const win32 = process.platform === 'win32'const temp = (t) => {@@ -55,6 +55,16 @@ test('the place line names the drive and its free space, or the folder', () => {}})+test('a drive runs low at a fifth of the free space it had when the data went there', () => {+ assert.equal(LOW_SHARE, 0.2)+ // 412 GB at the start: the line comes back at 82.4 GB.+ assert.equal(runningLow(82 * 2 ** 30, 412 * 2 ** 30), true)+ assert.equal(runningLow(83 * 2 ** 30, 412 * 2 ** 30), false)+ assert.equal(runningLow(20, 100), true)+ assert.equal(runningLow(21, 100), false)+ for (const [free, freeAtStart] of [[undefined, 100], [10, undefined], [10, 0], [Number.NaN, 100], [10, Number.POSITIVE_INFINITY]]) assert.equal(runningLow(free, freeAtStart), false)+})+test('the picker opens in the data folder\'s parent', (t) => {const dir = temp(t)assert.equal(pickFrom(join(dir, 'DeepSeek Bot', 'data')), join(dir, 'DeepSeek Bot'))diff --git a/app/test/start-page.test.mjs b/app/test/start-page.test.mjsindex c10d211b..daf8ad0c 100644--- a/app/test/start-page.test.mjs+++ b/app/test/start-page.test.mjs@@ -135,6 +135,19 @@ test('an empty or hidden arc leaves no dot: no dash touches its path', () => {assert.equal(touches(dashes(base), offsetOf(base)), true)})+test('the footer is the place line alone, centred with a grey button, on first and later starts', () => {+ assert.match(html, /<footer class="footrow"><p class="place" hidden><span class="place-text"><\/span><button class="btn" data-look="small" data-act="pick" data-detail="changePlace" data-t="btn.changePlace"><\/button><\/p><\/footer>/u)+ assert.ok(!('foot.community' in TEXT.zh), 'the community note is back')+ const css = read('start.css')+ assert.match(css, /\.footrow\{[^}]*justify-content:center/u)+ assert.match(css, /html\[data-start=moving\] \.footrow\{display:none\}/u)+ assert.doesNotMatch(css, /data-start=later[^{]*\.footrow/u)+ assert.doesNotMatch(css, /\.note\b/u)+ assert.match(code['start.js'], /const on = START !== 'moving' && place !== null/u)+ // A later start's move asks on a card: 〔移动并重启〕, 〔重新选…〕 and 〔取消〕.+ assert.match(html, /<section class="card" data-kind="move" hidden>.*?data-t="say\.move".*?data-t="card\.move\.lead".*?data-detail="move" data-t="btn\.move".*?data-act="pick" data-t="btn\.repick".*?data-detail="cancel" data-t="btn\.cancel".*?<\/section>/u)+})+// docs/plans/2026-10-29-start-copy.md §2: the first part of a key says where the line is.const LAYERS = ['voice', 'say', 'hint', 'card', 'reason', 'btn', 'note', 'foot', 'status', 'dialog']const layerOf = key => key.split('.')[0]@@ -248,7 +261,7 @@ test('every text key that the page uses exists', () => {// Keys the page builds from the snapshot's views, the stages and the failure reasons.for (const key of ['voice.failed', 'voice.viewFailed', 'voice.watchdog', 'voice.moving', 'voice.slow45', 'voice.slowLater', 'status.phase.data', 'status.phase.engine', 'status.phase.team', 'status.state.pending', 'status.state.active', 'status.state.done', 'status.state.failed']) assert.ok(key in TEXT.zh, key)assert.deepEqual(matching('reason.start.{reason}').sort(), ['reason.start.engine', 'reason.start.files', 'reason.start.other', 'reason.start.permission', 'reason.start.space'])- assert.deepEqual(matching('reason.place.{reason}').sort(), ['reason.place.dsh', 'reason.place.foreign', 'reason.place.nested', 'reason.place.onedrive', 'reason.place.permission', 'reason.place.program', 'reason.place.space'])+ assert.deepEqual(matching('reason.place.{reason}').sort(), ['reason.place.drive', 'reason.place.dsh', 'reason.place.foreign', 'reason.place.nested', 'reason.place.onedrive', 'reason.place.permission', 'reason.place.program', 'reason.place.space', 'reason.place.workspace'])assert.deepEqual(matching('reason.copy.{reason}').sort(), ['reason.copy.full', 'reason.copy.inUse', 'reason.copy.permission'])})diff --git a/app/test/start-window.test.mjs b/app/test/start-window.test.mjsindex 926d511c..92a19bde 100644--- a/app/test/start-window.test.mjs+++ b/app/test/start-window.test.mjs@@ -713,6 +713,31 @@ test('a start over in another folder drops the old engine\'s held ready', (t) =>assert.equal(o.state().view, 'handoff')})+test('a move from a later start turns the start window into the move\'s and drops the held hand-off', async (t) => {+ const m = startWindow(t)+ m.start.open('later')+ m.start.done('data')+ m.start.place({ drive: 'C', free: '30 GB' })+ assert.deepEqual(m.state().place, { drive: 'C', free: '30 GB' })+ // The folder picker and the question: a team view that is ready meanwhile waits for them.+ let answer+ const asked = m.start.asking(new Promise((resolve) => { answer = resolve }))+ m.start.done('engine')+ m.start.ready()+ assert.equal(m.state().view, 'boot')+ m.start.moving()+ answer('D:\\Data')+ await asked+ assert.equal(m.start.kind, 'moving')+ assert.equal(m.state().view, 'moving')+ assert.equal('place' in m.state(), false)+ assert.match(m.win().webContents.mainFrame.url, /\?start=moving$/u)+ assert.equal(m.act('pick', { value: 'changePlace' }), false)+ assert.equal(m.act('openLogs'), true)+ m.tick(WATCHDOG_MS)+ assert.equal(m.state().view, 'moving')+})+test('the 20 s check\'s verdict waits for a card\'s answer instead of being lost', (t) => {const v = startWindow(t)v.start.open('first')diff --git a/docs/plans/2026-10-26-start-window.md b/docs/plans/2026-10-26-start-window.mdindex 1ccc59bc..83d698c7 100644--- a/docs/plans/2026-10-26-start-window.md+++ b/docs/plans/2026-10-26-start-window.md@@ -53,8 +53,7 @@| 鲸鱼的话 | y 379–399,居中 | y 226–246,居中,在圆环和卡片之间 | 15/20、600,`--bt-ink`;只有一行,不换行,实在放不下才用省略号;只在第 3 节列的几种时候有字 || 提示行 | y 403–431,居中 | 隐藏 | 13/18,`--bt-ink-2`;最多约 22 个字,或者只有〔打开日志文件夹〕;平时空着 || 纸面 | 空,点击穿过它 | x 48–672,y 260–496 | 只放卡片 |-| 底注 | x 48,y 504–522 | 同左 | 「社区开源项目,不是 DeepSeek 官方产品」,13/18 |-| 位置行 | 右对齐 x 672,y 504–522,和底注同一行,挤不下时位置行的字省略 | 同左 | 「数据放在 C 盘(剩 412 GB)· 换个位置…」,13/18,`--bt-ink-2`;「换个位置…」是链接(第 6 节)。只在新团队和要导入的首次启动有,重装没有;导入一开始复制就收起;失败页和「团队界面没有加载出来」时隐藏,180 秒的问题开着时还能点。剩余空间按资源管理器的算法(1024 进制)。Windows 以外写文件夹(`~/.ds-bot`)代替盘;查不到剩余空间时不写括号 |+| 位置行 | 居中,y 500–528,在纸面下面 4 px;挤不下时字省略,按钮不让 | 同左 | 「数据放在 C 盘(剩 412 GB)」,13/18,`--bt-ink-2`,后面一个灰色的小按钮〔换个位置…〕(28 px 高,和提示行的〔打开日志文件夹〕一样,第 6 节)。新团队和要导入的首次启动有,重装没有;以后的启动只在数据所在的盘只剩开始时的五分之一时有,按钮当场搬数据(第 5 节);导入一开始复制就收起;失败页和「团队界面没有加载出来」时隐藏,180 秒的问题开着时还能点。剩余空间按资源管理器的算法(1024 进制)。Windows 以外写文件夹(`~/.ds-bot`)代替盘;查不到剩余空间时不写括号 |- 圆环的三段弧从正上方起顺时针排,依次是「准备数据文件夹」「启动本机引擎」「打开团队」,各占 120°,段与段之间空 10°(每段画出 110°):- 没开始:`--bt-line` 的淡线。@@ -62,10 +61,10 @@- 完成:`--bt-ink-deepseek` 的线顺时针把这一段画满,.56 s。- 失败:这段线变成 60% 的 `--bt-danger`(第 7 节)。- 交接:段与段之间的空隙接上,合成一整圈(.3 s),整圈鼓起一次(.5 s,最大 1.035 倍,第 8 节)。-- 圆环、水道、水线、鲸鱼的点击区和涟漪是一块,下面叫水塘。没有卡片时,水塘、鲸鱼的话和提示行整组比有卡片时低 45 px,鲸鱼在窗口的视觉中心稍上一点。要出卡片时,整组用 `SPRING_SHAPE` 上移 45 px,水塘在同一个弹簧里以圆心为准缩到 .62 倍、再上移 60 px,圆环落在卡片上面,卡片出现在下面的纸面里;卡片收回后,水塘回到原大,整组回到低处。底注和位置行不动。页面不能滚动(第 11 节)。+- 圆环、水道、水线、鲸鱼的点击区和涟漪是一块,下面叫水塘。没有卡片时,水塘、鲸鱼的话和提示行整组比有卡片时低 45 px,鲸鱼在窗口的视觉中心稍上一点。要出卡片时,整组用 `SPRING_SHAPE` 上移 45 px,水塘在同一个弹簧里以圆心为准缩到 .62 倍、再上移 60 px,圆环落在卡片上面,卡片出现在下面的纸面里;卡片收回后,水塘回到原大,整组回到低处。位置行不动。页面不能滚动(第 11 节)。- 鲸鱼的话和提示行直接写在 Mica 上。没有卡片时它们在纸面的位置上:纸面空着时点击穿过它,〔打开日志文件夹〕点得到。- 卡片是不透明的 `--bt-card`:1 px `--bt-line` 边,圆角 12,内边距 16 × 20。卡片正文比纸面高时,正文在卡片里滚动,按钮行固定在卡片底部。-- 以后的启动和首次启动是同一个布局:同样 112 px 的鲸鱼、圆环和水线,没有底注和位置行(第 5 节)。+- 以后的启动和首次启动是同一个布局:同样 112 px 的鲸鱼、圆环和水线;位置行只在盘快满时有(第 5 节)。### 3. 鲸鱼的总规则@@ -81,7 +80,7 @@- 每段一次性动作带序号,新状态到了就丢掉旧的。等动画结束的地方都配一个计时器兜底,因为最小化的窗口不走动画。- 弹簧只用 `motion.js` 的常量。头像动作的关键帧沿用插件的写法(`styles.js` 的 `bt-hop`、`bt-bob` 等),换算成像素。- 鲸鱼说话:- - 顺利的时候鲸鱼不说话,页面上除了底注和位置行(盘不够时还有提示行的那一句)没有字。只在要用户知道或回答的时候,圆环下面那一行(第 2 节)才有一句短话,用 Main Bot 自己的口吻:+ - 顺利的时候鲸鱼不说话,页面上除了位置行(盘不够时还有提示行的那一句)没有字。只在要用户知道或回答的时候,圆环下面那一行(第 2 节)才有一句短话,用 Main Bot 自己的口吻:- 45 秒,引擎还没起来:首次启动「有点久,可能是杀毒软件在查新文件」;以后的启动和搬数据时「比平时慢,请再等一会儿」(第 4、5 节)。- 180 秒:「等太久了,要不要重试?」(第 6 节)。- 失败:「DeepSeek Bot 没能启动」「团队界面没有加载出来」(第 7 节)。@@ -143,7 +142,7 @@- 180 ms,圆环的三段淡线各自顺时针画出来(.5 s)。- 220 ms,水线淡入。- 360 ms,睁眼。- - 420 ms,底注和位置行淡入。+ - 420 ms,位置行淡入。- 560 ms,到位。入场全是 CSS,不等脚本。入场时来的卡片和就绪,等它到位再处理。鲸鱼的话空着;提示行只在盘不够时有那一句(第 3 拍)。2. 「准备数据文件夹」:到 560 ms 还没完成、并且已经等了 250 ms,第一段弧才进入进行中,鲸鱼搜索。完成时第一段弧画满,但不早于入场后 260 ms(页面画出来后 820 ms),好让人看见它画满;这一小段等待里鲸鱼不换循环(入场后的姿势,或者接着搜索),弧画满、这一拍走完(360 ms)才换成工作的循环:为这 260 ms 换循环,循环自己要停满的 400 ms 会把弧再推迟。这 820 ms 只是弧在等:主进程建好数据文件夹就接着启动引擎,不等页面画出来。一般的首次启动里,数据阶段在页面画出来以前就结束了(主进程建文件夹要 0.3 到 1.2 秒,页面要 1 秒上下、冷启动时好几秒才画出来),所以第一段弧不显示进行中,820 ms 时直接画满。重新开始(第 7 节)不等这一拍;入场时就来的就绪照第 1 拍。@@ -155,16 +154,17 @@8. `dsBotApp.ready()`:剩下的弧画满,圆环合上,鲸鱼喷一次水,跳出水面,落到团队窗口里 Main Bot 的头像上(没有地方落时潜下去),见第 8 节。- 10 秒、45 秒和 180 秒按启动的时钟算,页面上不显示这个时钟。卡片等用户回答时它停着,回答后接着走:用户自己想了多久,不算在引擎头上。-- 位置行(第 2 节)从入场起就在:新团队和要导入时写「数据放在 C 盘(剩 412 GB)· 换个位置…」,什么都不点就按它走,不问。点「换个位置…」才开系统选择框(第 6 节),选择框开着时时钟也停。交接时随整组淡出(第 8 节)。+- 位置行(第 2 节)从入场起就在:新团队和要导入时写「数据放在 C 盘(剩 412 GB)」和〔换个位置…〕,什么都不点就按它走,不问。点〔换个位置…〕才开系统选择框(第 6 节),选择框开着时时钟也停。交接时随整组淡出(第 8 节)。### 5. 以后的启动-- 和首次启动是同一个页面:112 px 的鲸鱼在圆环中间,一段水线,三段弧跟着阶段走(第 2、3 节);没有底注和位置行,顺利时没有字。+- 和首次启动是同一个页面:112 px 的鲸鱼在圆环中间,一段水线,三段弧跟着阶段走(第 2、3 节);顺利时没有字,也没有位置行,盘快满时例外(下面)。- 0 ms:鲸鱼从水线下 84 px 浮上来(`SPRING_TAP` 290 ms),不倾斜,眼睛睁着,没有涟漪;圆环的淡线 180 ms 起画出来,水线 220 ms 淡入。第一段弧最早在入场后 260 ms(页面画出来后 550 ms)画满。- 前 1 秒鲸鱼不换循环:第一段弧画满时照样划两下尾巴、向前一涌,再点一下头(第 3 节)。1 秒后开始工作(只上下晃和眨眼,三个阶段都一样)。- 10 秒:鲸鱼看向用户一次,循环放慢,不出字。- 45 秒,引擎还没起来:鲸鱼说「比平时慢,请再等一会儿」,提示行只有〔打开日志文件夹〕,鲸鱼改成思考。- 180 秒:和首次启动一样。+- 盘快满了:数据放到一个文件夹时(首次启动定下位置、导入复制完、换位置或搬数据以后),`locations.json` 记下那块盘当时的剩余空间(`freeAtStart`);以后启动时剩余空间到了它的 20% 以下(开始时剩 412 GB 的,到 82 GB 以下),数据阶段读出位置时出现位置行「数据放在 C 盘(剩 30 GB)」和〔换个位置…〕,淡入 .22 s。点〔换个位置…〕走 设置 → 通用 → 位置 的搬数据,但除了系统选择框不弹系统对话框,都在纸面的卡片上问(第 6 节):选了不能用的文件夹出「这里放不了」加一句原因,〔重新选…〕;能用就出「搬到这个文件夹?」「会把数据复制到 `D:\Data`,然后重新启动。原来的 `C:\Users\<用户名>\.ds-bot` 原样留着,确认没问题后可以自己删掉。」〔移动并重启〕(主按钮)〔重新选…〕〔取消〕。选择框和卡片开着时时钟停、交接等着;选择框被取消或点〔取消〕就回到启动,照常进团队。点〔移动并重启〕时再查一次(总工作区可能刚好换了),然后启动窗口当场变成搬数据的样子(页面重新载入,「正在搬 DeepSeek Bot 的数据…」),这次启动的引擎停下,走 设置 → 通用 → 位置 的〔移到…〕同一条路:复制完在新文件夹重新启动(今天旧文件夹留着,卡片上也这样写;上手流程第 8 节「搬是搬」落地时这里一起改);复制时另一个 DSH 正在用这份数据、或者复制失败,仍和设置里一样弹系统对话框,然后在原来的文件夹重新启动(「已知限制」)。以前存下、没有记这个数的位置,这次启动补记,下一次起才按它算;`DS_BOT_HOME` 的一次性运行不记也不显示。- 换位置(第 1 节)时,鲸鱼下面一直是「正在搬 DeepSeek Bot 的数据…」,45 秒起换成「比平时慢,请再等一会儿」和〔打开日志文件夹〕。以后的启动和搬数据时,这一行的字 1 秒后带流光。- 就绪时没有庆祝(重试或重新开始后第一次成功时例外,第 8 节):剩下的弧画满、圆环合上,100 ms 后鲸鱼跳向 Main Bot 的头像(没有地方落时潜下去);220 ms 时发 `handoffShow`,启动窗口和首次启动一样长成主窗口的矩形,鲸鱼 650 ms 时落在头像上,主窗口在就绪后约 0.7 秒露面(第 8 节)。- `DS_BOT_HOME` 的一次性运行用这一套,只是不出卡片。@@ -179,6 +179,7 @@- 推荐盘:「C 盘有点挤」(空间不够),「这里不让我放东西」(默认位置不能用)。- 「会放在…」:「我多加了一层文件夹」。- 被拒绝的卡:「这里放不了」。+ - 以后的启动搬数据的确认:「搬到这个文件夹?」。- 找不到数据文件夹:「数据不在原来的地方了」。- 导入时空间不够:「地方不够放」。- DSH 正在用这个团队:「DeepSeek Harness 还在用这个团队」。@@ -187,14 +188,15 @@- 恢复卡、团队界面没有加载出来和复制失败的卡没有这一行,也不说俏皮话(第 7 节)。180 秒的卡也没有,问题由鲸鱼问。- 鲸鱼跳不跳:- 应用主动问的卡片(推荐盘、找不到数据文件夹、导入、180 秒),跳两下,最后一跳落地时探身看着卡片,然后停下(第 3 节第二张表)。- - 用户自己引出的卡片(「其他位置…」选完后的「会放在…」、停止复制的确认),不跳,变形开始 70 ms 后探身。+ - 用户自己引出的卡片(「其他位置…」选完后的「会放在…」、以后的启动搬数据时的「这里放不了」和「搬到这个文件夹?」、停止复制的确认),不跳,变形开始 70 ms 后探身。- 同一件事又出了新问题(复制时空间不够),跳一下。- 选位置的卡片只有推荐盘这一种,只在首次启动出现,〔放到 D 盘〕〔仍然放在 C 盘〕都已经试写通过(上手流程第 3 节);以后的启动还会出「找不到数据文件夹」卡:- 推荐盘:「C 盘只剩 1.2 GB。放到 D 盘(剩 412 GB)?」〔放到 D 盘〕(主按钮,拿到焦点)〔仍然放在 C 盘〕,按钮行末尾一个小链接「其他位置…」。默认位置不能用时,第一句换成原因(「DeepSeek Bot 没有权限在 `C:\Users\<用户名>` 里写文件。」),第二句一样;按钮只有〔放到 D 盘〕(主按钮)和小链接「其他位置…」,没有〔仍然放在 C 盘〕;没有可推荐的盘时只有〔选择其他位置…〕。- 「其他位置…」打开系统选择框,卡片留在后面。定出的根就是用户选的文件夹时(上手流程第 3 节的规则),卡片直接收回,照常启动,不确认。应用在里面加了一层 `DeepSeek Bot` 时,同一张卡变形成「会放在 `D:\DeepSeek Bot`。」〔继续〕(主按钮)〔重新选…〕。选的位置不能用,同一张卡写一句原因(「DeepSeek Bot 没有权限在 `D:\Data` 里写文件。」「`C:\Users\<用户名>\OneDrive\文档` 在 OneDrive 里,同步会打断正在写入的对话。」「`D:\Projects\DeepSeek Bot` 里已经有别的文件。」),〔重新选…〕(主按钮),来时那张卡的〔放到 D 盘〕〔仍然放在 C 盘〕照旧留着;选择框被取消就回到来时的卡。「会放在…」和被拒绝的卡也有脚注。- 脚注都是「以后可以在 设置 → 通用 → 位置 里改。」- 没有更好的盘时不出卡片:前 10 秒提示行写「C 盘只剩 1.2 GB」,之后提示行空着(第 4 节)。- - 位置行的「换个位置…」(第 2 节)不等推荐盘的卡:新团队和要导入的首次启动期间随时能点,引擎正在起也可以,走和「其他位置…」同一条路。选完先定根(上手流程第 3 节「一个位置」):根就是选的文件夹时不出卡,直接重新开始;加了一层 `DeepSeek Bot` 时出「会放在 `D:\DeepSeek Bot`。」〔继续〕(主按钮)〔重新选…〕;不能用时出「这里放不了」加一句原因(上面三句,再加「`D:\Data` 是 DeepSeek Harness 的数据。」「`C:\Program Files\DeepSeek Bot\data` 在程序文件夹里,卸载时会删掉。」),〔重新选…〕(主按钮);这两张卡都是用户自己引出的,不跳。选择框被取消就回到位置行:这一路没有来时的卡,「会放在…」和「这里放不了」也一起收回,仍按默认位置走。选了现在的根或数据文件夹就当没选;选在现在的数据文件夹里面、或者定出的根和它重叠,出「这里放不了」加「`C:\Users\<用户名>\.ds-bot\旧` 和现在放数据的位置重叠。」,总工作区里已经有东西时也一样,还空着的(这次启动刚建的)可以成为新的根:默认位置下选用户文件夹,就是「会放在 `C:\Users\<用户名>\DeepSeek Bot`。」;读不了的文件夹按没有权限处理;检查都穿过链接和联接看真正的路径,DSH 的家那句写用户选的文件夹。选择框或这两张卡开着时团队就绪了,交接和 20 秒的界面检查都等答完再走:交接会把启动窗口连同挂在它上面的选择框一起收掉。定好以后按第 7 节〔换个位置…〕的路重新开始:鲸鱼立刻沉下去,位置行立刻写新的盘;旧引擎直接结束,不等它起完、也不等它有序退出(两者都要 3 到 10 秒,鲸鱼会一直在水下;那个文件夹马上就删,没有要保全的东西),默认位置上这一次建的文件夹删掉(数据文件夹整个删,总工作区只在还是空的时候删),位置这时就记下,三段弧回到没开始,鲸鱼在原处重新浮上来。导入复制进行中不接这一下,复制完以后这一行收起:搬一个复制好的团队是 设置 → 通用 → 位置 的事。+ - 位置行的〔换个位置…〕(第 2 节)不等推荐盘的卡:新团队和要导入的首次启动期间随时能点,引擎正在起也可以,走和「其他位置…」同一条路。选完先定根(上手流程第 3 节「一个位置」):根就是选的文件夹时不出卡,直接重新开始;加了一层 `DeepSeek Bot` 时出「会放在 `D:\DeepSeek Bot`。」〔继续〕(主按钮)〔重新选…〕;不能用时出「这里放不了」加一句原因(上面三句,再加「`D:\Data` 是 DeepSeek Harness 的数据。」「`C:\Program Files\DeepSeek Bot\data` 在程序文件夹里,卸载时会删掉。」),〔重新选…〕(主按钮);这两张卡都是用户自己引出的,不跳。选择框被取消就回到位置行:这一路没有来时的卡,「会放在…」和「这里放不了」也一起收回,仍按默认位置走。选了现在的根或数据文件夹就当没选;选在现在的数据文件夹里面、或者定出的根和它重叠,出「这里放不了」加「`C:\Users\<用户名>\.ds-bot\旧` 和现在放数据的位置重叠。」,总工作区里已经有东西时也一样,还空着的(这次启动刚建的)可以成为新的根:默认位置下选用户文件夹,就是「会放在 `C:\Users\<用户名>\DeepSeek Bot`。」;读不了的文件夹按没有权限处理;检查都穿过链接和联接看真正的路径,DSH 的家那句写用户选的文件夹。选择框或这两张卡开着时团队就绪了,交接和 20 秒的界面检查都等答完再走:交接会把启动窗口连同挂在它上面的选择框一起收掉。定好以后按第 7 节〔换个位置…〕的路重新开始:鲸鱼立刻沉下去,位置行立刻写新的盘;旧引擎直接结束,不等它起完、也不等它有序退出(两者都要 3 到 10 秒,鲸鱼会一直在水下;那个文件夹马上就删,没有要保全的东西),默认位置上这一次建的文件夹删掉(数据文件夹整个删,总工作区只在还是空的时候删),位置这时就记下,三段弧回到没开始,鲸鱼在原处重新浮上来。导入复制进行中不接这一下,复制完以后这一行收起:搬一个复制好的团队是 设置 → 通用 → 位置 的事。+- 以后的启动在盘快满时点位置行的〔换个位置…〕(第 5 节):选完先查能不能搬过去(和设置里搬数据的检查一样),不能用的出「这里放不了」加一句原因,用的是上面被拒绝的卡的原因,多两句:「`D:\` 是整块磁盘,要选它里面的一个文件夹。」「`D:\Work` 和总工作区互相包含。」,已经有东西的文件夹是「`D:\Data` 里已经有别的文件。」,〔重新选…〕(主按钮);能用的出「搬到这个文件夹?」〔移动并重启〕(主按钮)〔重新选…〕〔取消〕,脚注和正文见第 5 节。这两张卡都没有〔放到 D 盘〕〔仍然放在 C 盘〕。- 重装(`C:\Users\<用户名>\.ds-bot` 里有团队、没有保存的位置)不出卡片,盘不够也不出;启动页上不写上次的团队和路径,进门后就是它。- 180 秒:鲸鱼立刻问「等太久了,要不要重试?」,卡片里只有〔继续等待〕(主按钮)〔重试〕〔打开日志文件夹〕,读屏读的是这句问话。- 〔继续等待〕:卡片收回,180 秒后再问。@@ -233,7 +235,7 @@- 鲸鱼抬一次头,看向更新条,然后又静止。- 恢复卡上的选择:- 〔重试〕:画满的弧保持画满;红的那段回到进行中,鲸鱼抖一抖,回到工作。- - 〔换个位置…〕和〔用新的空白团队开始…〕:先选文件夹(定根和首次启动同一条规则);然后鲸鱼沉到水线下 84 px,.16 s 淡出,三段弧回到没开始,鲸鱼在原处重新浮上来(12° 的倾斜回正,`SPRING_STRETCH`)。位置行的「换个位置…」(第 6 节)走同一条路;阶段被收回时,就算下一个快照里第一段马上又完成了,鲸鱼也先沉下去。+ - 〔换个位置…〕和〔用新的空白团队开始…〕:先选文件夹(定根和首次启动同一条规则);然后鲸鱼沉到水线下 84 px,.16 s 淡出,三段弧回到没开始,鲸鱼在原处重新浮上来(12° 的倾斜回正,`SPRING_STRETCH`)。位置行的〔换个位置…〕(第 6 节)走同一条路;阶段被收回时,就算下一个快照里第一段马上又完成了,鲸鱼也先沉下去。- 重试或重新开始后第一次成功时庆祝一次,首次启动和以后的启动一样:圆环合上时压扁、「^ ^」眼、喷水,然后跳到 Main Bot 的头像上,没有地方落时潜下去(第 8 节)。- 团队界面 20 秒没加载出来:- 主窗口始终不显示。@@ -251,7 +253,7 @@|---|---|---|| `t0` | 圆环合上;鲸鱼压扁再拉长(460 ms),「^ ^」眼,尾巴甩一下,喷一次水(第 3 节) | || `t0` + 160 ms | 提示行淡出 | |-| `t0` + 560 ms | 拉到最长时跳出水面,飞向 Main Bot 的头像会在的位置(590 ms,见下面「跳到 Main Bot 的头像上」);没有地方落时潜下去,深到身高的 1.25 倍;鲸鱼的话、水线、圆环、还在落的水、纸面、底注和位置行淡出 .16 s | |+| `t0` + 560 ms | 拉到最长时跳出水面,飞向 Main Bot 的头像会在的位置(590 ms,见下面「跳到 Main Bot 的头像上」);没有地方落时潜下去,深到身高的 1.25 倍;鲸鱼的话、水线、圆环、还在落的水、纸面和位置行淡出 .16 s | || `t0` + 660 ms | 只在潜下去时:涟漪,160 ms 淡完(交接时喷的水不另起一圈) | || `t0` + 720 ms | 发 `handoffShow` | 主窗口已经隐藏着放在最后的矩形上(以启动窗口的中心居中,不超出工作区);任务栏上仍是启动窗口的按钮 || `handoffShow` + 160 ms | 字、水线、圆环和纸面都已淡完,只剩 Mica 和飞着的鲸鱼(潜下去时鲸鱼在水线下,只剩 Mica) | 把启动窗口从 720 × 540 长到主窗口的矩形,300 ms,逐步 `setBounds`,约 14 ms 一步 |@@ -345,7 +347,7 @@|---|---|| [Windows 上手流程](2026-10-26-windows-onboarding.md) 第 3 节「启动页和引擎的页面共用这个窗口」 | 启动页在单独的启动窗口里;引擎的页面在隐藏的主窗口里加载,`dsBotApp.ready()` 之后主窗口才显示(待定) || 同上「选择框挂在窗口上」 | 挂在启动窗口上,从不自己弹出 |-| 同上 首次启动说明的第三条「聊天和设置保存在这台电脑上……· 社区开源项目,不是 DeepSeek 官方产品」 | 「社区开源项目,不是 DeepSeek 官方产品」是首次启动每一屏的底注,卡片不盖住它;前半句随说明一起去掉(见下面「首次启动的说明」那一行) |+| 同上 首次启动说明的第三条「聊天和设置保存在这台电脑上……· 社区开源项目,不是 DeepSeek 官方产品」 | 启动窗口里两半都没有了:前半句随说明一起去掉(见下面「首次启动的说明」那一行);后半句先做成首次启动每一屏的底注,2026-10-31 也去掉(见本表最后一行)。「不是 DeepSeek 官方产品」留在 README 和上手流程的下载区 || 同上 20 秒没就绪时「回到启动页」 | 启动窗口一直在,主窗口不显示 || 同上「首次启动期间再双击图标:恢复并聚焦已有窗口」 | 聚焦正在显示的那个窗口 || 同上 第 8 节 以后的启动「只写『正在打开你的团队…』」 | 另外 10 秒起显示已用秒数;45 秒显示「比平时慢,请再等一会儿」;180 秒同首次启动 |@@ -357,8 +359,8 @@| 同上 3.1 字族 | 启动窗口加 `"Microsoft YaHei UI"`,记进第 14 节 || 同上 12 可访问性 | 新出现的卡片和恢复页,焦点移到主按钮 || [Windows 上手流程](2026-10-26-windows-onboarding.md) 第 3 节「标题「正在准备你的 Bot 团队…」,下面三个真实阶段,各带进度勾」;本文首稿第 2 节的标题行和三站(16 px 标记的四种样子、阶段名、站间的细线、进行中的流光) | 没有标题行,阶段不画出来:鲸鱼停在哪一站就是进度,离开的站留下一个圈,水线上不画别的;三个阶段只留在看不见的列表「启动进度」里,朗读照旧;已用秒数移到右上角;没有卡片时整组低 80 px(第 2、3 节) |-| 同上 首次启动的说明(产品介绍、「下一步:接上一个模型…」、「聊天和设置保存在这台电脑上…」、写位置的小字、「接下来会先显示 DeepSeek Harness 的「预览版说明」…」);本文首稿第 4 节第 3 拍逐段出现的说明 | 不再有说明。鲸鱼一次说一句短话(第 3、4 节);提示行只写接下来要知道的一件事:「待会儿要接一个模型:DeepSeek 账号或 API Key」「里面先有一页说明,点「继续」就行」;首次启动不写完整路径,底注右边的位置行只写盘和剩余空间(2026-10-28 第二次补),路径只在卡片和 设置 → 通用 → 位置 里出现 |-| 本文 2026-10-28 首稿:首次启动没有自己选位置的入口,只有推荐盘的卡上才有「其他位置…」 | 位置行「数据放在 C 盘(剩 412 GB)· 换个位置…」随时能点(第 2、4、6 节)。维护者 2026-10-28:「给出建议,同时提供自行选择的接口,避免小弹窗」 |+| 同上 首次启动的说明(产品介绍、「下一步:接上一个模型…」、「聊天和设置保存在这台电脑上…」、写位置的小字、「接下来会先显示 DeepSeek Harness 的「预览版说明」…」);本文首稿第 4 节第 3 拍逐段出现的说明 | 不再有说明。鲸鱼一次说一句短话(第 3、4 节);提示行只写接下来要知道的一件事:「待会儿要接一个模型:DeepSeek 账号或 API Key」「里面先有一页说明,点「继续」就行」;首次启动不写完整路径,位置行只写盘和剩余空间(2026-10-28 第二次补),路径只在卡片和 设置 → 通用 → 位置 里出现 |+| 本文 2026-10-28 首稿:首次启动没有自己选位置的入口,只有推荐盘的卡上才有「其他位置…」 | 位置行「数据放在 C 盘(剩 412 GB)」〔换个位置…〕随时能点(第 2、4、6 节)。维护者 2026-10-28:「给出建议,同时提供自行选择的接口,避免小弹窗」 || 同上 超过 10 秒、45 秒的提示「第一次启动会慢一些,Windows 可能在检查刚装好的文件。」「比平时慢,可能是杀毒软件在检查新文件,请再等一会儿。」 | 首次启动由鲸鱼说「第一次会慢一点」「有点久,可能是杀毒软件在查新文件」,45 秒时提示行只有〔打开日志文件夹〕;以后的启动不变 || 同上 启动超过 180 秒:「启动比平常慢很多。可以再等一会儿,或者重试。」 | 鲸鱼问「等太久了,要不要重试?」,卡片里只有〔继续等待〕〔重试〕〔打开日志文件夹〕 || 同上 重装时说明的小字「接着用上次的数据:6 个 Bot、2 个群聊(`C:\Users\<用户名>\.ds-bot`)。可以在 设置 → 通用 → 位置 里改。」(本文第 6 节照写) | 提示行写「上次的 6 个 Bot 和 2 个群聊都在」,不写路径 |@@ -382,6 +384,7 @@| 本文第 2、6 节:没有卡片时,水塘、鲸鱼的话和提示行整组比有卡片时低 80 px,鲸鱼落在窗口的视觉中心(圆环的圆心 (360, 290),水线 y 322,鲸鱼的话 y 414–434,提示行 y 438–466);出卡片时整组上移 80 px | 低 45 px,鲸鱼在窗口的视觉中心稍上一点:圆心 (360, 255),水道 y 147–287,水线 y 287,鲸鱼的话 y 379–399,提示行 y 403–431;出卡片时整组上移 45 px,有卡片时的位置不变(第 2、6 节)。维护者 2026-10-30:「位置上调一些」 || 本文第 3、4、5、7、8 节:就绪时鲸鱼潜下去,深到身高的 1.25 倍;首次启动时 Main Bot 的鲸鱼在团队界面侧栏的磁贴上浮上来一次,由插件做,主进程显示主窗口时经 `dsBotApp` 发露面事件(待定),Main Bot 聊天里的第一张卡等它浮上来;「待定」里磁贴上的鲸鱼怎么知道该浮上来、「预览版说明」盖着侧栏时怎么办;「不做什么」「鲸鱼不从启动窗口飞进主窗口」 | 鲸鱼跳出水面,在长大的启动窗口里飞到 Main Bot 的头像会在的位置,缩到头像的大小落下;主窗口在同一个矩形上露面,头像正好在它下面。头像的位置由侧栏随 `dsBotApp.ready()` 带来,主进程换成启动页的坐标(`landing`);没有露面事件,团队界面里的头像不另做动画,第一张卡也不等;「预览版说明」挂着时照样落在头像的位置上。没有地方落时(别的样子或照片、团队列收起、经典 Agent 模式)照旧潜下去,减少动态效果时照旧淡出(第 3、8 节)。维护者 2026-10-30:「启动之后流畅变形为主页面,Chief跳到主页左侧的Chief位置」 || 本文第 8 节「长大时页面上除了 Mica 什么都不能有」 | 长大时页面上只有飞着的鲸鱼:字、水线、圆环和纸面照旧在长大之前淡完;鲸鱼的动画走合成线程,但页面只在其中几步重画,这 300 ms 里鲸鱼可能一顿一顿地动(第 8 节、「已知限制」)。鲸鱼要一直看得见,才能落到头像上:为了「Chief跳到主页左侧的Chief位置」,接受这一点 |+| 本文 2026-10-28 第 2、4、5 节:左下角的底注「社区开源项目,不是 DeepSeek 官方产品」;位置行在右下角,「换个位置…」是链接;以后的启动没有位置行 | 没有底注;位置行在底部正中,〔换个位置…〕是灰色的小按钮;以后的启动在盘只剩开始时的五分之一时也有,按钮当场搬数据(第 2、5 节)。以后的启动搬数据的确认和「这里放不了」在卡片上问,只有选择框是系统窗口(第 6 节)。维护者 2026-10-31:「移除左下角的社区非官方声明,右下角的init时显示,此外仅在空间不足时(剩余容量是起始容量的20%)显示,换个位置」;起始容量选了首次启动时的剩余空间(实现里是数据放进那个文件夹时那块盘的剩余空间:首次启动定下位置时记,换位置、搬数据、导入复制完以后重记,以前装的下一次启动补记),位置选了底部正中,以后的启动选了点了当场搬数据,「另外做成一个灰色按钮」;看到搬数据被拒绝的系统对话框后:「让我们尽可能避免系统中出现任何这样的默认弹窗」 |## 变更@@ -396,6 +399,7 @@- 2026-10-29 文案分层:启动页的字按页面位置分层、一张表,见 [启动页文案](2026-10-29-start-copy.md);第 11 节 `text.mjs` 一条改成指向它;按各层规则改四处:45 秒的提示和「团队界面没有加载出来」去句号,「会放在 …」加句号、〔重新选〕加 …,OneDrive 的原因里「聊天记录」改成「对话」(第 5、6、7 节)。- 2026-10-30 圆环:维护者转来一段讨论,说启动窗口太吵(「现在这版有点噪了」「是不是可以简约一点」「其实我觉得可能就放一个鲸鱼就够,然后可以做交互动画,文字什么的不太需要」),提议只留一只浮在水上、点一下会喷水的鲸鱼,进度做成横条或圆环;比较三份草稿(水线分三段的进度条、圆环、只有鲸鱼)后选了圆环。「为什么」、第 2 到 11 节按圆环改写:三站和留下的圈换成围着鲸鱼的三段弧,每种启动都是 112 px 的鲸鱼、圆环和水线,出卡片时水塘缩到 .62 倍、上移 60 px;顺利时不说话(去掉问候、各阶段的话、「进去吧」、接模型、预览版说明和重装的提示、已用秒数,以后的启动去掉「正在打开你的团队…」),只留盘不够的提示、45 秒、180 秒、失败、卡片和搬数据;以后的启动和搬数据时 45 秒那句由鲸鱼说;点鲸鱼喷水代替转一圈;交接时剩下的弧画满、圆环合上,庆祝的那次喷水、560 ms 潜下去、0.72 秒发 `handoffShow`,不庆祝的 0.22 秒。「待定」去掉问候用哪个名字,水线那一行按圆环改写;「不做什么」和「已知限制」跟着改。依据:原型的圆环布局(82 个状态的截图都过了布局探针,探针也查圆环不碰鲸鱼的话、提示行和卡片:没有问题);`ring-live.cjs`:首次启动 `handoffShow` 在就绪后 0.72 秒(原来的布局 1.09 到 1.17 秒),以后的启动 0.23 到 0.33 秒,都在原型兜底的 1.5 秒和 0.8 秒以内,45 秒的〔打开日志文件夹〕用指针点得到,搬数据那一行在,喷水的「^ ^」眼给失败的姿势让路,〔重试〕清掉红的那段弧;一次独立评审的 10 条意见都已改正(空纸面让点击穿过、卡片在时提示行隐藏、112 px 鲸鱼入场的深度 96 / 84 px、沉下去 84 px、喷水的「^ ^」眼不盖过失败的姿势、就绪以后不喷、强制颜色覆盖弧、光、水柱和水滴、弧 0.5 s 画出来等)。桌面应用里的检查(离屏 Electron、替身桥,15 项都过):首次启动 `handoffShow` 在就绪后 0.73 秒,以后的启动 0.24 秒(引擎在就绪前 0.5 秒才起来);数据阶段在页面画出来以前完成时,第一段弧 820 ms 画满,700 ms 时完成的,565 ms 进行中、999 ms 画满。真机上的首次启动(这条分支的一次性副本,装着锁定的 DSH 0.2.1-rc.4):窗口 1.5 秒出现、页面 2.9 秒画出来,第一段弧在页面时间 2.6 秒画满;引擎 17.1 秒后第二段画满,团队 4.4 秒后就绪;`handoffShow` 在就绪后 738 ms,窗口 173 ms 后开始长大,团队窗口在就绪后 1.31 秒露面,页面上没有留下的圈和已用秒数。和原型有意不同的两处:第一段弧等的时候鲸鱼不换循环(原型先换成工作的循环,循环自己要停满的 400 ms 把弧再推迟);就绪时正在走的那一拍不再走完,剩下的弧一起画满(原型让它走完;照原型写的桌面应用里,引擎在就绪前 0.5 秒起来的以后的启动 0.46 秒才发 `handoffShow`)。评审后补正:第一段弧等的时候鲸鱼不换循环(第 4 节);以后的启动前 1 秒有第一段弧画满的那一下(第 5 节);一拍走完点一下头(第 3 节);安静档点鲸鱼时照样压扁、甩尾和「^ ^」眼;浮上来的那圈涟漪 .56 s 淡完;盘不够的那句按启动的时钟算前 10 秒,入场时就在。- 2026-10-30 跳到 Chief:维护者问「要不要加个正在做的事情的简单描述,位置上调一些,启动之后流畅变形为主页面,Chief跳到主页左侧的Chief位置」,然后「三点都做」,紧接着又说「文案保持取消状态」:所以没有加描述正在做什么的字,顺利时页面上仍然没有字(第 3 节),只做了另外两点。一是位置上调:没有卡片时整组低 45 px(原来 80 px),圆环上移 35 px,出卡片时整组上移 45 px,有卡片时不变(第 2、6 节)。二是交接时鲸鱼不再潜下去,而是跳出水面,在长大的启动窗口里飞到 Main Bot 的头像会在的位置,缩到头像的大小落下,主窗口在同一个矩形上露面(第 3、4、5、7、8、9、11 节):插件的侧栏在 `dsBotApp.ready()` 里带上 Main Bot 头像的位置(只在默认的鲸鱼、头像在团队列里看得见时),主进程用 `landingOf` 换成启动页的坐标放进交接的快照,启动页的 `leap` 飞 590 ms(不庆祝的 550 ms),比主窗口露面早 30 ms 落下,`handoffDone` 改在落下时发(庆祝的 1150 ms,不庆祝的 650 ms);没有地方落时照旧潜下去。磁贴上的鲸鱼浮上来和 `dsBotApp` 的露面事件都不做了,「待定」里那一行随之去掉:团队界面里的头像不用自己动,鲸鱼落下的地方就是它;「预览版说明」盖着侧栏时鲸鱼照样落在头像的位置上,头像在遮罩下面(第 8 节)。「长大时页面上除了 Mica 什么都不能有」改成只留飞着的鲸鱼;长大时鲸鱼可能一顿一顿地动、落点在 `ready()` 之后团队列还在动时会差几个像素,记进「已知限制」;「不做什么」跟着改。依据:应用的测试(`start-window.test.mjs`:`landingOf` 在两个窗口边框相同、团队页面缩放到 125 %、只有启动窗口有系统标题栏时都算对,不像样的报告都不落;`ready()` 带着位置时交接的快照里有 `landing`,不带时没有;`start-page.test.mjs` 查 `.flight` 层),插件的侧栏测试(`app-ready.test.js`:默认的鲸鱼报告它的位置,别的样子或照片不报)。真机上的首次启动(一次性副本,装着锁定的 DSH 0.2.1-rc.4,团队页面缩放 125%):主进程记下「the whale lands at 105, 116 (60 px)」,团队窗口露面后侧栏里 Main Bot 的头像在 (104, 116)、60 px,差 1 px;`handoffShow` 在就绪后 738 ms,窗口在它之后 171 ms 开始长大,`handoffDone` 在它之后 442 ms,团队窗口在就绪后 1.32 秒露面:这台机器上长大比 300 ms 慢,鲸鱼先落下,再跟着窗口一起长到位(两次运行,落点都一样);首次启动时「预览版说明」的遮罩盖着侧栏,头像在遮罩下面+- 2026-10-31 位置行:维护者「替换之前的3点式,移除左下角的社区非官方声明,右下角的换个位置」。追问以后:「3点式」就是原来的三站,圆环已经代替了它,这次不改;维护者问「要不要显示圆环显示对应3个正在启动的阶段?」:三段弧本来就各是一个阶段(第 2 节),不加字(2026-10-30「文案保持取消状态」)。底注去掉;位置行挪到底部正中,〔换个位置…〕改成灰色的小按钮(28 px,`small`),整行在纸面下面 4 px(第 2 节);首次启动照旧有,以后的启动只在数据所在的盘剩下的不到开始时的 20% 时有:开始时的剩余空间在数据放进一个文件夹时记进 `locations.json`(`freeAtStart`;盘满时记不到,下一次再记),以前存下的位置下一次启动补记;以后的启动点〔换个位置…〕当场搬数据(第 5 节)。试的时候搬数据被拒绝弹了系统对话框,维护者:「让我们尽可能避免系统中出现任何这样的默认弹窗」。所以以后的启动搬数据时,除了系统选择框都在卡片上问:「这里放不了」用第 6 节被拒绝的那张卡(原因多「整块磁盘」和「和总工作区互相包含」两句,读不了的文件夹按没有权限),确认是新的一张「搬到这个文件夹?」〔移动并重启〕〔重新选…〕〔取消〕;确认以后启动窗口当场变成搬数据的页面,这次启动让位,等着的交接作废。还剩下的系统对话框记进「已知限制」。第 2、3、4、6、8 节和「改动的已定设计」跟着改。依据:应用的测试(`place.test.mjs`:20% 的界线;`start-window.test.mjs`:变成搬数据的页面并丢掉等着的交接;`main-low-space.test.mjs`:盘快满时以后的启动有位置行,选进数据文件夹里出「这里放不了」,读不了的 `C:\System Volume Information` 按没有权限,取消以后引擎照常起来、团队界面照常加载,〔移动并重启〕以后页面载入 `?start=moving`、引擎在复制之前停下、数据复制到新文件夹、`locations.json` 换成新文件夹和它自己的剩余空间、应用重新启动,一路没有系统对话框;`main-room-left.test.mjs`:剩余空间还多时没有位置行,换总工作区不动记下的剩余空间,设置里搬数据照旧;`main.test.mjs`:没有记过的位置这次补记;`start-page.test.mjs`:页脚只有位置行和灰色按钮、搬数据的卡);故意改坏 20% 的判断、复制前停引擎、取消时丢掉启动这三处,测试都会失败。离屏渲染的检查 17 项都过(位置行居中、指针点得到、离底边 12 px、有卡片时在纸面下面 4 px、以后的启动和失败页、英文长路径省略、深色、两张卡)。一次独立评审(四个方面,每条意见一个复核)确认 7 条,都已改正:读不了的文件夹不再把正常的启动变成失败页,盘满时记下的 0 不算数,start-copy 第 3 节、本节第 5 节、「改动的已定设计」和上手流程的说法。真机上的以后的启动(这条分支的一次性副本,G 盘剩 4.0 GB,记下的开始空间 10^15 字节):位置行「数据放在 G 盘(剩 4.0 GB)」,指针点得到;先取消选择框,启动照常走;再点、选了文件夹,团队界面在卡片开着时就绪,交接等着;卡片「搬到这个文件夹?」写着真实的路径,没有系统对话框;点〔移动并重启〕后启动窗口变成搬数据的页面,等着的交接作废(等了 13 秒),6 秒后应用在新文件夹上重新启动并交接,`locations.json` 是新文件夹和 3.99 GB。## 待定@@ -420,6 +424,7 @@## 已知限制+- 启动窗口里只有系统选择框是系统窗口,其余都在卡片上问(维护者 2026-10-31:「让我们尽可能避免系统中出现任何这样的默认弹窗」)。还有这些系统对话框:搬数据时另一个 DSH 正在用这份数据、复制失败(以后的启动和设置里都是),设置里搬数据的确认和「请选择…以外的位置」,首次启动问要不要复制团队的几个问题(导入卡还没落地),复制团队时对话比 DSH 新和复制失败,更新的提示,失败页上的「新版本可能修好了这个问题」,关窗口时第一次的托盘说明。- 主窗口在隐藏时启动 DSH 和 ds-bot。`dsBotApp.ready()`、#559 的重新挂载检查和系统按钮颜色的测量,都在看不见的窗口里跑,要在 M4 验证。- 从没显示过的 Mica 窗口第一次 `show()` 时,可能先露出一两帧空的 Mica。交接时启动窗口已经长成同样大小的 Mica,上面至多只有落在头像位置上的鲸鱼;主窗口在它上面露面,这一两帧和下面的一样,只是鲸鱼可能先不见一两帧,头像才出来。M4 用 60 帧录像确认主窗口第一帧之前没有白帧或黑帧;有的话,改成主窗口先在长大后的启动窗口下面露面,画出第一帧再放到上面、销毁启动窗口。- `#00000000` 的系统按钮颜色,只在一台 Windows 11(26200,深色,窗口不在前台)上验证过是透明的。前台、浅色、悬停和按下都没验证。按钮画成不透明的系统,改用不透明的 `--bt-main` 窗口。diff --git a/docs/plans/2026-10-26-windows-onboarding.md b/docs/plans/2026-10-26-windows-onboarding.mdindex 68b9f1dc..5ed7a22c 100644--- a/docs/plans/2026-10-26-windows-onboarding.md+++ b/docs/plans/2026-10-26-windows-onboarding.md@@ -95,7 +95,7 @@ Windows 是桌面应用的主要平台:0.2.0 到 0.2.2 三个版本的安装| 有卡片时 | 空着,由卡片自己的第一句说(15/20、600,在已定的文字上面):推荐盘「C 盘有点挤」(盘不够)或「这里不让我放东西」(没有写入权限),「会放在…」那张「我多加了一层文件夹」,被拒绝的「这里放不了」,找不到数据文件夹「数据不在原来的地方了」;导入的几张见第 4 节;失败的卡没有 | 隐藏 |- 鲸鱼的话换句时淡出、淡入各 .16 s,不排队。失败时不画叉:鲸鱼失败的姿势、红的那段弧和那句话就是失败。鲸鱼沉下去、换个新文件夹重新开始时,三段弧从头开始。就绪时剩下的弧画满、圆环合上,鲸鱼喷一次水,跳出水面,落到侧栏里 Main Bot 的头像上,没有地方落时潜下去(启动窗口第 8 节)。-- **一般情况下什么都不问**,用默认位置,但页面上写着放在哪、能换:底注右边一行「数据放在 C 盘(剩 412 GB)· 换个位置…」([启动窗口](2026-10-26-start-window.md) 第 2、4、6 节),什么都不点就按它走;点「换个位置…」才开系统选择框,定根和下面「一个位置」一样,定好后引擎在新文件夹重新起、鲸鱼沉下去重新开始(启动窗口第 7 节),默认位置上这一次建的文件夹删掉。重装没有这一行,导入复制完以后收起。先看是不是重装(下一条),再看要不要出位置卡片。选位置的卡片只有推荐盘这一张,它上面的按钮都已经试写通过,不会点了再被拒绝;每张卡都说明以后在哪里改:+- **一般情况下什么都不问**,用默认位置,但页面上写着放在哪、能换:底部正中一行「数据放在 C 盘(剩 412 GB)」和灰色的〔换个位置…〕([启动窗口](2026-10-26-start-window.md) 第 2、4、6 节),什么都不点就按它走;点〔换个位置…〕才开系统选择框,定根和下面「一个位置」一样,定好后引擎在新文件夹重新起、鲸鱼沉下去重新开始(启动窗口第 7 节),默认位置上这一次建的文件夹删掉。重装没有这一行,导入复制完以后收起。先看是不是重装(下一条),再看要不要出位置卡片。选位置的卡片只有推荐盘这一张,它上面的按钮都已经试写通过,不会点了再被拒绝;每张卡都说明以后在哪里改:- 数据所在的盘不到 5 GB(有团队要导入时,不到「5 GB + 导入卡上要多占的数」),而且有更好的盘:「C 盘只剩 1.2 GB。放到 D 盘(剩 412 GB)?」〔放到 D 盘〕〔仍然放在 C 盘〕,按钮行末尾一个小链接「其他位置…」。按 Enter 就是放到 D 盘。没有更好的盘就不出卡片,只在提示行写一句「C 盘只剩 1.2 GB」,照常启动。- 默认位置不能用(没有写入权限):第一句换成原因「DeepSeek Bot 没有权限在 `C:\Users\<用户名>` 里写文件。」,第二句一样;按钮只有〔放到 D 盘〕和小链接「其他位置…」,没有〔仍然放在 C 盘〕。没有可推荐的盘时只有〔选择其他位置…〕。- 保存过的数据文件夹找不到了(多见于以后的启动):「找不到数据文件夹 `D:\DeepSeek Bot\data`。可能是移动硬盘没插上,或者文件夹被移走、删除了。旧数据不会被改动。」〔重试〕〔重新找到它…〕〔用新的空白团队开始…〕。〔重新找到它…〕不走定根的规则:选中的文件夹本身或它下面的 `data` 里有 `.deepseek-bot` 标记和 `bot/state.json`(所以 `~/.dsh` 永远不算),又通过位置规则(不在 DSH 的家里、不在程序目录里),就把它写成数据文件夹;旁边有 `workspace` 时总工作区一起改过去,没有就不动。否则卡上写「这里没有 DeepSeek Bot 的数据。」,〔重新找到它…〕留着。@@ -134,7 +134,7 @@ Windows 是桌面应用的主要平台:0.2.0 到 0.2.2 三个版本的安装- 暂存在数据文件夹里,和目标同一个卷:对话、`bot/` 和附件都从暂存改名进位,不再把附件从暂存复制第二份。- 工作文件的空间在第二段开始前单独查,要求剩余不少于「要复制的工作文件 + 1 GB」,不够就不开始,只在设置里写「工作文件没有复制:D 盘还差 2.2 GB」〔重试〕,不打断启动;复制中剩余不到 500 MB 就停下,设置里写「工作文件没复制完:D 盘只剩 480 MB」〔继续复制〕。暂存加硬链接落位本来就不多占空间。- 复制后,设置 → 通用 → 位置 里有一行「DeepSeek Harness 里的原团队还在 `C:\Users\<用户名>\.dsh`(4.6 GB),DeepSeek Bot 不会改动它。」〔打开文件夹〕;要不要删、什么时候删由用户在 DeepSeek Harness 里决定。- - 新用户从不复制任何东西:推荐盘和「其他位置…」只新建空文件夹,重装接着用原处的数据。应用自己的数据搬动时(第 8 节〔移到…〕、恢复页的〔换个位置…〕)旧位置不留副本。+ - 新用户从不复制任何东西:推荐盘和「其他位置…」只新建空文件夹,重装接着用原处的数据。应用自己的数据搬动时(第 8 节〔移到…〕、恢复页的〔换个位置…〕、以后的启动盘快满时位置行的〔换个位置…〕)旧位置不留副本。- 第一段复制时卡片标题是「正在搬过来」,下面是分步进度和数字:「检查对话 23/143」→「复制 Bot 和对话 820 MB / 1.2 GB」→「启动团队」,带剩余时间估计和任务栏进度。〔停止复制〕会就地确认,并说明停下后会留下什么:不留下复制了一半的团队,DSH 里的团队不受影响。- DSH 正在用这个团队:第一句「DeepSeek Harness 还在用这个团队」,下面「请完全退出 DSH Desktop(任务栏右下角的托盘图标也要退出),并关掉 DSH Web,这里会自动继续。」这张卡在答〔复制过来〕时才出现(卡片一出现就查到被占着时只是不暂存),每 2 秒自动重查,不用点重试,锁一放开就开始暂存和复制;卡上有〔先不复制〕,退不掉 DSH 的人有路可走。判断规则和 ds-bot 的 home-lock 一样:同一台机器上 PID 活着**而且**锁在 60 秒内刷新过(#428 的修法),被系统重用的旧 PID 不再算。- 有更新版本 DSH 写的对话(下面两张卡的第一句都是「这些对话比我新」):更新器现在随应用一起启动,找到能读的版本时:「DeepSeek Bot 0.2.4 能读它们,正在下载(37%)。装好后会重新打开,再复制团队。」卡上有〔先不复制〕,还有「下载太慢?手动下载」;下载失败时〔重试〕〔手动下载〕(和恢复页的更新条一样)。位置在这之前不保存,重开后会再问导入。没找到时:「这些对话是更新版本的 DeepSeek Harness 写的,DeepSeek Bot 现在读不了。」主按钮是〔先不带团队开始〕(不再是「退出」),脚注「以后可以在 设置 → 通用 → 位置 里复制。」@@ -266,7 +266,7 @@ Windows 是桌面应用的主要平台:0.2.0 到 0.2.2 三个版本的安装### 8. 以后的启动和回头入口-- 以后每次启动也显示启动页,和首次启动同一个样子:112 px 的鲸鱼和三段弧的圆环,顺利时没有字,也没有底注和位置行;45 秒起鲸鱼说「比平时慢,请再等一会儿」,提示行只有〔打开日志文件夹〕,180 秒和首次启动一样;就绪时不庆祝,圆环合上,鲸鱼直接跳到侧栏里 Main Bot 的头像上,没有地方落时潜下去([启动窗口](2026-10-26-start-window.md) 第 5、8 节)。然后打开上次的 Bot(预计 3 到 12 秒,以后的启动还没实测)。+- 以后每次启动也显示启动页,和首次启动同一个样子:112 px 的鲸鱼和三段弧的圆环,顺利时没有字,也没有位置行,数据所在的盘只剩开始时的五分之一时例外:那时有位置行,〔换个位置…〕当场搬数据,确认和「这里放不了」都在卡片上问,不弹系统对话框([启动窗口](2026-10-26-start-window.md) 第 5、6 节);45 秒起鲸鱼说「比平时慢,请再等一会儿」,提示行只有〔打开日志文件夹〕,180 秒和首次启动一样;就绪时不庆祝,圆环合上,鲸鱼直接跳到侧栏里 Main Bot 的头像上,没有地方落时潜下去([启动窗口](2026-10-26-start-window.md) 第 5、8 节)。然后打开上次的 Bot(预计 3 到 12 秒,以后的启动还没实测)。- 设置卡由状态决定:没有能用的模型(跳过过、删了 key、退出了登录),Main Bot 的设置卡就回来;账号登录过期时显示「DeepSeek 账号的登录失效了。」〔重新登录〕(桌面应用里同样在登录窗口里登录)。- 目标卡、建议卡和第一件事卡(第 6 节)只在新团队接上模型、上手还没结束时出现。上手结束看 Main Bot 的会话:里面有那行「上手结束」的灰字、或者有用户自己发的消息(第一件事也是),就算结束,从会话里读,不另存标记;结束以后它们不再回来,设置卡回来时也不带它们。上手中途关了应用、或者模型没了:重开或重新接上模型后从目标卡重新开始,开场白不再发,已经建好的 Bot 留着,`restrict` 和 guard 重新挂上(它们只在内存里),「模型请求 n/3」从 0 算起。导入来的团队从来不出。- DS Bot 设置 → 模型在所有形态里都有(在 `team-actions.js` 里接上插件 Host 已有的 `providers`、`provider-key` 等接口,今天只有停用的 `app/ui` 接了),显示每个提供商的 key 状态(「已设置 Key」「需要 API Key」「Key 来自 DS Bot 之外」)和「添加提供商」。原来的「Harness 设置」改叫「高级设置(DeepSeek Harness)」。@@ -304,7 +304,7 @@ Windows 是桌面应用的主要平台:0.2.0 到 0.2.2 三个版本的安装| [桌面应用](2026-10-16-desktop-app.md)「首次启动分别选数据位置和总工作区……用的是系统对话框」 | 窗口先出来,显示应用自己的启动页;默认位置直接用,只在需要时出卡片;换位置只选一个文件夹,按第 3 节定根 `R`,数据和总工作区一起放在 `R\data` 和 `R\workspace`;盘不够或默认位置不能用时先推荐一个固定盘,系统选择框只在「其他位置…」之后,只在应用改了所选路径时才确认 || 同上「两个位置不能一个在另一个里面」 | 保留;一个位置的两个子文件夹是兄弟,不互相包含 || 本文首稿 §3「找到以前的 DS Bot 数据……〔接着用(推荐)〕〔用新的空白团队开始…〕」 | 不问,直接接着用;空白团队在设置里 |-| 本文 2026-10-28 首稿 §3:首次启动不写路径,自己选位置只在推荐盘的卡上有「其他位置…」 | 启动页底注右边写「数据放在 C 盘(剩 412 GB)· 换个位置…」,随时能换;维护者 2026-10-28:「给出建议,同时提供自行选择的接口,避免小弹窗」 |+| 本文 2026-10-28 首稿 §3:首次启动不写路径,自己选位置只在推荐盘的卡上有「其他位置…」 | 启动页写「数据放在 C 盘(剩 412 GB)」和〔换个位置…〕,随时能换(2026-10-31 起在底部正中、是灰色的按钮,见下面那一行);维护者 2026-10-28:「给出建议,同时提供自行选择的接口,避免小弹窗」 || 本文首稿「不做什么」:不扫描 D: 到 Z: 去推荐数据位置 | 只在盘不够或默认位置不能用时枚举一次固定盘,可移动盘、网络盘和光驱仍然一概不碰 || 本文首稿 §3「OneDrive 里的总工作区只提醒,不拒绝」 | 一个位置之下总工作区和数据是兄弟,位置在 OneDrive 里就整个不能用,首次启动不再有这张提醒卡 || 同上 换数据位置「选一个空文件夹或新文件夹……也不能选整个磁盘」 | 选磁盘根目录或别人的非空文件夹时,应用在里面加一层 `DeepSeek Bot`(第 3 节定根的规则),只在加了这一层时确认 |@@ -332,7 +332,7 @@ Windows 是桌面应用的主要平台:0.2.0 到 0.2.2 三个版本的安装| 同上 已知限制「新 Bot 可能落到没配好密钥的模型上」(「怎么根治待维护者定」) | 按那里写的方向解决:默认只从能用的模型里选(`needsKey` 先过滤,再用检查确认),凭据失败回到设置卡或修复卡。那条限制里「DSH 不告诉插件哪个提供方已经配好了凭据」已经部分过时:DS Bot 现在能标出 `needsKey`,但「有 key」仍不等于「key 能用」 || `ds-bot/index.js` 默认 Main Bot「Chief / Chief of Staff」 | 中文界面下建团队时用「总管 / 团队负责人」(待定):看配置里有没有指定名字(`rt.config`,不看已经合并了英文默认值的 `rt.defaults`),没有时按第一次 `state` 请求带来的界面语言的主标签是不是 `zh` 决定;英文不变,已有团队不改 || 本文首稿 §3「标题「正在准备你的 Bot 团队…」,下面三个真实阶段,各带进度勾」 | 没有标题和三站的标记:鲸鱼停在哪一站就是到了哪一步,离开的站留一个圈;阶段名只给读屏(看不见的「启动进度」列表和朗读区);「已用 N 秒」5 秒起在右上方,一直留到「进去吧」 |-| 同上「只在第一次启动时,等待期间显示一段说明」(五段:产品是什么、下一步接模型、聊天和设置保存在这台电脑上、数据位置的小字、预览版说明的提醒),以及 10 秒「第一次启动会慢一些……」、45 秒「比平时慢……」两句 | 一次一句鲸鱼的话,提示行只说接下来要准备什么:接模型缩成「待会儿要接一个模型:DeepSeek 账号或 API Key」,预览版说明缩成「里面先有一页说明,点「继续」就行」;产品介绍、「聊天和设置保存在这台电脑上」和数据位置的小字去掉(位置在 设置 → 通用 → 位置 里看和改,「社区开源项目,不是 DeepSeek 官方产品」仍是每一屏的底注);10 秒「第一次会慢一点」,45 秒「有点久,可能是杀毒软件在查新文件」加〔打开日志文件夹〕 |+| 同上「只在第一次启动时,等待期间显示一段说明」(五段:产品是什么、下一步接模型、聊天和设置保存在这台电脑上、数据位置的小字、预览版说明的提醒),以及 10 秒「第一次启动会慢一些……」、45 秒「比平时慢……」两句 | 一次一句鲸鱼的话,提示行只说接下来要准备什么:接模型缩成「待会儿要接一个模型:DeepSeek 账号或 API Key」,预览版说明缩成「里面先有一页说明,点「继续」就行」;产品介绍、「聊天和设置保存在这台电脑上」和数据位置的小字去掉(位置在 设置 → 通用 → 位置 里看和改;「社区开源项目,不是 DeepSeek 官方产品」先留作每一屏的底注,2026-10-31 也去掉,只留在 README 和下载区);10 秒「第一次会慢一点」,45 秒「有点久,可能是杀毒软件在查新文件」加〔打开日志文件夹〕 || 同上 重装时说明的小字「接着用上次的数据:6 个 Bot、2 个群聊(`C:\Users\<用户名>\.ds-bot`)。可以在 设置 → 通用 → 位置 里改。」 | 第 2 站的提示「上次的 6 个 Bot 和 2 个群聊都在」,不写路径 || 同上 180 秒「启动比平常慢很多。可以再等一会儿,或者重试。」 | 鲸鱼问「等太久了,要不要重试?」,卡片上只有〔继续等待〕〔重试〕〔打开日志文件夹〕,不再重复这句话 || 同上「窗口先出来……启动页和引擎的页面共用这个窗口」 | 启动页在单独的启动窗口里([启动窗口](2026-10-26-start-window.md) 第 1 节,待定,那里记过这一行);启动窗口整个启动期间都是 720 × 540,只在交接时改一次大小,长成主窗口的矩形,主窗口在同一个矩形上露面(同上第 8 节):首次启动在就绪后约 1.6 秒可见(原来约 620 ms),以后的启动约 0.6 秒(原来 120 ms) |@@ -347,6 +347,7 @@ Windows 是桌面应用的主要平台:0.2.0 到 0.2.2 三个版本的安装| 本文 2026-10-28 §5「桌面应用首次启动交接后,Main Bot 的鲸鱼在侧栏的磁贴上浮上来一次」,§3 `dsBotApp` 列表里「主窗口露面时发给页面的一个事件」(待定);§3、§8 就绪时鲸鱼潜下去 | 交接时启动窗口的鲸鱼跳出水面,落到侧栏里 Main Bot 的头像上,主窗口露面时头像正好在它下面,每种启动都这样;头像的位置随 `ready()` 带来,没有露面事件,磁贴上的鲸鱼不另做动画;没有地方落时照旧潜下去([启动窗口](2026-10-26-start-window.md) 第 8 节,那里记过这一行)。维护者 2026-10-30:「启动之后流畅变形为主页面,Chief跳到主页左侧的Chief位置」 |实现各批时,同步改写上面几份文档里对应的规则本身(「已定的行为」写现在的行为,不只是在末尾追加),并在它们的「变更」里写一条;新的 DSH 让步记进 [DSH 让步总账](2026-10-13-dsh-concessions.md),「提供商」记进 [UI 标准](../design/ui-standard.md) 第 11 节的术语表。+| 本文 2026-10-28 §3:启动页底注右边的位置行「数据放在 C 盘(剩 412 GB)· 换个位置…」,「换个位置…」是链接;§8 以后的启动没有位置行;每一屏有底注「社区开源项目,不是 DeepSeek 官方产品」 | 没有底注;位置行在底部正中,〔换个位置…〕是灰色的按钮;以后的启动在数据所在的盘只剩开始时的 20% 时也有位置行,按钮当场搬数据,确认和「这里放不了」在卡片上问,不弹系统对话框([启动窗口](2026-10-26-start-window.md) 第 2、5、6 节)。维护者 2026-10-31:「移除左下角的社区非官方声明,右下角的init时显示,此外仅在空间不足时(剩余容量是起始容量的20%)显示,换个位置」,「让我们尽可能避免系统中出现任何这样的默认弹窗」 |## 需要 DSH 提供的@@ -386,7 +387,7 @@ Windows 是桌面应用的主要平台:0.2.0 到 0.2.2 三个版本的安装- 打包后的 Windows CI,用名为「测试 用户」、没有「下载」文件夹、没有 `~/.dsh` 的一次性用户:进程启动后 2 秒内窗口可见(目标 1 秒,CI 留余量);引擎的页面之前不出现任何卡片;能进到引擎的页面。- 启动页(同一个 CI,中英文各一遍):首次启动没有标题、阶段名和说明段落;顺利的启动里鲸鱼的话和提示行一直空着(例外是盘不够时前 10 秒的「C 盘只剩 1.2 GB」),三段弧依次画满;45 秒时只有鲸鱼那一句和〔打开日志文件夹〕,按钮用指针点得到;在 720 × 540 和 720 × 500 下没有一行字折行或被省略号截断,圆环不碰鲸鱼的话、提示行和卡片,页面不能滚动;读屏的「启动进度」列表和朗读区照旧报阶段。- 交接:从 `ready()` 到达算(入场还没到位时从到位算),庆祝的交接(首次启动,重试或重新开始后第一次成功)`handoffShow` 在 1 秒内(原型实测 0.72 秒),其余以后的启动在 0.5 秒内(0.23 到 0.33 秒);启动窗口在约 300 ms 里至少经过一个中间尺寸,长到主窗口的矩形;主窗口在庆祝的交接里 1.5 秒内可见、其余 1 秒内,矩形和启动窗口长成的一样;页面不发 `handoffShow` 时,主进程在 `ready()` 后 2.5 秒自己显示主窗口(以后的启动 0.8 秒,重试或重新开始后庆祝的那次也是 2.5 秒);减少动态效果时窗口不长大,`handoffShow` 时主窗口直接出现。-- 首次启动期间没有一个 `dialog.show*` 不挂在主窗口上(单元测试扫描调用处),窗口出来之前没有系统对话框;位置和总工作区不问(没有「欢迎」对话框),系统选择框只在点了位置行的「换个位置…」以后出现,取消它什么都不变。+- 首次启动期间没有一个 `dialog.show*` 不挂在主窗口上(单元测试扫描调用处),窗口出来之前没有系统对话框;位置和总工作区不问(没有「欢迎」对话框),系统选择框只在点了位置行的〔换个位置…〕以后出现,取消它什么都不变。- 数据所在的盘不够 5 GB(CI 用替身的空间查询):只有一张卡片、一个主按钮,按 Enter 就过,不出现系统选择框。枚举盘的 PowerShell 只在盘不够或默认位置不能用时运行一次,正常启动和重装的日志里没有它;没有剩余 20 GB 以上的其他固定盘时不出卡片,提示行写剩余空间。〔放到 D 盘〕之后 `D:\DeepSeek Bot\data` 和 `D:\DeepSeek Bot\workspace` 都存在,`locations.json` 指向它们;〔仍然放在 C 盘〕之后 D 盘上没有留下试写建的文件夹。- 有 `~/.ds-bot` 团队、没有 `locations.json` 的一次性用户:没有卡片,C 盘不到 5 GB 时也没有,启动页上不写团队的数字,进去就是原来的团队。- 导入:点〔复制过来〕后,对话复制完团队就打开,`bot/work-files.json` 记着工作文件没复制完;工作文件在后台到齐后记成已完成;复制一半退出再启动会接着复制,已有的文件一个不覆盖;〔先不复制〕不重启引擎,暂存已删。@@ -496,3 +497,4 @@ Windows 是桌面应用的主要平台:0.2.0 到 0.2.2 三个版本的安装- 2026-10-29:启动页的文案分层,写进 [启动页文案](2026-10-29-start-copy.md);按各层的写法规则改了本文引用的四处:§3「团队界面没有加载出来」、§8 45 秒的「比平时慢,请再等一会儿」去句号,§3「会放在 `D:\DeepSeek Bot`。」加句号、〔重新选…〕加 …(被拒绝的卡也一样),§4 更新版本那张卡的脚注改成「以后可以在 设置 → 通用 → 位置 里复制。」,和「以后可以在 … 里改。」同一个句式;「用词」加一条指向它。- 2026-10-30:维护者转来一段讨论,说启动窗口太吵(「现在这版有点噪了」「是不是可以简约一点」「其实我觉得可能就放一个鲸鱼就够,然后可以做交互动画,文字什么的不太需要」),提议只留一只浮在水上、点一下会喷水的鲸鱼,进度做成横条或圆环;比较三份草稿(水线分三段的进度条、圆环、只有鲸鱼)后选了圆环。§3 的启动页改成「圆环就是进度」和「顺利时没有字」,话和提示的表只剩盘不够、45 秒、180 秒、失败和卡片;重装、接模型和预览版说明不在启动页上提前说(「取舍」和已知限制跟着改);§8 以后的启动和首次启动同一个样子,没有字;「用词」的圈换成圆环和弧,鲸鱼的话只在这几种时候有;验收(启动页、交接、重装)、M4、「待定」的水线和已知限制里的露面时间跟着改。细节在 [启动窗口](2026-10-26-start-window.md) 同一天的变更里。依据:原型的圆环布局(82 个状态的截图都过了布局探针,没有问题)和 `ring-live.cjs`(首次启动 `handoffShow` 在就绪后 0.72 秒,原来 1.09 到 1.17 秒;以后的启动 0.23 到 0.33 秒)。评审后补正:M4 写九种动作,补上 2026-10-28 加的张望,估计里的布局一项改叫圆环即进度。- 2026-10-30 跳到 Chief:维护者要「启动之后流畅变形为主页面,Chief跳到主页左侧的Chief位置」。交接时启动窗口的鲸鱼不再潜下去,而是跳出水面,落到侧栏里 Main Bot 的头像上,主窗口在同一个矩形上露面(§3、§5、§8、M4);`ready()` 同时带上 Main Bot 头像的位置,主窗口露面的事件不做了(§3 的 `dsBotApp` 列表),磁贴上的鲸鱼也不另浮上来(§5),「改动的已定设计」加一行,§3 那一行记录补一句;文件头的「一起改」和已知限制里露面时间那一条的说法跟着改。同一次提的「正在做的事情的简单描述」随后被维护者收回(「文案保持取消状态」),启动页顺利时仍然没有字。细节和依据在 [启动窗口](2026-10-26-start-window.md) 同一天「跳到 Chief」那条变更里。+- 2026-10-31 位置行:维护者要去掉启动页左下角的「社区开源项目,不是 DeepSeek 官方产品」,右下角的位置行首次启动照旧显示、此外只在空间不足时显示,并换个位置。§3 的位置行改到底部正中,〔换个位置…〕改成灰色的小按钮;§8 以后的启动在数据所在的盘只剩开始时的 20% 时也有位置行,按钮当场搬数据,确认和「这里放不了」在卡片上问(维护者看到搬数据被拒绝的系统对话框后:「让我们尽可能避免系统中出现任何这样的默认弹窗」);§4「旧位置不留副本」的列表加上这个入口;「改动的已定设计」加一行,底注那一行和 2026-10-28 那一行跟着改;验收里的〔换个位置…〕改成按钮的写法。「第一次介绍产品的地方都写「不是 DeepSeek 官方产品」」不变:README 和下载区照旧写。细节和依据在 [启动窗口](2026-10-26-start-window.md) 同一天「位置行」那条变更里。diff --git a/docs/plans/2026-10-29-start-copy.md b/docs/plans/2026-10-29-start-copy.mdindex 13139512..75c9f8d4 100644--- a/docs/plans/2026-10-29-start-copy.md+++ b/docs/plans/2026-10-29-start-copy.md@@ -31,10 +31,10 @@| `say.*` | 卡片的第一行(15/20、600) | 鲸鱼 | 最多 12 字;不加句号 || `hint.*` | 提示行,只有盘不够时前 10 秒的那一句 | 应用,中性 | 只写一件用户现在要知道的事,最多 22 字;不加句号 || `card.*` | 卡片正文 | 应用 | 整句,以 。? 结尾;说出了什么事,怎么办交给按钮;路径放 `code`;`card.<卡>.<部分>`,几张卡共用的放 `card.update.*` |-| `reason.*` | 卡片正文里复用的原因 | 应用 | 整句的以 。 结尾(`reason.place.*` 位置不能用的七个原因、`reason.start.*` 启动失败的五个);嵌进句子的片段不带标点(`reason.copy.*` 复制失败的三个) |+| `reason.*` | 卡片正文里复用的原因 | 应用 | 整句的以 。 结尾(`reason.place.*` 位置不能用的九个原因、`reason.start.*` 启动失败的五个);嵌进句子的片段不带标点(`reason.copy.*` 复制失败的三个) || `btn.*` | 按钮 | 用户的动作 | 最多 10 字,动词或动作短语开头;打开系统选择框或离开这张卡的以 … 结尾;不加句号;链接样式的小按钮可以是名词短语(「其他位置…」「详细」) || `note.*` | 卡片脚注 | 应用 | 一句,以 。 结尾,说以后在哪里改 |-| `foot.*` | 底注行 | 应用 | 不加句号(「社区开源项目,不是 DeepSeek 官方产品」、位置行) |+| `foot.*` | 页脚的位置行 | 应用 | 不加句号(「数据放在 C 盘(剩 412 GB)」) || `status.*` | 只给读屏 | 应用 | 不加句号:隐藏列表「启动进度」、三个阶段名、四个状态词、朗读句 || `dialog.*` | 系统对话框的正文和标题 | 应用 | 正文整句以 。? 结尾,可以两段(`\n\n`);选择框标题不加句号;按钮用 `btn.*` |@@ -83,6 +83,7 @@| `reason.place.permission` | DeepSeek Bot 没有权限在 {path} 里写文件。 | `card.reason.permission` 和 `card.rejected.permission` 合一 || `reason.place.onedrive` | {path} 在 OneDrive 里,同步会打断正在写入的对话。 | `card.rejected.onedrive`(聊天记录 → 对话) || `reason.place.foreign / dsh / program / nested` | 照旧 | `card.rejected.*` |+| `reason.place.drive / workspace` | {path} 是整块磁盘,要选它里面的一个文件夹。/{path} 和总工作区互相包含。 | 新(2026-10-31):以后的启动搬数据时的「这里放不了」,意思同 `dialog.move.drive / workspace` || `reason.start.permission / space / files / engine / other` | 照旧,带句号 | `failed.reason.*` || `reason.copy.inUse / permission / full` | 照旧,片段 | `importFailed.*` |@@ -110,7 +111,7 @@脚注 `note.*`:`card.footnote` → `note.changeLater`「以后可以在 设置 → 通用 → 位置 里改。」;`import.footnote` → `note.copyLater`「也可以在 设置 → 通用 → 位置 里复制。」;`newer.footnote` → `note.copyAgain`「以后可以在 设置 → 通用 → 位置 里复制。」(和 `note.changeLater` 同一个句式)。-底注 `foot.*`:`footer` → `foot.community`;`place.drive / driveOnly / path / pathOnly` → `foot.place.drive / driveOnly / path / pathOnly`。+页脚 `foot.*`:`place.drive / driveOnly / path / pathOnly` → `foot.place.drive / driveOnly / path / pathOnly`。`footer`(「社区开源项目,不是 DeepSeek 官方产品」)没有键:启动页 2026-10-31 起没有底注。状态 `status.*`:`track.label` → `status.track`;`phase.*` → `status.phase.*`;`state.*` → `status.state.*`;`sr.*` → `status.sr.*`。`elapsed`(「已用 N 秒」)没有新键:启动页不显示已用秒数。@@ -172,6 +173,7 @@| 本文第 3 节:`voice.hello / helloName / helloBack / data / found / engine / slow10 / team / ready` 不动,`title.later` → `voice.opening`;`hint.model / preview / reinstall` 不动;`elapsed` → `status.elapsed`;第 2 节「「待会儿要接一个模型」……留着」 | 这 14 个键都没有了(`voice` 十个、`hint` 三个、`status` 一个),那句说明也去掉 | 启动窗口的样子换成圆环([启动窗口](2026-10-26-start-window.md)「改动的已定设计」里 2026-10-30 的几行):顺利时不说话,不显示已用秒数,不提前说进门以后的事。维护者 2026-10-30 转来的讨论:「现在这版有点噪了」「其实我觉得可能就放一个鲸鱼就够,然后可以做交互动画,文字什么的不太需要」 || 本文第 3 节:`slow.45.later` → `hint.slowLater`「比平时慢,请再等一会儿」,在提示行 | `voice.slowLater`,同一句 | 以后的启动和搬数据时,45 秒起这一句由鲸鱼说,和首次启动的 `voice.slow45` 在同一行;提示行只留〔打开日志文件夹〕 || 本文第 2 节 `status.*`「只给读屏和计数」 | 只给读屏 | 启动页不显示已用秒数 |+| 本文第 2、3 节:`foot.*` 是底注行,`footer` → `foot.community`「社区开源项目,不是 DeepSeek 官方产品」 | `foot.*` 只剩位置行,没有这个键 | 维护者 2026-10-31:「移除左下角的社区非官方声明」([启动窗口](2026-10-26-start-window.md) 「改动的已定设计」最后一行) |## 不做什么@@ -191,3 +193,4 @@- 2026-10-29 首稿:十层、一张表、键的对照、测试;对应 `text.mjs` 重排、`first-run.mjs` 和 `updates.mjs` 的表并入、`start.html` 和 `start.js` 改键。依据:2026-10-29 对三张表的审读(30 个对话框键和 11 个更新键都在用,没有死键;页面表和两份设计稿逐句对照只有 `failed.reason.*` 的句号一处不同;风格问题 30 条,全部复核过)。- 2026-10-30:启动窗口的样子换成圆环([启动窗口](2026-10-26-start-window.md) 同一天的变更):鲸鱼的话只剩用户要知道或回答时的几句,表里去掉 14 个键(`voice.hello / helloName / helloBack / data / found / engine / slow10 / team / ready / opening`、`hint.model / preview / reinstall`、`status.elapsed`),`hint.slowLater` 改名 `voice.slowLater`(同一句,以后的启动和搬数据时 45 秒起由鲸鱼说);第 2 节 `voice`、`hint`、`status` 三层的说明、第 3 节的对照和第 4 节单复数的例子跟着改,第 5 节加一条测试。依据:维护者 2026-10-30 转来的讨论(「现在这版有点噪了」)和维护者选定的圆环原型。+- 2026-10-31:启动页的底注去掉([启动窗口](2026-10-26-start-window.md) 同一天的变更),表里去掉 `foot.community`;`foot` 层只剩位置行,第 2、3 节跟着改,「改动的已定设计」加一行。以后的启动搬数据改在卡片上问,加 `say.move`「搬到这个文件夹?」、`card.move.lead`、`reason.place.drive / workspace`(第 3 节对照表加一行,第 2 节 `reason.*` 改成九个原因);按钮用已有的 `btn.move / repick / cancel`。依据:维护者「移除左下角的社区非官方声明」「让我们尽可能避免系统中出现任何这样的默认弹窗」。