Skip to content

feat(rust): add send_typing_with_status - #101

Draft
KyleYe wants to merge 1 commit into
corespeed-io:mainfrom
KyleYe:agent/rust-typing-status-v2
Draft

feat(rust): add send_typing_with_status#101
KyleYe wants to merge 1 commit into
corespeed-io:mainfrom
KyleYe:agent/rust-typing-status-v2

Conversation

@KyleYe

@KyleYe KyleYe commented Jul 24, 2026

Copy link
Copy Markdown

Summary

  • Add WeChatBot::send_typing_with_status(user_id, status) to the Rust SDK.
  • Preserve the existing send_typing(user_id) behavior by delegating to status 1.
  • Document status 1 as start and status 2 as stop.
  • Add a public API regression test covering both the existing and new method signatures.

Motivation

The iLink /sendtyping endpoint supports status 1 and 2, and the low-level Rust ILinkClient::send_typing method already accepts a status parameter. However, the high-level WeChatBot::send_typing method hardcodes status 1, so Rust callers cannot explicitly stop the typing indicator through the high-level API.

Developer impact

Existing calls remain unchanged:

bot.send_typing(user_id).await?;

Callers can now explicitly stop the indicator:

bot.send_typing_with_status(user_id, 2).await?;

Backward compatibility

No existing public method signatures are changed. Existing calls to send_typing(user_id) retain their current status-1 behavior.

Test plan

  • cargo fmt --all -- --check
  • cargo build
  • cargo test (49 unit tests, 1 public API integration test, and 2 doc tests)
  • git diff --check upstream/main...HEAD

Supersedes #100, which was closed to resubmit this change from a fresh branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant