Commit graph

9 commits

Author SHA1 Message Date
f25aab2441 feat(bot): improve prompt-building and help command handling
- Added a default system prompt and adjusted the structure to use XML for clarity.
- Improved help command handling by simplifying triggers and updating responses.
- Enhanced NixOS configuration with support for optional custom instructions.
2026-02-03 17:39:31 +01:00
9342933987 feat(bot): switch to in-memory conversation history
- Replaced Nextcloud chat history fetching with in-memory storage for conversation history.
- Added limits to history length based on an environment variable (`CONTEXT_MESSAGES`).
- Simplified prompt-building logic by removing async history fetching.
2026-02-03 17:26:46 +01:00
b35373b0ec feat(bot): replace maxTokens with contextMessages option
- Switched `maxTokens` to `contextMessages` to set chat history length instead of token limit.
- Updated environment variables, NixOS module, and prompt building logic for consistency.
- Removed in-memory conversation history, now fetching from Nextcloud for better scalability.
2026-02-03 17:00:50 +01:00
538d7623be refactor(bot): remove unused max-tokens argument handling
- Simplified the `call_claude` function by removing the unused `MAX_TOKENS` argument handling.
- Ensures cleaner and more maintainable command construction.
2026-02-03 16:30:47 +01:00
1f61a0d1ec feat(bot): refactor webhook parsing for better structure
- Updated webhook parsing to align with the latest Nextcloud Talk Bot format.
- Improved handling of actor, message, and conversation data for clarity and flexibility.
- Added robust JSON decoding with fallback for content extraction.
2026-02-03 16:29:10 +01:00
77cf4a0aed feat(bot): support random token in signature verification
- Enhanced signature verification by adding support for a `random` token included in webhook headers.
- Introduced logging to display signature variants for debugging purposes.
- Improved webhook handling to process new `X-Nextcloud-Talk-Random` header.
2026-02-03 16:26:37 +01:00
33937ab115 feat(bot): add signature verification logging
- Added info-level logging to provide details about signature verification, including secret length and partial hashes for expected and received signatures.
- Helps in debugging signature mismatches without exposing full sensitive data.
2026-02-03 16:23:14 +01:00
b1370b5fc6 feat(bot): enhance group chat handling and mention detection
- Updated bot to only respond in group chats when explicitly mentioned.
- Added mention detection using regex for "Claude" patterns and cleaned up the message text for processing.
- Improved help message to clarify usage in direct messages and group chats.
2026-02-03 16:09:25 +01:00
bc6091f63f feat(nix): add Nextcloud Claude Bot integration
- Added configuration for Nextcloud Claude Bot, including NixOS module, secrets management, and example setup files.
- Introduced a Python-based HTTP server for handling webhook events and interacting with Nextcloud Talk.
- Integrated necessary dependencies and systemd service for seamless operation.
2026-02-03 15:42:56 +01:00