dev: rename prompts/clojure_errors.md to prompts/review.md

This commit is contained in:
rcmerci
2025-08-26 17:22:15 +08:00
parent 28b958ff7c
commit cd17afdc23
3 changed files with 9 additions and 4 deletions

View File

@@ -1,3 +0,0 @@
You're Clojure expert, you're responsible to check those common errors:
1. `empty?` should be used instead of `empty` when a boolean value is expected in an expression.

8
prompts/review.md Normal file
View File

@@ -0,0 +1,8 @@
You're Clojure(script) expert, you're responsible to check those common errors:
- `empty?` should be used instead of `empty` when a boolean value is expected in an expression.
- `logseq.common.defkeywords/defkeywords`:
`defkeywords` is a macro, and cljs vars should not be used in its parameter `keyvals`,
because they cannot be evaluated at compile time

View File

@@ -6,7 +6,7 @@
(defn check-common-errors
[]
(let [prompt (String. (fs/read-all-bytes "prompts/clojure_errors.md"))
(let [prompt (String. (fs/read-all-bytes "prompts/review.md"))
diff (:out (shell {:out :string} "git diff --no-prefix -U100 -- '*.cljs'"))]
(when-not (string/blank? diff)
(let [command (format "gh models run openai/gpt-5 \"%s\""