Skip to content

Commit 204e3f4

Browse files
committed
Improve UI for running tasks
1 parent 0fcfd65 commit 204e3f4

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/eca/features/tools/shell.clj

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
(def ^:private default-timeout 60000)
1818
(def ^:private max-timeout (* 60000 10))
1919

20+
(defmethod tools.util/tool-call-details-before-invocation :shell_command
21+
[_name arguments _server _ctx]
22+
(when (get arguments "background")
23+
{:background true}))
24+
2025
(defn start-shell-process!
2126
"Start a shell process, returning the process object for deref/management.
2227
@@ -231,16 +236,14 @@
231236

232237
(defn shell-command-summary [{:keys [args config db]}]
233238
(let [max-length (get-in config [:toolCall :shellCommand :summaryMaxLength])
234-
workspace-folders (:workspace-folders db)
235-
bg? (get args "background")]
239+
workspace-folders (:workspace-folders db)]
236240
(if-let [command (some-> (get args "command")
237241
(strip-workspace-cd-prefix workspace-folders)
238242
(string/replace #"\n" " ")
239243
string/trim)]
240-
(let [prefix (if bg? "🟡 $ " "$ ")]
241-
(if (> (count command) max-length)
242-
(format "%s%s..." prefix (subs command 0 max-length))
243-
(format "%s%s" prefix command)))
244+
(if (> (count command) max-length)
245+
(format "$ %s..." (subs command 0 max-length))
246+
(format "$ %s" command))
244247
"Preparing shell command")))
245248

246249
(def definitions

0 commit comments

Comments
 (0)