Skip to content

Commit b38e689

Browse files
registry uses all main branch refs
1 parent 09b24bb commit b38e689

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

functions/registry.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
{:name "analyze_project",
1515
:description "Analyze a project to determine how it should be built",
1616
:type "prompt",
17-
:ref "github:docker/labs-ai-tools-for-devs?ref=slim/args&path=prompts/project_type"}
17+
:ref "github:docker/labs-ai-tools-for-devs?ref=main&path=prompts/project_type"}
1818
{:name "write_files",
1919
:description "Write a set of files to my project",
2020
:parameters {:type "object",

runbook.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Running prompts
22

3+
### help
4+
5+
```sh
6+
bb -m prompts --help
7+
```
8+
39
### Plain prompt Generation
410

511
```sh

src/prompts.clj

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -276,14 +276,15 @@
276276
[nil "--thread-id THREAD_ID" "use this thread-id for the next conversation"
277277
:assoc-fn (fn [m k v] (assoc m k v :save-thread-volume true))]
278278
[nil "--model MODEL" "use this model on the openai compatible endpoint"]
279-
[nil "--stream" "disable streaming"
279+
[nil "--stream" "stream responses"
280280
:id :stream
281281
:default true
282282
:assoc-fn (fn [m k _] (assoc m k true))]
283-
[nil "--nostream" "disable streaming"
283+
[nil "--nostream" "disable streaming responses"
284284
:id :stream
285285
:assoc-fn (fn [m k _] (assoc m k false))]
286-
[nil "--debug" "add debug logging"]])
286+
[nil "--debug" "add debug logging"]
287+
[nil "--help" "print option summary"]])
287288

288289
(def output-handler (fn [x] (jsonrpc/notify :message {:content (json/generate-string x)})))
289290
(defn output-prompts [coll]
@@ -370,12 +371,16 @@
370371
"Errors: {{errors}}\nSummary:\n{{summary}}"
371372
{:summary summary :errors (string/join "\n" errors)})
372373
(System/exit 1))
373-
(let [cmd (apply command options arguments)]
374-
(alter-var-root
375-
#'jsonrpc/notify
376-
(fn [_] (partial (if (:jsonrpc options) jsonrpc/-notify jsonrpc/-println) options)))
377-
((if (:pretty-print-prompts options) output-prompts output-handler)
378-
(cmd)))))
374+
(if (:help options)
375+
(do
376+
(println summary)
377+
(System/exit 0))
378+
(let [cmd (apply command options arguments)]
379+
(alter-var-root
380+
#'jsonrpc/notify
381+
(fn [_] (partial (if (:jsonrpc options) jsonrpc/-notify jsonrpc/-println) options)))
382+
((if (:pretty-print-prompts options) output-prompts output-handler)
383+
(cmd))))))
379384
(catch Throwable t
380385
(warn "Error: {{ exception }}" {:exception t})
381386
(System/exit 1))))

0 commit comments

Comments
 (0)