Selaa lähdekoodia

set *publishing?

Tienson Qin 4 kuukautta sitten
vanhempi
sitoutus
be69292346

+ 4 - 1
src/main/frontend/worker/db_worker.cljs

@@ -78,8 +78,11 @@
 (defn- init-sqlite-module!
   []
   (when-not @*sqlite
-    (p/let [sqlite (sqlite3InitModule (clj->js {:print js/console.log
+    (p/let [href (.. js/location -href)
+            publishing? (string/includes? href "publishing=true")
+            sqlite (sqlite3InitModule (clj->js {:print js/console.log
                                                 :printErr js/console.error}))]
+      (reset! *publishing? publishing?)
       (reset! *sqlite sqlite)
       nil)))
 

+ 1 - 1
src/main/frontend/worker/embedding.cljs

@@ -266,7 +266,7 @@
                          ;; (prn :debug :semantic-search-result
                          ;;      :block (:block/title (d/entity @conn label))
                          ;;      :distance distance)
-                         (when-not (or (js/isNaN distance) (>= distance 0.45)
+                         (when-not (or (js/isNaN distance) (>= distance 0.6)
                                        (> label 2147483647))
                            (when-let [block (d/entity @conn label)]
                              (when (:block/title block)