Skip to content

Commit 375cd43

Browse files
committed
updated
1 parent c005d2c commit 375cd43

15 files changed

+167
-140
lines changed

.codebolt/chat.json

+1-5
Large diffs are not rendered by default.

.codebolt/debug.json

+1-5
Large diffs are not rendered by default.

.codebolt/projectState.json

+3-94
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"activeAgent": false,
32
"currentLayout": {
43
"grid": {
54
"root": {
@@ -14,62 +13,13 @@
1413
"activeView": "Code",
1514
"id": "1"
1615
},
17-
<<<<<<< HEAD
18-
"size": 1152.7999877929688
19-
=======
20-
"size": 849.9140625
21-
>>>>>>> 20c881c7d3bcaea5f51650d8e362eabe1c086260
22-
},
23-
{
24-
"type": "branch",
25-
"data": [
26-
{
27-
"type": "leaf",
28-
"data": {
29-
"views": [
30-
"Chat"
31-
],
32-
"activeView": "Chat",
33-
"id": "2"
34-
},
35-
<<<<<<< HEAD
36-
"size": 378
37-
=======
38-
"size": 430
39-
>>>>>>> 20c881c7d3bcaea5f51650d8e362eabe1c086260
40-
},
41-
{
42-
"type": "leaf",
43-
"data": {
44-
"views": [
45-
"Preview"
46-
],
47-
"activeView": "Preview",
48-
"id": "3"
49-
},
50-
<<<<<<< HEAD
51-
"size": 378
52-
}
53-
],
54-
"size": 383.20001220703125
16+
"size": 1536
5517
}
5618
],
5719
"size": 756
5820
},
5921
"width": 1536,
6022
"height": 756,
61-
=======
62-
"size": 430
63-
}
64-
],
65-
"size": 620.0859375
66-
}
67-
],
68-
"size": 860
69-
},
70-
"width": 1470,
71-
"height": 860,
72-
>>>>>>> 20c881c7d3bcaea5f51650d8e362eabe1c086260
7323
"orientation": "HORIZONTAL"
7424
},
7525
"panels": {
@@ -79,51 +29,10 @@
7929
"tabComponent": "props.defaultTabComponent",
8030
"title": "Code",
8131
"renderer": "always"
82-
},
83-
"Chat": {
84-
"id": "Chat",
85-
"contentComponent": "Chat",
86-
"tabComponent": "props.defaultTabComponent",
87-
"title": "Chat",
88-
"renderer": "always"
89-
},
90-
"Preview": {
91-
"id": "Preview",
92-
"contentComponent": "Preview",
93-
"tabComponent": "props.defaultTabComponent",
94-
"title": "Preview",
95-
"renderer": "always"
9632
}
9733
},
9834
"activeGroup": "1"
9935
},
100-
<<<<<<< HEAD
101-
"pinnedAgent": [
102-
{
103-
"id": 1,
104-
"agentId": "6dd799b5-43c2-4c55-ba49-cae6cbac2498",
105-
"title": "CodeBolt Dev",
106-
"avatarSrc": "https://placehold.co/200x200",
107-
"avatarFallback": "CE",
108-
"description": "Codebolt Dev, is a highly skilled software developer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.",
109-
"longDescription": "A basic agent designed for the Codebolt platform, offering a range of\nfunctionalities to enhance interaction with the platform.\n",
110-
"zipFilePath": "https://storage.googleapis.com/codeboltai.appspot.com/agents/bvfiVEFStP.zip",
111-
"agentPath": "C:\\Users\\NURSID\\AppData\\Roaming\\codebolt\\.codebolt\\6dd799b5-43c2-4c55-ba49-cae6cbac2498",
112-
"isLocal": true,
113-
"tags": [
114-
"web",
115-
"code-generation"
116-
],
117-
"isInstalled": false,
118-
"version": "1.1.6",
119-
"createdAt": "2024-11-03T18:02:26.836Z",
120-
"needsUpdate": false,
121-
"currentPinned": false
122-
}
123-
],
124-
"activeAgent": false,
125-
"treeViewState": "{\"tree-2\":{\"focusedItem\":null,\"expandedItems\":[\"root-1\",\"root-2\",\"root-3\",\"root-4\",\"root-5\",\"root-6\",\"root-7\",\"root-8\",\"root-9\",\"root-10\",\"root-11\",\"root-12\",\"root-13\",\"root-14\",\"root-15\",\"root-16\",\"root-17\",\"root-18\",\"root-19\",\"root-20\",\"root-21\"],\"selectedItems\":[]}}"
126-
=======
127-
"pinnedAgent": []
128-
>>>>>>> 20c881c7d3bcaea5f51650d8e362eabe1c086260
36+
"pinnedAgent": [],
37+
"activeAgent": false
12938
}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@
1818
npm-debug.log*
1919
yarn-debug.log*
2020
yarn-error.log*
21+
.codeboltAgents

docs/api/rag/add_file.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ data:
2222
<CBBaseInfo/>
2323
<CBParameters/>
2424

25-
### Status
2625

27-
Comming soon...
26+
### Example
27+
28+
```js
29+
import codebolt from '@codebolt/codeboltjs';
30+
31+
async function exampleAddFile() {
32+
await codebolt.rag.add_file("example.txt", "/path/to/file");
33+
console.log("File added successfully.");
34+
}
35+
36+
exampleAddFile();

docs/api/rag/init.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ data:
1616
<CBBaseInfo/>
1717
<CBParameters/>
1818

19-
### Status
19+
### Example
2020

21-
Comming soon...
21+
```js
22+
import codebolt from '@codebolt/codeboltjs';
23+
24+
async function exampleInit() {
25+
await codebolt.rag.init();
26+
console.log("CodeBolt File System Module initialized.");
27+
}
28+
29+
exampleInit();
30+
31+
```

docs/api/rag/retrieve_related_knowledge.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ data:
2222
<CBBaseInfo/>
2323
<CBParameters/>
2424

25-
### Status
25+
### Example
2626

27-
Comming soon...
27+
```js
28+
import codebolt from '@codebolt/codeboltjs';
29+
30+
async function exampleRetrieveRelatedKnowledge() {
31+
await codebolt.rag.retrieve_related_knowledge("What is CodeBolt?", "example.txt");
32+
console.log("Related knowledge retrieved.");
33+
}
34+
35+
exampleRetrieveRelatedKnowledge();

docs/api/search/get_first_link.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@ data:
2121
<CBBaseInfo/>
2222
<CBParameters/>
2323

24-
### Status
24+
### Example
2525

26-
Comming soon...
26+
```js
27+
import codebolt from '@codebolt/codeboltjs';
28+
29+
async function exampleGetFirstLink() {
30+
try {
31+
const firstLink = await codebolt.bsearch.get_first_link("JavaScript documentation");
32+
console.log("First link:", firstLink);
33+
} catch (error) {
34+
console.error("Failed to retrieve the first link:", error);
35+
}
36+
}
37+
38+
exampleGetFirstLink();

docs/api/search/init.md

+14-7
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,26 @@ cbparameters:
66
parameters:
77
- name: engine
88
typeName: string
9-
description: The search engine to use for initializing the module.
9+
description: The search engine to use for initializing the module. Defaults to "bing".
1010
returns:
1111
signatureTypeName: void
12-
description: ' '
13-
typeArgs: []
12+
description: This function does not return any value.
1413
data:
1514
name: init
16-
category: search
15+
category: cbsearch
1716
link: init.md
1817
---
1918
<CBBaseInfo/>
20-
<CBParameters/>
19+
<CBParameters/>
2120

22-
### Status
21+
### Example
2322

24-
Comming soon...
23+
```js
24+
import codebolt from '@codebolt/codeboltjs';
25+
26+
function exampleInit() {
27+
codebolt.search.init("google");
28+
console.log("Search module initialized.");
29+
}
30+
31+
exampleInit();

docs/api/search/search.md

+17-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,21 @@ data:
2121
<CBBaseInfo/>
2222
<CBParameters/>
2323

24-
### Status
24+
### Example
2525

26-
Comming soon...
26+
### Example
27+
28+
```js
29+
import codebolt from '@codebolt/codeboltjs';
30+
31+
async function exampleSearch() {
32+
try {
33+
const results = await codebolt.search.search("JavaScript documentation");
34+
console.log("Search results:", results);
35+
} catch (error) {
36+
console.error("Failed to perform search:", error);
37+
}
38+
}
39+
40+
exampleSearch();
41+
```

docs/api/taskplaner/addTask.md

+16-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: addTask
33
cbbaseinfo:
4-
description: Adds a task using a WebSocket message.
4+
description: Adds a task to the system via WebSocket.
55
cbparameters:
66
parameters:
77
- name: task
@@ -11,22 +11,31 @@ cbparameters:
1111
signatureTypeName: Promise
1212
description: A promise that resolves with the response from the add task event.
1313
typeArgs:
14-
- type: intrinsic
15-
name: any
14+
- type: reference
15+
name: AddTaskResponse
1616
data:
1717
name: addTask
1818
category: taskplaner
1919
link: addTask.md
2020
---
2121
<CBBaseInfo/>
22-
<CBParameters/>
22+
<CBParameters/>
2323

24-
### Example
24+
### Example
2525

26-
```js
26+
```js
27+
import codebolt from '@codebolt/codeboltjs';
2728

28-
await codebolt.taskplaner.addTask("Task Name")
29+
async function exampleAddTask() {
30+
try {
31+
const response = await codebolt.taskplaner.addTask("Complete project documentation");
32+
console.log("Task added successfully:", response);
33+
} catch (error) {
34+
console.error("Failed to add task:", error);
35+
}
36+
}
2937

38+
exampleAddTask();
3039
```
3140

3241
### Explaination

docs/api/taskplaner/getTasks.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,23 @@ data:
2020

2121
### Examples
2222

23+
24+
### Example
25+
2326
```js
24-
// It retrieves the current list of tasks from the task planner
25-
const getTask = await codebolt.taskplaner.getTasks()
27+
import codebolt from '@codebolt/codeboltjs';
28+
29+
async function exampleGetTasks() {
30+
try {
31+
const response = await codebolt.taskplaner.getTasks()
32+
33+
console.log("Tasks retrieved successfully:", response);
34+
} catch (error) {
35+
console.error("Failed to retrieve tasks:", error);
36+
}
37+
}
38+
39+
exampleGetTasks();
2640

2741
```
2842

docs/api/taskplaner/updateTask.md

+20-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: updateTask
33
cbbaseinfo:
4-
description: Updates an existing task using a WebSocket message.
4+
description: Updates an existing task in the system via WebSocket.
55
cbparameters:
66
parameters:
77
- name: task
@@ -11,16 +11,30 @@ cbparameters:
1111
signatureTypeName: Promise
1212
description: A promise that resolves with the response from the update task event.
1313
typeArgs:
14-
- type: intrinsic
15-
name: any
14+
- type: reference
15+
name: UpdateTasksResponse
1616
data:
1717
name: updateTask
1818
category: taskplaner
1919
link: updateTask.md
2020
---
2121
<CBBaseInfo/>
22-
<CBParameters/>
22+
<CBParameters/>
2323

24-
### Status
24+
### Example
2525

26-
Comming soon...
26+
```js
27+
28+
import codebolt from '@codebolt/codeboltjs';
29+
30+
async function exampleUpdateTask() {
31+
try {
32+
const response = await codebolt.taskplaner.updateTask("Update project documentation");
33+
console.log("Task updated successfully:", response);
34+
} catch (error) {
35+
console.error("Failed to update task:", error);
36+
}
37+
}
38+
39+
exampleUpdateTask();
40+
```

0 commit comments

Comments
 (0)