fix(web): default search to context (#17118)

* fix(web): default search to context

* one liner

* Refactor
This commit is contained in:
Alex 2025-03-25 17:57:12 -05:00 committed by GitHub
parent 392ce7deb2
commit dfb0626c91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -164,8 +164,21 @@
};
function getSearchType(): 'smart' | 'metadata' | 'description' {
const t = localStorage.getItem('searchQueryType');
return t === 'smart' || t === 'description' ? t : 'metadata';
const searchType = localStorage.getItem('searchQueryType');
switch (searchType) {
case 'smart': {
return 'smart';
}
case 'metadata': {
return 'metadata';
}
case 'description': {
return 'description';
}
default: {
return 'smart';
}
}
}
function getSearchTypeText(): string {