mirror of
https://github.com/logseq/logseq.git
synced 2026-05-25 21:24:21 +00:00
enhance: update :logseq.property.agent/session-id
This commit is contained in:
8
deps/db/src/logseq/db/frontend/property.cljs
vendored
8
deps/db/src/logseq/db/frontend/property.cljs
vendored
@@ -646,10 +646,12 @@
|
||||
:schema {:type :node
|
||||
:public? false
|
||||
:hide? true}}
|
||||
:logseq.property.agent/session-id {:title "agent session id"
|
||||
:logseq.property.agent/session-id {:title "Agent Session ID"
|
||||
:schema {:type :string
|
||||
:public? false
|
||||
:hide? true}}
|
||||
:public? true
|
||||
:hide? true}
|
||||
:properties
|
||||
{:logseq.property/description "Stores the AgentBridge session ID for a routed task."}}
|
||||
:logseq.property/used-template {:title "Used template"
|
||||
:schema {:type :node
|
||||
:public? false
|
||||
|
||||
@@ -91,13 +91,15 @@
|
||||
(deftest agent-session-id-built-in-property
|
||||
(let [property (get db-property/built-in-properties :logseq.property.agent/session-id)]
|
||||
(testing "schema"
|
||||
(is (= "agent session id" (:title property)))
|
||||
(is (= "Agent Session ID" (:title property)))
|
||||
(is (= :string (get-in property [:schema :type])))
|
||||
(is (not (contains? (:schema property) :db/cardinality)))
|
||||
(is (= false (get-in property [:schema :public?])))
|
||||
(is (= true (get-in property [:schema :public?])))
|
||||
(is (= true (get-in property [:schema :hide?]))))
|
||||
|
||||
(testing "internal built-in logseq property"
|
||||
(is (not (contains? db-property/public-built-in-properties :logseq.property.agent/session-id)))
|
||||
(testing "built-in logseq property"
|
||||
(is (= "Stores the AgentBridge session ID for a routed task."
|
||||
(get-in property [:properties :logseq.property/description])))
|
||||
(is (contains? db-property/public-built-in-properties :logseq.property.agent/session-id))
|
||||
(is (db-property/logseq-property? :logseq.property.agent/session-id))
|
||||
(is (db-property/internal-property? :logseq.property.agent/session-id)))))
|
||||
|
||||
@@ -197,10 +197,12 @@
|
||||
(:kv/value (d/entity @conn :logseq.kv/schema-version))))
|
||||
(let [property (d/entity @conn :logseq.property.agent/session-id)]
|
||||
(is (some? property))
|
||||
(is (= "agent session id" (:block/title property)))
|
||||
(is (= "Agent Session ID" (:block/title property)))
|
||||
(is (= :string (:logseq.property/type property)))
|
||||
(is (false? (:logseq.property/public? property)))
|
||||
(is (true? (:logseq.property/hide? property))))
|
||||
(is (true? (:logseq.property/public? property)))
|
||||
(is (true? (:logseq.property/hide? property)))
|
||||
(is (= "Stores the AgentBridge session ID for a routed task."
|
||||
(:block/title (:logseq.property/description property)))))
|
||||
(is (some #(= {:properties [:logseq.property.agent/session-id]}
|
||||
(:migrate-updates %))
|
||||
(:upgrade-result-coll result))))))
|
||||
|
||||
@@ -99,12 +99,14 @@
|
||||
|
||||
(testing "agent session id is an internal built-in property"
|
||||
(let [property (get db-property/built-in-properties :logseq.property.agent/session-id)]
|
||||
(is (= "agent session id" (:title property)))
|
||||
(is (= "Agent Session ID" (:title property)))
|
||||
(is (= :string (get-in property [:schema :type])))
|
||||
(is (not (contains? (:schema property) :db/cardinality)))
|
||||
(is (= false (get-in property [:schema :public?])))
|
||||
(is (= true (get-in property [:schema :public?])))
|
||||
(is (= true (get-in property [:schema :hide?])))
|
||||
(is (not (contains? db-property/public-built-in-properties :logseq.property.agent/session-id)))
|
||||
(is (= "Stores the AgentBridge session ID for a routed task."
|
||||
(get-in property [:properties :logseq.property/description])))
|
||||
(is (contains? db-property/public-built-in-properties :logseq.property.agent/session-id))
|
||||
(is (db-property/logseq-property? :logseq.property.agent/session-id))
|
||||
(is (db-property/internal-property? :logseq.property.agent/session-id)))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user