mirror of
https://github.com/logseq/logseq.git
synced 2026-05-24 12:44:22 +00:00
enhance(cli): update agent-bridge prompt
This commit is contained in:
@@ -177,6 +177,7 @@
|
||||
"Reply instructions:"
|
||||
"For a short reply, append a comment after the requesting comment."
|
||||
"For a long reply, write a normal block tree after the comments area and append a comment that references that tree."
|
||||
"When referencing result blocks in DB graphs, reference result blocks with [[block-uuid]], not ((block-uuid))."
|
||||
"If the request is blocked or fails, make that clear in the reply."]))
|
||||
|
||||
(def ^:private prompt-template-vars
|
||||
|
||||
@@ -245,6 +245,17 @@
|
||||
(is (string/starts-with? preview "codex --sandbox danger-full-access exec --json --skip-git-repo-check '"))
|
||||
(is (string/includes? preview "Ship the CLI bridge")))))
|
||||
|
||||
(deftest test-default-comment-prompt-documents-db-graph-block-ref-syntax
|
||||
(let [prompt (#'agent-command/build-comment-codex-prompt
|
||||
{:graph "demo"
|
||||
:agent-name "build-host"
|
||||
:comment (comment-block {})
|
||||
:target-tree-texts ["- Target block"]
|
||||
:comments-area-tree-text "- Comments"
|
||||
:comment-tree-text "- [[build-host]] summarize"})]
|
||||
(is (string/includes? prompt "reference result blocks with [[block-uuid]], not ((block-uuid))"))
|
||||
(is (not (string/includes? prompt "reference result blocks with ((block-uuid))")))))
|
||||
|
||||
(deftest test-prompt-templates
|
||||
(testing "prompt builders render supplied graph templates"
|
||||
(let [prompt (agent-command/build-codex-prompt
|
||||
|
||||
Reference in New Issue
Block a user