feat(#383): Streaming AI responses via Matrix message edits
Some checks failed
ci/woodpecker/push/api Pipeline failed
Some checks failed
ci/woodpecker/push/api Pipeline failed
- Add MatrixStreamingService with editMessage, setTypingIndicator, streamResponse - Rate-limited edits (500ms) for incremental streaming output - Typing indicator management during generation - Graceful error handling and fallback for non-streaming scenarios - Add optional editMessage to IChatProvider interface - Add getClient() accessor to MatrixService for streaming service - Register MatrixStreamingService in BridgeModule - Tests: 20 tests pass Refs #383 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -76,4 +76,17 @@ export interface IChatProvider {
|
||||
* Parse a command from a message
|
||||
*/
|
||||
parseCommand(message: ChatMessage): ChatCommand | null;
|
||||
|
||||
/**
|
||||
* Edit an existing message in a channel.
|
||||
*
|
||||
* Optional method for providers that support message editing
|
||||
* (e.g., Matrix via m.replace, Discord via message.edit).
|
||||
* Used for streaming AI responses with incremental updates.
|
||||
*
|
||||
* @param channelId - The channel/room ID
|
||||
* @param messageId - The original message/event ID to edit
|
||||
* @param content - The updated message content
|
||||
*/
|
||||
editMessage?(channelId: string, messageId: string, content: string): Promise<void>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user