How xcisxc29/dsh-wechat works
This is a DSH desktop plugin that lets a WeChat user operate DSH sessions and exchange messages and media through Tencent’s iLink gateway. The principal path is phone message → channel polling → host routing to a DSH session → response back to WeChat. The graph also preserves login/settings, session controls, attachments, agent tool activity and remote approval/question handling. Several core modules are indexed but not excerpted; their internal relationships are omitted unless the README or shown source supports them.
Main entry points: host.ts Plugin host · channel.ts Long-poll channel · media.ts Media transfer · http.ts iLink HTTP
Components 22
DSH plugin host
- Plugin host
packages/bundle/src/host.ts - Settings routes
packages/bundle/src/routes.ts - DSH services
packages/bundle/src/services.ts - Question parsing
packages/bundle/src/interactions.ts - Media classification
packages/bundle/src/media-kind.ts
WeChat channel
- Long-poll channel
packages/core/src/channel.ts - QR login
packages/core/src/login.ts
Core protocol
- iLink HTTP
packages/core/src/http.ts - Media encryption
packages/core/src/crypto.ts - Media transfer
packages/core/src/media.ts - Voice conversion
packages/core/src/silk.ts - Media thumbnails
packages/core/src/thumbnail.ts - Message rendering
packages/core/src/render.ts - Channel state
packages/core/src/state.ts - iLink wire types
packages/core/src/types.ts
Sessions and interaction
- Session router
packages/core/src/router.ts - Session index
packages/core/src/session-index.ts - Remote approvals
packages/bundle/src/host.ts - Tool activity
packages/bundle/src/host.ts
Other components
- WeChat user
- DSH agent
- Tencent iLink
Connections 24
- WeChat user → Long-poll channel: sends messages
README.md - Long-poll channel → Tencent iLink: polls and sends
packages/core/src/channel.ts - Long-poll channel → Plugin host: delivers inbound
- Plugin host → Session router: routes prompts
- Session router → DSH agent: ensures sessions
packages/core/src/router.ts - Session router → Channel state: saves bindings
packages/core/src/state.ts - Plugin host → DSH agent: uses host services
- Plugin host → Question parsing: parses replies
packages/bundle/src/host.ts - Plugin host → Media classification: classifies media
packages/bundle/src/host.ts - Plugin host → Media transfer: uploads attachments
packages/bundle/src/host.ts - Plugin host → Message rendering: renders session rows
packages/bundle/src/host.ts - Plugin host → Channel state: persists channel state
packages/bundle/src/host.ts - Plugin host → Settings routes: serves settings
packages/bundle/src/host.ts - Plugin host → Remote approvals: handles prompts
packages/bundle/src/host.ts - Plugin host → Tool activity: reports tool activity
packages/bundle/src/host.ts - QR login → iLink HTTP: requests login
packages/core/src/login.ts - Long-poll channel → iLink HTTP: calls API
packages/core/src/channel.ts - Long-poll channel → Media transfer: detects media items
packages/core/src/channel.ts - Media transfer → iLink HTTP: requests media endpoints
packages/core/src/media.ts - Media transfer → Media encryption: parses media keys
packages/core/src/media.ts - Media transfer → Voice conversion: converts voice
packages/core/src/media.ts - Voice conversion → Media thumbnails: uses thumbnail support
packages/core/src/silk.ts - Plugin host → Session index: reads session data
- iLink HTTP → iLink wire types: uses protocol types
packages/core/src/http.ts