enhance(cli): update agent-bridge prompt

This commit is contained in:
rcmerci
2026-05-23 21:11:23 +08:00
parent c8b8bd3ef6
commit cd96ecb6b5
2 changed files with 12 additions and 0 deletions

View File

@@ -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

View File

@@ -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