Commit
·
ed0f702
1
Parent(s):
3ebd805
🔨 Add VSCode config to lint/prettier on save
Browse files- .vscode/settings.json +6 -0
- postcss.config.js +5 -5
- src/lib/Types.ts +10 -12
.vscode/settings.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"editor.formatOnSave": true,
|
| 3 |
+
"editor.codeActionsOnSave": {
|
| 4 |
+
"source.fixAll": true
|
| 5 |
+
}
|
| 6 |
+
}
|
postcss.config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
export default {
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
}
|
|
|
|
| 1 |
export default {
|
| 2 |
+
plugins: {
|
| 3 |
+
tailwindcss: {},
|
| 4 |
+
autoprefixer: {}
|
| 5 |
+
}
|
| 6 |
+
};
|
src/lib/Types.ts
CHANGED
|
@@ -1,22 +1,20 @@
|
|
| 1 |
export type Message =
|
| 2 |
-
| {
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
}
|
| 6 |
-
| {
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
};
|
| 10 |
-
|
| 11 |
|
| 12 |
export interface Token {
|
| 13 |
-
id:
|
| 14 |
-
text:
|
| 15 |
logprob: number;
|
| 16 |
special: boolean;
|
| 17 |
}
|
| 18 |
|
| 19 |
-
|
| 20 |
export interface StreamResponse {
|
| 21 |
/**
|
| 22 |
* Generated token
|
|
|
|
| 1 |
export type Message =
|
| 2 |
+
| {
|
| 3 |
+
from: 'user';
|
| 4 |
+
content: string;
|
| 5 |
+
}
|
| 6 |
+
| {
|
| 7 |
+
from: 'bot';
|
| 8 |
+
content: string;
|
| 9 |
+
};
|
|
|
|
| 10 |
|
| 11 |
export interface Token {
|
| 12 |
+
id: number;
|
| 13 |
+
text: string;
|
| 14 |
logprob: number;
|
| 15 |
special: boolean;
|
| 16 |
}
|
| 17 |
|
|
|
|
| 18 |
export interface StreamResponse {
|
| 19 |
/**
|
| 20 |
* Generated token
|