feat(web): 主题皮肤系统与 LLM 设置面板重构
- useThemeSkin 重构主题皮肤应用逻辑,支持企业 AI 风格主题切换 - settingsModelHelper 新增主题与模型表字段映射,useSettings 适配 - LlmSettingsPanel/SettingsView 面板重构,支持多模型行编辑与主题区块 - settings-view.css 适配主题样式,新增 settings-theme-section 测试,更新 settings-llm-section 测试
This commit is contained in:
@@ -7,17 +7,27 @@ const llmSettingsPanel = readFileSync(new URL('../src/views/LlmSettingsPanel.vue
|
||||
|
||||
function testLlmSectionReplacesVlmWithReranker() {
|
||||
assert.doesNotMatch(settingsView, /VLM 模型/)
|
||||
assert.match(llmSettingsPanel, /Reranker 模型配置/)
|
||||
assert.match(llmSettingsPanel, /Rerank/)
|
||||
assert.match(settingsModel, /rerankerProvider/)
|
||||
}
|
||||
|
||||
function testRerankerCardRendersAfterEmbeddingCard() {
|
||||
assert.match(llmSettingsPanel, /Embedding 模型配置[\s\S]*Reranker 模型配置/)
|
||||
function testLlmSectionUsesTableAndAddModelDialog() {
|
||||
assert.match(llmSettingsPanel, /model-table-toolbar[\s\S]*添加模型/)
|
||||
assert.match(llmSettingsPanel, /<table class="model-config-table">/)
|
||||
assert.match(llmSettingsPanel, /model-dialog-overlay/)
|
||||
assert.match(llmSettingsPanel, /供应商[\s\S]*接口地址[\s\S]*API Key[\s\S]*model_id[\s\S]*模型类型/)
|
||||
assert.match(llmSettingsPanel, /大语言模型[\s\S]*Embedding[\s\S]*Rerank/)
|
||||
}
|
||||
|
||||
function testSettingsModelKeepsExtensibleModelRows() {
|
||||
assert.match(settingsModel, /models:\s*buildLlmModelRows/)
|
||||
assert.match(settingsModel, /buildLlmModelRows/)
|
||||
}
|
||||
|
||||
function run() {
|
||||
testLlmSectionReplacesVlmWithReranker()
|
||||
testRerankerCardRendersAfterEmbeddingCard()
|
||||
testLlmSectionUsesTableAndAddModelDialog()
|
||||
testSettingsModelKeepsExtensibleModelRows()
|
||||
console.log('settings llm section tests passed')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user