dsh-wechat-access 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +10 -2
- package/lib/client.js +28 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## 0.0.2
|
|
2
|
+
|
|
3
|
+
### 改进
|
|
4
|
+
|
|
5
|
+
- 首次配置屏新增「还没装 agent-wechat?先做这四步」引导卡,
|
|
6
|
+
直接给出 [Releases 下载入口](https://github.com/thisnick/agent-wechat/releases)
|
|
7
|
+
和 `wx tokens create` 完整命令。
|
|
8
|
+
- 未连接屏新增 agent-wechat 下载入口。
|
|
9
|
+
- README 补充桌面端 / 命令行两种安装方式。
|
|
10
|
+
|
|
11
|
+
原 QQ 版的「插件自动下载 NapCat(约 118 MB)」逻辑已彻底移除:
|
|
12
|
+
这个插件不会下载或启动任何客户端,需要用户自己先把 agent-wechat 跑起来。
|
|
13
|
+
|
|
1
14
|
# 更新日志
|
|
2
15
|
|
|
3
16
|
## 0.0.1
|
package/README.md
CHANGED
|
@@ -34,9 +34,17 @@
|
|
|
34
34
|
|
|
35
35
|
### 第 1 步:把 agent-wechat 跑起来
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
两种方式,任选其一:
|
|
38
|
+
|
|
39
|
+
**方式 A:桌面端(推荐)**
|
|
40
|
+
|
|
41
|
+
到 [agent-wechat Releases](https://github.com/thisnick/agent-wechat/releases)
|
|
42
|
+
下载对应平台的安装包,装上后打开它。
|
|
43
|
+
|
|
44
|
+
**方式 B:命令行**
|
|
38
45
|
|
|
39
46
|
```bash
|
|
47
|
+
npm install -g --allow-scripts=@agent-wechat/cli @agent-wechat/cli
|
|
40
48
|
wx serve # 终端 1:守护进程,保持运行
|
|
41
49
|
wx accounts create --alias me # 终端 2:建一个账号槽位
|
|
42
50
|
wx auth login # 扫码登录
|
|
@@ -86,7 +94,7 @@ dsh plugin add dsh-wechat-access
|
|
|
86
94
|
或者从本地 tgz 安装:
|
|
87
95
|
|
|
88
96
|
```bash
|
|
89
|
-
dsh plugin add ./dsh-wechat-access-0.0.
|
|
97
|
+
dsh plugin add ./dsh-wechat-access-0.0.2.tgz
|
|
90
98
|
```
|
|
91
99
|
|
|
92
100
|
### 第 4 步:在面板里填两样东西
|
package/lib/client.js
CHANGED
|
@@ -9,6 +9,8 @@ window.__ModuleLoader__.load({
|
|
|
9
9
|
const API = "/dsh-wechat/api";
|
|
10
10
|
// 项目主页。只放图标按钮,不在界面上明文显示链接。
|
|
11
11
|
const REPO_URL = "https://github.com/Applepinea/dsh-wechat-access";
|
|
12
|
+
const WX_REPO_URL = "https://github.com/thisnick/agent-wechat";
|
|
13
|
+
const WX_RELEASE_URL = "https://github.com/thisnick/agent-wechat/releases";
|
|
12
14
|
const CSS_ID = "dsh-wechat-access/panel.css";
|
|
13
15
|
const CSS = [
|
|
14
16
|
".wxa{max-width:780px;display:flex;flex-direction:column;gap:14px;color:var(--dsw-alias-label-primary);height:100%;max-height:min(100%, calc(100vh - 88px));min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin;padding-right:8px;box-sizing:border-box}",
|
|
@@ -824,6 +826,26 @@ window.__ModuleLoader__.load({
|
|
|
824
826
|
h("h2", null, "微信接入 · 首次配置"),
|
|
825
827
|
h("p", { className: "sub" }, "先在电脑上把 agent-wechat 跑起来并扫码登录,然后到命令行执行 wx tokens create 拿一个 token。这一步只写配置文件,不启动任何东西。")),
|
|
826
828
|
),
|
|
829
|
+
h(Card, { title: "还没装 agent-wechat?先做这四步" },
|
|
830
|
+
h("div", { className: "hint", style: { marginTop: 0 } },
|
|
831
|
+
"这个插件不会自己下载或启动微信客户端。它需要电脑上已有一个 agent-wechat 守护进程在跑。"),
|
|
832
|
+
h("ol", { style: { margin: "8px 0 0", paddingLeft: "20px", lineHeight: 1.9 } },
|
|
833
|
+
h("li", null,
|
|
834
|
+
"下载安装:",
|
|
835
|
+
h("a", { href: WX_RELEASE_URL, target: "_blank", rel: "noreferrer" }, "github.com/thisnick/agent-wechat/releases"),
|
|
836
|
+
"(桌面端一键安装;或命令行 npm i -g @agent-wechat/cli)"),
|
|
837
|
+
h("li", null, "打开桌面端或执行 wx serve,让它保持运行"),
|
|
838
|
+
h("li", null, "用手机微信扫码登录,确认账号状态是「在线」"),
|
|
839
|
+
h("li", null,
|
|
840
|
+
"执行 ",
|
|
841
|
+
h("code", null, "wx tokens create dsh-wechat-access --accounts '*' --scopes read --scopes send --scopes media --scopes read-state"),
|
|
842
|
+
",把输出的 token 填到下面"),
|
|
843
|
+
),
|
|
844
|
+
h("div", { className: "hint", style: { marginTop: "8px" } },
|
|
845
|
+
"详细说明见 ",
|
|
846
|
+
h("a", { href: WX_REPO_URL, target: "_blank", rel: "noreferrer" }, "agent-wechat 文档"),
|
|
847
|
+
";本插件的 README 里也有逐步教程。"),
|
|
848
|
+
),
|
|
827
849
|
h(Card, { title: "agent-wechat 守护进程" },
|
|
828
850
|
h("div", { className: "row" },
|
|
829
851
|
h("div", null,
|
|
@@ -885,6 +907,12 @@ window.__ModuleLoader__.load({
|
|
|
885
907
|
h("li", null, "改完配置后重载插件"),
|
|
886
908
|
),
|
|
887
909
|
),
|
|
910
|
+
h(Card, { title: "没有安装 agent-wechat?" },
|
|
911
|
+
h("div", { className: "hint", style: { marginTop: 0 } },
|
|
912
|
+
"先到 ",
|
|
913
|
+
h("a", { href: WX_RELEASE_URL, target: "_blank", rel: "noreferrer" }, "agent-wechat Releases"),
|
|
914
|
+
" 下载桌面端并安装;也可以执行 npm i -g @agent-wechat/cli。装好后扫码登录,再回来重载这个插件。"),
|
|
915
|
+
),
|
|
888
916
|
h(Card, { title: "当前配置" },
|
|
889
917
|
h("div", { className: "row" },
|
|
890
918
|
h("div", null,
|