feat: rename config modelName to model

This commit is contained in:
Simon
2025-10-21 15:13:16 +08:00
parent dc7e09b4ad
commit b6bf6fe06a
3 changed files with 5 additions and 5 deletions

View File

@@ -19,9 +19,9 @@ console.log('🚀 page-agent.js loaded!')
const currentScript = document.currentScript as HTMLScriptElement | null
if (currentScript) {
const url = new URL(currentScript.src)
const modelName = url.searchParams.get('model')
const model = url.searchParams.get('model')
const language = (url.searchParams.get('lang') as 'zh-CN' | 'en-US') || 'zh-CN'
const config = { modelName, language } as PageAgentConfig
const config = { model, language } as PageAgentConfig
window.pageAgent = new PageAgent(config)
} else {
window.pageAgent = new PageAgent()