@@ -30,7 +30,7 @@ pub async fn autocomplete_repositories(
3030 let state = expect_context :: < crate :: server:: GlobalAppState > ( ) ;
3131 let state = state. lock ( ) . await ;
3232 let db = PostgresDb :: new ( state. pool . clone ( ) ) ;
33- let normalized_limit = limit. max ( 1 ) . min ( 50 ) ;
33+ let normalized_limit = limit. max ( 1 ) . min ( 20 ) ;
3434 db. autocomplete_repositories ( term. trim ( ) , normalized_limit)
3535 . await
3636 . map_err ( |e| ServerFnError :: new ( e. to_string ( ) ) )
@@ -45,7 +45,7 @@ pub async fn autocomplete_paths(
4545 let state = expect_context :: < crate :: server:: GlobalAppState > ( ) ;
4646 let state = state. lock ( ) . await ;
4747 let db = PostgresDb :: new ( state. pool . clone ( ) ) ;
48- let normalized_limit = limit. max ( 1 ) . min ( 50 ) ;
48+ let normalized_limit = limit. max ( 1 ) . min ( 20 ) ;
4949 let repos: Vec < String > = repositories
5050 . into_iter ( )
5151 . map ( |repo| repo. trim ( ) . to_string ( ) )
@@ -68,7 +68,7 @@ pub async fn autocomplete_symbols(
6868 let state = expect_context :: < crate :: server:: GlobalAppState > ( ) ;
6969 let state = state. lock ( ) . await ;
7070 let db = PostgresDb :: new ( state. pool . clone ( ) ) ;
71- let normalized_limit = limit. max ( 1 ) . min ( 50 ) ;
71+ let normalized_limit = limit. max ( 1 ) . min ( 20 ) ;
7272 db. autocomplete_symbols ( trimmed, normalized_limit)
7373 . await
7474 . map_err ( |e| ServerFnError :: new ( e. to_string ( ) ) )
@@ -83,7 +83,7 @@ pub async fn autocomplete_languages(
8383 let state = expect_context :: < crate :: server:: GlobalAppState > ( ) ;
8484 let state = state. lock ( ) . await ;
8585 let db = PostgresDb :: new ( state. pool . clone ( ) ) ;
86- let normalized_limit = limit. max ( 1 ) . min ( 50 ) ;
86+ let normalized_limit = limit. max ( 1 ) . min ( 20 ) ;
8787 let repos: Vec < String > = repositories
8888 . into_iter ( )
8989 . map ( |repo| repo. trim ( ) . to_string ( ) )
@@ -103,7 +103,7 @@ pub async fn autocomplete_branches(
103103 let state = expect_context :: < crate :: server:: GlobalAppState > ( ) ;
104104 let state = state. lock ( ) . await ;
105105 let db = PostgresDb :: new ( state. pool . clone ( ) ) ;
106- let normalized_limit = limit. max ( 1 ) . min ( 50 ) ;
106+ let normalized_limit = limit. max ( 1 ) . min ( 20 ) ;
107107 let repos: Vec < String > = repositories
108108 . into_iter ( )
109109 . map ( |repo| repo. trim ( ) . to_string ( ) )
@@ -123,7 +123,7 @@ pub async fn autocomplete_files(
123123 let state = expect_context :: < crate :: server:: GlobalAppState > ( ) ;
124124 let state = state. lock ( ) . await ;
125125 let db = PostgresDb :: new ( state. pool . clone ( ) ) ;
126- let normalized_limit = limit. max ( 1 ) . min ( 50 ) ;
126+ let normalized_limit = limit. max ( 1 ) . min ( 20 ) ;
127127 let repos: Vec < String > = repositories
128128 . into_iter ( )
129129 . map ( |repo| repo. trim ( ) . to_string ( ) )
0 commit comments