Commit 18428092 authored by Eyor Alemayehu's avatar Eyor Alemayehu Committed by Commit Bot

Set typing modality for text queries

Currently, we call the SendTextQuery method in the assistant manager
internal API to send text queries. However, this way does not set
the modality to typing. As a result, TTS is played, which should
not happen for text queries.

Made changes such that we use the SendVoicelessInteraction method
instead of SendTextQuery. Using SendVoicelessInteraction, we can
set the modality to typing.

Bug: b/79769347
Change-Id: I23ed23f1068196b3590b642b2e0674700624d935
Reviewed-on: https://chromium-review.googlesource.com/1139184Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Commit-Queue: Eyor Alemayehu <eyor@google.com>
Cr-Commit-Position: refs/heads/master@{#575826}
parent fe8c1395
......@@ -208,7 +208,14 @@ void AssistantManagerServiceImpl::StopActiveInteraction() {
}
void AssistantManagerServiceImpl::SendTextQuery(const std::string& query) {
assistant_manager_internal_->SendTextQuery(query);
assistant_client::VoicelessOptions options;
options.is_user_initiated = true;
options.modality =
assistant_client::VoicelessOptions::Modality::TYPING_MODALITY;
std::string interaction = CreateTextQueryInteraction(query);
assistant_manager_internal_->SendVoicelessInteraction(
interaction, /*description=*/"text_query", options, [](auto) {});
}
void AssistantManagerServiceImpl::AddAssistantInteractionSubscriber(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment