diff --git a/README.md b/README.md index 77e1f2d..347cd0e 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ A lightweight, zero-config web tool to quickly check whether an LLM API is reachable, and to measure latency and token usage across providers. +[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/vdeng-ai/ModelPing) + +> One-click Cloudflare deployment clones the repository, configures Workers Builds, and provisions resources declared by Wrangler. Before exposing the Worker publicly, set strong `APP_PASSWORD` and `PRIVATE_STATE_SECRET` values during deployment setup. + ![Screenshot](./web/public/screenshot.png) Supported protocols: @@ -112,6 +116,10 @@ Private working state (history, the history persistence toggle, last connection, ### Cloudflare Workers (free tier) +For the simplest setup, use the **Deploy to Cloudflare** button near the top of this README. Cloudflare will clone the repository, configure Workers Builds, provision the Wrangler-declared KV binding for the new deployment, and let you provide `APP_PASSWORD` and `PRIVATE_STATE_SECRET` from the repository's example environment configuration. + +Manual deployment remains available: + ```bash npx wrangler login npx wrangler kv namespace create SETTINGS_KV @@ -237,5 +245,3 @@ web/ Released under the [MIT License](./LICENSE) — free to use, modify, and distribute. See the `LICENSE` file in the repo root. The default models and curated provider presets are referenced from [farion1231/cc-switch](https://github.com/farion1231/cc-switch) (provider / baseUrl / model / balance endpoints). Each provider's protocols, model ids, and endpoints belong to their respective owners. This tool only forwards and tests; it bundles no API keys and is not responsible for third-party service availability or billing. - -Issues and PRs welcome. Before submitting, please make sure `npm run typecheck`, `npm test`, `npm run lint`, and `npm run build` pass. diff --git a/README.zh-CN.md b/README.zh-CN.md index 66c87da..ef9a6c0 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -4,6 +4,10 @@ 开箱即用的轻量 Web 工具,用于快速点测各家大模型 API 是否可用,并测量延迟与 token 消耗。 +[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/vdeng-ai/ModelPing) + +> Cloudflare 一键部署会自动克隆仓库、配置 Workers Builds,并 provision Wrangler 声明的资源。公网使用前请在部署配置中设置强 `APP_PASSWORD` 和独立的 `PRIVATE_STATE_SECRET`。 + ![Screenshot](./web/public/screenshot.png) 支持的协议: @@ -114,6 +118,10 @@ npm start # http://localhost:8787 ### Cloudflare Workers(免费版) +最简单的方式是点击 README 顶部的 **Deploy to Cloudflare** 按钮。Cloudflare 会自动克隆仓库、配置 Workers Builds、为新部署 provision Wrangler 声明的 KV binding,并让你根据仓库的示例环境配置填写 `APP_PASSWORD` 与 `PRIVATE_STATE_SECRET`。 + +仍然支持手动部署: + ```bash npx wrangler login npx wrangler kv namespace create SETTINGS_KV @@ -241,4 +249,4 @@ web/ 默认模型与精选 provider 预设参考了 [farion1231/cc-switch](https://github.com/farion1231/cc-switch)(provider / baseUrl / model / 余额端点)。各家协议、模型 id 与端点归各自服务商所有,本工具仅作转发与测试,不附带任何 API Key,也不对第三方服务的可用性或计费负责。 -欢迎提 issue 与 PR。提交前请确保 `npm run typecheck`、`npm test`、`npm run lint` 与 `npm run build` 通过。 +欢迎提 issue 与 PR。提交前请确保 `npm run typecheck`、`npm test`、`npm run lint` 与 `npm run build` 通过。 \ No newline at end of file diff --git a/web/design-system/layout.css b/web/design-system/layout.css new file mode 100644 index 0000000..5445792 --- /dev/null +++ b/web/design-system/layout.css @@ -0,0 +1,11 @@ +/* Page-level layout behavior owned by the Apple Web Design System. */ + +/* + * The legacy desktop workbench gave both Models and History a viewport-sized + * minimum height. History benefits from that workspace treatment, but Models + * should end immediately after the actual model list and Add Model row. + */ +.workspace-content > .model-panel { + min-height: 0; + height: auto; +} diff --git a/web/main.tsx b/web/main.tsx index dc7ce42..1b2694a 100644 --- a/web/main.tsx +++ b/web/main.tsx @@ -6,5 +6,6 @@ import "./design-system/materials.css"; import "./design-system/motion.css"; import "./design-system/components.css"; import "./design-system/brand.css"; +import "./design-system/layout.css"; -render(, document.getElementById("app")!); +render(, document.getElementById("app")!); \ No newline at end of file