From 24dd7c71281ac9a31d0ba371f277705cb2c13c18 Mon Sep 17 00:00:00 2001 From: Dimitry Ageev Date: Thu, 14 Dec 2023 22:12:59 +0300 Subject: [PATCH] relative to full url for telemetry endpoints in case of self-hosting (#42) --- src/caps.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/caps.rs b/src/caps.rs index 3625e9b8d..7169a7b3b 100644 --- a/src/caps.rs +++ b/src/caps.rs @@ -280,6 +280,10 @@ pub async fn load_caps( _inherit_r1_from_r0(&mut r1, &r0); r1.endpoint_template = relative_to_full_url(&caps_url, &r1.endpoint_template)?; r1.endpoint_chat_passthrough = relative_to_full_url(&caps_url, &r1.endpoint_chat_passthrough)?; + if r1.cloud_name == "Refact Self-Hosted" { + r1.telemetry_basic_dest = relative_to_full_url(&caps_url, &r1.telemetry_basic_dest)?; + r1.telemetry_corrected_snippets_dest = relative_to_full_url(&caps_url, &r1.telemetry_corrected_snippets_dest)?; + } info!("caps {} completion models", r1.code_completion_models.len()); info!("caps default completion model: \"{}\"", r1.code_completion_default_model); info!("caps {} chat models", r1.code_chat_models.len());