@@ -137,7 +137,7 @@ pub(super) async fn _handle(
137137 match item {
138138 Ok ( Either :: Left ( exchange) ) => yield exchange,
139139 Ok ( Either :: Right ( n) ) => next = n?,
140- Err ( e ) => Err ( anyhow!( "reached timeout of {TIMEOUT_SECS}s" ) ) ?,
140+ Err ( _ ) => Err ( anyhow!( "reached timeout of {TIMEOUT_SECS}s" ) ) ?,
141141 }
142142 }
143143
@@ -688,14 +688,6 @@ impl Conversation {
688688
689689 let mut s = "" . to_owned ( ) ;
690690
691- if !self . paths . is_empty ( ) {
692- s += "##### PATHS #####\n path alias, path\n " ;
693-
694- for ( alias, path) in self . paths . iter ( ) . enumerate ( ) {
695- s += & format ! ( "{alias}, {}\n " , & path) ;
696- }
697- }
698-
699691 let mut path_aliases = aliases
700692 . into_iter ( )
701693 . filter ( |alias| * alias < self . paths . len ( ) )
@@ -704,6 +696,22 @@ impl Conversation {
704696 path_aliases. sort ( ) ;
705697 path_aliases. dedup ( ) ;
706698
699+ if !self . paths . is_empty ( ) {
700+ s += "##### PATHS #####\n path alias, path\n " ;
701+
702+ if path_aliases. len ( ) == 1 {
703+ // Only show matching path
704+ let alias = path_aliases[ 0 ] ;
705+ let path = self . paths [ alias] . clone ( ) ;
706+ s += & format ! ( "{alias}, {}\n " , & path) ;
707+ } else {
708+ // Show all paths that have been seen
709+ for ( alias, path) in self . paths . iter ( ) . enumerate ( ) {
710+ s += & format ! ( "{alias}, {}\n " , & path) ;
711+ }
712+ }
713+ }
714+
707715 if !self . code_chunks . is_empty ( ) {
708716 s += "\n ##### CODE CHUNKS #####\n \n " ;
709717 }
0 commit comments