add single line comment to languages so they can be used in prompting [TAB-181] (#388)

* chore: add comment signs to extended languages

* Update crates/tabby/src/serve/completions/prompt.rs

---------

Co-authored-by: Meng Zhang <meng@tabbyml.com>
release-v0.1
vodkaslime 2023-09-01 11:43:27 +08:00 committed by GitHub
parent 63c00494f3
commit 5dff349801
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -197,8 +197,14 @@ impl IndexState {
}
lazy_static! {
static ref LANGUAGE_LINE_COMMENT_CHAR: HashMap<&'static str, &'static str> =
HashMap::from([("python", "#"), ("rust", "//"),]);
static ref LANGUAGE_LINE_COMMENT_CHAR: HashMap<&'static str, &'static str> = HashMap::from([
("python", "#"),
("rust", "//"),
("javascript-typescript", "//"),
("go", "//"),
("java", "//"),
("lua", "--"),
]);
}
#[cfg(test)]