Просмотр исходного кода

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

rcmerci 6 месяцев назад
Родитель
Сommit
cd17afdc23
3 измененных файлов с 9 добавлено и 4 удалено
  1. 0 3
      prompts/clojure_errors.md
  2. 8 0
      prompts/review.md
  3. 1 1
      scripts/src/logseq/tasks/common_errors.clj

+ 0 - 3
prompts/clojure_errors.md

@@ -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 - 0
prompts/review.md

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

+ 1 - 1
scripts/src/logseq/tasks/common_errors.clj

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