Improve LightRAG knowledge search locator alignment
This commit is contained in:
@@ -335,6 +335,26 @@ pub(crate) fn citation_url_for_locator(locator: &EvidenceLocator) -> String {
|
||||
if let Some(source_map_path) = locator.source_map_path.as_deref() {
|
||||
append_query_param(&mut url, "sourceMapPath", source_map_path);
|
||||
}
|
||||
if let Some(query) = locator
|
||||
.open_action
|
||||
.params
|
||||
.get("query")
|
||||
.and_then(Value::as_str)
|
||||
.map(str::trim)
|
||||
.filter(|value| !value.is_empty())
|
||||
{
|
||||
append_query_param(&mut url, "evidenceText", query);
|
||||
}
|
||||
if let Some(search_query) = locator
|
||||
.open_action
|
||||
.params
|
||||
.get("searchQuery")
|
||||
.and_then(Value::as_str)
|
||||
.map(str::trim)
|
||||
.filter(|value| !value.is_empty())
|
||||
{
|
||||
append_query_param(&mut url, "searchQuery", search_query);
|
||||
}
|
||||
if let Some(line_range) = &locator.line_range {
|
||||
append_query_param(
|
||||
&mut url,
|
||||
|
||||
Reference in New Issue
Block a user