diff --git a/src/chatbox.tsx b/src/chatbox.tsx
index 905be02..4c5db37 100644
--- a/src/chatbox.tsx
+++ b/src/chatbox.tsx
@@ -316,63 +316,64 @@ export default function ChatBOX(props: {
请先在上方设置 API Endpoint
)}
- {(chatStore.history.filter((msg) => !msg.example).length == 0 ||
- !chatStore.apiEndpoint ||
- !chatStore.apiKey) && (
-
-
已保存的 API 模板
-
-
- {templateAPIs.map((t, index) => (
-
{
- chatStore.apiEndpoint = t.endpoint;
- chatStore.apiKey = t.key;
- setChatStore({ ...chatStore });
- }}
- >
- {t.name}
-
-
-
-
-
-
- ))}
-
-
- )}
+ {templateAPIs.length > 0 &&
+ (chatStore.history.filter((msg) => !msg.example).length == 0 ||
+ !chatStore.apiEndpoint ||
+ !chatStore.apiKey) && (
+
+
已保存的 API 模板
+
+
+ {templateAPIs.map((t, index) => (
+
{
+ chatStore.apiEndpoint = t.endpoint;
+ chatStore.apiKey = t.key;
+ setChatStore({ ...chatStore });
+ }}
+ >
+ {t.name}
+
+
+
+
+
+
+ ))}
+
+
+ )}
{templates.length > 0 &&
chatStore.history.filter((msg) => !msg.example).length == 0 && (