Skip to content

Commit c222dcc

Browse files
changes
1 parent ae6c5f3 commit c222dcc

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codebolt/codeboltjs",
3-
"version": "1.1.23",
3+
"version": "1.1.24",
44
"description": "",
55
"keywords": [],
66
"author": "",

src/modules/codeutils.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import cbws from './websocket';
2+
13
/**
24
* A utility module for working with code.
35
*/
@@ -13,6 +15,20 @@ const cbcodeutils = {
1315
return new Promise((resolve, reject) => {
1416
// Implementation would go here
1517
});
18+
},
19+
getAllFilesAsMarkDown:()=>{
20+
return new Promise((resolve, reject) => {
21+
cbws.getWebsocket.send(JSON.stringify({
22+
"type": "codeEvent",
23+
"action":"getAllFilesMarkdown"
24+
}));
25+
cbws.getWebsocket.on('message', (data: string) => {
26+
const response = JSON.parse(data);
27+
if (response.type === "getAllFilesMarkdownResponse") {
28+
resolve(response.markdown); // Resolve the Promise with the response data
29+
}
30+
});
31+
});
1632
}
1733
};
1834

src/modules/fs.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,11 @@ const cbfs = {
158158
}
159159
});
160160
});
161-
}
161+
},
162+
listFile:(folderPath?:string)=>{
163+
164+
},
165+
162166
};
163167

164168
export default cbfs;

0 commit comments

Comments
 (0)