fix(telegram): address Copilot review feedback
- Fix silent parse failures: message_id.parse().unwrap_or(0) replaced with match + tracing::warn on parse error (update_draft, finalize_draft) - Fix UTF-8 panic: byte-based truncation replaced with char_indices() safe boundary detection for TELEGRAM_MAX_MESSAGE_LENGTH - Fix global rate limiter: Mutex<Option<Instant>> replaced with Mutex<HashMap<String, Instant>> for per-chat rate limiting so concurrent conversations don't interfere with each other - Document Block variant: clarify it's reserved for future use and currently behaves the same as Partial
This commit is contained in:
parent
93538a70e3
commit
e21fe1ff55
2 changed files with 47 additions and 13 deletions
|
|
@ -1449,7 +1449,8 @@ pub enum StreamMode {
|
|||
Off,
|
||||
/// Update a draft message with every flush interval.
|
||||
Partial,
|
||||
/// Update a draft message in larger chunks.
|
||||
/// Update a draft message in larger chunks (reserved for future use;
|
||||
/// currently behaves the same as `Partial`).
|
||||
Block,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue