File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,6 @@ docker run --rm \
59
59
" $( uname -o) " \
60
60
local/prompts/eslint \
61
61
--pat " $( cat ~ /.secrets/dockerhub-pat-ai-tools-for-devs.txt) " \
62
- --jsonrpc
63
-
62
+ --thread-id " something " \
63
+ --save-thread-volume
64
64
```
Original file line number Diff line number Diff line change 300
300
(update-in m [:prompts ] (fn [coll] (remove (fn [{:keys [type]}] (= type (second args))) coll)))))
301
301
302
302
(= " run" (first args))
303
- (with-volume
303
+ (apply with-volume
304
304
(fn [thread-id]
305
305
(select-keys
306
306
(async/<!! (apply conversation-loop (concat (rest args) [:thread-id thread-id])))
324
324
(defn- add-arg [options args k]
325
325
(if-let [v (k options)] (concat args [k v]) args))
326
326
327
- (def output-handler (fn [x] (jsonrpc/notify { :message {:content (json/generate-string x)} })))
327
+ (def output-handler (fn [x] (jsonrpc/notify :message {:content (json/generate-string x)})))
328
328
(defn output-prompts [coll]
329
329
(jsonrpc/notify {:message {:content " ## Prompts:\n " }})
330
330
(->> coll
333
333
content]))
334
334
(interpose " \n " )
335
335
(apply str)
336
- ((fn [s] (jsonrpc/notify { :message {:content s} })))))
336
+ ((fn [s] (jsonrpc/notify :message {:content s})))))
337
337
338
338
(defn -main [& args]
339
339
(try
348
348
((if (:pretty-print-prompts options) output-prompts output-handler)
349
349
(apply -run-command (concat
350
350
arguments
351
- (reduce (partial add-arg options) [] [:url :pat :host-dir :prompts ])
352
- (when (:offline options) [:offline true ])
353
- (when (:save-thread-volume options) [:save-thread-volume true ])))))
351
+ (reduce (partial add-arg options) [] [:url :pat :host-dir :prompts :thread-id :offline :save-thread-volume ])))))
354
352
(catch Throwable t
355
353
(warn " Error: {{ exception }}" {:exception t})
356
354
(System/exit 1 ))))
You can’t perform that action at this time.
0 commit comments