Commit Graph
164 Commits
Author SHA1 Message Date
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
chenhg5andClaude Opus 4.6 1e61269629 build: release v1.2.0-beta.7
- Multi-bot relay binding support
- System-level systemd daemon mode
- Interactive command buttons
- Exec commands support
- Configurable idle timeout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 21:07:22 +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 Opus 4.6 34c1b7a0cc feat(daemon): support system-level systemd and improve error handling
- Add support for system-level systemd (/etc/systemd/system/) when running as root
- Add requireInstalled check before start/stop/restart operations
- Improve systemd detection and error messages for WSL2, containers, SSH
- Add isWSL2() helper for better platform detection
- Update daemon help text to clarify Linux root vs non-root behavior

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 18:48:23 +08:00
chenhg5andClaude 4837dec436 feat(cli): add config-example command and embed config template
Add new 'config-example' command that prints annotated config template.
Embed config.example.toml file using go:embed directive.
Improve CLI usage output formatting and documentation.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-07 13:49:19 +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 fe3306f385 feat(codex): patch session source to make CLI visible
Add patchSessionSource function to rewrite session_meta lines in Codex JSONL transcripts, changing source from "exec" to "cli" and originator to "codex_cli_rs" for CLI visibility. Includes tests for patching behavior and idempotency.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-07 08:46:25 +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 8f630a0538 feat(commands): add support for exec commands with shell execution
Add ability to define custom slash commands that execute shell commands directly:
- Extend CommandConfig with Exec and WorkDir fields
- Add cmdCommandsAddExec handler for exec commands
- Implement executeShellCommand with timeout and output handling
- Add work_dir support for exec commands
- Update documentation and i18n messages
- Add tests and error handling

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-07 07:55:24 +08:00
chenhg5andClaude 796526df50 feat(engine): add configurable agent idle timeout
Add support for configuring agent idle timeout duration via config file
(idle_timeout_mins). Defaults to 2 hours (changed from previous fixed 30 mins).
Timeout can be disabled by setting to 0.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-07 00:21:40 +08:00
chenhg5andClaude 7c36fd1d49 chore: remove unused micro.tar.gz file
generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-07 00:08:18 +08:00
chenhg5andClaude 0c119d8682 refactor(engine): increase event idle timeout to 30 minutes
Adjust eventIdleTimeout constant from 5 to 30 minutes to better handle agent response scenarios. Also includes minor code formatting cleanup in Engine struct.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-07 00:08:00 +08:00
chenhg5 b8c0eed437 build: release v1.2.0-beta.6 — bot relay, session search, streaming preview control, voice qwen 2026-03-06 22:18:28 +08:00
chenhg5 ddff00577b Merge branch 'main_bak' 2026-03-06 21:32:27 +08:00
cg33 d47ff47987 Merge pull request #24 from koperjian/feature/speechsupportqwen
Feature/speechsupportqwen
2026-03-06 21:27:31 +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 54ea246f60 feat(i18n): add translation for session switch success message
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:34:13 +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
wujian ed4a49c8ae voice function support qwen mod 2026-03-06 19:31:06 +08:00
chenhg5andClaude Opus 4.6 2160090ec6 feat(streaming): add per-platform streaming preview control
Add disabled_platforms config option to disable streaming preview
for specific platforms (e.g. feishu) where it causes formatting issues.

- Add DisabledPlatforms field to StreamPreviewConfig and StreamPreviewCfg
- Check platform name against disabled list in canPreview()
- Allows pure text messages to use correct message type instead of cards

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 19:08:43 +08:00
wujian 505bb43bf0 voice function support qwen mod 2026-03-06 19:03:05 +08:00
chenhg5andClaude 44c48de8f2 refactor(core): improve message splitting logic with boundary checks
Optimize the splitMessage function to handle newline boundaries more intelligently by checking if the boundary is in the second half of the chunk. Also simplifies the chunking logic and improves variable scoping.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-06 17:52:23 +08:00
chenhg5andClaude 50ee383051 feat(engine): improve error handling for platform startups
Change engine startup to continue with partial failures instead of exiting.
Handle .old binary paths correctly during restarts. Update logging to reflect
partial startup status and improve restart reliability after updates.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-06 17:07:20 +08:00
chenhg5andClaude 5befb5cc0e feat(search): add session search command with name/ID matching
Implement new `/search` command that allows searching sessions by:
- Session name or summary (case-insensitive)
- Session ID prefix
Adds internationalization support and usage documentation
Includes error handling and formatted results output

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-06 16:39:06 +08:00
chenhg5andClaude b0aa286c03 feat(cmd): add pagination support for list command
The cmdList function now accepts page arguments and displays paginated results. Added new i18n messages for paginated titles and hints. Implemented page size constant and page calculation logic.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-06 16:19:00 +08:00
chenhg5andClaude 2a48df3224 fix(engine): add idle timeout for unresponsive agent sessions
Added eventIdleTimeout constant and idle timer logic to detect and handle stuck agent sessions that stop emitting events. The timer resets on each new event and terminates the session if no events are received within 5 minutes.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-06 16:07:56 +08:00
chenhg5andClaude 9c5b290eae refactor(streaming): remove maxChars check and improve preview cleanup
Remove intermediate maxChars throttling since we now always attempt final update regardless of length. Add cleanup when final update fails by attempting to delete stale preview message.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-06 15:37:57 +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 802c694a92 feat(updater): improve update process with auto-restart and Gitee support
Add platform-specific restart handling with restart_unix.go and restart_windows.go. Enhance updater to support Gitee mirrors for Chinese users and automatically restart after updates. Improve version display in restart notifications and streamline update messages.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-06 14:45:00 +08:00
chenhg5andClaude 89ef7a7259 feat(updater): add Windows support for self-update
Add zip archive extraction functionality to support auto-updates on Windows systems.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-06 14:09:27 +08:00
chenhg5andClaude fcc0da88e2 feat(cron): add silent mode for cron job notifications
generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-06 14:00:12 +08:00
chenhg5andClaude aa4b9a495a feat(relay): add bot-to-bot relay functionality with CLI and API support
This commit introduces a new relay system for bot-to-bot communication, including:
- New `relay` command with send/bind functionality
- RelayManager for coordinating messages between engines
- API endpoints for relay operations
- Interactive `/bind` command for chat group binding
- Session handling and message forwarding
- CLI documentation and help messages
- Internationalization support for relay messages
- Stream preview improvements for relay messages

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-06 13:49:21 +08:00
chenhg5 53d5576b4b build: release v1.2.0-beta.5 — streaming preview, typing indicators, markdown rendering, rate limiting
Made-with: Cursor
2026-03-06 11:21:46 +08:00
chenhg5 c953bab72b build: release v1.2.0-beta.4 — streaming preview, typing indicators, markdown rendering, rate limiting
Made-with: Cursor
2026-03-06 11:04:54 +08:00
chenhg5 135f18f23e build: bump npm version to 1.2.0-beta.4 (npm registry conflict on beta.3)
Made-with: Cursor
2026-03-06 11:00:54 +08:00
chenhg5 f1c8a4a214 build: release v1.2.0-beta.3 — streaming preview, typing indicators, markdown rendering, rate limiting
Made-with: Cursor
2026-03-06 10:54:55 +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 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