fix: complete canonical language channel acceptance

This commit is contained in:
冰朔 2026-08-20 05:33:35 +08:00
commit e72ee85b89
7 changed files with 105 additions and 17 deletions

View file

@ -23,6 +23,8 @@ test('knowledge workspace keeps the chat visible and binds the exact active page
assert.match(channel, /引用知识 · \{receipt\.path\} · \{shortHash\(receipt\.contentSha256\)\}/)
assert.match(runtime, /collect_knowledge_context\([\s\S]*?input\.active_knowledge_source\.as_deref\(\)[\s\S]*?input\.active_knowledge_path\.as_deref\(\)/)
assert.match(runtime, /append_knowledge_document\(&mut context, &mut seen, document\)/)
assert.match(runtime, /let secret = read_secret_bounded\(app, provider_id\)\.await\.ok\(\)/)
assert.doesNotMatch(runtime, /fn read_secret\(/)
})
test('model configuration remains secondary to the conversation surface', () => {
@ -31,3 +33,11 @@ test('model configuration remains secondary to the conversation surface', () =>
assert.match(channel, /\{settingsOpen && <aside className="persona-chat-settings">/)
assert.match(channel, /API 密钥 · 只进钥匙串/)
})
test('the chosen model route survives restart and prefers explicit user configuration', () => {
assert.match(channel, /const PROVIDER_SELECTION_KEY = 'hololake-persona-provider-id'/)
assert.match(channel, /localStorage\.getItem\(PROVIDER_SELECTION_KEY\)/)
assert.match(channel, /item\.source === 'EXPLICIT_USER_CONFIG'/)
assert.match(channel, /rememberProvider\(nextProviderId\)/)
assert.match(channel, /onChange=\{\(event\) => selectProvider\(event\.target\.value\)\}/)
})