picoclaw/docs/channels/wecom/wecom_app/README.vi.md
dj-oyu 31376d2961 merge: sync upstream/main
Merge upstream/main (c0bb8d6) into fork. Key upstream changes:
- SSE streaming support (Telegram sendMessageDraft, channel StreamDelegate)
- Pico client outbound WebSocket channel
- Smarter heartbeat task detection (heartbeatHasUserTasks)
- Separate tool-limit vs empty-response messages
- TUI launcher refactoring with cyberpunk theme
- Android fallback DNS resolver
- Improved docs translations

Conflict resolution:
- Kept fork's channel-based StreamingProvider interface and ChatStream API
- Kept fork's buildHTTPRequest (superset of upstream's buildRequestBody)
- Merged upstream's streamActive tracking alongside fork's draft-based streaming
- Added upstream's parser_markdown_to_html.go for new Telegram streaming
- Resolved duplicate declarations (MessageDeleter, escapeHTML, DeleteMessage)
- Adopted upstream's resolveScopeKey prefix-gated behavior

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 09:23:04 +09:00

2.3 KiB

Quay lại README

Ứng dụng nội bộ WeCom

Ứng dụng nội bộ WeCom là ứng dụng được doanh nghiệp tạo ra trong WeCom, chủ yếu dùng cho mục đích nội bộ. Thông qua ứng dụng nội bộ WeCom, doanh nghiệp có thể thực hiện giao tiếp và cộng tác hiệu quả với nhân viên, nâng cao hiệu suất làm việc.

Cấu hình

{
  "channels": {
    "wecom_app": {
      "enabled": true,
      "corp_id": "wwxxxxxxxxxxxxxxxx",
      "corp_secret": "YOUR_CORP_SECRET",
      "agent_id": 1000002,
      "token": "YOUR_TOKEN",
      "encoding_aes_key": "YOUR_ENCODING_AES_KEY",
      "webhook_path": "/webhook/wecom-app",
      "allow_from": [],
      "reply_timeout": 5
    }
  }
}
Trường Kiểu Bắt buộc Mô tả
corp_id string ID doanh nghiệp
corp_secret string Secret của ứng dụng
agent_id int ID agent của ứng dụng
token string Token xác minh callback
encoding_aes_key string Khóa AES 43 ký tự
webhook_path string Không Đường dẫn webhook (mặc định: /webhook/wecom-app)
allow_from array Không Danh sách cho phép ID người dùng
reply_timeout int Không Thời gian chờ phản hồi tính bằng giây

Hướng dẫn thiết lập

  1. Đăng nhập vào Bảng điều khiển quản trị WeCom

  2. Vào "Quản lý ứng dụng" -> "Tạo ứng dụng"

  3. Lấy ID doanh nghiệp (CorpID) và Secret của ứng dụng

  4. Cấu hình "Nhận tin nhắn" trong cài đặt ứng dụng để lấy Token và EncodingAESKey

  5. Đặt URL callback thành http://<your-server-ip>:<port>/webhook/wecom-app

  6. Nhập CorpID, Secret, AgentID và các thông tin khác vào file cấu hình

    Lưu ý: PicoClaw hiện sử dụng máy chủ HTTP Gateway dùng chung để nhận callback webhook cho tất cả các kênh. Địa chỉ lắng nghe mặc định là 127.0.0.1:18790. Để nhận callback từ internet công cộng, hãy cấu hình reverse proxy từ tên miền bên ngoài của bạn đến Gateway (cổng mặc định 18790).