aboutsummaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-04-27 22:53:34 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-04-27 22:54:02 +0300
commit5a61ae2f9d89320c2e91d58fc3646b5a6a88f44a (patch)
tree5a627b659542cc3b881e50de1b57e10f1736a198 /src/api
parentd7879fafe80933ce962f1e029992e47a4eafc69d (diff)
feat: add status command
Diffstat (limited to 'src/api')
-rw-r--r--src/api/mod.rs1
-rw-r--r--src/api/schema.rs2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/api/mod.rs b/src/api/mod.rs
index 33a3cd44..e97d94f6 100644
--- a/src/api/mod.rs
+++ b/src/api/mod.rs
@@ -304,6 +304,7 @@ fn handle_request(request: Request, api_tx: &ApiRequestSender) -> String {
id: request.id,
result: ResponseResult::Pong {
version: env!("CARGO_PKG_VERSION").into(),
+ protocol: crate::server::protocol::PROTOCOL_VERSION,
},
})
.unwrap_or_else(|_| {
diff --git a/src/api/schema.rs b/src/api/schema.rs
index f7665fd9..d3fd4682 100644
--- a/src/api/schema.rs
+++ b/src/api/schema.rs
@@ -428,6 +428,7 @@ pub struct ErrorBody {
pub enum ResponseResult {
Pong {
version: String,
+ protocol: u32,
},
WorkspaceInfo {
workspace: WorkspaceInfo,
@@ -940,6 +941,7 @@ mod tests {
id: "req_1".into(),
result: ResponseResult::Pong {
version: "0.1.2".into(),
+ protocol: 2,
},
};