import assert from 'node:assert/strict' import { readFileSync } from 'node:fs' const settingsModel = readFileSync(new URL('../src/utils/settingsModelHelper.js', import.meta.url), 'utf8') const settingsView = readFileSync(new URL('../src/views/SettingsView.vue', import.meta.url), 'utf8') const llmSettingsPanel = readFileSync(new URL('../src/views/LlmSettingsPanel.vue', import.meta.url), 'utf8') function testLlmSectionReplacesVlmWithReranker() { assert.doesNotMatch(settingsView, /VLM 模型/) assert.match(llmSettingsPanel, /Rerank/) assert.match(settingsModel, /rerankerProvider/) } function testLlmSectionUsesTableAndAddModelDialog() { assert.match(llmSettingsPanel, /model-table-toolbar[\s\S]*添加模型/) assert.match(llmSettingsPanel, /