Remove cursor_offset

Michael Sloan created

Change summary

crates/cloud_llm_client/src/cloud_llm_client.rs | 5 ++---
crates/zeta/src/zeta.rs                         | 2 --
2 files changed, 2 insertions(+), 5 deletions(-)

Detailed changes

crates/cloud_llm_client/src/cloud_llm_client.rs 🔗

@@ -156,13 +156,12 @@ pub struct PredictEditsBody {
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct PredictEditsGitInfo {
-    /// Path within the repository that contains the input excerpt.
+    /// Path to the file in the repository that contains the input excerpt.
     #[serde(skip_serializing_if = "Option::is_none", default)]
     pub input_path: Option<String>,
+    /// Cursor position within the file that contains the input excerpt.
     #[serde(skip_serializing_if = "Option::is_none", default)]
     pub cursor_point: Option<Point>,
-    #[serde(skip_serializing_if = "Option::is_none", default)]
-    pub cursor_offset: Option<usize>,
     /// SHA of git HEAD commit at time of prediction.
     #[serde(skip_serializing_if = "Option::is_none", default)]
     pub head_sha: Option<String>,

crates/zeta/src/zeta.rs 🔗

@@ -431,7 +431,6 @@ impl Zeta {
         let git_info = if matches!(can_collect_data, CanCollectData(true)) {
             self.gather_git_info(
                 cursor_point.clone(),
-                cursor_offset,
                 &buffer_snapshotted_at,
                 &snapshot,
                 project.clone(),
@@ -1143,7 +1142,6 @@ and then another
     fn gather_git_info(
         &mut self,
         cursor_point: language::Point,
-        cursor_offset: usize,
         buffer_snapshotted_at: &Instant,
         snapshot: &BufferSnapshot,
         project: Option<&Entity<Project>>,