diff --git a/public/app.js b/public/app.js
index f055d42..6785e16 100644
--- a/public/app.js
+++ b/public/app.js
@@ -1165,6 +1165,24 @@
``
).join('');
+ if (modelEditingTemplates.length === 0) {
+ modelCustomArea.innerHTML = `
+
尚无模板,点击下方按钮新建。
+
+
+
+ `;
+ panel.querySelector('#model-tpl-add-first').addEventListener('click', () => {
+ const newName = prompt('输入新模板名称:');
+ if (!newName || !newName.trim()) return;
+ const n = newName.trim();
+ modelEditingTemplates.push({ name: n, apiKey: '', apiBase: '', defaultModel: '', opusModel: '', sonnetModel: '', haikuModel: '' });
+ modelActiveTemplate = n;
+ renderModelTemplateEditor();
+ });
+ return;
+ }
+
modelCustomArea.innerHTML = `