Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.9.10.27 #249

Merged
merged 3 commits into from
Mar 19, 2025
Merged

3.9.10.27 #249

merged 3 commits into from
Mar 19, 2025

Conversation

atorber
Copy link
Collaborator

@atorber atorber commented Mar 19, 2025

Summary by CodeRabbit

  • Documentation

    • Updated version and compatibility details to support newer WeChat client versions.
  • New Features

    • Added an interactive greeting during login.
    • Introduced an auto-reply mechanism that responds to specific trigger messages.
  • Chores

    • Enhanced deployment workflows and updated package dependencies.
    • Streamlined integrations by removing legacy scripts and reorganizing internal code for improved maintainability.

atorber and others added 3 commits June 16, 2024 19:28
* 3.9.10.19 init (#233)

* 3.9.2.23 init (#180)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 3.9.2.23 init (#182)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23 (#185)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23

---------

Co-authored-by: LuChao <atorber@163.com>

* add 1.3.0 illustrate

* Update README.md

* Update README.md

* add demo

* 1.13.1

* 1.13.1

* 1.13.2 dev

* 增加扫码登录、检测登录状态

* 增加登入登出事件

* 增加ts改造init

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

1. 修复获取群成员昵称乱码

* Update .npmignore

* Update .gitignore

* 1.13.2删除agent的ts文件

* 1.13.4

* 1.13.5

* Update init-agent-script.ts

* 1.13.5

* 1.13.6

* del png file

* Update init-agent-script.js

* 1.13.7 修复@好友出现两个昵称的bug

* 1.13.7 修复@好友昵称重复bug (#209)

* 3.9.2.23 init (#180)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 3.9.2.23 init (#182)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23 (#185)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23

---------

Co-authored-by: LuChao <atorber@163.com>

* add 1.3.0 illustrate

* Update README.md

* Update README.md

* add demo

* 1.13.1

* 1.13.1

* 1.13.2 dev

* 增加扫码登录、检测登录状态

* 增加登入登出事件

* 增加ts改造init

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

1. 修复获取群成员昵称乱码

* Update .npmignore

* Update .gitignore

* 1.13.2删除agent的ts文件

* 1.13.4

* 1.13.5

* Update init-agent-script.ts

* 1.13.5

* 1.13.6

* del png file

* Update init-agent-script.js

* 1.13.7 修复@好友出现两个昵称的bug

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>

* 1.13.7

* Update README.md

* 1.13.8

* 3.9.10.19 init

* 3.9.10.19 init

1. Support WeChat version 3.9.10.19
2. Support list
    - getMyselfInfo
    - sendMsg
    - recvMsg

* Update package.json

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>

* update to support 3.9.10.19 (#234)

* 3.9.2.23 init (#180)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 3.9.2.23 init (#182)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23 (#185)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23

---------

Co-authored-by: LuChao <atorber@163.com>

* add 1.3.0 illustrate

* Update README.md

* Update README.md

* add demo

* 1.13.1

* 1.13.1

* 1.13.2 dev

* 增加扫码登录、检测登录状态

* 增加登入登出事件

* 增加ts改造init

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

1. 修复获取群成员昵称乱码

* Update .npmignore

* Update .gitignore

* 1.13.2删除agent的ts文件

* 1.13.4

* 1.13.5

* Update init-agent-script.ts

* 1.13.5

* 1.13.6

* del png file

* Update init-agent-script.js

* 1.13.7 修复@好友出现两个昵称的bug

* 1.13.7 修复@好友昵称重复bug (#209)

* 3.9.2.23 init (#180)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 3.9.2.23 init (#182)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23 (#185)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23

---------

Co-authored-by: LuChao <atorber@163.com>

* add 1.3.0 illustrate

* Update README.md

* Update README.md

* add demo

* 1.13.1

* 1.13.1

* 1.13.2 dev

* 增加扫码登录、检测登录状态

* 增加登入登出事件

* 增加ts改造init

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

1. 修复获取群成员昵称乱码

* Update .npmignore

* Update .gitignore

* 1.13.2删除agent的ts文件

* 1.13.4

* 1.13.5

* Update init-agent-script.ts

* 1.13.5

* 1.13.6

* del png file

* Update init-agent-script.js

* 1.13.7 修复@好友出现两个昵称的bug

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>

* 1.13.7

* Update README.md

* 1.13.8

* 3.9.10.19 init

* 3.9.10.19 init

1. Support WeChat version 3.9.10.19
2. Support list
    - getMyselfInfo
    - sendMsg
    - recvMsg

* Update package.json

* match wechat client version

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>

* Updated the automatic packaging logic (#235)

* 3.9.2.23 init (#180)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 3.9.2.23 init (#182)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23 (#185)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23

---------

Co-authored-by: LuChao <atorber@163.com>

* add 1.3.0 illustrate

* Update README.md

* Update README.md

* add demo

* 1.13.1

* 1.13.1

* 1.13.2 dev

* 增加扫码登录、检测登录状态

* 增加登入登出事件

* 增加ts改造init

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

1. 修复获取群成员昵称乱码

* Update .npmignore

* Update .gitignore

* 1.13.2删除agent的ts文件

* 1.13.4

* 1.13.5

* Update init-agent-script.ts

* 1.13.5

* 1.13.6

* del png file

* Update init-agent-script.js

* 1.13.7 修复@好友出现两个昵称的bug

* 1.13.7 修复@好友昵称重复bug (#209)

* 3.9.2.23 init (#180)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 3.9.2.23 init (#182)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23 (#185)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23

---------

Co-authored-by: LuChao <atorber@163.com>

* add 1.3.0 illustrate

* Update README.md

* Update README.md

* add demo

* 1.13.1

* 1.13.1

* 1.13.2 dev

* 增加扫码登录、检测登录状态

* 增加登入登出事件

* 增加ts改造init

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

1. 修复获取群成员昵称乱码

* Update .npmignore

* Update .gitignore

* 1.13.2删除agent的ts文件

* 1.13.4

* 1.13.5

* Update init-agent-script.ts

* 1.13.5

* 1.13.6

* del png file

* Update init-agent-script.js

* 1.13.7 修复@好友出现两个昵称的bug

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>

* 1.13.7

* Update README.md

* 1.13.8

* 3.9.10.19 init

* 3.9.10.19 init

1. Support WeChat version 3.9.10.19
2. Support list
    - getMyselfInfo
    - sendMsg
    - recvMsg

* Update package.json

* match wechat client version

* Update npm.yml

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>

* Update README.md

* Update README.md

* Update raw-sidecar-hook.ts

* 3.9.10.27 init

* 2.1.0

* 3.9.10.27 add messageSendText/contactSelfInfo/contactList/roomList

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>
* 3.9.10.19 init (#233)

* 3.9.2.23 init (#180)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 3.9.2.23 init (#182)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23 (#185)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23

---------

Co-authored-by: LuChao <atorber@163.com>

* add 1.3.0 illustrate

* Update README.md

* Update README.md

* add demo

* 1.13.1

* 1.13.1

* 1.13.2 dev

* 增加扫码登录、检测登录状态

* 增加登入登出事件

* 增加ts改造init

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

1. 修复获取群成员昵称乱码

* Update .npmignore

* Update .gitignore

* 1.13.2删除agent的ts文件

* 1.13.4

* 1.13.5

* Update init-agent-script.ts

* 1.13.5

* 1.13.6

* del png file

* Update init-agent-script.js

* 1.13.7 修复@好友出现两个昵称的bug

* 1.13.7 修复@好友昵称重复bug (#209)

* 3.9.2.23 init (#180)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 3.9.2.23 init (#182)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23 (#185)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23

---------

Co-authored-by: LuChao <atorber@163.com>

* add 1.3.0 illustrate

* Update README.md

* Update README.md

* add demo

* 1.13.1

* 1.13.1

* 1.13.2 dev

* 增加扫码登录、检测登录状态

* 增加登入登出事件

* 增加ts改造init

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

1. 修复获取群成员昵称乱码

* Update .npmignore

* Update .gitignore

* 1.13.2删除agent的ts文件

* 1.13.4

* 1.13.5

* Update init-agent-script.ts

* 1.13.5

* 1.13.6

* del png file

* Update init-agent-script.js

* 1.13.7 修复@好友出现两个昵称的bug

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>

* 1.13.7

* Update README.md

* 1.13.8

* 3.9.10.19 init

* 3.9.10.19 init

1. Support WeChat version 3.9.10.19
2. Support list
    - getMyselfInfo
    - sendMsg
    - recvMsg

* Update package.json

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>

* update to support 3.9.10.19 (#234)

* 3.9.2.23 init (#180)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 3.9.2.23 init (#182)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23 (#185)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23

---------

Co-authored-by: LuChao <atorber@163.com>

* add 1.3.0 illustrate

* Update README.md

* Update README.md

* add demo

* 1.13.1

* 1.13.1

* 1.13.2 dev

* 增加扫码登录、检测登录状态

* 增加登入登出事件

* 增加ts改造init

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

1. 修复获取群成员昵称乱码

* Update .npmignore

* Update .gitignore

* 1.13.2删除agent的ts文件

* 1.13.4

* 1.13.5

* Update init-agent-script.ts

* 1.13.5

* 1.13.6

* del png file

* Update init-agent-script.js

* 1.13.7 修复@好友出现两个昵称的bug

* 1.13.7 修复@好友昵称重复bug (#209)

* 3.9.2.23 init (#180)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 3.9.2.23 init (#182)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23 (#185)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23

---------

Co-authored-by: LuChao <atorber@163.com>

* add 1.3.0 illustrate

* Update README.md

* Update README.md

* add demo

* 1.13.1

* 1.13.1

* 1.13.2 dev

* 增加扫码登录、检测登录状态

* 增加登入登出事件

* 增加ts改造init

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

1. 修复获取群成员昵称乱码

* Update .npmignore

* Update .gitignore

* 1.13.2删除agent的ts文件

* 1.13.4

* 1.13.5

* Update init-agent-script.ts

* 1.13.5

* 1.13.6

* del png file

* Update init-agent-script.js

* 1.13.7 修复@好友出现两个昵称的bug

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>

* 1.13.7

* Update README.md

* 1.13.8

* 3.9.10.19 init

* 3.9.10.19 init

1. Support WeChat version 3.9.10.19
2. Support list
    - getMyselfInfo
    - sendMsg
    - recvMsg

* Update package.json

* match wechat client version

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>

* Updated the automatic packaging logic (#235)

* 3.9.2.23 init (#180)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 3.9.2.23 init (#182)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23 (#185)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23

---------

Co-authored-by: LuChao <atorber@163.com>

* add 1.3.0 illustrate

* Update README.md

* Update README.md

* add demo

* 1.13.1

* 1.13.1

* 1.13.2 dev

* 增加扫码登录、检测登录状态

* 增加登入登出事件

* 增加ts改造init

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

1. 修复获取群成员昵称乱码

* Update .npmignore

* Update .gitignore

* 1.13.2删除agent的ts文件

* 1.13.4

* 1.13.5

* Update init-agent-script.ts

* 1.13.5

* 1.13.6

* del png file

* Update init-agent-script.js

* 1.13.7 修复@好友出现两个昵称的bug

* 1.13.7 修复@好友昵称重复bug (#209)

* 3.9.2.23 init (#180)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 3.9.2.23 init (#182)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23 (#185)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23

---------

Co-authored-by: LuChao <atorber@163.com>

* add 1.3.0 illustrate

* Update README.md

* Update README.md

* add demo

* 1.13.1

* 1.13.1

* 1.13.2 dev

* 增加扫码登录、检测登录状态

* 增加登入登出事件

* 增加ts改造init

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

1. 修复获取群成员昵称乱码

* Update .npmignore

* Update .gitignore

* 1.13.2删除agent的ts文件

* 1.13.4

* 1.13.5

* Update init-agent-script.ts

* 1.13.5

* 1.13.6

* del png file

* Update init-agent-script.js

* 1.13.7 修复@好友出现两个昵称的bug

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>

* 1.13.7

* Update README.md

* 1.13.8

* 3.9.10.19 init

* 3.9.10.19 init

1. Support WeChat version 3.9.10.19
2. Support list
    - getMyselfInfo
    - sendMsg
    - recvMsg

* Update package.json

* match wechat client version

* Update npm.yml

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>

* Update README.md

* Update README.md

* Update raw-sidecar-hook.ts

* 3.9.10.27 init

* 2.1.0

* 3.9.10.27 add messageSendText/contactSelfInfo/contactList/roomList

* fixed Transfer message err

* Update puppet-xp.ts

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>
* 3.9.10.19 init (#233)

* 3.9.2.23 init (#180)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 3.9.2.23 init (#182)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23 (#185)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23

---------

Co-authored-by: LuChao <atorber@163.com>

* add 1.3.0 illustrate

* Update README.md

* Update README.md

* add demo

* 1.13.1

* 1.13.1

* 1.13.2 dev

* 增加扫码登录、检测登录状态

* 增加登入登出事件

* 增加ts改造init

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

1. 修复获取群成员昵称乱码

* Update .npmignore

* Update .gitignore

* 1.13.2删除agent的ts文件

* 1.13.4

* 1.13.5

* Update init-agent-script.ts

* 1.13.5

* 1.13.6

* del png file

* Update init-agent-script.js

* 1.13.7 修复@好友出现两个昵称的bug

* 1.13.7 修复@好友昵称重复bug (#209)

* 3.9.2.23 init (#180)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 3.9.2.23 init (#182)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23 (#185)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23

---------

Co-authored-by: LuChao <atorber@163.com>

* add 1.3.0 illustrate

* Update README.md

* Update README.md

* add demo

* 1.13.1

* 1.13.1

* 1.13.2 dev

* 增加扫码登录、检测登录状态

* 增加登入登出事件

* 增加ts改造init

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

1. 修复获取群成员昵称乱码

* Update .npmignore

* Update .gitignore

* 1.13.2删除agent的ts文件

* 1.13.4

* 1.13.5

* Update init-agent-script.ts

* 1.13.5

* 1.13.6

* del png file

* Update init-agent-script.js

* 1.13.7 修复@好友出现两个昵称的bug

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>

* 1.13.7

* Update README.md

* 1.13.8

* 3.9.10.19 init

* 3.9.10.19 init

1. Support WeChat version 3.9.10.19
2. Support list
    - getMyselfInfo
    - sendMsg
    - recvMsg

* Update package.json

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>

* update to support 3.9.10.19 (#234)

* 3.9.2.23 init (#180)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 3.9.2.23 init (#182)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23 (#185)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23

---------

Co-authored-by: LuChao <atorber@163.com>

* add 1.3.0 illustrate

* Update README.md

* Update README.md

* add demo

* 1.13.1

* 1.13.1

* 1.13.2 dev

* 增加扫码登录、检测登录状态

* 增加登入登出事件

* 增加ts改造init

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

1. 修复获取群成员昵称乱码

* Update .npmignore

* Update .gitignore

* 1.13.2删除agent的ts文件

* 1.13.4

* 1.13.5

* Update init-agent-script.ts

* 1.13.5

* 1.13.6

* del png file

* Update init-agent-script.js

* 1.13.7 修复@好友出现两个昵称的bug

* 1.13.7 修复@好友昵称重复bug (#209)

* 3.9.2.23 init (#180)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 3.9.2.23 init (#182)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23 (#185)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23

---------

Co-authored-by: LuChao <atorber@163.com>

* add 1.3.0 illustrate

* Update README.md

* Update README.md

* add demo

* 1.13.1

* 1.13.1

* 1.13.2 dev

* 增加扫码登录、检测登录状态

* 增加登入登出事件

* 增加ts改造init

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

1. 修复获取群成员昵称乱码

* Update .npmignore

* Update .gitignore

* 1.13.2删除agent的ts文件

* 1.13.4

* 1.13.5

* Update init-agent-script.ts

* 1.13.5

* 1.13.6

* del png file

* Update init-agent-script.js

* 1.13.7 修复@好友出现两个昵称的bug

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>

* 1.13.7

* Update README.md

* 1.13.8

* 3.9.10.19 init

* 3.9.10.19 init

1. Support WeChat version 3.9.10.19
2. Support list
    - getMyselfInfo
    - sendMsg
    - recvMsg

* Update package.json

* match wechat client version

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>

* Updated the automatic packaging logic (#235)

* 3.9.2.23 init (#180)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 3.9.2.23 init (#182)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23 (#185)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23

---------

Co-authored-by: LuChao <atorber@163.com>

* add 1.3.0 illustrate

* Update README.md

* Update README.md

* add demo

* 1.13.1

* 1.13.1

* 1.13.2 dev

* 增加扫码登录、检测登录状态

* 增加登入登出事件

* 增加ts改造init

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

1. 修复获取群成员昵称乱码

* Update .npmignore

* Update .gitignore

* 1.13.2删除agent的ts文件

* 1.13.4

* 1.13.5

* Update init-agent-script.ts

* 1.13.5

* 1.13.6

* del png file

* Update init-agent-script.js

* 1.13.7 修复@好友出现两个昵称的bug

* 1.13.7 修复@好友昵称重复bug (#209)

* 3.9.2.23 init (#180)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 3.9.2.23 init (#182)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23 (#185)

* 3.9.2.23 initt

* Update init-agent-script.js

* 3.9.2.23 adapter

* 适配3.9.2.23

* Delete agent-script-3.9.2.23-new.js

* 适配3.9.2.23

---------

Co-authored-by: LuChao <atorber@163.com>

* add 1.3.0 illustrate

* Update README.md

* Update README.md

* add demo

* 1.13.1

* 1.13.1

* 1.13.2 dev

* 增加扫码登录、检测登录状态

* 增加登入登出事件

* 增加ts改造init

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

* 1.13.2

1. 修复获取群成员昵称乱码

* Update .npmignore

* Update .gitignore

* 1.13.2删除agent的ts文件

* 1.13.4

* 1.13.5

* Update init-agent-script.ts

* 1.13.5

* 1.13.6

* del png file

* Update init-agent-script.js

* 1.13.7 修复@好友出现两个昵称的bug

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>

* 1.13.7

* Update README.md

* 1.13.8

* 3.9.10.19 init

* 3.9.10.19 init

1. Support WeChat version 3.9.10.19
2. Support list
    - getMyselfInfo
    - sendMsg
    - recvMsg

* Update package.json

* match wechat client version

* Update npm.yml

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>

* Update README.md

* Update README.md

* Update raw-sidecar-hook.ts

* 3.9.10.27 init

* 2.1.0

* 3.9.10.27 add messageSendText/contactSelfInfo/contactList/roomList

* fixed Transfer message err

* Update puppet-xp.ts

---------

Co-authored-by: choogoo <104893934+choogoo@users.noreply.github.com>
Copy link

coderabbitai bot commented Mar 19, 2025

Walkthrough

This pull request revises various components across the project. The CI/CD workflow now limits publish conditions to branches starting with “3” (or main), and the README’s version and WeChat compatibility support have been updated. Several example files have been modified: a new raw sidecar hook was added to process incoming messages, while older raw sidecar functionality and login-related code were commented out. Multiple obsolete agent scripts have been removed, and the core source code has been refactored using TypeScript interfaces and asynchronous functions to improve type safety and maintainability.

Changes

File(s) Change Summary
.github/workflows/npm.yml, README.md Updated CI/CD publish conditions (branch now “main” or starting with refs/heads/3) and revised versioning/compatibility support in documentation.
examples/raw-sidecar-hook.ts, examples/raw-sidecar.ts, examples/ripe-wechaty.ts, tests/raw-sidecar.ts Introduced a new sidecar hook implementation with an event listener (replying “dong” to a “ding”), removed or commented out legacy version-checks, login handling, and logging in various example and test files.
package.json, src/agents/agent-script-3.3.0.115.js, src/agents/agent-script-3.6.0.18.js, src/agents/agent-script-3.9.2.23-laozhang-raw.js, src/agents/winapi-sidecar.ts, src/agents/winapi.js Bumped package version from 1.13.12 to 2.2.0; updated and added scripts (e.g., new start:raw:hook); added dependency @swc/core; updated sidecar dependency; removed several obsolete agent and Windows API scripts.
src/init-agent-script.ts, src/puppet-xp.ts, src/wechat-sidecar.ts Refactored core modules by removing low-level offset handling; introduced new TypeScript interfaces and multiple asynchronous functions for contacts, messages, and room management; improved type safety and streamlined sidecar initialization by removing legacy components (e.g., XpSidecar).

Sequence Diagram(s)

sequenceDiagram
  participant E as External Event
  participant S as Raw-Sidecar-Hook
  participant H as onRecvMsg Handler
  E->>S: Trigger hook with message ("ding")
  S->>H: Process incoming message
  H-->>S: Log message details
  alt Message text is "ding"
    H->>S: Reply with "dong"
  else
    H->>S: No reply
  end
Loading
sequenceDiagram
  participant C as Contact
  participant B as Ripe-WeChaty Bot
  C->>B: Login event occurs
  B->>C: Send greeting "你好,我是瓦力!"
Loading

Poem

I’m a hopping rabbit, bytes in my fur,
Skipping through code as changes occur.
Branches align with a numeric beat,
Sidecars listen as messages meet.
Obsolete scripts hop quietly away,
New functions spring to light the day.
🐇 CodeRabbit cheers in a joyful sway!

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

ellipsis-dev bot commented Mar 19, 2025

⚠️ This PR is too big for Ellipsis, but support for larger PRs is coming soon. If you want us to prioritize this feature, let us know at help@ellipsis.dev


Generated with ❤️ by ellipsis.dev

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (26)
examples/raw-sidecar-hook.ts (1)

61-87: Review the message handling logic and type safety

The onRecvMsg function handles message events, but there are some concerns:

  1. The function uses any type for args which limits type safety
  2. The args array is accessed by numerical indices which is brittle and hard to maintain

Consider defining a proper interface for the message arguments:

-const onRecvMsg = async (args: any) => {
+interface RecvMsgArgs {
+  talkerId: string;
+  text: string;
+  toId: string;
+  [key: number]: any; // For backward compatibility
+}
+
+const onRecvMsg = async (args: RecvMsgArgs | Error) => {
   console.log('onRecvMsg事件触发:', JSON.stringify(args))

   if (args instanceof Error) {
     console.error('onRecvMsg: 参数错误 Error', args)
     return
   }

-  const toId = String(args[3])
-  const text = String(args[2])
-  const talkerId = String(args[1])
+  const toId = String(args.toId || args[3])
+  const text = String(args.text || args[2])
+  const talkerId = String(args.talkerId || args[1])
tests/raw-sidecar.ts (1)

63-63: Commented out attachment sending functionality

The sendAttatchMsg call has been commented out, which aligns with the changes in other files where older functionality is being deprecated or modified.

Note: There's a typo in the function name - "Attatch" should be "Attach".

When reactivating this functionality in the future, consider fixing the typo:

-// await sidecar.sendAttatchMsg('23023281066@chatroom','zhanghua_cd',fullFilePath,baseName,size)
+// await sidecar.sendAttachMsg('23023281066@chatroom','zhanghua_cd',fullFilePath,baseName,size)
README.md (1)

65-72: Added WeChat version 3.9.10.27 to compatibility table

The table has been expanded to include support for the new WeChat version 3.9.10.27, accurately marking which features are supported.

Consider adding leading pipes to the table rows to improve markdown formatting consistency according to markdownlint standards:

-版本|3.3.0.115|3.6.0.18|3.9.2.23|3.9.10.27|
-:---|:---|:---|:---|:---|
-**<消息>**|
-接收文本|✅|✅|✅|✅
-接收图片|✅|✅|✅
-接收文件|✅|✅|✅|✅
-接收动图|✅|✅|✅|✅
-接收表情|✅|✅|✅|✅
+|版本|3.3.0.115|3.6.0.18|3.9.2.23|3.9.10.27|
+|:---|:---|:---|:---|:---|
+|**<消息>**|
+|接收文本|✅|✅|✅|✅|
+|接收图片|✅|✅|✅||
+|接收文件|✅|✅|✅|✅|
+|接收动图|✅|✅|✅|✅|
+|接收表情|✅|✅|✅|✅|
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

65-65: Table pipe style
Expected: leading_and_trailing; Actual: trailing_only; Missing leading pipe

(MD055, table-pipe-style)


66-66: Table pipe style
Expected: leading_and_trailing; Actual: trailing_only; Missing leading pipe

(MD055, table-pipe-style)


67-67: Table pipe style
Expected: leading_and_trailing; Actual: trailing_only; Missing leading pipe

(MD055, table-pipe-style)


67-67: Table column count
Expected: 5; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


68-68: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


68-68: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


69-69: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


69-69: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


69-69: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


70-70: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


70-70: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


71-71: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


71-71: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


72-72: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


72-72: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)

examples/ripe-wechaty.ts (1)

49-50: Consider renaming the variable for clarity.
Renaming const contacts: Contact[] = [ contact ] to something like const mentionList = [ contact ] can make the intent clearer when mentioning the contact in a room.

-    const contacts: Contact[] = [ contact ]
+    const mentionList: Contact[] = [ contact ]
examples/raw-sidecar.ts (5)

38-38: Remove or justify commented-out code.
// const isLoggedIn = await sidecar.isLoggedIn() is no longer used. If not needed, consider removing it entirely to avoid confusion.

-  // const isLoggedIn = await sidecar.isLoggedIn()

42-43: Eliminate commented-out login URL code if obsolete.
Having // const loginUrl = await sidecar.getLoginUrl() and its accompanying log statement commented out can be confusing. Remove them if you no longer plan to restore the functionality.

-  // const loginUrl = await sidecar.getLoginUrl()
-  // console.info(`登陆二维码地址loginUrl: ${loginUrl}`)

70-81: Confirm unused login event code.
Lines 70–81 are fully commented out. If login status checks are unnecessary, remove them to keep the codebase clean. Otherwise, preserve them along with an explanatory comment.

-        // if (!isLoggedIn) {
-        //   let loginRes = false
-        //   sidecar.isLoggedIn().then(res => {
-        //     loginRes = res
-        //     if (loginRes) {
-        //       void onLogin()
-        //     }
-        //     return res
-        //   }).catch(e => {
-        //     console.error('登录状态检查失败:', e)
-        //   })
-        // }

96-110: Decide on reintroducing or removing the onLogin function.
The entire onLogin function is commented out. If you do not plan to restore it, consider removing it for clarity.

-  // const onLogin = async () => {
-  //   console.info('登陆事件触发')
-  //   console.info(`登陆状态: ${isLoggedIn}`)
-  //   await sidecar.sendMsg('filehelper', 'Sidecar is ready!')
-  //   const contacts = await sidecar.getContact()
-  //   console.log(`contacts: ${contacts}`)
-  //   const contactsJSON = JSON.parse(contacts)
-  //   console.log('contacts列表:', contactsJSON.length)
-  //   ...
-  // }

166-167: Cleanup or clarify commented-out nickname retrieval.
If you no longer need to fetch talker info, remove these lines. If you plan to reintroduce them, add a TODO note to clarify.

-    // const talker = await sidecar.getChatroomMemberNickInfo(talkerId, toId)
-    // console.log('发言人:', talker)
src/wechat-sidecar.ts (3)

36-40: Add error handling for file reads.
Reading init-agent-script.js directly from disk can fail if the file is missing or paths are incorrect. Consider wrapping this in a try-catch or adding file existence checks.

-const scriptPath =  path.join(
-  codeRoot,
-  'src',
-  'init-agent-script.js',
-)
-const initAgentScript = fs.readFileSync(scriptPath, 'utf-8')
+let initAgentScript = ''
+try {
+  const scriptPath = path.join(
+    codeRoot,
+    'src',
+    'init-agent-script.js'
+  )
+  initAgentScript = fs.readFileSync(scriptPath, 'utf-8')
+} catch (err) {
+  console.error('Failed to read init-agent-script.js:', err)
+}

44-44: Remove or document the console statement if no longer needed.
Commented-out logs might create confusion for future maintainers. Remove or explain why it’s kept.

-// console.info('XpSidecar initAgentScript:', XpSidecar.initAgentScript)

46-66: Interface design looks comprehensive.
The new ContactOrRoom interface covers many optional fields. Ensure the optional fields use ? consistently (e.g., avatar?, city?, etc.) if they are truly optional for all use cases.

 export interface ContactOrRoom {
   id: string;
-  avatar: string; // profile picture, optional
+  avatar?: string; // profile picture, optional
   ...
-  city: string; // city of residence, optional
+  city?: string; // city of residence, optional
   ...
 }
src/puppet-xp.ts (4)

241-241: Avoid using any for message type
Setting let type: any can lead to type-unsafety. Consider using a more precise type or a union type from PUPPET.types.Message.

- let type:any = PUPPET.types.Message.Unknown
+ let type = PUPPET.types.Message.Unknown

499-499: Empty block for Transfer messages
The else if (type === PUPPET.types.Message.Transfer) { /* empty */ } block lacks implementation. If transfers are supported, consider implementing or adding a clear TODO.


540-540: Remove commented-out code?
The line // const contactList:any = [] appears unused. Removing dead code can keep things cleaner.

- // const contactList:any = []

569-573: Commented-out debug or unused code
These lines reference or comment out sidecar calls. Please confirm if they’re needed. Otherwise, removing them benefits maintainability.

src/init-agent-script.ts (10)

2-3: Documentation note
The comment references “WeChat 3.9.10.27.” If this code is version-specific, ensure future version increments are clearly tracked.


148-199: writeWStringPtr utility
Nicely implemented utility for writing a UTF-16 string structure. Consider stronger runtime checks for invalid inputs (e.g., empty or extremely large strings).


227-236: getStringByStrAddr
This function returns an empty string when strLength is 0. Consider verifying negative or extremely large lengths to guard against memory issues.


304-335: findIamgePathAddr
Mostly logs output for debugging. If used in production code, ensure large console logs don’t degrade performance.


361-391: readAll
Reads data in 1KB chunks until a short read occurs. Ensure you handle the possibility of an EOF not triggered by a smaller chunk.


505-508: contactSelfQRCode stub
Currently empty. If future logic is needed to retrieve and parse the QR code, add a placeholder comment or TODO.


562-562: Empty conditional block
Double-check if the block for serviceAddr.add(0x168).readU32() is intentionally empty. Might need a fallback or error logging.


568-568: Potential fallback needed
out.country is only assigned if offset reads are valid. If not, consider setting a default empty string or null.


572-573: Commented-out code
These lines suggest a partial approach to reading ChatroomMemberInfo. Remove or enable them as needed.


589-597: Check city offset
This block is similar to the province logic. Make sure the same pattern is consistent for city, signature, etc.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2cd0438 and 2108908.

📒 Files selected for processing (15)
  • .github/workflows/npm.yml (2 hunks)
  • README.md (3 hunks)
  • examples/raw-sidecar-hook.ts (1 hunks)
  • examples/raw-sidecar.ts (4 hunks)
  • examples/ripe-wechaty.ts (2 hunks)
  • package.json (4 hunks)
  • src/agents/agent-script-3.3.0.115.js (0 hunks)
  • src/agents/agent-script-3.6.0.18.js (0 hunks)
  • src/agents/agent-script-3.9.2.23-laozhang-raw.js (0 hunks)
  • src/agents/winapi-sidecar.ts (0 hunks)
  • src/agents/winapi.js (0 hunks)
  • src/init-agent-script.ts (2 hunks)
  • src/puppet-xp.ts (15 hunks)
  • src/wechat-sidecar.ts (2 hunks)
  • tests/raw-sidecar.ts (1 hunks)
💤 Files with no reviewable changes (5)
  • src/agents/agent-script-3.9.2.23-laozhang-raw.js
  • src/agents/winapi-sidecar.ts
  • src/agents/agent-script-3.6.0.18.js
  • src/agents/agent-script-3.3.0.115.js
  • src/agents/winapi.js
🧰 Additional context used
🧬 Code Definitions (3)
examples/raw-sidecar.ts (1)
src/puppet-xp.ts (1) (1)
  • sidecar (79-81)
examples/raw-sidecar-hook.ts (2)
src/puppet-xp.ts (1) (1)
  • sidecar (79-81)
src/wechat-sidecar.ts (1) (1)
  • WeChatSidecar (98-98)
src/init-agent-script.ts (2)
src/puppet-xp.ts (13) (13)
  • contactList (689-693)
  • contactRawPayload (720-723)
  • roomList (1061-1065)
  • roomAdd (1086-1091)
  • roomTopic (1096-1107)
  • roomQuit (1118-1120)
  • roomQRCode (1122-1125)
  • roomAnnounce (1173-1178)
  • messageSendText (915-928)
  • messageSendFile (930-958)
  • messageSendContact (960-970)
  • messageSendUrl (972-980)
  • messageSendMiniProgram (982-1022)
src/wechat-sidecar.ts (2) (2)
  • contactList (75-75)
  • roomList (78-78)
🪛 markdownlint-cli2 (0.17.2)
README.md

65-65: Table pipe style
Expected: leading_and_trailing; Actual: trailing_only; Missing leading pipe

(MD055, table-pipe-style)


66-66: Table pipe style
Expected: leading_and_trailing; Actual: trailing_only; Missing leading pipe

(MD055, table-pipe-style)


67-67: Table pipe style
Expected: leading_and_trailing; Actual: trailing_only; Missing leading pipe

(MD055, table-pipe-style)


67-67: Table column count
Expected: 5; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


68-68: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


68-68: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


69-69: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


69-69: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


69-69: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


70-70: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


70-70: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


71-71: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


71-71: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


72-72: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


72-72: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


73-73: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


73-73: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


73-73: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


74-74: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


74-74: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


74-74: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


75-75: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


75-75: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


75-75: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


76-76: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


76-76: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


77-77: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


77-77: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


77-77: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


78-78: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


78-78: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


78-78: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


79-79: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


79-79: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


79-79: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


80-80: Table pipe style
Expected: leading_and_trailing; Actual: trailing_only; Missing leading pipe

(MD055, table-pipe-style)


80-80: Table column count
Expected: 5; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


81-81: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


81-81: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


81-81: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


82-82: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


82-82: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


83-83: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


83-83: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


83-83: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


84-84: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


84-84: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


84-84: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


85-85: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


85-85: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


85-85: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


86-86: Table pipe style
Expected: leading_and_trailing; Actual: trailing_only; Missing leading pipe

(MD055, table-pipe-style)


86-86: Table column count
Expected: 5; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


87-87: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


87-87: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


88-88: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


88-88: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


88-88: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


89-89: Table pipe style
Expected: leading_and_trailing; Actual: trailing_only; Missing leading pipe

(MD055, table-pipe-style)


89-89: Table column count
Expected: 5; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


90-90: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


90-90: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)

🪛 Biome (1.9.4)
src/puppet-xp.ts

[error] 587-589: This code is unreachable

(lint/correctness/noUnreachable)

src/init-agent-script.ts

[error] 1187-1187: void is confusing inside a union type.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 1264-1264: void is confusing inside a union type.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Publish
  • GitHub Check: Build (windows-latest, 16)
🔇 Additional comments (41)
examples/raw-sidecar-hook.ts (4)

1-29: Appropriate setup and imports for WeChat Sidecar integration

The file is properly set up with necessary imports, license information, and correct dependency imports.


31-59: Well-structured main function with proper event handling

The main function correctly initializes the WeChatSidecar instance and sets up the event listener for hooks. The switch statement is well-organized to handle different hook methods.

Good practice to log just the method name rather than the full JSON payload of args to avoid potential sensitive information exposure in logs.


89-96: Good cleanup implementation with signal handlers

The cleanup function appropriately detaches the sidecar and is properly registered with both SIGINT and SIGTERM signals, which is a good practice for graceful shutdown.


98-101: Proper error handling for the main function

The main function is executed with appropriate error handling to catch and log any failures.

.github/workflows/npm.yml (2)

60-60: Updated publish condition to target version 3.x branches

Modified publish condition to trigger on branches starting with '3' instead of 'v', aligning with the new version numbering format in this PR (3.9.10.27). This ensures the workflow correctly identifies version branches for publishing.


88-88: Updated branch check pattern for semantic versioning

Changed the regex pattern to match semantic version branches without requiring the 'v' prefix. This modification properly aligns with the PR objectives and version numbering scheme used in this release.

README.md (3)

32-32: Updated version compatibility notation

Changed from "1.13.0+" to "1.13.+" to better reflect the versioning strategy for WeChat v3.9.2.23 compatibility.


76-91: Updated feature compatibility matrix to include new version

Correctly marked the supported features for WeChat v3.9.10.27, providing users with clear information about what's supported in the latest version.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

76-76: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


76-76: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


77-77: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


77-77: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


77-77: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


78-78: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


78-78: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


78-78: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


79-79: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


79-79: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


79-79: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


80-80: Table pipe style
Expected: leading_and_trailing; Actual: trailing_only; Missing leading pipe

(MD055, table-pipe-style)


80-80: Table column count
Expected: 5; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


81-81: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


81-81: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


81-81: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


82-82: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


82-82: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


83-83: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


83-83: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


83-83: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


84-84: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


84-84: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


84-84: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


85-85: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


85-85: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


85-85: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


86-86: Table pipe style
Expected: leading_and_trailing; Actual: trailing_only; Missing leading pipe

(MD055, table-pipe-style)


86-86: Table column count
Expected: 5; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


87-87: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


87-87: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


88-88: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


88-88: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


88-88: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


89-89: Table pipe style
Expected: leading_and_trailing; Actual: trailing_only; Missing leading pipe

(MD055, table-pipe-style)


89-89: Table column count
Expected: 5; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


90-90: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


90-90: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


91-91: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


91-91: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


91-91: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data

(MD056, table-column-count)


106-121: Added release notes for v2.1.1 and v2.0.0

Well-documented release notes for the new versions, clearly listing supported features. This helps users understand what functionality they can expect in each version.

examples/ripe-wechaty.ts (2)

45-47: Ensure contact existence and handle potential null scenario.
When calling contact?.say('你好,我是瓦力!'), there's no fallback if contact is not found. The optional chaining helps avoid runtime errors, but it might silently fail if the contact does not exist. Consider adding an error/log message if contact is undefined.


144-144:

✅ Verification successful

Verify default version usage for PuppetXp instantiation.
The previously removed wechatVersion parameter might have been required for a specific environment. Confirm that calling new PuppetXp() without parameters does not break older or specialized WeChat workflows.


🏁 Script executed:

#!/bin/bash
# Description: Search for references to the previously used `wechatVersion` parameter in the codebase.
rg 'PuppetXp\([^)]'

Length of output: 21


Below is a new shell script that searches the entire codebase for any occurrences of the removed wechatVersion parameter. This will help us confirm whether any code still relies on it:

Please run the above script and share the output. Once we confirm that no references exist, we can finalize the review comment accordingly.


🏁 Script executed:

#!/bin/bash
# Searching for any occurrences of 'wechatVersion' in the repository.
rg -n 'wechatVersion'

Length of output: 143


PuppetXp Instantiation Verified – No Legacy Parameter References Detected

  • A repository-wide search for the previously used wechatVersion parameter returned no results.
  • Calling new PuppetXp() without parameters appears safe, as there are no remaining dependencies on the removed parameter.
  • Please ensure any specialized WeChat workflows are manually tested if they have unique requirements.
package.json (3)

3-3: Confirm major version bump compliance.
You’ve updated the version to 2.2.0. If this represents a breaking change from version 1.x, ensure there’s a clear changelog entry or release note describing it.


32-32: New script looks good.
The new start:raw:hook script introduces a clear build step and runs the sidecar hook example. This addition appears consistent with your pattern of “start:xxx” tasks.


87-89:

❓ Verification inconclusive

Validate new dependencies for potential conflicts.
The addition of @swc/core and the upgrade of sidecar to ^1.0.19 may introduce compatibility or dependency changes. Verify these updates to prevent unexpected runtime behavior.


🏁 Script executed:

#!/bin/bash
# Description: Validate usage of @swc/core and confirm sidecar references.
rg '@swc/core'
rg '"sidecar":'

Length of output: 112


Action: Confirm dependency integration and test for runtime compatibility.
The static verification shows that both @swc/core and sidecar are present in the package.json with the expected versions. While these changes look correct, please ensure that you run integration or runtime tests to confirm that the new dependency versions don't introduce any conflicts or unexpected behaviors.

  • The package.json correctly references:
    • "@swc/core": "^1.5.25"
    • "sidecar": "^1.0.19"
src/wechat-sidecar.ts (5)

68-68: Sidecar decoration reference updated.
Using initAgentScript directly aligns with your new approach. This change looks consistent.


74-75: Confirm data transformations from raw sidecar responses.
contactList() returns Promise<ContactOrRoom[]>. Verify that the sidecar layer indeed structures the data to conform to this interface. Adding unit tests here would be beneficial.


77-78: Validate room data shape.
roomList() similarly returns Promise<ContactOrRoom[]>. Ensure that any room-specific attributes are present or handled.


80-84: Check numeric return type for sendMsg.
You’ve changed sendMsg from returning a string to returning a number. Ensure this accurately reflects the underlying sidecar call (e.g., a message ID).


98-98: Re-exporting WeChatSidecar.
Exporting WeChatSidecar is correct for external usage. No additional concerns noted.

src/puppet-xp.ts (8)

47-47: Introduce ContactOrRoom import
Good to see ContactOrRoom imported for stronger type checks on contact/room data.


113-113: Ensure login flow is intentional
Calling await this.onLogin() in onStart() might trigger a second login if already logged in. The onLogin method does have a safeguard, but please confirm that no race conditions occur when quickly restarting.


255-255: Validate condition
The condition json?.msgsource?.atuserlist === 'atuserlist' relies on a specific field name. If upstream format changes, this check might fail.

🧰 Tools
🪛 Biome (1.9.4)

[error] 255-255: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


539-539: Appropriate use of typed list
Using ContactOrRoom[] from this.sidecar.contactList() should improve clarity.


553-557: Incomplete contact details
The contact's avatar is set to an empty string, and gender is always Unknown, despite having contactInfo.alias. Confirm if ignoring actual avatar/gender data is intentional or if it should be populated from contactInfo.


567-567: Consistent approach to room data
Fetching room data as ContactOrRoom[] is aligned with your contact approach. Looks good.


583-585: Room member initialization
The sequence of const roomId = roomInfo.id and const roomMember: any[] = [] is fine, but verify that roomMember is actually updated later. If not, consider clarifying or removing.


587-589: Potential unreachable code
Static analysis indicates these lines might be unreachable. Double-check the surrounding logic to ensure the block is actually executed in practice.

🧰 Tools
🪛 Biome (1.9.4)

[error] 587-589: This code is unreachable

(lint/correctness/noUnreachable)

src/init-agent-script.ts (14)

6-25: New Contact interface
Defining a comprehensive interface for contacts improves clarity across the codebase. Great job enumerating optional fields.


28-40: New Message interface
This interface organizes message data well and clarifies the shape of chat messages (e.g., talkerId, roomId).


45-45: Init struct function
Double-check the memory allocation sizes. Off-by-one or boundary issues can cause stability problems when dealing with UTF-16 strings.


201-225: readWStringPtr utility
Ensure you handle the possibility of a null pointer or size mismatch. If size is out of any expected bounds, the read might be invalid.


238-270: WeChatMessage interface
This layout accurately captures WeChat’s raw message fields. Keep in mind potential data expansions for new WeChat features.


272-292: ReadWeChatStr
Cautiously parse pointer-based string data. Defensive checks can prevent crashes if data is malformed or truncated.


294-302: ReadSKBuiltinString function
Calls ReadWeChatStr on offset pointers. Confirm that offsets are correct for WeChat 3.9.10.27, as any patch release could shift them.


345-349: uint8ArrayToString
Using decodeURIComponent(escape(...)) is a known approach; just be aware of potential overflows on very large arrays.


351-359: stringToUint8Array
The symmetrical approach to uint8ArrayToString. Looks good.


393-398: Offsets object
Storing memory addresses in an object is risky if any offset changes. Keep an eye on WeChat updates that might shift these addresses.


500-503: moduleBaseAddress & selfInfo
You retrieve the base address for WeChatWin.dll once. If WeChat updates or loads differently, this might break.


513-558: contactSelfInfo method
Thoroughly parses user info from memory offsets. If an offset changes or the user is not logged in, handle potential null reads or partial data.


570-570: Braces within braces
Check the structure of your try/catch blocks and nested conditionals for clarity.


582-586: Review province logic
You read the province from memory offsets. If a contact has no province set, we rely on the fallback to empty string. OK to keep as is, but confirm that’s the intended behavior.

Comment on lines +99 to +100
|2.1.1|[WeChat-v3.9.10.27](https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.10.27/WeChatSetup-3.9.10.27.exe)|npm i wechaty-puppet-xp@2.1.1|
|1.13.12|[WeChat-v3.9.2.23](https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.2.23/WeChatSetup-3.9.2.23.exe)|npm i wechaty-puppet-xp@1.3.12|
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Added information about new supported versions

Updated the version support table to include the new 2.1.1 version for WeChat v3.9.10.27 and corrected the version reference for 1.13.12 (previously referred to as 1.3.12 in the npm install command).

There's an inconsistency in line 100:

-|1.13.12|[WeChat-v3.9.2.23](https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.2.23/WeChatSetup-3.9.2.23.exe)|npm i wechaty-puppet-xp@1.3.12|
+|1.13.12|[WeChat-v3.9.2.23](https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.2.23/WeChatSetup-3.9.2.23.exe)|npm i wechaty-puppet-xp@1.13.12|

The npm install command references version 1.3.12 while the table column shows 1.13.12, which could confuse users trying to install the correct version.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
|2.1.1|[WeChat-v3.9.10.27](https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.10.27/WeChatSetup-3.9.10.27.exe)|npm i wechaty-puppet-xp@2.1.1|
|1.13.12|[WeChat-v3.9.2.23](https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.2.23/WeChatSetup-3.9.2.23.exe)|npm i wechaty-puppet-xp@1.3.12|
|2.1.1|[WeChat-v3.9.10.27](https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.10.27/WeChatSetup-3.9.10.27.exe)|npm i wechaty-puppet-xp@2.1.1|
|1.13.12|[WeChat-v3.9.2.23](https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.2.23/WeChatSetup-3.9.2.23.exe)|npm i wechaty-puppet-xp@1.13.12|

Comment on lines +71 to +72
@Call(agentTarget('contactSelfInfo'))
getMyselfInfo ():Promise<any> { return Ret() }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Refine the return type to avoid using any.
getMyselfInfo returns a Promise<any>. For better type safety, introduce a specific return interface or type definition.

-  getMyselfInfo (): Promise<any> { return Ret() }
+  interface MyselfInfo {
+    wxid: string;
+    nickname: string;
+    // ...
+  }
+  getMyselfInfo (): Promise<MyselfInfo> { return Ret() }

Committable suggestion skipped: line range outside the PR's diff.


try {
Interceptor.attach(
moduleBaseAddress.add(offsets.kDoAddMsg), {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Revisit “void | string” usage
Same issue flagged by the linter. Replacing void with undefined can improve clarity.

🧰 Tools
🪛 Biome (1.9.4)

[error] 1264-1264: void is confusing inside a union type.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)

Comment on lines +337 to +343
const hasPath = (path: string | undefined) => {
// return path.indexOf('Thumb') !== -1
if (path && path.length > 0) {
console.log('path is :', path)
}
return false
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

hasPath
This function currently always returns false. The check never sees return true for recognized paths, so it might be incomplete.

- return false
+ return path?.includes('Thumb') ?? false
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const hasPath = (path: string | undefined) => {
// return path.indexOf('Thumb') !== -1
if (path && path.length > 0) {
console.log('path is :', path)
}
return false
}
const hasPath = (path: string | undefined) => {
// return path.indexOf('Thumb') !== -1
if (path && path.length > 0) {
console.log('path is :', path)
}
return path?.includes('Thumb') ?? false
}

async function messageSendLocation(
conversationId: string,
locationPayload: any,
): Promise<void | string> {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Static analysis: remove confusing union with void
Your function signature returns Promise<void | string>. Consider using Promise<string | undefined> to avoid confusion.

- async function roomSendLocation(...): Promise<void | string> {
+ async function roomSendLocation(...): Promise<string | undefined> {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
): Promise<void | string> {
- async function roomSendLocation(...): Promise<void | string> {
+ async function roomSendLocation(...): Promise<string | undefined> {
🧰 Tools
🪛 Biome (1.9.4)

[error] 1187-1187: void is confusing inside a union type.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)

@atorber atorber merged commit 5ab08b6 into main Mar 19, 2025
7 checks passed
@atorber atorber deleted the 3.9.10.27 branch March 19, 2025 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant