Skip to content

Commit e9026f1

Browse files
committed
Updated the Yaml Generation to handle Multiline Description
1 parent 280529a commit e9026f1

File tree

27 files changed

+81
-48
lines changed

27 files changed

+81
-48
lines changed

docs/api/browser/cb_index.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,16 @@ cbapicategory:
4141
description: Takes a screenshot of the current page.
4242
- name: scroll
4343
link: scroll
44-
description: Scrolls the current page in a specified direction by a specified number of pixels.
44+
description: >-
45+
Scrolls the current page in a specified direction by a specified number of
46+
pixels.
4547
- name: search
4648
link: search
4749
description: Performs a search on the current page using a specified query.
4850
- name: type
4951
link: type
5052
description: Types text into a specified element on the page.
53+
5154
---
5255
# browser
5356
<CBAPICategory />

docs/api/cbstate/cb_index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
cbapicategory:
33
- name: getApplicationState
44
link: getApplicationState
5-
description:
5+
description: ' '
6+
67
---
78
# cbstate
89
<CBAPICategory />

docs/api/chat/cb_index.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,23 @@
22
cbapicategory:
33
- name: eventEmitter
44
link: eventEmitter
5-
description:
5+
description: ' '
66
- name: stopProcess
77
link: stopProcess
8-
description:
8+
description: ' '
99
- name: getChatHistory
1010
link: getChatHistory
11-
description:
11+
description: ' '
1212
- name: processStarted
1313
link: processStarted
14-
description:
14+
description: ' '
1515
- name: sendMessage
1616
link: sendMessage
17-
description:
17+
description: ' '
1818
- name: waitforReply
1919
link: waitforReply
20-
description:
20+
description: ' '
21+
2122
---
2223
# chat
2324
<CBAPICategory />

docs/api/codeparsers/cb_index.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ cbapicategory:
99
- name: getFunctionsinClass
1010
link: getFunctionsinClass
1111
description: Retrieves the functions in a given class within a file.
12+
1213
---
1314
# codeparsers
1415
<CBAPICategory />

docs/api/codeutils/cb_index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
cbapicategory:
33
- name: getAllFilesAsMarkDown
44
link: getAllFilesAsMarkDown
5-
description:
5+
description: ' '
66
- name: getCodeTree
77
link: getCodeTree
88
description: Asynchronously generates a code tree from the provided source code.
9+
910
---
1011
# codeutils
1112
<CBAPICategory />

docs/api/constructor/cb_index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
cbapicategory:
2+
cbapicategory: []
3+
34
---
45
# constructor
56
<CBAPICategory />

docs/api/crawler/cb_index.md

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ cbapicategory:
2424
- name: type
2525
link: type
2626
description: Types the provided text into an element with the specified ID.
27+
2728
---
2829
# crawler
2930
<CBAPICategory />

docs/api/dbmemory/cb_index.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ cbapicategory:
66
- name: getKnowledge
77
link: getKnowledge
88
description: Retrieves a value from the in-memory database by key.
9+
910
---
1011
# dbmemory
1112
<CBAPICategory />

docs/api/debug/cb_index.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
cbapicategory:
33
- name: debug
44
link: debug
5-
description:
5+
description: ' '
66
- name: openDebugBrowser
77
link: openDebugBrowser
8-
description:
8+
description: ' '
9+
910
---
1011
# debug
1112
<CBAPICategory />

docs/api/docutils/cb_index.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ cbapicategory:
33
- name: pdf_to_text
44
link: pdf_to_text
55
description: Converts a PDF document to text.
6+
67
---
78
# docutils
89
<CBAPICategory />

docs/api/fs/cb_index.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,26 @@
22
cbapicategory:
33
- name: createFile
44
link: createFile
5-
description:
5+
description: ' '
66
- name: createFolder
77
link: createFolder
8-
description:
8+
description: ' '
99
- name: deleteFile
1010
link: deleteFile
11-
description:
11+
description: ' '
1212
- name: deleteFolder
1313
link: deleteFolder
14-
description:
14+
description: ' '
1515
- name: listFile
1616
link: listFile
17-
description:
17+
description: ' '
1818
- name: readFile
1919
link: readFile
20-
description:
20+
description: ' '
2121
- name: updateFile
2222
link: updateFile
23-
description:
23+
description: ' '
24+
2425
---
2526
# fs
2627
<CBAPICategory />

docs/api/git/cb_index.md

+16-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
cbapicategory:
33
- name: add
44
link: add
5-
description: Adds changes in the local repository to the staging area at the given path.
5+
description: >-
6+
Adds changes in the local repository to the staging area at the given
7+
path.
68
- name: branch
79
link: branch
810
description: Creates a new branch in the local repository at the given path.
@@ -14,10 +16,14 @@ cbapicategory:
1416
description: Clones a Git repository from the given URL to the specified path.
1517
- name: commit
1618
link: commit
17-
description: Commits the staged changes in the local repository with the given commit message.
19+
description: >-
20+
Commits the staged changes in the local repository with the given commit
21+
message.
1822
- name: diff
1923
link: diff
20-
description: Retrieves the diff of changes for a specific commit in the local repository.
24+
description: >-
25+
Retrieves the diff of changes for a specific commit in the local
26+
repository.
2127
- name: init
2228
link: init
2329
description: Initializes a new Git repository at the given path.
@@ -26,13 +32,18 @@ cbapicategory:
2632
description: Retrieves the commit logs for the local repository at the given path.
2733
- name: pull
2834
link: pull
29-
description: Pulls the latest changes from the remote repository to the local repository at the given path.
35+
description: >-
36+
Pulls the latest changes from the remote repository to the local
37+
repository at the given path.
3038
- name: push
3139
link: push
32-
description: Pushes local repository changes to the remote repository at the given path.
40+
description: >-
41+
Pushes local repository changes to the remote repository at the given
42+
path.
3343
- name: status
3444
link: status
3545
description: Retrieves the status of the local repository at the given path.
46+
3647
---
3748
# git
3849
<CBAPICategory />

docs/api/knowledge/cb_index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
cbapicategory:
2+
cbapicategory: []
3+
34
---
45
# knowledge
56
<CBAPICategory />

docs/api/llm/cb_index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
cbapicategory:
33
- name: inference
44
link: inference
5-
description: Sends an inference request to the LLM and returns the model's response.
6-
The model is selected based on the provided
5+
description: "Sends an inference request to the LLM and returns the model's response.\r\nThe model is selected based on the provided "
6+
77
---
88
# llm
99
<CBAPICategory />

docs/api/outputparsers/cb_index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
cbapicategory:
33
- name: init
44
link: init
5-
description: Initializes the output parser module.
6-
Currently, this function does not perform any operations.
5+
description: "Initializes the output parser module.\r\nCurrently, this function does not perform any operations."
76
- name: parseErrors
87
link: parseErrors
98
description: Parses the given output and returns all the error messages.
109
- name: parseWarnings
1110
link: parseWarnings
1211
description: Parses the given output and returns all the warning messages.
12+
1313
---
1414
# outputparsers
1515
<CBAPICategory />

docs/api/project/cb_index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ cbapicategory:
55
description: Retrieves the path of the current project.
66
- name: getProjectSettings
77
link: getProjectSettings
8-
description: Placeholder for a method to get project settings.
9-
Currently, this method does not perform any operations.
8+
description: "Placeholder for a method to get project settings.\r\nCurrently, this method does not perform any operations."
9+
1010
---
1111
# project
1212
<CBAPICategory />

docs/api/rag/cb_index.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ cbapicategory:
99
- name: retrieve_related_knowledge
1010
link: retrieve_related_knowledge
1111
description: Retrieves related knowledge for a given query and filename.
12+
1213
---
1314
# rag
1415
<CBAPICategory />

docs/api/search/cb_index.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ cbapicategory:
99
- name: search
1010
link: search
1111
description: Performs a search operation for the given query.
12+
1213
---
1314
# search
1415
<CBAPICategory />

docs/api/start_browser/cb_index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
cbapicategory:
2+
cbapicategory: []
3+
34
---
45
# start_browser
56
<CBAPICategory />

docs/api/taskplaner/cb_index.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ cbapicategory:
99
- name: updateTask
1010
link: updateTask
1111
description: Updates an existing task using a WebSocket message.
12+
1213
---
1314
# taskplaner
1415
<CBAPICategory />

docs/api/terminal/cb_index.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,20 @@
22
cbapicategory:
33
- name: eventEmitter
44
link: eventEmitter
5-
description:
5+
description: ' '
66
- name: executeCommand
77
link: executeCommand
8-
description: Executes a given command and returns the result.
9-
Listens for messages from the WebSocket that indicate the output, error, or finish state
10-
of the executed command and resolves the promise accordingly.
8+
description: "Executes a given command and returns the result.\r\nListens for messages from the WebSocket that indicate the output, error, or finish state\r\nof the executed command and resolves the promise accordingly."
119
- name: executeCommandRunUntilError
1210
link: executeCommandRunUntilError
13-
description: Executes a given command and keeps running until an error occurs.
14-
Listens for messages from the WebSocket and resolves the promise when an error is encountered.
11+
description: "Executes a given command and keeps running until an error occurs.\r\nListens for messages from the WebSocket and resolves the promise when an error is encountered."
1512
- name: executeCommandWithStream
1613
link: executeCommandWithStream
17-
description:
14+
description: ' '
1815
- name: sendManualInterrupt
1916
link: sendManualInterrupt
20-
description:
17+
description: ' '
18+
2119
---
2220
# terminal
2321
<CBAPICategory />

docs/api/tokenizer/cb_index.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ cbapicategory:
33
- name: addToken
44
link: addToken
55
description: Adds a token asynchronously.
6+
67
---
78
# tokenizer
89
<CBAPICategory />
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
cbapicategory:
2+
cbapicategory: []
3+
34
---
45
# userMessageListener
56
<CBAPICategory />

docs/api/vectordb/cb_index.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ cbapicategory:
99
- name: queryVectorItem
1010
link: queryVectorItem
1111
description: Queries a vector item from the vector database based on the provided key.
12+
1213
---
1314
# vectordb
1415
<CBAPICategory />
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
cbapicategory:
2+
cbapicategory: []
3+
34
---
45
# waitForConnection
56
<CBAPICategory />

docs/api/websocket/cb_index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
cbapicategory:
2+
cbapicategory: []
3+
34
---
45
# websocket
56
<CBAPICategory />

scripts/jsdoc_to_docusaurus.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,12 @@ function writeToFile(filePath, frontMatterVars){
6363
}
6464

6565
function writeClassIndex(categoryName, indexFilePath, classAllFrontMatters) {
66-
let classIndexContent = '---\ncbapicategory:\n';
67-
68-
classAllFrontMatters.forEach(frontMatter => {
69-
classIndexContent += ` - name: ${frontMatter.data.name}\n link: ${frontMatter.data.name}\n description: ${frontMatter.cbbaseinfo.description}\n`;
70-
});
66+
let classIndexContent = '---\n';
67+
classIndexContent += `${yaml.dump({ cbapicategory: classAllFrontMatters.map(frontMatter => ({
68+
name: frontMatter.data.name,
69+
link: frontMatter.data.name,
70+
description: frontMatter.cbbaseinfo.description
71+
}))})}\n`;
7172
classIndexContent += `---\n# ${categoryName}\n<CBAPICategory />\n`;
7273
fs.writeFileSync(indexFilePath, classIndexContent);
7374
}

0 commit comments

Comments
 (0)