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 \
5959 " $( uname -o) " \
6060 local/prompts/eslint \
6161 --pat " $( cat ~ /.secrets/dockerhub-pat-ai-tools-for-devs.txt) " \
62- --jsonrpc
63-
62+ --thread-id " something " \
63+ --save-thread-volume
6464```
Original file line number Diff line number Diff line change 300300 (update-in m [:prompts ] (fn [coll] (remove (fn [{:keys [type]}] (= type (second args))) coll)))))
301301
302302 (= " run" (first args))
303- (with-volume
303+ (apply with-volume
304304 (fn [thread-id]
305305 (select-keys
306306 (async/<!! (apply conversation-loop (concat (rest args) [:thread-id thread-id])))
324324(defn- add-arg [options args k]
325325 (if-let [v (k options)] (concat args [k v]) args))
326326
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)})))
328328(defn output-prompts [coll]
329329 (jsonrpc/notify {:message {:content " ## Prompts:\n " }})
330330 (->> coll
333333 content]))
334334 (interpose " \n " )
335335 (apply str)
336- ((fn [s] (jsonrpc/notify { :message {:content s} })))))
336+ ((fn [s] (jsonrpc/notify :message {:content s})))))
337337
338338(defn -main [& args]
339339 (try
348348 ((if (:pretty-print-prompts options) output-prompts output-handler)
349349 (apply -run-command (concat
350350 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 ])))))
354352 (catch Throwable t
355353 (warn " Error: {{ exception }}" {:exception t})
356354 (System/exit 1 ))))
You can’t perform that action at this time.
0 commit comments