chore: fix lint error caused CI fail

This commit is contained in:
Simon
2026-06-15 22:59:34 +08:00
parent c04c02723d
commit 235fa1bc26
3 changed files with 7 additions and 5 deletions

View File

@@ -51,7 +51,7 @@ Fastest way to try PageAgent with our free Demo LLM:
> **⚠️ For technical evaluation only.** This demo CDN uses our free [testing LLM API](https://alibaba.github.io/page-agent/docs/features/models#free-testing-api). By using it, you agree to its [terms](https://github.com/alibaba/page-agent/blob/main/docs/terms-and-privacy.md). > **⚠️ For technical evaluation only.** This demo CDN uses our free [testing LLM API](https://alibaba.github.io/page-agent/docs/features/models#free-testing-api). By using it, you agree to its [terms](https://github.com/alibaba/page-agent/blob/main/docs/terms-and-privacy.md).
| Mirrors | URL | | Mirrors | URL |
| ------- | ---------------------------------------------------------------------------------- | | ------- | ----------------------------------------------------------------------------------- |
| Global | https://cdn.jsdelivr.net/npm/page-agent@1.10.0/dist/iife/page-agent.demo.js | | Global | https://cdn.jsdelivr.net/npm/page-agent@1.10.0/dist/iife/page-agent.demo.js |
| China | https://registry.npmmirror.com/page-agent/1.10.0/files/dist/iife/page-agent.demo.js | | China | https://registry.npmmirror.com/page-agent/1.10.0/files/dist/iife/page-agent.demo.js |

View File

@@ -50,7 +50,7 @@ https://github.com/user-attachments/assets/a1f2eae2-13fb-4aae-98cf-a3fc1620a6c2
> **⚠️ 仅用于技术评估。** 该 Demo CDN 使用了免费的[测试 LLM API](https://alibaba.github.io/page-agent/docs/features/models#free-testing-api),使用即表示您同意其[条款](https://github.com/alibaba/page-agent/blob/main/docs/terms-and-privacy.md)。 > **⚠️ 仅用于技术评估。** 该 Demo CDN 使用了免费的[测试 LLM API](https://alibaba.github.io/page-agent/docs/features/models#free-testing-api),使用即表示您同意其[条款](https://github.com/alibaba/page-agent/blob/main/docs/terms-and-privacy.md)。
| Mirrors | URL | | Mirrors | URL |
| ------- | ---------------------------------------------------------------------------------- | | ------- | ----------------------------------------------------------------------------------- |
| Global | https://cdn.jsdelivr.net/npm/page-agent@1.10.0/dist/iife/page-agent.demo.js | | Global | https://cdn.jsdelivr.net/npm/page-agent@1.10.0/dist/iife/page-agent.demo.js |
| China | https://registry.npmmirror.com/page-agent/1.10.0/files/dist/iife/page-agent.demo.js | | China | https://registry.npmmirror.com/page-agent/1.10.0/files/dist/iife/page-agent.demo.js |

View File

@@ -9,13 +9,15 @@ export function useGitHubStars() {
useEffect(() => { useEffect(() => {
if (cached !== null) return if (cached !== null) return
fetch(STATS_URL) const controller = new AbortController()
fetch(STATS_URL, { signal: controller.signal })
.then((r) => r.json()) .then((r) => r.json())
.then((data) => { .then((data) => {
cached = data.stargazers_count ?? null cached = data.stargazers_count ?? null
setStars(cached) setStars(cached)
}) })
.catch(() => {}) .catch(() => {})
return () => controller.abort()
}, []) }, [])
return stars return stars