From 760fe317a0890a99b42ea5a4b64b9b9118e7bb3d Mon Sep 17 00:00:00 2001 From: 2022Hao <1072075189@qq.com> Date: Mon, 25 May 2026 12:42:22 +0800 Subject: [PATCH] Use html.inherit-ai.top as default host Switch default HTMLSlide endpoints from local localhost to the public host https://html.inherit-ai.top:8085. Update scripts/sync-htmlslide.mjs to set DEFAULT_APP_BASE and DEFAULT_API_BASE accordingly, adjust the CLI usage text, and update README.md, README.en.md and SKILL.md to reference the website host and to guide users to check the online service if the API is not reachable. --- README.en.md | 6 +++--- README.md | 6 +++--- SKILL.md | 6 +++--- scripts/sync-htmlslide.mjs | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.en.md b/README.en.md index 9ac16aa..3167c49 100644 --- a/README.en.md +++ b/README.en.md @@ -178,12 +178,12 @@ node scripts/validate-swiss-deck.mjs path/to/index.html ## HTMLSlide Sync -If the local HTMLSlide API is running, first bind the local agent to the website account: +If users access HTMLSlide at `https://html.inherit-ai.top:8085/`, first bind the local agent to the website account: ```bash node scripts/sync-htmlslide.mjs login \ - --api-base http://127.0.0.1:3001/api \ - --app-base http://127.0.0.1:5173 + --api-base https://html.inherit-ai.top:8085/api \ + --app-base https://html.inherit-ai.top:8085 ``` The script prints an authorization URL and code. After the user confirms inside the logged-in HTMLSlide website, the agent token is saved to `~/.htmlslide-agent/config.json`. diff --git a/README.md b/README.md index e97370e..dd0c136 100644 --- a/README.md +++ b/README.md @@ -180,12 +180,12 @@ node scripts/validate-swiss-deck.mjs path/to/index.html ## HTMLSlide 网站联动 -如果本地已经运行 HTMLSlide 后端(默认 `http://127.0.0.1:3001`),可以先把本地 Agent 绑定到网站账号: +如果用户访问的 HTMLSlide 网站是 `https://html.inherit-ai.top:8085/`,可以先把本地 Agent 绑定到网站账号: ```bash node scripts/sync-htmlslide.mjs login \ - --api-base http://127.0.0.1:3001/api \ - --app-base http://127.0.0.1:5173 + --api-base https://html.inherit-ai.top:8085/api \ + --app-base https://html.inherit-ai.top:8085 ``` 脚本会输出网站授权链接和授权码。用户在 HTMLSlide 网站登录后确认授权,Agent token 会保存到 `~/.htmlslide-agent/config.json`。 diff --git a/SKILL.md b/SKILL.md index f04555d..43631b0 100644 --- a/SKILL.md +++ b/SKILL.md @@ -466,8 +466,8 @@ open "项目/XXX/ppt/index.html" ```bash node "/scripts/sync-htmlslide.mjs" login \ - --api-base "http://127.0.0.1:3001/api" \ - --app-base "http://127.0.0.1:5173" + --api-base "https://html.inherit-ai.top:8085/api" \ + --app-base "https://html.inherit-ai.top:8085" ``` 脚本会打印 `/agent/authorize?code=XXXX-XXXX` 链接;用户在网站里登录并确认后,token 会保存到 `~/.htmlslide-agent/config.json`。 @@ -497,7 +497,7 @@ node "/scripts/sync-htmlslide.mjs" pull --title "网站里的 PPT - 如果用户说“修改我网站上的 xxx PPT”,先运行 `list` 或 `pull --title "xxx"`,修改本地 `index.html`,再运行 `push` 覆盖同一个 `projectId` - 如果 `.htmlslide-sync.json` 已存在,优先复用里面的 `apiBase` / `projectId` - 如果缺少 agent token,不要猜;先运行 `login` 让用户在网站确认授权 -- 如果 API 没启动,提示用户先启动 HTMLSlide 后端(默认 `http://127.0.0.1:3001`)再重试 +- 如果 API 无法访问,提示用户确认线上 HTMLSlide 服务可访问(默认 `https://html.inherit-ai.top:8085`)再重试 - 同步成功后告诉用户项目标题和 `projectId` ### Step 7 · 迭代 diff --git a/scripts/sync-htmlslide.mjs b/scripts/sync-htmlslide.mjs index d1c896c..2631766 100644 --- a/scripts/sync-htmlslide.mjs +++ b/scripts/sync-htmlslide.mjs @@ -3,8 +3,8 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync, watch } from "node: import { homedir } from "node:os"; import { basename, dirname, extname, isAbsolute, join, normalize, relative, resolve, sep } from "node:path"; -const DEFAULT_API_BASE = "http://127.0.0.1:3001/api"; -const DEFAULT_APP_BASE = "http://127.0.0.1:5173"; +const DEFAULT_APP_BASE = "https://html.inherit-ai.top:8085"; +const DEFAULT_API_BASE = `${DEFAULT_APP_BASE}/api`; const SIDECAR_NAME = ".htmlslide-sync.json"; const CONFIG_DIR = join(homedir(), ".htmlslide-agent"); const CONFIG_PATH = join(CONFIG_DIR, "config.json"); @@ -350,7 +350,7 @@ function parseArgs(argv) { function usage(message) { if (message) console.error(message); console.error(`Usage: - node scripts/sync-htmlslide.mjs login [--api-base http://127.0.0.1:3001/api] [--app-base http://127.0.0.1:5173] + node scripts/sync-htmlslide.mjs login [--api-base https://html.inherit-ai.top:8085/api] [--app-base https://html.inherit-ai.top:8085] node scripts/sync-htmlslide.mjs list node scripts/sync-htmlslide.mjs pull --title "Project title" --out path/to/ppt/index.html node scripts/sync-htmlslide.mjs pull --project-id --out path/to/ppt/index.html