Commit Graph
124 Commits
Author SHA1 Message Date
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 Opus 4.6 00477f25a8 refactor(core): remove redundant fmt.Sprintf and add unit tests
- Remove unnecessary fmt.Sprintf wrapper around i18n.T() calls
- Add comprehensive unit tests for core module components

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 20:56:38 +08:00
chenhg5andClaude f31b3dd9be fix(engine): improve graceful shutdown and context handling
Add proper platform shutdown sequence before engine cleanup and check for canceled context in message processing and session creation to prevent operations during shutdown. Also reordered error collection for logical shutdown sequence.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 17:54:39 +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 c922908e08 docs: update Discord server badge IDs
generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 15:04:06 +08:00
chenhg5andClaude b07b18e181 feat(engine): add project-level command disabling support
Implement disabled commands functionality for projects, including config parsing, engine integration, and i18n support. Allows disabling specific commands per-project via config.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 14:43:51 +08:00
chenhg5andClaude d6a3a2253e feat: add banned words filter functionality
Add banned words configuration and filtering logic to block messages containing prohibited content. Includes:
- Config file support for banned_words list
- Engine methods to set and check banned words
- Case-insensitive matching during message processing
- Localization support for blocked message response
- Documentation updates in config example

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 13:59:25 +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 958066feaa feat(sessions): improve session creation and naming
Add i18n support for session creation messages and ensure pending session names are properly set. Includes:
- Added MsgNewSessionCreated and MsgNewSessionCreatedName i18n messages
- Modified cmdNew to use i18n messages and handle empty names
- Set session name from pendingName in processInteractiveEvents if valid

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 13:12:38 +08:00
chenhg5andClaude 8ba7190256 docs(readme): add community links and badges
generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 13:05:44 +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
chenhg5 2ffeb240bd build: release v1.2.0-beta.2 — upgrade/restart/reload commands, session naming, group chat filtering, security hardening 2026-03-05 09:18:21 +08:00
chenhg5 8917f4a2ef feat(session): add /name command, history provider for claude code, and improve list summary\n\n- Add /name command to set custom display names for sessions\n- Implement GetSessionHistory for claude code agent (fixes empty /history after /switch)\n- Change scanSessionMeta to use last user message as summary instead of first\n- Show custom session names in /list, /switch, and /status\n- Persist session names in SessionManager with full i18n support 2026-03-05 09:15:44 +08:00
chenhg5 fcdd11a79b feat(config): add default quiet mode setting at global and project level\n\nAllow users to configure quiet = true globally or per-project to\nsuppress thinking/tool progress messages by default. Project-level\nsetting overrides global. Users can still toggle with /quiet command. 2026-03-05 08:06:11 +08:00
chenhg5andClaude 1bba9e4a97 feat(config): add hot reload functionality for config
Add config reload capability that updates display settings, providers and commands without restart.
- Added config reload command (/config reload)
- Implemented ConfigReloadResult tracking updates
- Added ClearSource to CommandRegistry
- Updated help messages across languages
- Added SetConfigReloadFunc to Engine

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 01:26:45 +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 e6fb09474c refactor(api): store http.Server instance and improve provider listing
- Store http.Server instance in APIServer struct for better resource management
- Enhance provider listing with current provider marker and remove bold formatting
- Update i18n strings for provider list titles

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 00:28:16 +08:00
chenhg5andClaude 216d2ef319 feat(command): add command prefix matching and improve help/session switching
Add builtinCommands list and prefix matching functionality for commands/subcommands. Improve session switching by supporting numeric indices. Update help messages and session listing format to reflect these changes. Simplify command parsing by removing redundant slash prefix handling.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 00:19:38 +08:00
chenhg5andClaude 2c6f9e1831 refactor(cmdList): normalize and truncate summary display
Clean up command list summary display by:
- Replacing newlines with spaces
- Collapsing multiple spaces
- Adding truncation at 40 characters
- Keeping existing empty summary handling

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 00:04:18 +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
chenhg5andClaude f2920739d8 feat: add timeout handling for agent session closure
Added timeout mechanisms with logging for graceful session closure across multiple agent types (claudecode, codex, cursor, gemini, opencode, qoder). Modified engine cleanup to handle timeouts and improve logging. Sessions now timeout after 8-10 seconds with appropriate warnings/errors.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-04 22:02:54 +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
cg33 f6b3967e93 Merge pull request #15 from Terrency/feature/claude-code-router-support
feat(claudecode): add Claude Code Router integration support
2026-03-04 18:08:59 +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
TerrencyandClaude Sonnet 4.6 d91f7d3a29 feat(claudecode): add Claude Code Router integration support
Add support for routing Claude Code requests through Claude Code Router,
enabling multi-provider support (OpenRouter, DeepSeek, Gemini, etc.) and
dynamic model switching.

Changes:
- Add router_url and router_api_key configuration options
- Automatically set ANTHROPIC_BASE_URL when router is configured
- Set NO_PROXY, DISABLE_TELEMETRY, DISABLE_COST_WARNINGS for clean integration
- Update documentation with setup guide and usage examples
- Add configuration examples in config.example.toml

The integration is backward compatible - when router_url is not configured,
the agent behaves exactly as before. When configured, all requests are
transparently routed through Claude Code Router.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 16:50:30 +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
cg33 848f22543b Merge remote-tracking branch 'gitee/main' into main 2026-03-04 10:45:29 +08:00
chenhg5 cfd8004fe6 build: release v1.2.0-beta.1 — custom commands, skills, Discord slash menu, /config, /doctor, slow logs 2026-03-04 10:41:19 +08:00
chenhg5andClaude 57d8ae6fcc feat(engine): add slow operation monitoring and metrics
Add slow operation thresholds and logging for agent/platform operations.
Track and warn on slow agent session start/send/close, first event latency,
and platform send/reply operations. Add turn duration metrics and improve
existing logging with timing information.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-04 10:36:21 +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
cg33 33dcbbabf3 Merge pull request #8 from kevinWangSheng/feat/opencode-agent
feat(agent): add OpenCode support
2026-03-04 10:08:11 +08:00
chenhg5andClaude 905287adb1 refactor: remove hardcoded 200-char truncation in tool input
Remove fixed 200-rune truncation from all agents since truncation
is now handled dynamically via /config (thinking_max_len, tool_max_len).

Affected agents: claudecode, codex, cursor, gemini, qoder

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-04 10:07:18 +08:00
chenhg5andClaude ab37c5708c feat(i18n): improve /config and /doctor localization
/config:
- Add description for each config item (en/zh)
- Show description in config list and get output
- Improve usage hints with examples

/doctor:
- Localize check names (zh/ja translations)
- Use i18n system for title and summary
- Cleaner output format

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-04 10:01:50 +08:00
chenhg5andClaude 1520c20ffc feat: add /config and /doctor commands
/config command:
- View runtime configuration (thinking_max_len, tool_max_len)
- Update config values with persistence to config.toml
- Short syntax: /config <key> [value]

/doctor command:
- Run system diagnostics and health checks
- Check agent CLI binary and authentication
- Check platform connections
- Check system resources (memory, CPU, disk)
- Check dependencies (git, sqlite3, ffmpeg)
- Check network connectivity to API endpoints

Full i18n support for 5 languages.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-04 09:40:47 +08:00
chenhg5andClaude 7764465bc0 feat(cursor): improve session listing with message count and summary
- Add message count display for each session
- Use first user message as summary fallback instead of session ID
- Fix meta value reading (direct TEXT read, not hex() wrapped)
- Add RootBlobID tracking for message blob traversal
- Parse blob protobuf structure to count user/assistant messages

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-04 09:30:20 +08:00
chenhg5andClaude Opus 4.6 ca728fbe70 feat: add SkillProvider support for codex, cursor, qoder agents
Extend skill discovery to remaining agents:
- codex: .codex/skills + .claude/skills + CODEX_HOME/skills
- cursor: .claude/skills (project + home)
- qoder: .claude/skills (project + home)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 09:02:39 +08:00
chenhg5andClaude Opus 4.6 68b2c7b320 feat: add agent skills discovery and execution
Add support for discovering and invoking agent skills from SKILL.md files:
- Skills are auto-discovered from .claude/skills/<name>/SKILL.md (claudecode)
  and .gemini/skills/<name>/SKILL.md (gemini)
- New /skills command to list available skills
- Skills can be invoked via /<skill-name> [args...]
- SKILL.md supports optional YAML frontmatter (description, name)
- Full i18n support for 5 languages

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 08:51:54 +08:00
shenghui kevin f2d0d6c46c docs: update README and config for OpenCode agent
- Add OpenCode to support matrix (4 agents → 5 agents)
- Add OpenCode permission modes section
- Add OpenCode to prerequisites, provider env mapping, project structure
- Add OpenCode config example in config.example.toml
- Update both English and Chinese README
2026-03-03 15:58:28 -08:00
shenghui kevin 5d54487237 feat(agent): add OpenCode support
OpenCode (`opencode run --format json`) streams NDJSON events,
similar to the Gemini agent. This wires it up so users can drive
OpenCode from Telegram / Discord / Slack / etc.

- agent/opencode/opencode.go — agent struct, factory, model/mode/provider switching
- agent/opencode/session.go  — subprocess lifecycle, NDJSON event → core.Event mapping
- cmd/cc-connect/main.go     — register the "opencode" agent
2026-03-03 15:55:57 -08:00
chenhg5andClaude 522f9ff4c9 feat(commands): add custom slash command system with config and file-based commands
Add support for customizable slash commands that expand prompt templates with arguments. Includes:
- CommandProvider interface for agent-specific command directories
- Command registry with config.toml and agent file support
- Template expansion with placeholders ({{1}}, {{args}}, etc.)
- Dynamic command management via `/commands add/del`
- Multi-language support and documentation
- Example config additions and implementation for Claude/Gemini agents

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-04 07:34:00 +08:00
chenhg5andClaude Opus 4.6 9a291eb0c3 feat: add daemon mode for running as background service
Add support for running cc-connect as a daemon managed by OS init system:
- Linux: systemd user service
- macOS: launchd LaunchAgent

New CLI commands:
- cc-connect daemon install/uninstall
- cc-connect daemon start/stop/restart/status
- cc-connect daemon logs [-f] [-n N] [--log-file PATH]

Features:
- Auto log rotation with configurable max size
- Cross-platform support (systemd/launchd)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 00:18:55 +08:00
cg33 afd15318b6 Merge pull request #10 from kevinWangSheng/feat/telegram-proxy
feat(telegram): add proxy support
2026-03-03 23:13:28 +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 cca838504a feat(qoder): add Qoder CLI agent support
generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-03 22:43:20 +08:00
chenhg5andClaude 55d0d1db42 docs: remove beta labels and references from documentation
The documentation has been updated to remove all beta labels and references, indicating that previously beta features are now considered stable. This includes removing beta installation instructions, updating feature status indicators, and removing beta section headers.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-03 19:25:02 +08:00