Skip to content

Commit dd201e3

Browse files
committed
initial version
1 parent d21a63f commit dd201e3

File tree

12 files changed

+1652
-0
lines changed

12 files changed

+1652
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
custom/node_modules
3+
dist

ChangeLog.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## [1.0.18] - 2024-12-26
2+
3+
### Improved
4+
5+
- COmpatibility with latest AdminForth, remove dependency of hook types
6+
7+
## [1.0.17] - 2024-12-06
8+
9+
### Added
10+
11+
- Reworked completion for adapter
12+
13+
## [1.0.12] - 2021-10-07
14+
15+
### Added
16+
17+
- Rate limiting for openai requests support

custom/async-queue.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
3+
export default class AsyncQueue {
4+
queue: (() => Promise<any>)[];
5+
processing: boolean;
6+
7+
constructor() {
8+
this.queue = [];
9+
this.processing = false;
10+
}
11+
12+
async add(task: () => Promise<any>) {
13+
this.queue.push(task);
14+
if (!this.processing) {
15+
this.process();
16+
}
17+
}
18+
19+
async process() {
20+
this.processing = true;
21+
while (this.queue.length > 0) {
22+
const task = this.queue.shift()!;
23+
try {
24+
await task();
25+
} catch (error) {
26+
console.error('Task encountered an error:', error);
27+
}
28+
}
29+
this.processing = false;
30+
}
31+
}

custom/package-lock.json

Lines changed: 74 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

custom/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "custom",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"keywords": [],
10+
"author": "",
11+
"license": "ISC",
12+
"dependencies": {
13+
"quill": "^2.0.2"
14+
}
15+
}

0 commit comments

Comments
 (0)