@codebolt/codeboltjs 1.1.54 → 1.1.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -179,6 +179,7 @@ declare class Codebolt {
179
179
  project: {
180
180
  getProjectSettings: (output: any) => void;
181
181
  getProjectPath: () => Promise<import("@codebolt/types").GetProjectPathResponse>;
182
+ runProject: () => void;
182
183
  };
183
184
  dbmemory: {
184
185
  addKnowledge: (key: string, value: any) => Promise<import("@codebolt/types").MemorySetResponse>;
@@ -14,5 +14,6 @@ declare const cbproject: {
14
14
  * @returns {Promise<GetProjectPathResponse>} A promise that resolves with the project path response.
15
15
  */
16
16
  getProjectPath: () => Promise<GetProjectPathResponse>;
17
+ runProject: () => void;
17
18
  };
18
19
  export default cbproject;
@@ -33,6 +33,11 @@ const cbproject = {
33
33
  }
34
34
  });
35
35
  });
36
- }
36
+ },
37
+ runProject: () => {
38
+ websocket_1.default.getWebsocket.send(JSON.stringify({
39
+ "type": "runProject"
40
+ }));
41
+ },
37
42
  };
38
43
  exports.default = cbproject;
@@ -85,7 +85,7 @@ const VectorDB = {
85
85
  return new Promise((resolve, reject) => {
86
86
  websocket_1.default.getWebsocket.send(JSON.stringify({
87
87
  "type": "vectordbEvent",
88
- "action": "queryVectorItem",
88
+ "action": "queryVectorItems",
89
89
  "message": {
90
90
  items,
91
91
  dbPath
@@ -57,13 +57,13 @@ class cbws {
57
57
  });
58
58
  this.websocket.on('open', () => {
59
59
  console.log('WebSocket connected');
60
- if (this.websocket) {
61
- this.websocket.send(JSON.stringify({
62
- "type": "sendMessage",
63
- "message": initialMessage
64
- }));
65
- resolve(this.websocket);
66
- }
60
+ // if (this.websocket) {
61
+ // this.websocket.send(JSON.stringify({
62
+ // "type": "sendMessage",
63
+ // "message": initialMessage
64
+ // }));
65
+ // resolve(this.websocket);
66
+ // }
67
67
  });
68
68
  this.websocket.on('message', (data) => {
69
69
  // Handle incoming WebSocket messages here.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebolt/codeboltjs",
3
- "version": "1.1.54",
3
+ "version": "1.1.57",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "",
@@ -1,5 +1,5 @@
1
1
  import cbws from './websocket';
2
- import {GetProjectPathResponse } from '@codebolt/types';
2
+ import { GetProjectPathResponse } from '@codebolt/types';
3
3
  /**
4
4
  * A module for interacting with project settings and paths.
5
5
  */
@@ -29,6 +29,11 @@ const cbproject = {
29
29
  }
30
30
  });
31
31
  });
32
- }
32
+ },
33
+ runProject: () => {
34
+ cbws.getWebsocket.send(JSON.stringify({
35
+ "type": "runProject"
36
+ }));
37
+ },
33
38
  };
34
39
  export default cbproject
@@ -83,7 +83,7 @@ const VectorDB = {
83
83
  return new Promise((resolve, reject) => {
84
84
  cbws.getWebsocket.send(JSON.stringify({
85
85
  "type":"vectordbEvent",
86
- "action": "queryVectorItem",
86
+ "action": "queryVectorItems",
87
87
  "message": {
88
88
  items,
89
89
  dbPath
@@ -56,13 +56,13 @@ class cbws {
56
56
 
57
57
  this.websocket.on('open', () => {
58
58
  console.log('WebSocket connected');
59
- if (this.websocket) {
60
- this.websocket.send(JSON.stringify({
61
- "type": "sendMessage",
62
- "message": initialMessage
63
- }));
64
- resolve(this.websocket);
65
- }
59
+ // if (this.websocket) {
60
+ // this.websocket.send(JSON.stringify({
61
+ // "type": "sendMessage",
62
+ // "message": initialMessage
63
+ // }));
64
+ // resolve(this.websocket);
65
+ // }
66
66
  });
67
67
 
68
68
  this.websocket.on('message', (data: WebSocket.Data) => {