From 77656a4091c4d78a3c0ff6c66bf9e29d48c9c6c1 Mon Sep 17 00:00:00 2001 From: Agus Zubiaga Date: Thu, 27 Nov 2025 18:29:42 -0300 Subject: [PATCH] sweep: Set `use_bytes` flag (#43687) Without this new flag, the Sweep API will actually produce a combination of UTF-16 and char indices, leading to incorrect edit positions. Release Notes: - N/A --- crates/zeta/src/sweep_ai.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/zeta/src/sweep_ai.rs b/crates/zeta/src/sweep_ai.rs index f40e9711f231523174a2d2edbd9fe1adb14ad498..427051a6b82d5dd3700b4970d039bfba8d6563c3 100644 --- a/crates/zeta/src/sweep_ai.rs +++ b/crates/zeta/src/sweep_ai.rs @@ -164,6 +164,7 @@ impl SweepAi { file_chunks, retrieval_chunks: vec![], recent_user_actions: vec![], + use_bytes: true, // TODO privacy_mode_enabled: false, }; @@ -275,6 +276,7 @@ struct AutocompleteRequest { pub multiple_suggestions: bool, pub privacy_mode_enabled: bool, pub changes_above_cursor: bool, + pub use_bytes: bool, } #[derive(Debug, Clone, Serialize)]