Skip to content

Commit b83edc0

Browse files
committed
Remove leftover comments
1 parent d57b8bd commit b83edc0

1 file changed

Lines changed: 7 additions & 17 deletions

File tree

crates/zeta_prompt/src/zeta_prompt.rs

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -211,23 +211,15 @@ pub struct RelatedExcerpt {
211211
}
212212

213213
pub fn prompt_input_contains_special_tokens(input: &ZetaPromptInput, format: ZetaFormat) -> bool {
214-
special_tokens_for_format(format)
215-
.iter()
216-
.any(|token| {
217-
if let Some(line_token) = token.strip_suffix('\n') {
218-
// Token ends with \n - check if any line in the excerpt equals this token
219-
input.cursor_excerpt.lines().any(|line| line == line_token)
220-
} else {
221-
// Token doesn't end with \n - use original substring check
222-
input.cursor_excerpt.contains(token)
223-
}
224-
})
214+
special_tokens_for_format(format).iter().any(|token| {
215+
if let Some(line_token) = token.strip_suffix('\n') {
216+
input.cursor_excerpt.lines().any(|line| line == line_token)
217+
} else {
218+
input.cursor_excerpt.contains(token)
219+
}
220+
})
225221
}
226222

227-
/// Checks if `text` contains `token` at the start of a line.
228-
///
229-
230-
231223
pub fn format_zeta_prompt(input: &ZetaPromptInput, format: ZetaFormat) -> Option<String> {
232224
format_prompt_with_budget_for_format(input, format, MAX_PROMPT_TOKENS)
233225
}
@@ -5300,8 +5292,6 @@ mod tests {
53005292
assert_eq!(apply_edit(excerpt, &output1), "new content\n");
53015293
}
53025294

5303-
5304-
53055295
#[test]
53065296
fn test_special_tokens_not_triggered_by_comment_separator() {
53075297
// Regression test for https://github.com/zed-industries/zed/issues/52489

0 commit comments

Comments
 (0)