You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Assign a version to this `LoadFile` request only if it's the current file and loaded as the file to edit, not as the sidebar TOC. We can us a simple comparison, since both file names have already been canonicalized.
// #### These messages may only be sent by the Server.
217
-
/// Ask the IDE if the provided file is loaded. If so, the IDE should
218
-
/// respond by sending a `LoadFile` with the requested file. If not, the
219
-
/// returned `Result` should indicate the error "not loaded". The boolean
220
-
/// indicates if the request is for the non-editable sidebar TOC file, or
221
-
/// for an editable Client file (which still may be the TOC, if that's being
222
-
/// edited). Valid destinations: IDE.
223
-
LoadFile(PathBuf,bool),
217
+
/// Ask the IDE if the provided file is already loaded. The IDE should always respond to this with a `ResultOkTypes::LoadFile` message. If the file was loaded, the IDE responds with `Some((` contents of file, version of file `))`; if the was isn't loaded, it responds with `None`. The boolean value accompanying this message
218
+
/// Valid destinations: IDE.
219
+
LoadFile(
220
+
// Path to the file to load.
221
+
PathBuf,
222
+
// `is_current` - true if this is the current file being edited/viewed by the Client.
223
+
bool,
224
+
),
224
225
/// This may only be used to respond to an `Opened` message; it contains the
225
226
/// HTML for the CodeChat Editor Client to display in its built-in browser.
226
227
/// Valid destinations: IDE.
@@ -251,9 +252,14 @@ pub enum ResultOkTypes {
251
252
Void,
252
253
/// The `LoadFile` message provides file contents and a revision number, if
253
254
/// available. This message may only be sent from the IDE to the Server.
254
-
/// If this is sent in response to a `LoadFile` where the toc boolean is false,
255
-
/// this value will be ignored.
256
-
LoadFile(Option<(String,f64)>),
255
+
LoadFile(
256
+
Option<(
257
+
// The text of the file.
258
+
String,
259
+
// The version of the file; ignored if the corresponding `LoadFile` request's `is_current` value was false.
0 commit comments