diff --git a/CHANGELOG.md b/CHANGELOG.md index f3655d073..e65ff28e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ - [#3797](https://github.com/clojure-emacs/cider/issues/3797): Completion: enable `cider-completion-style` by default (this enables richer completion suggestions where candidates don't have to strictly match the prefix). - [#3803](https://github.com/clojure-emacs/cider/pull/3803): Enable dynamic indentation for `clojure-ts-mode`. - [#3805](https://github.com/clojure-emacs/cider/pull/3805): Profiler: update to latest profiling middleware. +- [#3806](https://github.com/clojure-emacs/cider/pull/3806): Add client info to `clone` op request. ### Bugs fixed diff --git a/nrepl-client.el b/nrepl-client.el index 454fb2fe5..97d53503e 100644 --- a/nrepl-client.el +++ b/nrepl-client.el @@ -1032,12 +1032,16 @@ ADDITIONAL-PARAMS is a plist to be appended to the request message." connection tooling)) +(defvar cider-version) + (defun nrepl-sync-request:clone (connection &optional tooling) "Sent a :clone request to create a new client session. The request is dispatched via CONNECTION. Optional argument TOOLING Tooling is set to t if wanting the tooling session from CONNECTION." - (nrepl-send-sync-request '("op" "clone") + (nrepl-send-sync-request `("op" "clone" + "client-name" "CIDER" + "client-version" ,cider-version) connection nil tooling)) diff --git a/test/nrepl-server-mock.el b/test/nrepl-server-mock.el index 6264eb8d2..d02995bed 100644 --- a/test/nrepl-server-mock.el +++ b/test/nrepl-server-mock.el @@ -43,7 +43,10 @@ requirements." (let* ((msg (queue-dequeue (cdr (nrepl-bdecode output)))) (_ (mock/log! ":mock.filter/msg :in %S" msg)) (response (pcase msg - (`(dict "op" "clone" "id" ,id) + (`(dict "op" "clone" + "client-name" "CIDER" + "client-version" ,cider-version + "id" ,id) `(dict "id" ,id "session" "a-session" "status" ("done")