Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
a4f30e9
Add WeCom AIBot channel implementation and tests
reevoid Feb 28, 2026
d0d6c8c
fix(wecom-aibot): correct variable name in JSON parsing in message ca…
reevoid Feb 28, 2026
728b65b
feat(wecom): add WeCom AI Bot integration and update documentation
reevoid Feb 28, 2026
fb60941
feat(wecom-aibot): add reasoning_channel_id to configuration and enha…
reevoid Feb 28, 2026
8774ce1
Update pkg/channels/wecom/aibot.go
reevoid Feb 28, 2026
e3634fb
Update pkg/channels/wecom/aibot.go
reevoid Feb 28, 2026
0696f97
Update pkg/channels/wecom/aibot.go
reevoid Feb 28, 2026
fd3111f
feat(wecom-aibot): add context management for stream tasks to improve…
reevoid Feb 28, 2026
aaddf94
feat(wecom-aibot): enhance stream task management with StreamClosedAt…
reevoid Feb 28, 2026
8d5f134
fix(docs): update WeCom AI Bot task timeout duration in README
reevoid Feb 28, 2026
399a763
Update pkg/channels/wecom/aibot.go
reevoid Feb 28, 2026
fb1e207
fix(docs): update WeCom AI Bot timeout duration in README and improve…
reevoid Feb 28, 2026
7918b9f
refactor(wecom): replace generateSignature with computeSignature and …
reevoid Feb 28, 2026
ad7ce69
refactor(wecom): streamline AES encryption/decryption and improve tas…
reevoid Feb 28, 2026
77723eb
refactor(wecom): simplify stream message structure by introducing WeC…
reevoid Feb 28, 2026
711657c
fix(wecom): improve error handling in sendViaResponseURL and remove t…
reevoid Feb 28, 2026
59d1f06
fix(wecom): update CanonicalID generation to use identity.BuildCanoni…
reevoid Feb 28, 2026
1ba5ab7
refactor(config): remove WebhookHost and WebhookPort from WeComAIBotC…
reevoid Feb 28, 2026
a193e2d
refactor(docs): remove webhook_host and webhook_port from configurati…
reevoid Feb 28, 2026
7c80274
fix(wecom): improve error message for response_url delivery failure
reevoid Feb 28, 2026
403b0c2
fix(wecom): handle empty response by encrypting and returning a defau…
reevoid Feb 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion config/config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"reasoning_channel_id": ""
},
"wecom": {
"_comment": "WeCom Bot (ζ™Ίθƒ½ζœΊε™¨δΊΊ) - Easier setup, supports group chats",
"_comment": "WeCom Bot - Easier setup, supports group chats",
"enabled": false,
"token": "YOUR_TOKEN",
"encoding_aes_key": "YOUR_43_CHAR_ENCODING_AES_KEY",
Expand All @@ -153,6 +153,17 @@
"allow_from": [],
"reply_timeout": 5,
"reasoning_channel_id": ""
},
"wecom_aibot": {
"_comment": "WeCom AI Bot (ζ™Ίθƒ½ζœΊε™¨δΊΊ) - Official WeCom AI Bot integration, supports proactive messaging and private chats.",
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

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

The comment says "supports proactive messaging and private chats" but the documentation in docs/channels/wecom/wecom_aibot/README.zh.md (feature comparison table, line 10) shows that WeCom AI Bot also supports group chats. The comment should be updated to mention group chat support.

Suggested change
"_comment": "WeCom AI Bot (ζ™Ίθƒ½ζœΊε™¨δΊΊ) - Official WeCom AI Bot integration, supports proactive messaging and private chats.",
"_comment": "WeCom AI Bot (ζ™Ίθƒ½ζœΊε™¨δΊΊ) - Official WeCom AI Bot integration, supports proactive messaging, private chats, and group chats.",

Copilot uses AI. Check for mistakes.
"enabled": false,
"token": "YOUR_TOKEN",
"encoding_aes_key": "YOUR_43_CHAR_ENCODING_AES_KEY",
"webhook_host": "0.0.0.0",
"webhook_port": 18791,
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

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

The WeComAIBot example configuration uses port 18791, which conflicts with the default port for LINE. The example should use a unique port (e.g., 18794) to avoid misleading users into a port conflict when they also have LINE enabled.

Suggested change
"webhook_port": 18791,
"webhook_port": 18794,

Copilot uses AI. Check for mistakes.
"webhook_path": "/webhook/wecom-aibot",
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

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

The wecom_aibot entry in config.example.json is missing the allow_from and reply_timeout fields that are present in the WeComAIBotConfig struct (and in the defaults) and are included in every other WeCom channel entry (wecom and wecom_app). Omitting these from the example config makes it less discoverable for users who want to restrict which users the bot responds to.

Suggested change
"webhook_path": "/webhook/wecom-aibot",
"webhook_path": "/webhook/wecom-aibot",
"allow_from": [],
"reply_timeout": 5,

Copilot uses AI. Check for mistakes.
"max_steps": 10,
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

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

The wecom_aibot example configuration is missing the allow_from and reply_timeout fields that are present in the wecom and wecom_app example configurations. While these fields have defaults, including them in the example config would help users understand that these options exist, consistent with the other WeCom channel examples.

Suggested change
"max_steps": 10,
"max_steps": 10,
"allow_from": [],
"reply_timeout": 5,

Copilot uses AI. Check for mistakes.
"welcome_message": "Hello! I'm your AI assistant. How can I help you today?"
}
Comment on lines 157 to 166
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

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

The wecom_aibot section in config.example.json is missing the allow_from and reply_timeout fields. Every other channel in this file includes allow_from, and the other WeCom channels (wecom and wecom_app) both include reply_timeout. This inconsistency makes it less obvious to users that these configuration options exist for wecom_aibot. The fields are supported by the config struct (WeComAIBotConfig) and the channel implementation.

Copilot uses AI. Check for mistakes.
},
Comment on lines +157 to 167
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

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

The wecom_aibot entry in config.example.json omits allow_from and reply_timeout fields that are present in both the wecom and wecom_app example entries. For consistency and to make the example easier to use as a template, these fields should be included in the example, just as they are in the wecom and wecom_app blocks.

Copilot uses AI. Check for mistakes.
"providers": {
Expand Down
4 changes: 4 additions & 0 deletions pkg/channels/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ func (m *Manager) initChannels() error {
m.initChannel("wecom", "WeCom")
}

if m.config.Channels.WeComAIBot.Enabled && m.config.Channels.WeComAIBot.Token != "" {
m.initChannel("wecom_aibot", "WeCom AI Bot")
}

if m.config.Channels.WeComApp.Enabled && m.config.Channels.WeComApp.CorpID != "" {
m.initChannel("wecom_app", "WeCom App")
}
Expand Down
Loading