feat(weixin): 微信iLink面板配置/启用逻辑对齐真实桥接(token即用)
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled

面板此前让用户手填 bot_id/owner_id/cursor(实为扫码登录后自动获取/自动落盘),与参考
weixin_ClawBot_Bridge 流程不符。对齐成 kook/telegram 的'token即用、其余自动获取':
- channelFields.ts: weixin-ilink 字段只留 cdn_base_url(可选,留空自动),移除 bot_id/owner_id/
  cursor; guide/hint 改为'只需填 bot_token(必填,或连接时触发扫码登录自动获取),其余自动获取'
- AdapterDetailPage/GenericAdapterPanel: 账号身份区显示自动获取的 bot_id(account.botId)
- 后端确认无需改: cmd/cyrene 仅校验 bot_token;Connect(BotToken空)自动扫码并持久化 bot_token/
  bot_id/owner_id;游标自动落盘;与参考一致
验收: 前端 build 100模块绿 + 后端相关包 build/test ok(无Go改动)
This commit is contained in:
Aska committed 2026-09-07 20:29:56 +08:00
1 parent 817f1e6355
commit 0a597cfa42
3 files changed
+5 -6

No files matched your search

@@ -24,10 +24,7 @@ export const PLATFORM_FIELDS: Record<string, PlatformField[]> = {
],
telegram: [{ key: "webhook_url", label: "webhook_url(公网回调地址)", placeholder: "https://…" }],
"weixin-ilink": [
{ key: "cdn_base_url", label: "cdn_base_url(媒体 CDN)", placeholder: "https://…" },
{ key: "bot_id", label: "bot_id(ilink_bot_id)", placeholder: "wx…" },
{ key: "owner_id", label: "owner_id(绑定主人 uid)", placeholder: "wx…" },
{ key: "cursor", label: "cursor(get_updates_buf)", placeholder: "…" },
{ key: "cdn_base_url", label: "cdn_base_url(媒体 CDN,留空自动)", placeholder: "https://…" },
],
webhook: [
{ key: "endpointPath", label: "endpointPath(挂载路由)", placeholder: "/webhook" },
@@ -59,8 +56,8 @@ export const PLATFORM_GUIDE: Record<string, PlatformGuide> = {
hint: "webhook_url(公网回调,可选)在「高级选项」里配置;留空则走长轮询。",
},
"weixin-ilink": {
guide: "填 bot_token(必填)与 bot_id / owner_id",
hint: "bot_id / owner_id / cdn_base_url / cursor 在「高级选项」里配置;媒体 CDN 可留空自动。",
guide: "只需填 bot_token(必填,或连接时触发扫码登录自动获取),其余自动获取",
hint: "连接后自动获取 bot 身份(ilink_bot_id / bot_id)并持续维护 get_updates_buf 游标;需要媒体 CDN 时可在「高级选项」配 cdn_base_url(留空自动)。",
},
webhook: {
guide: "填 endpointPath 与 secret(必填)",
@@ -55,6 +55,7 @@ export function AdapterDetailPage({ adapter, onBack }: { adapter: string; onBack
<Tag tone={connected ? "ok" : "err"}>{connected ? "已连接" : "未连接"}</Tag>
{account?.botUsername ? <Tag tone="neutral">@{account.botUsername}</Tag> : null}
{account?.botNickname ? <Tag tone="neutral">{account.botNickname}</Tag> : null}
{account?.botId ? <Tag tone="neutral">bot_id:{account.botId}</Tag> : null}
{loading ? <span className="text-xs text-[var(--mu-text-lo)]">加载中…</span> : null}
</div>
<div className="flex flex-wrap items-center gap-2">
@@ -35,6 +35,7 @@ export function GenericAdapterPanel({
<div className="flex flex-wrap items-center gap-2">
<Tag tone="accent">{label} 平台能力</Tag>
<Tag tone="neutral">{accountName}</Tag>
{account?.botId ? <Tag tone="neutral">bot_id:{account.botId}</Tag> : null}
<span className="ml-auto text-xs text-[var(--mu-text-lo)]">通用壳 · 平台专属端点未接入</span>
</div>