Skip to content

Commit b88a946

Browse files
committed
Add workspaces to /doctor
1 parent 272a34e commit b88a946

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- Add workspaces to `/doctor`
6+
57
## 0.78.1
68

79
- Fix regression: completion broken after rewrite feature API changes.

src/eca/features/commands.clj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@
145145
""
146146
(str "Server cmd: " (.orElse (.commandLine (.info (ProcessHandle/current))) nil))
147147
""
148+
(str "Workspaces: " (shared/workspaces-as-str db))
149+
""
148150
(str "Default model: " model)
149151
""
150152
(str "Login providers: " (reduce

src/eca/features/prompt.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
(defn init-prompt [db]
133133
(replace-vars
134134
(init-prompt-template)
135-
{:workspaceFolders (string/join ", " (map (comp shared/uri->filename :uri) (:workspace-folders db)))}))
135+
{:workspaceFolders (shared/workspaces-as-str db)}))
136136

137137
(defn title-prompt []
138138
(title-prompt-template))

src/eca/metrics.clj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
(ns eca.metrics
22
(:require
3-
[clojure.string :as string]
43
[eca.config :as config]
54
[eca.logger :as logger]
65
[eca.shared :as shared]))
@@ -14,8 +13,7 @@
1413
(fn [_]
1514
{:client-name (:name (:client-info @db*))
1615
:client-version (:version (:client-info @db*))
17-
:workspace-roots (string/join ", " (map (comp shared/uri->filename :uri)
18-
(:workspace-folders @db*)))})))
16+
:workspace-roots (shared/workspaces-as-str @db*)})))
1917

2018
(defprotocol IMetrics
2119
(start! [this])

src/eca/shared.clj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@
4545
string/lower-case))
4646
(string/replace ":" "%3A")))))
4747

48+
(defn workspaces-as-str [db]
49+
(string/join ", " (map (comp uri->filename :uri) (:workspace-folders db))))
50+
4851
(defn update-last [coll f]
4952
(if (seq coll)
5053
(update coll (dec (count coll)) f)

0 commit comments

Comments
 (0)