Skip to content

Commit dd83ccd

Browse files
chore: add env var override for the SendMessage API, for testing purposes (#843)
1 parent 7d766a2 commit dd83ccd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/fig_api_client/src/clients/streaming_client.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ pub struct StreamingClient(inner::Inner);
5252

5353
impl StreamingClient {
5454
pub async fn new() -> Result<Self, Error> {
55-
let client = if fig_util::system_info::in_cloudshell() {
55+
let client = if fig_util::system_info::in_cloudshell()
56+
|| std::env::var("Q_USE_SENDMESSAGE").is_ok_and(|v| !v.is_empty())
57+
{
5658
Self::new_qdeveloper_client(&Endpoint::load_q()).await?
5759
} else {
5860
Self::new_codewhisperer_client(&Endpoint::load_codewhisperer()).await

0 commit comments

Comments
 (0)