Commit Graph
56 Commits
Author SHA1 Message Date
chenhg5andClaude c4eade463c fix(feishu): validate URLs before creating hyperlinks
Add URL validation for Feishu post hyperlinks to prevent rejection of non-HTTP(S) URLs. Skip invalid links during markdown parsing.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-09 15:21:35 +08:00
kevinWangSheng 0158f44eb1 fix(feishu): add nil checks for SenderId.OpenId and msg.Content
Prevent nil pointer panics when Feishu sends messages where
sender.SenderId.OpenId or msg.Content is nil.
2026-03-08 17:29:46 -07:00
chenhg5andClaude c9127ae652 feat(dingtalk): preprocess markdown content for reply messages
Add preprocessDingTalkMarkdown function to handle DingTalk-specific markdown rendering quirks:
- Convert leading spaces to non-breaking spaces
- Ensure proper line breaks between non-empty lines
- Preserve code blocks formatting

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-08 22:26:25 +08:00
chenhg5andClaude 754c65af32 feat(i18n): add new message keys and improve command formatting
Add new i18n message keys for various command responses (switch, timeout, relay bindings).
Improve formatting of command list output with better descriptions and shell command display.
Adjust Feishu platform message type detection threshold for posts.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-08 21:17:25 +08:00
xiaoheicat b89aadb9c2 Merge upstream/main and resolve conflicts
Merge upstream changes (iFlow agent, multi-bot relay, QQ Beta tag)
with our QQ Bot Official Platform additions. Resolved conflicts in
README.md, README.zh-CN.md, and cmd/cc-connect/main.go by combining
both sets of changes.
2026-03-08 13:25:30 +08:00
xiaoheicat 53043e84fd fix(qqbot): address code review feedback and add image/doc support
Code review fixes:
1. Fix msgSeqMap memory leak: replace unbounded sync.Map with TTL-based
   map that evicts entries older than 5 minutes
2. Fix @mention not stripped: add stripAtMention() to parse and remove
   the <@!botid> prefix from group message content
3. Filter empty messages: skip handler call when content is empty after
   stripping (e.g. bare @bot with no text)
4. Fix reconnect race condition: add atomic.Bool guard to prevent
   concurrent reconnectLoop goroutines
5. Add shard field to Identify payload per QQ official docs
6. Cap reconnect attempts at 30 to avoid infinite retry on config errors

New features:
7. Support receiving image attachments from group and C2C messages,
   downloaded into core.ImageAttachment for agent consumption
8. Add docs/qqbot.md setup guide (bilingual EN/ZH)
9. Update README.md and README.zh-CN.md with QQ Bot platform entries
   in support matrix, setup guide table, config examples, and project
   structure
2026-03-08 13:09:48 +08:00
Rayquaza 4e5d760bd2 feat(telegram): add bot command menu registration
- add BotCommandInfo and CommandRegistrar interface for platform abstraction
- implement GetAllCommands to collect builtin/custom commands and skills
- add i18n descriptions for all 30 builtin commands (en/zh/zh-TW/ja/es)
- implement RegisterCommands for Telegram setMyCommands API integration
2026-03-08 01:12:57 +08:00
xiaoheicat f567b90dd1 feat(platform): add official QQ Bot Platform integration
Add new `qqbot` platform type using the official QQ Bot API v2
(bot.q.qq.com), coexisting with the existing `qq` (OneBot v11) platform.

- OAuth2 token management with auto-refresh
- WebSocket gateway with heartbeat, reconnection, and resume
- GROUP_AT_MESSAGE_CREATE and C2C_MESSAGE_CREATE event handling
- REST API v2 message sending with msg_seq tracking
- No new dependencies (reuses gorilla/websocket)
2026-03-07 21:13:24 +08:00
chenhg5andClaude Opus 4.6 952a0e5d24 feat(relay): support multi-bot binding in group chats
- Add AddToBind() method to incrementally add projects to binding
- Add RemoveFromBind() method to remove specific project from binding
- Update /bind command to support multiple projects:
  - /bind <project> - add project to binding
  - /bind -<project> - remove specific project
  - /bind remove - clear all bindings
- Add debug logging for telegram group message filtering

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 18:49:23 +08:00
chenhg5andClaude f8e5e7b828 fix(streaming): clean stale previews when degraded
Add logic to delete stale preview messages when stream preview is degraded.
Implement PreviewCleaner interface for Telegram platform and add test coverage.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-07 09:02:19 +08:00
chenhg5andClaude 0179d098ce feat(commands): add interactive buttons for lang/model/mode commands
generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-07 08:36:30 +08:00
chenhg5andClaude Opus 4.6 896d8db6ab feat(feishu): add three-tier rendering strategy for markdown messages
- Code blocks/tables → card (schema 2.0 markdown)
- Many \n\n paragraphs (≥4, e.g. help, status) → post rich-text (preserves blank lines)
- Other markdown → post md tag (best native rendering)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:40:16 +08:00
chenhg5andClaude Opus 4.6 16b028b098 feat(ui): improve status display and fix Feishu message formatting
- Add quiet mode status to /status command with i18n support
- Fix Feishu help command line breaks (use buildPostJSON instead of md tag)
- Improve tool message formatting (code block for long content)
- Strip XML tags from session summary display

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:31:37 +08:00
chenhg5andClaude 6717b3ef0b feat(core): add message deduplication by process start time
Added StartTime tracking and IsOldMessage check to prevent processing of messages from before process startup. Implemented checks across all platforms with platform-specific timestamp handling. Includes tests for new functionality.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-06 15:25:08 +08:00
chenhg5andClaude e40d033c3f feat(engine): enhance session switching and markdown conversion
- Improved `/switch` command to support session names and better matching logic
- Refactored markdown-to-HTML conversion with proper tag nesting and quote escaping
- Added detailed logging for streaming preview operations
- Fixed HTML tag validation in markdown tests
- Updated Telegram platform to handle HTML parsing errors gracefully

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-06 10:30:29 +08:00
chenhg5andClaude 914198e597 refactor(feishu): ignore reaction removal events
Add handler to ignore reaction deletion events similar to existing reaction creation handling.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-06 09:46:03 +08:00
chenhg5andClaude Opus 4.6 b8e8316968 feat: add typing indicator and fix HTML escaping
Typing Indicator:
- Add TypingIndicator interface for "processing" feedback
- Discord: send typing status every 8 seconds
- Telegram: send chat typing action every 5 seconds
- Feishu: add emoji reaction, remove when done

Markdown HTML Escaping:
- Fix HTML special chars (<, >, &) escaping in all contexts
- Use placeholder strategy: extract code/links, escape all, restore

Streaming Preview:
- Remove trailing cursor character from preview messages

Feishu Card:
- Add wide_screen_mode config

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 09:42:14 +08:00
chenhg5andClaude Opus 4.6 4b26663fd5 feat: improve markdown rendering and streaming preview
Streaming Preview:
- Add freeze() method to pause preview on permission prompts
- Improve finish() logic for better edge case handling

Markdown Rendering:
- Telegram: switch from Markdown to HTML mode with MarkdownToTelegramHTML
- Discord: use code-fence-aware message splitting
- Feishu: dual rendering strategy (card for code/tables, post for text)
- Feishu: support links, italic, strikethrough in inline parsing
- Feishu: use Patch API for card message updates

i18n:
- Use code blocks for permission prompt content
- Simplify button labels (remove emoji)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 09:14:50 +08:00
chenhg5andClaude Opus 4.6 e5d328d9d6 feat: add streaming preview and rate limiting support
Streaming Preview:
- Real-time message preview during agent response (like "typing" indicator)
- Supported on Telegram, Discord, and Feishu
- Configurable interval, min delta chars, and max preview length

Rate Limiting:
- Per-session sliding-window rate limiter
- Prevents users from flooding the bot with messages
- Configurable max messages and window size

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 07:02:37 +08:00
chenhg5andClaude a2a2b2b77b feat(discord): enhance session management commands
Add 'name' command and improve descriptions for session management.
Move 'delete' command to group with other session commands.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 17:42:50 +08:00
chenhg5andClaude 0667e970bf feat(agent): add session deletion capability
Implement session deletion functionality across all agent implementations (claudecode, codex, cursor, gemini)
Add new /delete command with session lookup by ID/prefix
Add i18n support for delete-related messages
Update command help texts to include new delete command
Add SessionDeleter interface for agents supporting deletion
Implement core deletion logic with active session protection

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 13:53:43 +08:00
chenhg5andClaude 506061597e feat: add group_replay_all config
generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 12:50:51 +08:00
chenhg5andClaude e5b9b35278 feat(alias): add command alias support with config and runtime management
generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 10:17:43 +08:00
chenhg5andClaude c6fd0d6b31 feat(restart): add graceful restart capability with notifications
Add restart functionality triggered by /restart command:
- Persists restart requests across process termination
- Sends success notifications post-restart
- Includes internationalized messages
- Supports Discord slash command
- Uses syscall.Exec for clean restart

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 01:19:19 +08:00
chenhg5andClaude 4797b78823 feat(updater): add self-update command with GitHub/Gitee support
Add new `/upgrade` command to check for updates and self-update the binary:
- Checks releases from both GitHub and Gitee APIs
- Supports semver comparison for version checking
- Downloads and replaces binary automatically (except Windows)
- Includes i18n support for all messages
- Adds Discord slash command integration

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 01:04:15 +08:00
chenhg5andClaude 7e24ec307d feat: add bot mention handling for group messages
Add bot mention requirements for group messages across Discord, Feishu, and Telegram platforms:
- Discord: Only respond when bot is @mentioned in guild channels
- Feishu: Add bot openID detection and mention filtering for group chats
- Telegram: Add group message filtering and mention handling

Includes helper functions for mention stripping and detection.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 00:46:53 +08:00
chenhg5andClaude 5e0a192b01 feat(claudecode): add provider proxy support for third-party endpoints
Add local reverse proxy support for third-party Claude providers with:
- Thinking parameter override rewriting
- Bearer token auth compatibility
- Provider clearing functionality
- Configurable thinking modes
- Improved provider management UX
- Enhanced markdown rendering for Feishu

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-04 23:57:13 +08:00
cg33 1c69c843e4 Merge pull request #16 from kevinWangSheng/fix/feishu-post-and-slash-passthrough
fix: 飞书 post 富文本支持 & slash 命令透传
2026-03-04 18:11:17 +08:00
shenghui kevin 7e1fc2434c fix: 飞书 post 富文本消息支持 & 未识别 slash 命令透传给 agent
1. 飞书发图片或富文本时 msgType 为 post,之前直接忽略了,现在解析其中的文字和图片
2. cc-connect 不认识的 /xxx 命令之前直接报 Unknown command,现在透传给 agent 处理
2026-03-04 01:48:18 -08:00
chenhg5andClaude 1e39199720 fix(dingtalk): handle stream start error more accurately
Check for non-nil error before formatting error message to avoid wrapping nil errors.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-04 12:41:05 +08:00
chenhg5andClaude e8e39413e8 refactor(session): add context-aware event sending and secure arg logging
Add context-aware select statements when sending events to prevent blocking on closed channels. Implement secure argument logging using RedactArgs to mask sensitive flags. Add atomic file writes and locks for config safety. Improve session handling with mutex protection and deduplication checks.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-04 12:38:37 +08:00
chenhg5andClaude 698ac48ba7 feat(discord): add slash command support with guild-specific registration
generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-04 10:29:20 +08:00
shenghui kevin 997c2d8f6b fix: only override http.Transport when proxy is configured
An empty http.Transport{} loses Go's default TLS settings, causing
NewBotAPIWithClient to hang on the initial getMe call. Only set a
custom transport when a proxy URL is actually provided.
2026-03-03 07:09:54 -08:00
shenghui kevin 225508b0dc feat(telegram): add proxy support
Support HTTP/SOCKS5 proxy for Telegram API requests via config options:

  proxy = "http://proxy.example.com:8080"
  proxy_username = "user"    # optional
  proxy_password = "pass"    # optional

Covers both bot API calls and file downloads. Follows the same
pattern as the existing wecom proxy implementation.

Closes #6
2026-03-03 07:00:38 -08:00
chenhg5andClaude df9f38894d feat(wecom): add proxy authentication support
generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-03 19:14:37 +08:00
chenhg5andClaude 24ea984569 feat(telegram): add inline buttons for permission prompts
Implemented interactive buttons for permission prompts in Telegram platform:
- Added new `InlineButtonSender` interface for platforms supporting inline buttons
- Created `sendPermissionPrompt` method in Engine that uses buttons when available
- Added Telegram-specific implementation (`SendWithButtons` and callback handling)
- Support both English and Chinese button labels
- Includes fallback to text-only prompts when buttons fail

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-03 12:46:44 +08:00
chenhg5andClaude 3bcc969209 feat(claudecode): add system prompt support and user allowlist
Implement agent system prompts explaining cc-connect capabilities
Add AllowList function for platform user authorization

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-02 17:34:43 +08:00
chenhg5andClaude b4fd9bf940 feat(feishu): add configurable emoji reactions
generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-02 15:19:35 +08:00
chenhg5andClaude c33f90cb34 feat(cron): add cron scheduling system with CLI and API support
generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-02 14:35:05 +08:00
chenhg5andClaude c88d46a973 feat(qq): add QQ platform support via OneBot v11/NapCat
generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-02 11:50:53 +08:00
chenhg5andClaude ed8778b99e feat(agent): add Cursor Agent integration with CLI support
Add full integration for Cursor Agent with support for CLI interactions via `agent --print --output-format stream-json`. Includes:
- New cursor package with Agent and Session implementations

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-01 19:28:41 +08:00
chenhg5andClaude 8098e85c1d refactor(wecom): wrap media handling in goroutines
Move media download and handler calls into goroutine closures to prevent blocking.
This ensures the HTTP request completes while processing continues async.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-01 12:55:43 +08:00
chenhg5andClaude f75da06fee feat(speech): add voice message support with Whisper API and ffmpeg integration
Add speech-to-text functionality for voice messages using OpenAI/Groq Whisper API. Includes:
- Configurable speech provider (OpenAI or Groq)
- Audio format conversion via ffmpeg
- Support for voice messages on Feishu, WeChat Work, Telegram, LINE, Discord, Slack
- Internationalization messages for voice transcription flow
- Documentation updates in README and config example

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-01 12:29:40 +08:00
chenhg5andClaude 4871157250 feat(claude): add image support and CLI API server for sending messages
Add multimodal image support to Claude sessions by saving attachments to temp files and sending as base64-encoded content. Implement new CLI `send` command and Unix socket API server for external tools to send messages to active sessions. Image support added across all platforms (Discord, Feishu, Line, Slack, Telegram, WeCom).

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-01 12:08:00 +08:00
chenhg5andClaude 048563b352 feat(markdown): add StripMarkdown utility for LINE and WeCom
Add new utility function StripMarkdown to convert Markdown to plain text
for platforms without Markdown support. Integrate into LINE and WeCom
platforms to ensure proper message formatting.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-01 09:36:37 +08:00
chenhg5andClaude e22a6028f4 feat(codex): add OpenAI Codex agent support with docs and config updates
Add new Codex agent implementation with permission modes, session management, and history retrieval. Update installation docs, README files, and config templates to reflect Codex support. Enhance session listing and history commands to work with both Claude and Codex agents.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-01 09:20:38 +08:00
chenhg5andClaude 5ab969cec5 feat(wecom): add Markdown support and improve help formatting
generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-01 00:09:50 +08:00
chenhg5andClaude 737f4f8c75 feat(claudecode): enhance permission modes with runtime switching
generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-28 23:44:59 +08:00
chenhg5andClaude ecd0e0070f feat(claudecode): refactor agent into persistent session model with permission handling and i18n support
This major refactor:

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-28 22:05:12 +08:00
chenhg5 b3f9887454 feat(wecom): add proxy support for API calls
generated by llmgit

o-Authored-By: Claude <noreply@anthropic.com>
2026-02-28 16:02:23 +08:00