@@ -28,19 +28,6 @@ let dsget_meta = {
2828 }
2929
3030
31- /**
32- * Implementation of the data store get logic. Minimal skeleton for now.
33- * NOTE: Has access to the javascript web worker environment and can mess with it and beyond
34- * @param {string } chatid
35- * @param {string } toolcallid
36- * @param {string } toolname
37- * @param {any } obj
38- */
39- function dsget_run ( chatid , toolcallid , toolname , obj ) {
40- gToolsDBWorker . postMessage ( { cid : chatid , tcid : toolcallid , name : toolname , args : obj } )
41- }
42-
43-
4431let dsset_meta = {
4532 "type" : "function" ,
4633 "function" : {
@@ -64,19 +51,6 @@ let dsset_meta = {
6451 }
6552
6653
67- /**
68- * Implementation of the data store set logic. Minimal skeleton for now.
69- * NOTE: Has access to the javascript web worker environment and can mess with it and beyond
70- * @param {string } chatid
71- * @param {string } toolcallid
72- * @param {string } toolname
73- * @param {any } obj
74- */
75- function dsset_run ( chatid , toolcallid , toolname , obj ) {
76- gToolsDBWorker . postMessage ( { cid : chatid , tcid : toolcallid , name : toolname , args : obj } )
77- }
78-
79-
8054let dsdel_meta = {
8155 "type" : "function" ,
8256 "function" : {
@@ -96,19 +70,6 @@ let dsdel_meta = {
9670 }
9771
9872
99- /**
100- * Implementation of the data store delete logic. Minimal skeleton for now.
101- * NOTE: Has access to the javascript web worker environment and can mess with it and beyond
102- * @param {string } chatid
103- * @param {string } toolcallid
104- * @param {string } toolname
105- * @param {any } obj
106- */
107- function dsdel_run ( chatid , toolcallid , toolname , obj ) {
108- gToolsDBWorker . postMessage ( { cid : chatid , tcid : toolcallid , name : toolname , args : obj } )
109- }
110-
111-
11273let dslist_meta = {
11374 "type" : "function" ,
11475 "function" : {
@@ -124,14 +85,14 @@ let dslist_meta = {
12485
12586
12687/**
127- * Implementation of the data store list logic. Minimal skeleton for now .
88+ * Implementation of the minimal needed plumbing for data store related ops triggering .
12889 * NOTE: Has access to the javascript web worker environment and can mess with it and beyond
12990 * @param {string } chatid
13091 * @param {string } toolcallid
13192 * @param {string } toolname
13293 * @param {any } obj
13394 */
134- function dslist_run ( chatid , toolcallid , toolname , obj ) {
95+ function dsops_run ( chatid , toolcallid , toolname , obj ) {
13596 gToolsDBWorker . postMessage ( { cid : chatid , tcid : toolcallid , name : toolname , args : obj } )
13697}
13798
@@ -142,22 +103,22 @@ function dslist_run(chatid, toolcallid, toolname, obj) {
142103 */
143104export let tc_switch = {
144105 "data_store_get" : {
145- "handler" : dsget_run ,
106+ "handler" : dsops_run ,
146107 "meta" : dsget_meta ,
147108 "result" : ""
148109 } ,
149110 "data_store_set" : {
150- "handler" : dsset_run ,
111+ "handler" : dsops_run ,
151112 "meta" : dsset_meta ,
152113 "result" : ""
153114 } ,
154115 "data_store_delete" : {
155- "handler" : dsdel_run ,
116+ "handler" : dsops_run ,
156117 "meta" : dsdel_meta ,
157118 "result" : ""
158119 } ,
159120 "data_store_list" : {
160- "handler" : dslist_run ,
121+ "handler" : dsops_run ,
161122 "meta" : dslist_meta ,
162123 "result" : ""
163124 } ,
0 commit comments