@@ -78,10 +78,10 @@ class FilePickerModel: ObservableObject {
7878 @Published var isLoading : Bool = false
7979 @Published var error : ClientError ?
8080
81- let client : Client
81+ let client : AgentClient
8282
8383 init ( host: String ) {
84- client = Client ( url : URL ( string : " http:// \( host) :4 " ) ! )
84+ client = AgentClient ( agentHost : host)
8585 }
8686
8787 func loadRoot( ) {
@@ -176,7 +176,7 @@ class FilePickerItemModel: Identifiable, ObservableObject {
176176 // This being a binding is pretty important performance-wise, as it's a struct
177177 // that would otherwise be recreated every time the the item row is rendered.
178178 // Removing the binding results in very noticeable lag when scrolling a file tree.
179- @Binding var client : Client
179+ @Binding var client : AgentClient
180180
181181 @Published var contents : [ FilePickerItemModel ] ?
182182 @Published var isLoading = false
@@ -197,7 +197,7 @@ class FilePickerItemModel: Identifiable, ObservableObject {
197197
198198 init (
199199 name: String ,
200- client: Binding < Client > ,
200+ client: Binding < AgentClient > ,
201201 absolute_path: String ,
202202 path: [ String ] ,
203203 dir: Bool = false ,
@@ -237,7 +237,7 @@ class FilePickerItemModel: Identifiable, ObservableObject {
237237
238238extension LSResponse {
239239 @MainActor
240- func toModels( client: Binding < Client > , path: [ String ] ) -> [ FilePickerItemModel ] {
240+ func toModels( client: Binding < AgentClient > , path: [ String ] ) -> [ FilePickerItemModel ] {
241241 contents. compactMap { file in
242242 // Filter dotfiles from the picker
243243 guard !file. name. hasPrefix ( " . " ) else { return nil }
0 commit comments