Skip to content

Commit 677c5d6

Browse files
committed
Simplify operation confirmation output to status and subject only
1 parent 630c22b commit 677c5d6

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

src/eca/features/tools/todo.clj

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,8 @@
213213
true (conj (str " description: " description))
214214
(seq blocked-by) (conj (str " blocked_by: " (str/join ", " (sort blocked-by))))))))
215215

216-
(defn ^:private read-task-line-short [{:keys [id subject status priority blocked-by]}]
217-
(let [base (format "- #%d [%s] [%s] %s" id (name status) (name priority) subject)]
218-
(str/join "\n"
219-
(cond-> [base]
220-
(seq blocked-by) (conj (str " blocked_by: " (str/join ", " (sort blocked-by))))))))
216+
(defn ^:private read-task-line-short [{:keys [id subject status]}]
217+
(format "- #%d [%s] %s" id (name status) subject))
221218

222219
(defn ^:private read-text [state]
223220
(let [tasks (:tasks state)]
@@ -252,8 +249,8 @@
252249
(defn ^:private success [state text]
253250
(assoc (tools.util/single-text-content text) :details (todo-details state)))
254251

255-
(defn ^:private format-tasks-list [tasks & [full?]]
256-
(str/join "\n" (map (if full? read-task-line-full read-task-line-short) tasks)))
252+
(defn ^:private format-tasks-list [tasks]
253+
(str/join "\n" (map read-task-line-short tasks)))
257254

258255
(defmethod tools.util/tool-call-details-after-invocation :todo
259256
[_name _arguments before-details result _ctx]
@@ -401,7 +398,7 @@
401398
(success state
402399
(format "Started %d task(s):\n%s"
403400
(count started)
404-
(format-tasks-list started true))))))))
401+
(format-tasks-list started))))))))
405402

406403
(defn ^:private clean-summary-if-no-in-progress [state]
407404
(if (empty? (filter #(= :in-progress (:status %)) (:tasks state)))

0 commit comments

Comments
 (0)