feat: add human-first dual HoloLake workbench

This commit is contained in:
冰朔 2026-08-20 06:10:29 +08:00
commit cdfb2c81e3
12 changed files with 469 additions and 23 deletions

View file

@ -29,7 +29,7 @@ test('knowledge workspace keeps the chat visible and binds the exact active page
test('model configuration remains secondary to the conversation surface', () => {
assert.match(channel, /const \[settingsOpen, setSettingsOpen\] = useState\(false\)/)
assert.match(channel, /说话是主入口。知识、模型和执行证据在需要时进入/)
assert.match(channel, /直接输入消息开始对话;知识引用、模型设置和运行回执按需展开/)
assert.match(channel, /\{settingsOpen && <aside className="persona-chat-settings">/)
assert.match(channel, /API 密钥 · 只进钥匙串/)
})

View file

@ -0,0 +1,63 @@
import assert from 'node:assert/strict'
import { readFile } from 'node:fs/promises'
import test from 'node:test'
const root = new URL('../', import.meta.url)
const read = (path) => readFile(new URL(path, root), 'utf8')
test('release center records every shipped HoloLake line from 0.4.0 through current', async () => {
const contract = JSON.parse(await read('contracts/product-release-center.json'))
assert.equal(contract.schema, 'hololake.product-release-center/v1')
assert.equal(contract.currentVersion, '0.9.0')
const versions = contract.releases.map((release) => release.version)
for (const version of ['0.4.0', '0.4.1', '0.5.0', '0.6.0', '0.7.0', '0.8.1', '0.9.0']) assert.ok(versions.includes(version), version)
assert.equal(contract.releases.filter((release) => release.state === 'CURRENT').length, 1)
for (const release of contract.releases) {
assert.ok(release.title.length > 0)
assert.ok(release.summary.length > 0)
assert.ok(release.highlights.length >= 3)
assert.ok(release.evidence.length >= 1)
}
})
test('one engine exposes Guanghu and standard workbench projections with a human default', async () => {
const source = await read('src/main.tsx')
assert.match(source, /type PresentationMode = 'guanghu' \| 'workbench'/)
assert.match(source, /type AudienceLayer = 'human' \| 'execution'/)
assert.match(source, /hololake-presentation-mode/)
assert.match(source, /hololake-audience-layer/)
assert.match(source, /\|\| 'human'/)
assert.match(source, /className="standard-workbench"/)
assert.match(source, /HoloLake · V\{productReleaseCenter\.currentVersion\}/)
assert.doesNotMatch(source, /HoloLake · V0\.8\.1/)
assert.match(source, /renderHumanView\(\)/)
assert.match(source, /renderExecutionProjection\(\)/)
assert.match(source, /人格体结构化执行界面/)
})
test('main domain routes to the public release center instead of a descriptive popup', async () => {
const source = await read('src/main.tsx')
assert.match(source, /gate\.domain === 'MAIN_DOMAIN'/)
assert.match(source, /setWorldStage\('mainDomain'\)/)
assert.match(source, /光湖主域公告与版本中心/)
assert.match(source, /renderReleaseCenter\(audienceLayer\)/)
})
test('public language persona copy is formal and keeps a visible human composer', async () => {
const source = await read('src/modules/persona-channel-body/index.tsx')
assert.match(source, /<h1>\{embedded \? '对话与知识协作' : '语言人格频道'\}<\/h1>/)
assert.match(source, /输入消息;需要知识时可直接提问。/)
assert.match(source, /<textarea/)
assert.match(source, /send_message/)
assert.doesNotMatch(source, /说点什么/)
assert.doesNotMatch(source, /先让频道知道你要和谁说话/)
})
test('all native product manifests advertise the same version', async () => {
const packageJson = JSON.parse(await read('package.json'))
const tauri = JSON.parse(await read('src-tauri/tauri.conf.json'))
const cargo = await read('src-tauri/Cargo.toml')
assert.equal(packageJson.version, '0.9.0')
assert.equal(tauri.version, packageJson.version)
assert.match(cargo, /version = "0\.9\.0"/)
})