Skip to content

Commit 20c881c

Browse files
committedDec 6, 2024
changes
1 parent 58ffd7e commit 20c881c

11 files changed

+133
-33
lines changed
 

‎.codebolt/chat.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

‎.codebolt/debug.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

‎.codebolt/projectState.json

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"activeAgent": false,
3+
"currentLayout": {
4+
"grid": {
5+
"root": {
6+
"type": "branch",
7+
"data": [
8+
{
9+
"type": "leaf",
10+
"data": {
11+
"views": [
12+
"Code"
13+
],
14+
"activeView": "Code",
15+
"id": "1"
16+
},
17+
"size": 849.9140625
18+
},
19+
{
20+
"type": "branch",
21+
"data": [
22+
{
23+
"type": "leaf",
24+
"data": {
25+
"views": [
26+
"Chat"
27+
],
28+
"activeView": "Chat",
29+
"id": "2"
30+
},
31+
"size": 430
32+
},
33+
{
34+
"type": "leaf",
35+
"data": {
36+
"views": [
37+
"Preview"
38+
],
39+
"activeView": "Preview",
40+
"id": "3"
41+
},
42+
"size": 430
43+
}
44+
],
45+
"size": 620.0859375
46+
}
47+
],
48+
"size": 860
49+
},
50+
"width": 1470,
51+
"height": 860,
52+
"orientation": "HORIZONTAL"
53+
},
54+
"panels": {
55+
"Code": {
56+
"id": "Code",
57+
"contentComponent": "Code",
58+
"tabComponent": "props.defaultTabComponent",
59+
"title": "Code",
60+
"renderer": "always"
61+
},
62+
"Chat": {
63+
"id": "Chat",
64+
"contentComponent": "Chat",
65+
"tabComponent": "props.defaultTabComponent",
66+
"title": "Chat",
67+
"renderer": "always"
68+
},
69+
"Preview": {
70+
"id": "Preview",
71+
"contentComponent": "Preview",
72+
"tabComponent": "props.defaultTabComponent",
73+
"title": "Preview",
74+
"renderer": "always"
75+
}
76+
},
77+
"activeGroup": "1"
78+
},
79+
"pinnedAgent": []
80+
}

‎.codebolt/tasks.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

‎docs/agents/2_firstExtension.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@
55

66
Follow the steps below to create a new agent using Codebolt.
77

8-
### Step 1: Open Your Terminal and Run the Command
8+
### Step 1: Choose Your Method to Create an Agent
9+
- **Option 1: Use Agent Template**
10+
Open Codebolt Application. Create Project In Workspace > Select Agent Template > Create Project
11+
![create agent](../../static/img/createAgent.png)
12+
13+
- **Option 2: Use Npx Command**
14+
Open your terminal in the directory where you want the agent to be created and run the following command:
15+
```bash
16+
npx create-codebolt-agent your-agent-name
17+
```
918

1019
Open your terminal in the directory where you want the agent to be created and run the following command:
1120

‎docs/api/fs/listCodeDefinitionNames.md

+14-9
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,15 @@ cbbaseinfo:
44
description: ' '
55
cbparameters:
66
parameters:
7-
- name: filename
8-
typeName: string
9-
description: The name of the file to update.
107
- name: filePath
118
typeName: string
129
description: The path of the file to update.
13-
- name: newContent
14-
typeName: string
15-
description: The new content to write into the file.
1610
returns:
1711
signatureTypeName: Promise
1812
description: A promise that resolves with the server response.
1913
typeArgs:
2014
- type: reference
21-
name: UpdateFileResponse
15+
name: listCodeDefinitionNamesResponse
2216
data:
2317
name: listCodeDefinitionNames
2418
category: fs
@@ -27,6 +21,17 @@ data:
2721
<CBBaseInfo/>
2822
<CBParameters/>
2923

30-
### Status
3124

32-
Comming soon...
25+
26+
### Example
27+
```js
28+
29+
30+
let { success, result } = await codebolt.fs.listCodeDefinitionNames(path);
31+
32+
```
33+
34+
### Explaination
35+
36+
The codebolt.fs.listCodeDefinitionNames method extract meaningful code definitions from a path source files
37+
returns success and result. as output.

‎docs/api/fs/listFile.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ data:
1919
<CBBaseInfo/>
2020
<CBParameters/>
2121

22-
### Status
22+
### Example
23+
```js
2324

24-
Comming soon...
25+
26+
let { success, result } = await codebolt.fs.listFile(path);
27+
28+
```
29+
30+
### Explaination
31+
32+
The listFiles function is designed to list files in a specified directory, with options for recursive listing and ignoring certain directories. Here's a summary of its functionality:

‎docs/api/fs/searchFiles.md

+15-11
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@ cbbaseinfo:
44
description: ' '
55
cbparameters:
66
parameters:
7-
- name: foldername
8-
typeName: string
9-
description: The name of the folder to delete.
107
- name: folderpath
118
typeName: string
12-
description: The path of the folder to delete.
9+
description: The path of the folder to search within.
10+
- name: regex
11+
typeName: RegExp
12+
description: The regular expression pattern to match file contents.
13+
- name: filePattern
14+
typeName: string
15+
description: The pattern to match file names.
1316
returns:
1417
signatureTypeName: Promise
1518
description: A promise that resolves with the server response.
1619
typeArgs:
1720
- type: reference
18-
name: DeleteFolderResponse
21+
name: SearchFilesResponse
1922
data:
2023
name: searchFiles
2124
category: fs
@@ -27,17 +30,18 @@ data:
2730
### Example
2831

2932
```js
30-
//Let's assume you want to delete a folder named oldFolder in the /home/user/documents directory.
31-
32-
codebolt.fs.deleteFolder('oldFolder', '/home/user/documents');
33+
let { success, result } = await codebolt.fs.searchFiles(path, regex, filePattern);
34+
return [success, result]
3335

3436
```
3537

3638

3739
### Explaination
3840

39-
The codebolt.fs.deleteFolder method is used to delete a specified folder from a given directory. It has two parameters:
41+
The codebolt.fs.searchFiles method is used to search for files within a specified directory that match a given pattern. It has three parameters:
42+
43+
folderpath (string): The path of the folder to search within.
4044

41-
foldername (string): The name of the folder to be deleted.
45+
regex (RegExp): The regular expression pattern to match file contents.
4246

43-
folderpath (string): The path to the directory where the folder is located.
47+
filePattern (string): The pattern to match file names.

‎docs/api/fs/writeToFile.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ data:
2828
```js
2929

3030

31-
let { success, result } = await codebolt.fs.readFile(toolInput.path);
31+
let { success, result } = await codebolt.fs.readFile(path);
3232

3333
```
3434

‎docs/api/llm/inference.md

-9
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ cbparameters:
1111
description: The input message or prompt to be sent to the LLM.
1212
- name: llmrole
1313
typeName: string
14-
<<<<<<< HEAD
1514
description: The role of the LLM to determine which model to use. This parameter is optional.
16-
=======
17-
description: The role of the LLM to determine which model to use
18-
19-
>>>>>>> 29130529741fc9e77724a073fca43156770b98f8
2015
returns:
2116
signatureTypeName: Promise
2217
description: A promise that resolves with the LLM's response.
@@ -49,11 +44,7 @@ let message={
4944
}
5045

5146

52-
<<<<<<< HEAD
5347
const response = codebolt.llm.inference(message,<optional llmrole>);
54-
=======
55-
const response = codebolt.llm.inference(message);
56-
>>>>>>> 29130529741fc9e77724a073fca43156770b98f8
5748
console.log(response);
5849

5950
```

‎static/img/createAgent.png

369 KB
Loading

0 commit comments

Comments
 (0)
Failed to load comments.