mirror of
https://github.com/TabbyML/tabby
synced 2024-11-21 16:03:07 +00:00
fix(core): canonicalize git_url before performing code search (#2612)
* fix(core): canonicalize git_url before performing code search Previously, the git_url used in the index was not properly canonicalized, leading to inconsistencies when performing queries. This commit updates the code to ensure that the git_url is canonicalized before performing the code search. * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
510a63c095
commit
a3864a3280
@ -0,0 +1,3 @@
|
||||
kind: Fixed and Improvements
|
||||
body: Canonicalize the git_url before performing a relevant code search. Previously, for git_urls with credentials, the canonicalized git_url was used in the index, but the query still used the raw git_url.
|
||||
time: 2024-07-10T18:59:20.774068+09:00
|
@ -84,7 +84,7 @@ impl CodeSearchImpl {
|
||||
query.git_url, git_url
|
||||
);
|
||||
|
||||
query.git_url = git_url.to_owned();
|
||||
query.git_url = RepositoryConfig::canonicalize_url(git_url);
|
||||
|
||||
let docs_from_embedding = {
|
||||
let embedding = self.embedding.embed(&query.content).await?;
|
||||
|
Loading…
Reference in New Issue
Block a user