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.
This commit is contained in:
2022Hao 2026-05-25 12:42:22 +08:00
parent 9150654846
commit 760fe317a0
4 changed files with 12 additions and 12 deletions

View File

@ -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`.

View File

@ -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`

View File

@ -466,8 +466,8 @@ open "项目/XXX/ppt/index.html"
```bash
node "<SKILL_ROOT>/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 "<SKILL_ROOT>/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 · 迭代

View File

@ -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 <id> --out path/to/ppt/index.html