Skip to content

Commit 52f4b91

Browse files
committed
updated the docs
1 parent ce93c11 commit 52f4b91

19 files changed

+326
-260
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"label": "websocket",
2+
"label": "Api",
33
"position": 2.5,
44
"collapsible": true,
55
"collapsed": true,
66
"className": "red",
77
"link": {
88
"type": "doc",
9-
"id": "cb_index"
9+
"id": "api_index"
1010
}
1111
}

docs/api/api_index.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
cbapicategory:
3+
- name: Browser
4+
link: browser/cb_index
5+
description: The browser module provides functions for interacting with the browser.
6+
- name: Cbstate
7+
link: cbstate/cb_index
8+
description: This is a state module that gives the current state. The state is being continuously updated by the application based on various actions.
9+
- name: Chat
10+
link: chat/cb_index
11+
description: This has various chat related functionalities where the agent can send chat to user and get the user response
12+
- name: CodeParsers
13+
link: codeparsers/cb_index
14+
description: This is a module that parses the code and returns the code tree.
15+
- name: CodeUtils
16+
link: codeutils/cb_index
17+
description: This is a module that provides various utilities for parsing and manipulating code.
18+
- name: Crawler
19+
link: crawler/cb_index
20+
description: This is a module that crawls the web and returns the crawled data.
21+
- name: DbMemory
22+
link: dbmemory/cb_index
23+
description: This is a module that provides memory based database functionalities.
24+
- name: Debug
25+
link: debug/cb_index
26+
description: This is a module that provides various debug functionalities.
27+
- name: DocUtils
28+
link: docutils/cb_index
29+
description: This is a module that provides various utilities for parsing and manipulating markdown.
30+
- name: Fs
31+
link: fs/cb_index
32+
description: This is a module that provides various file system functionalities.
33+
- name: Git
34+
link: git/cb_index
35+
description: This is a module that provides various git functionalities.
36+
- name: Knowledge
37+
link: knowledge/cb_index
38+
description: This is a module that provides various knowledge related functionalities.
39+
- name: LLM
40+
link: llm/cb_index
41+
description: This is a module that provides various LLM related functionalities.
42+
- name: OutputParsers
43+
link: outputparsers/cb_index
44+
description: This is a module that parses the output and returns the output tree.
45+
- name: Project
46+
link: project/cb_index
47+
description: This is a module that provides various project related functionalities.
48+
- name: Rag
49+
link: rag/cb_index
50+
description: This is a module that provides various RAG related functionalities.
51+
- name: Search
52+
link: search/cb_index
53+
description: This is a module that provides various search related functionalities.
54+
- name: TaskPlanner
55+
link: taskplaner/cb_index
56+
description: This is a module that provides various task planner related functionalities.
57+
- name: Terminal
58+
link: terminal/cb_index
59+
description: Handle Terminal Related Functionalities like Running Commands and Getting Output. Supports handling multiple terminals and long running code executions like Servers.
60+
- name: Tokenizer
61+
link: tokenizer/cb_index
62+
description: Tokenization related Functionalities are provided so that the code can be tokenized and the tokens can be used to perform and measure various operations.
63+
- name: VectorDB
64+
link: vectordb/cb_index
65+
description: Provides Vector DB related Functionalities for Storing and Managing of Vector Embedding
66+
67+
---
68+
# Codebolt AI Agent Framework API
69+
70+
## Overview
71+
72+
<CBAPICategory />

docs/api/browser/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"label": "browser",
2+
"label": "Browser",
33
"position": 2.5,
44
"collapsible": true,
55
"collapsed": true,

docs/api/browser/cb_index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# browser
1+
# Browser
2+
23
- [click](click.md) - Clicks on a specified element on the page.
34
- [close](close.md) - Closes the current page.
45
- [enter](enter.md) - Simulates the Enter key press on the current page.

docs/api/constructor/_category_.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/api/constructor/cb_index.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/api/start_browser/_category_.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/api/start_browser/cb_index.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/api/userMessageListener/_category_.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/api/userMessageListener/cb_index.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/api/waitForConnection/_category_.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/api/waitForConnection/cb_index.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/api/websocket/cb_index.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

scripts/jsdoc_to_docusaurus.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,26 @@ function writeClassIndex(categoryName, indexFilePath, classAllFrontMatters) {
7171
fs.writeFileSync(indexFilePath, classIndexContent);
7272
}
7373

74+
// function writeAPIIndex(){
75+
76+
// }
77+
78+
// let allClasses = [];
79+
// let classDetails = {
80+
// "name": " ",
81+
// "description": " ",
82+
// "link": " "
83+
// };
7484

7585

7686
if (codeboltChild && codeboltChild.children) {
7787
codeboltChild.children.forEach(CbProperties => {
88+
89+
// classDetails.name = CbProperties.name;
90+
// classDetails.description = CbProperties.comment && CbProperties.comment.summary && CbProperties.comment.summary.length > 0 ? CbProperties.comment.summary[0].text : ' ';
91+
// classDetails.link = `${CbProperties.name}`;
92+
93+
7894
const dir = `../docs/api/${CbProperties.name}`;
7995

8096
let classAllFrontMatters = [];

src/components/CBAPICategory.jsx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* This is a custom Front Matter Component that takes the front matter and renders the api data
3+
*/
4+
import React from "react";
5+
import useFrontMatter from "./useFrontMatter";
6+
7+
const CBAPICategory = () => {
8+
const frontMatter = useFrontMatter();
9+
console.log(frontMatter)
10+
console.log(Object.entries(frontMatter))
11+
return (
12+
<div>
13+
{Object.entries(frontMatter).map(([key, value]) => {
14+
console.log(key)
15+
if (key === "cbapicategory") {
16+
console.log(value);
17+
return (
18+
<ul>
19+
{value.map((item, index) => (
20+
<li key={index}>
21+
<a href={item.link}>{item.name}</a> - {item.description}
22+
</li>
23+
))}
24+
</ul>
25+
);
26+
}
27+
28+
return null;
29+
})}
30+
</div>
31+
);
32+
};
33+
34+
export default CBAPICategory;

src/components/CBBaseInfo.jsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,13 @@ import useFrontMatter from "./useFrontMatter";
66

77
const CBBaseInfo = () => {
88
const frontMatter = useFrontMatter();
9-
console.log(frontMatter);
109
return (
1110
<div>
1211
{Object.entries(frontMatter).map(([key, value]) => {
1312
if (key === "cbbaseinfo") {
1413
console.log(`Key: ${key}, Value: ${value}`);
1514

1615
return <div className="description" key={key}>Description: {value.description}</div>;
17-
// return Object.entries(value).map(([cbkey, cbvalue]) => {
18-
// console.log(cbkey);
19-
// return (
20-
// <p key={cbkey}>
21-
// <strong>{cbkey}</strong>
22-
// <br/>
23-
// </p>
24-
// );
25-
// });
2616
}
2717

2818
return null;

src/components/CBProvider.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ import React from 'react';
66
import {MDXProvider} from '@mdx-js/react';
77
import CBBaseInfo from './CBBaseInfo';
88
import CBParameters from './CBParameters';
9+
import CBAPICategory from './CBAPICategory';
910
import FrontMatterContext from './FrontMatterContext';
1011

1112

1213
const components = {
1314
CBBaseInfo: props => <CBBaseInfo {...props} />,
14-
CBParameters: props => <CBParameters {...props} />
15+
CBParameters: props => <CBParameters {...props} />,
16+
CBAPICategory: props => <CBAPICategory {...props} />
1517
};
1618

1719
const CBProvider = ({children, frontMatter}) => (

0 commit comments

Comments
 (0)