omnibot3000 1.9.8 → 1.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.husky/pre-commit CHANGED
@@ -1 +1 @@
1
- pnpm lint && pnpm prettify && .codacy/cli.sh analyze ./src
1
+ pnpm lint && pnpm prettify
@@ -0,0 +1,12 @@
1
+ {
2
+ "extends": "stylelint-config-standard",
3
+ "rules": {
4
+ "selector-class-pattern": [
5
+ "^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
6
+ {
7
+ "message": "expect class selector to be kebab-case"
8
+ }
9
+ ]
10
+ },
11
+ "ignoreFiles": ["node_modules/**", "dist/**"]
12
+ }
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- ## OMNIBOT 3000
1
+ # OMNIBOT 3000
2
2
 
3
- YOUR OMNISCIENT SOURCE OF TRUTH
3
+ ## YOUR OMNISCIENT SOURCE OF TRUTH
4
4
 
5
5
  ![image](https://github.com/user-attachments/assets/f3c88ab8-4c8c-4056-8d82-9cfb3fbe023e)
6
6
 
@@ -35,7 +35,7 @@ OPENAI_API_KEY=<your_openai_api_key>
35
35
 
36
36
  ### Package
37
37
 
38
- https://www.npmjs.com/package/omnibot3000
38
+ <https://www.npmjs.com/package/omnibot3000>
39
39
 
40
40
  ### Contributing
41
41
 
package/api/server.ts CHANGED
@@ -1,9 +1,10 @@
1
- import {exec} from "child_process";
1
+ import {execSync} from "child_process";
2
2
  import {
3
3
  accessSync,
4
4
  constants as FS,
5
5
  Dirent,
6
6
  readdirSync,
7
+ realpathSync,
7
8
  statSync,
8
9
  writeFileSync,
9
10
  } from "fs";
@@ -12,13 +13,9 @@ import path from "path";
12
13
 
13
14
  import "dotenv/config";
14
15
  import {Mistral} from "@mistralai/mistralai";
15
- import type {
16
- ChatCompletionRequest,
17
- CompletionEvent,
18
- } from "@mistralai/mistralai/models/components";
19
16
  import OpenAI from "openai";
20
17
  import type {ChatCompletionCreateParamsNonStreaming} from "openai/resources/chat/completions";
21
- import type {ChatCompletionChunk} from "openai/resources/index.mjs";
18
+ import type {ChatCompletionChunk} from "openai/resources/chat/completions/completions";
22
19
  import type {Stream} from "openai/streaming";
23
20
 
24
21
  type Package = {
@@ -35,11 +32,14 @@ const JSON_PATH = path.join(BASE_PATH, "dist", "packages.json");
35
32
 
36
33
  type Provider = "openai" | "mistral";
37
34
 
38
- export const MODEL: Provider = "openai";
35
+ export const MODEL: Provider = "openai" as Provider;
39
36
  const MAX_TOKENS = 1000;
40
37
 
41
38
  type OpenAIConfig = Omit<ChatCompletionCreateParamsNonStreaming, "messages">;
42
- type MistralConfig = Omit<ChatCompletionRequest, "messages">;
39
+ type MistralConfig = Omit<
40
+ Parameters<Mistral["chat"]["complete"]>[0],
41
+ "messages"
42
+ >;
43
43
 
44
44
  export const API_CONFIG = {
45
45
  openai: {
@@ -58,21 +58,24 @@ export const API_CONFIG = {
58
58
  topP: 0.1 /* nucleus sampling */,
59
59
  frequencyPenalty: 1.0 /* avoid repetition */,
60
60
  presencePenalty: 1.0 /* encourage new topics */,
61
- maxTokens: MAX_TOKENS,
61
+ maxTokens: MAX_TOKENS + 500,
62
62
  randomSeed: Math.round(Math.random() * 1e9),
63
63
  } satisfies MistralConfig,
64
64
  };
65
65
 
66
66
  const getFolderSize = (folder: string): number => {
67
+ const resolved = path.resolve(folder);
68
+ if (!resolved.startsWith(BASE_PATH)) return 0;
67
69
  let total = 0;
68
70
  try {
69
- accessSync(folder, FS.R_OK);
71
+ accessSync(resolved, FS.R_OK);
70
72
  } catch {
71
73
  return total;
72
74
  }
73
- const files: Dirent[] = readdirSync(folder, {withFileTypes: true});
75
+ const files: Dirent[] = readdirSync(resolved, {withFileTypes: true});
74
76
  for (const file of files) {
75
- const fullPath = path.join(folder, file.name);
77
+ const fullPath = path.resolve(resolved, file.name);
78
+ if (!fullPath.startsWith(BASE_PATH)) continue;
76
79
  if (file.isDirectory()) total += getFolderSize(fullPath);
77
80
  else total += statSync(fullPath).size;
78
81
  }
@@ -153,7 +156,7 @@ const server = createServer((req: IncomingMessage, res: ServerResponse) => {
153
156
  messages,
154
157
  });
155
158
  /* forward chunks to browser as SSE */
156
- for await (const chunk of response as AsyncIterable<CompletionEvent>) {
159
+ for await (const chunk of response) {
157
160
  res.write(`data: ${JSON.stringify(chunk)}\n\n`);
158
161
  }
159
162
  /* end the SSE stream */
@@ -199,29 +202,37 @@ const server = createServer((req: IncomingMessage, res: ServerResponse) => {
199
202
  res.writeHead(200, {"Content-Type": "application/json"});
200
203
  res.end(JSON.stringify(config));
201
204
  } else if (url.startsWith(`${API_PATH}/packages`)) {
202
- exec("npm list --json --depth=0 --prod --silent", (err, stdout) => {
203
- if (err) {
204
- const error = err instanceof Error ? err.message : "unknown error";
205
- res.writeHead(500, {"Content-Type": "application/json"});
206
- res.end(JSON.stringify({error}));
207
- return;
208
- }
205
+ try {
206
+ const stdout = execSync("npm list --json --depth=0 --prod --silent", {
207
+ encoding: "utf8",
208
+ });
209
209
  const json = JSON.parse(stdout);
210
210
  const data = json?.dependencies || {};
211
211
  const list = Object.keys(data)
212
212
  .map((key) => {
213
- const dir = data[key].resolved.replace("file:", "");
213
+ const modulePath = path.join(BASE_PATH, "node_modules", key);
214
+ let resolvedPath;
215
+ try {
216
+ resolvedPath = realpathSync(modulePath);
217
+ } catch {
218
+ resolvedPath = modulePath;
219
+ }
220
+
214
221
  return {
215
222
  name: key,
216
223
  version: data[key].version.split(".") as Package["version"],
217
- size: getFolderSize(path.join(BASE_PATH, "node_modules", dir)),
224
+ size: getFolderSize(resolvedPath),
218
225
  };
219
226
  })
220
227
  .sort((a, b) => (a.name < b.name ? -1 : 1));
221
228
  res.writeHead(200, {"Content-Type": "application/json"});
222
229
  res.end(JSON.stringify(list));
223
230
  writeFileSync(JSON_PATH, JSON.stringify(list, null, 2));
224
- });
231
+ } catch (error) {
232
+ const message = error instanceof Error ? error.message : "unknown error";
233
+ res.writeHead(500, {"Content-Type": "application/json"});
234
+ res.end(JSON.stringify({error: message}));
235
+ }
225
236
  } else {
226
237
  res.writeHead(404);
227
238
  res.end("nothing to see here");
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "x-display-name": "OMNIBOT 3000",
4
4
  "description": "your omniscient source of truth",
5
5
  "private": false,
6
- "version": "1.9.8",
6
+ "version": "1.9.9",
7
7
  "type": "module",
8
8
  "author": {
9
9
  "name": "rez",
@@ -19,38 +19,39 @@
19
19
  "omnibot": "./bin/omnibot.js"
20
20
  },
21
21
  "dependencies": {
22
+ "@mistralai/mistralai": "^2.1.2",
22
23
  "dotenv": "^17.3.1",
23
- "openai": "^6.29.0",
24
+ "openai": "^6.32.0",
24
25
  "react": "^19.2.4",
25
26
  "react-dom": "^19.2.4",
26
27
  "react-markdown": "^10.1.0",
27
- "react-router-dom": "^7.13.1",
28
- "zustand": "^5.0.11"
28
+ "react-router-dom": "^7.13.2",
29
+ "zustand": "^5.0.12"
29
30
  },
30
31
  "devDependencies": {
31
32
  "@eslint/js": "^10.0.1",
32
- "@mistralai/mistralai": "^1.15.1",
33
33
  "@types/node": "^25.5.0",
34
34
  "@types/react": "^19.2.14",
35
35
  "@types/react-dom": "^19.2.3",
36
36
  "@vitejs/plugin-react": "^6.0.1",
37
37
  "classnames": "^2.5.1",
38
- "eslint": "^10.0.3",
38
+ "eslint": "^10.1.0",
39
39
  "eslint-plugin-import": "^2.32.0",
40
40
  "eslint-plugin-react-hooks": "^7.0.1",
41
41
  "eslint-plugin-react-refresh": "^0.5.2",
42
42
  "eslint-plugin-simple-import-sort": "^12.1.1",
43
43
  "globals": "^17.4.0",
44
44
  "husky": "^9.1.7",
45
- "knip": "^5.86.0",
45
+ "knip": "^6.0.3",
46
46
  "nodemon": "^3.1.14",
47
47
  "npm-run-all": "^4.1.5",
48
48
  "prettier": "^3.8.1",
49
49
  "react-refresh": "^0.18.0",
50
- "typescript": "^5.9.3",
51
- "typescript-eslint": "^8.57.0",
52
- "vite": "^8.0.0",
53
- "vite-tsconfig-paths": "^6.1.1"
50
+ "stylelint": "^17.5.0",
51
+ "stylelint-config-standard": "^40.0.0",
52
+ "typescript": "^6.0.2",
53
+ "typescript-eslint": "^8.57.2",
54
+ "vite": "^8.0.2"
54
55
  },
55
56
  "scripts": {
56
57
  "start": "pnpm run-p start:dev start:api",
@@ -64,6 +65,7 @@
64
65
  "build:client": "tsc -b && vite build",
65
66
  "build:api": "tsc --project tsconfig.api.json",
66
67
  "lint": "eslint --fix .",
68
+ "lint:css": "stylelint --fix 'src/**/*.css'",
67
69
  "lint:deps": "knip --dependencies",
68
70
  "prettify": "prettier --write ."
69
71
  }
@@ -26,22 +26,22 @@
26
26
  ),
27
27
  linear-gradient(
28
28
  30deg,
29
- hsla(calc(var(--h) - 90) 30% 30% / var(--opacity-background)) 0%,
30
- hsla(calc(var(--h) - 45) 50% 20% / var(--opacity-background)) 25%,
31
- hsla(calc(var(--h) + 0) 70% 10% / var(--opacity-background)) 50%,
32
- hsla(calc(var(--h) + 45) 50% 20% / var(--opacity-background)) 75%,
33
- hsla(calc(var(--h) + 90) 30% 30% / var(--opacity-background)) 100%
29
+ hsl(calc(var(--h) - 90) 30% 30% / var(--opacity-background)) 0%,
30
+ hsl(calc(var(--h) - 45) 50% 20% / var(--opacity-background)) 25%,
31
+ hsl(calc(var(--h) + 0) 70% 10% / var(--opacity-background)) 50%,
32
+ hsl(calc(var(--h) + 45) 50% 20% / var(--opacity-background)) 75%,
33
+ hsl(calc(var(--h) + 90) 30% 30% / var(--opacity-background)) 100%
34
34
  ),
35
35
  radial-gradient(
36
36
  circle,
37
- hsla(calc(var(--h) - 270) 30% 30% / var(--opacity-background)) 0%,
38
- hsla(calc(var(--h) - 180) 30% 30% / var(--opacity-background)) 100%
37
+ hsl(calc(var(--h) - 270) 30% 30% / var(--opacity-background)) 0%,
38
+ hsl(calc(var(--h) - 180) 30% 30% / var(--opacity-background)) 100%
39
39
  ),
40
40
  radial-gradient(
41
41
  circle,
42
- hsla(0 100% 100% / 0.0125) 0%,
43
- hsla(0 0% 0% / 0.25) 80%,
44
- hsla(0 0% 0% / 0.5) 100%
42
+ hsl(0deg 100% 100% / 1.25%) 0%,
43
+ hsl(0deg 0% 0% / 25%) 80%,
44
+ hsl(0deg 0% 0% / 50%) 100%
45
45
  );
46
46
  animation: fade-tty var(--duration-fade) linear;
47
47
  }
@@ -59,15 +59,15 @@
59
59
  animation: fade-tty var(--duration-fade) linear;
60
60
  background-image: repeating-linear-gradient(
61
61
  0deg,
62
- #0000 0rem,
63
- hsla(0 0% 0% / 0.3) 0.02rem,
64
- hsla(0 0% 0% / 0.3) 0.12rem,
62
+ #0000 0,
63
+ hsl(0deg 0% 0% / 30%) 0.02rem,
64
+ hsl(0deg 0% 0% / 30%) 0.12rem,
65
65
  #0000 0.14rem,
66
66
  #0000 0.2rem
67
67
  );
68
68
  background-size: 100%, 100%;
69
69
  background-repeat: no-repeat, repeat;
70
- background-position: 0rem -0.0333rem;
70
+ background-position: 0 -0.0333rem;
71
71
  background-blend-mode: overlay;
72
72
  }
73
73
 
@@ -119,9 +119,11 @@
119
119
  0% {
120
120
  opacity: 0;
121
121
  }
122
+
122
123
  20% {
123
124
  opacity: 0;
124
125
  }
126
+
125
127
  100% {
126
128
  opacity: 1;
127
129
  }
package/src/Error.tsx CHANGED
@@ -27,7 +27,7 @@ export class ErrorBoundary extends React.Component<Props, State> {
27
27
  }
28
28
 
29
29
  componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {
30
- console.error(`YOU DECEIVED ${NAME}`, error, errorInfo);
30
+ console.error("YOU DECEIVED %s", NAME, error, errorInfo);
31
31
  }
32
32
 
33
33
  render() {
@@ -1,41 +1,51 @@
1
1
  .root {
2
2
  display: flex;
3
3
  flex-direction: column;
4
- word-break: break-word;
4
+ overflow-wrap: break-word;
5
5
  opacity: var(--opacity-secondary);
6
+
6
7
  p {
7
8
  display: inline-block;
8
9
  padding-bottom: var(--line-height);
10
+
9
11
  em {
10
12
  opacity: var(--opacity-primary);
11
13
  color: var(--color-highlight);
12
14
  }
15
+
13
16
  a {
14
17
  opacity: var(--opacity-primary);
15
18
  color: var(--color-highlight);
16
19
  }
17
20
  }
21
+
18
22
  ul {
19
23
  list-style-position: outside;
20
24
  margin-left: calc(var(--tab-size) * var(--font-width));
21
25
  }
26
+
22
27
  ul > :last-child {
23
28
  padding-bottom: 0 !important;
24
29
  }
30
+
25
31
  ol {
26
32
  list-style-position: outside;
27
33
  padding-left: calc(var(--tab-size) * var(--font-width));
28
34
  margin-left: calc(var(--tab-size) * var(--font-width));
29
35
  }
36
+
30
37
  ol > :last-child {
31
38
  padding-bottom: 0 !important;
32
39
  }
40
+
33
41
  li {
34
42
  padding-bottom: var(--line-height);
43
+
35
44
  p {
36
45
  padding-bottom: 0 !important;
37
46
  }
38
47
  }
48
+
39
49
  li > :last-child {
40
50
  margin-bottom: 0;
41
51
  }
@@ -44,7 +54,8 @@
44
54
  .hr {
45
55
  margin: 0;
46
56
  padding: 0;
47
- /*padding-bottom: var(--line-height);*/
57
+
58
+ /* padding-bottom: var(--line-height); */
48
59
  opacity: var(--opacity-tertiary);
49
60
  }
50
61
 
@@ -1,5 +1,5 @@
1
1
  .root {
2
- display: relative;
2
+ position: relative;
3
3
  width: 100%;
4
4
  height: 100%;
5
5
  opacity: var(--opacity-ghosting);
@@ -8,7 +8,7 @@
8
8
 
9
9
  .board {
10
10
  position: absolute;
11
- word-wrap: break-word;
11
+ overflow-wrap: break-word;
12
12
  white-space: pre-wrap;
13
13
  opacity: 0;
14
14
  }
@@ -30,6 +30,7 @@
30
30
  from {
31
31
  opacity: 0;
32
32
  }
33
+
33
34
  to {
34
35
  opacity: 1;
35
36
  }
@@ -43,6 +44,7 @@
43
44
  from {
44
45
  opacity: 1;
45
46
  }
47
+
46
48
  to {
47
49
  opacity: 0;
48
50
  }
@@ -22,6 +22,7 @@
22
22
  from {
23
23
  opacity: 0;
24
24
  }
25
+
25
26
  to {
26
27
  opacity: 1;
27
28
  }
@@ -1,8 +1,7 @@
1
1
  .root {
2
2
  width: 100%;
3
3
  height: 100%;
4
- overflow-x: hidden;
5
- overflow-y: auto;
4
+ overflow: hidden auto;
6
5
  outline: none;
7
6
  scroll-snap-type: both mandatory;
8
7
  }
@@ -41,6 +40,7 @@
41
40
  opacity: var(--opacity-secondary);
42
41
  visibility: hidden;
43
42
  list-style-type: none;
43
+
44
44
  li {
45
45
  scroll-snap-align: start;
46
46
  }
@@ -1,9 +1,8 @@
1
1
  .root {
2
2
  display: flex;
3
- flex-direction: row;
3
+ flex-flow: row wrap;
4
4
  flex-grow: 0;
5
5
  flex-shrink: 0;
6
- flex-wrap: wrap;
7
6
  column-gap: var(--font-width);
8
7
  align-items: start;
9
8
  align-self: stretch;
@@ -31,6 +30,7 @@
31
30
  b {
32
31
  opacity: var(--opacity-primary);
33
32
  }
33
+
34
34
  i {
35
35
  opacity: var(--opacity-secondary);
36
36
  }
@@ -40,6 +40,7 @@
40
40
  0% {
41
41
  opacity: 0;
42
42
  }
43
+
43
44
  100% {
44
45
  opacity: 1;
45
46
  }
@@ -11,8 +11,7 @@
11
11
 
12
12
  .container {
13
13
  display: flex;
14
- flex-direction: row;
15
- flex-wrap: wrap;
14
+ flex-flow: row wrap;
16
15
  column-gap: var(--font-width);
17
16
  height: fit-content;
18
17
  }
@@ -44,8 +43,7 @@
44
43
 
45
44
  .avatar {
46
45
  display: flex;
47
- flex: row;
48
- flex-wrap: nowrap;
46
+ flex-flow: row nowrap;
49
47
  column-gap: var(--font-width);
50
48
  align-items: flex-start;
51
49
  opacity: 0;
@@ -69,6 +67,7 @@
69
67
  from {
70
68
  opacity: 0;
71
69
  }
70
+
72
71
  to {
73
72
  opacity: 1;
74
73
  }
@@ -30,6 +30,7 @@
30
30
  b {
31
31
  opacity: var(--opacity-primary);
32
32
  }
33
+
33
34
  i {
34
35
  opacity: var(--opacity-secondary);
35
36
  }
@@ -12,9 +12,7 @@
12
12
 
13
13
  .debug * {
14
14
  border-radius: 0.125rem;
15
- outline-style: dashed !important;
16
- outline-width: 0.125rem !important;
17
- outline-color: var(--color-rainbow-1) !important;
15
+ outline: var(--color-rainbow-1) dashed 0.125rem !important;
18
16
  outline-offset: 0.25rem;
19
17
  visibility: visible !important;
20
18
  }
@@ -39,23 +37,23 @@
39
37
  outline-color: var(--color-rainbow-6) !important;
40
38
  }
41
39
 
42
- .debug * > * > * > * > * > * {
40
+ .debug * > * > * > * > * > * > * {
43
41
  outline-color: var(--color-rainbow-7) !important;
44
42
  }
45
43
 
46
- .debug * > * > * > * > * > * > * {
44
+ .debug * > * > * > * > * > * > * > * {
47
45
  outline-color: var(--color-rainbow-8) !important;
48
46
  }
49
47
 
50
- .debug * > * > * > * > * > * > * > * {
48
+ .debug * > * > * > * > * > * > * > * > * {
51
49
  outline-color: var(--color-rainbow-1) !important;
52
50
  }
53
51
 
54
- .debug * > * > * > * > * > * > * > * > * {
52
+ .debug * > * > * > * > * > * > * > * > * > * {
55
53
  outline-color: var(--color-rainbow-2) !important;
56
54
  }
57
55
 
58
- .debug * > * > * > * > * > * > * > * > * > * {
56
+ .debug * > * > * > * > * > * > * > * > * > * > * {
59
57
  outline-color: var(--color-rainbow-3) !important;
60
58
  }
61
59
 
@@ -71,8 +69,8 @@
71
69
  background-color: #000;
72
70
  border-radius: 0.25rem;
73
71
  box-shadow:
74
- 0rem 0rem 0.125rem #000,
75
- 0rem 0rem 0.25rem #000,
76
- 0rem 0rem 0.5rem #000;
72
+ 0 0 0.125rem #000,
73
+ 0 0 0.25rem #000,
74
+ 0 0 0.5rem #000;
77
75
  z-index: var(--z-index-debug);
78
76
  }
@@ -2,6 +2,7 @@
2
2
  /* constants */
3
3
  --base-size: 15; /* default font size */
4
4
  --base-height: 2; /* default line height */
5
+
5
6
  /* global variables */
6
7
  --font-width: 1rem;
7
8
  --font-height: 2rem;
@@ -18,29 +19,35 @@
18
19
  --opacity-tertiary: 0.5;
19
20
  --opacity-ghosting: 0.25;
20
21
  --opacity-background: 0.15;
22
+
21
23
  /* layout variables */
22
24
  --menu-width: 20;
23
25
  --content-width: 48;
26
+
24
27
  /* game of life variables */
25
28
  --lifespan: 750; /* lifespan of lifeforms in ms */
29
+
26
30
  /* colors */
27
31
  --h: 150; /* amber:30 | yellow: 90 | green:120 | blue:180 */
28
32
  --s: 33.333; /* saturation */
29
33
  --l: 66.666; /* lightness */
30
- --color-primary: hsla(var(--h) var(--s) var(--l) / 0.7);
31
- --color-secondary: hsla(var(--h) var(--s) var(--l) / 0.5);
32
- --color-tertiary: hsla(var(--h) var(--s) var(--l) / 0.3);
33
- --color-background: hsla(var(--h) var(--s) var(--l) / 0.15);
34
- --color-highlight: hsla(var(--h) calc(var(--s) * 1.2) calc(var(--l) * 1.2));
35
- --color-scrollbar: hsla(var(--h) var(--s) var(--l) / 0.125);
34
+ --color-primary: hsl(var(--h) var(--s) var(--l) / 70%);
35
+ --color-secondary: hsl(var(--h) var(--s) var(--l) / 50%);
36
+ --color-tertiary: hsl(var(--h) var(--s) var(--l) / 30%);
37
+ --color-background: hsl(var(--h) var(--s) var(--l) / 15%);
38
+ --color-highlight: hsl(var(--h) calc(var(--s) * 1.2) calc(var(--l) * 1.2));
39
+ --color-scrollbar: hsl(var(--h) var(--s) var(--l) / 12.5%);
40
+
36
41
  /* duration */
37
42
  --duration-transition: 375ms;
38
43
  --duration-fade: 750ms;
39
- --duration-lifespan: calc(var(--lifespan) * 1ms + 5ms);
44
+ --duration-lifespan: calc((var(--lifespan) + 5) * 1ms);
45
+
40
46
  /* z-index */
41
47
  --z-index-background: 1;
42
48
  --z-index-screen: 2;
43
49
  --z-index-debug: 3;
50
+
44
51
  /* global settings */
45
52
  user-select: none;
46
53
  -webkit-user-drag: none;
@@ -48,28 +55,31 @@
48
55
  font-size: var(--font-size);
49
56
  line-height: var(--line-height);
50
57
  font-weight: var(--font-weight);
51
- ::selection {
52
- background-color: var(--color-background);
53
- color: var(--color-highlight);
54
- }
55
- ::-webkit-scrollbar {
56
- background-color: transparent;
57
- width: var(--scrollbar-size);
58
- height: var(--scrollbar-size);
59
- }
60
- ::-webkit-scrollbar-thumb {
61
- background-image: repeating-linear-gradient(
62
- 0deg,
63
- #0000 0rem,
64
- var(--color-scrollbar) 0.02rem,
65
- var(--color-scrollbar) 0.12rem,
66
- #0000 0.14rem,
67
- #0000 0.2rem
68
- );
69
- background-size: 0.8rem, 100%;
70
- background-repeat: no-repeat, repeat;
71
- background-position-y: 0.12rem;
72
- }
58
+ }
59
+
60
+ ::selection {
61
+ background-color: var(--color-background);
62
+ color: var(--color-highlight);
63
+ }
64
+
65
+ ::-webkit-scrollbar {
66
+ background-color: transparent;
67
+ width: var(--scrollbar-size);
68
+ height: var(--scrollbar-size);
69
+ }
70
+
71
+ ::-webkit-scrollbar-thumb {
72
+ background-image: repeating-linear-gradient(
73
+ 0deg,
74
+ #0000 0,
75
+ var(--color-scrollbar) 0.02rem,
76
+ var(--color-scrollbar) 0.12rem,
77
+ #0000 0.14rem,
78
+ #0000 0.2rem
79
+ );
80
+ background-size: 0.8rem, 100%;
81
+ background-repeat: no-repeat, repeat;
82
+ background-position-y: 0.12rem;
73
83
  }
74
84
 
75
85
  html {
@@ -135,9 +145,11 @@ ol {
135
145
  padding: 0;
136
146
  margin-bottom: var(--line-height);
137
147
  list-style-position: outside;
148
+
138
149
  p {
139
150
  display: block !important;
140
151
  }
152
+
141
153
  ::marker {
142
154
  color: var(--color-primary);
143
155
  }
@@ -174,6 +186,7 @@ blockquote {
174
186
  padding: 0;
175
187
  padding-left: var(--padding);
176
188
  color: var(--color-highlight);
189
+
177
190
  p {
178
191
  margin: 0 !important;
179
192
  padding: 0 !important;
@@ -8,7 +8,6 @@
8
8
  .ascii {
9
9
  color: var(--color-primary);
10
10
  font-family: "VT220", monospace;
11
- font-display: swap;
12
11
  font-style: normal;
13
12
  font-kerning: none;
14
13
  font-variant: no-common-ligatures tabular-nums;
@@ -20,17 +19,17 @@
20
19
  tab-size: var(--tab-size);
21
20
  text-shadow:
22
21
  -0.75rem -0.01rem 0.4rem var(--color-background),
23
- -0.625rem 0rem 0.3rem var(--color-background),
22
+ -0.625rem 0 0.3rem var(--color-background),
24
23
  -0.5rem 0.01rem 0.2rem var(--color-background),
25
- -0.02rem 0rem 0.4rem var(--color-secondary),
26
- -0.01rem 0rem 0.2rem var(--color-secondary),
27
- 0rem 0rem 0.1rem var(--color-primary),
24
+ -0.02rem 0 0.4rem var(--color-secondary),
25
+ -0.01rem 0 0.2rem var(--color-secondary),
26
+ 0 0 0.1rem var(--color-primary),
28
27
  0.3rem -0.02rem 0.2rem var(--color-tertiary),
29
- 0rem 0rem 0.5rem var(--color-tertiary),
30
- 0rem 0rem 0.05rem #000,
28
+ 0 0 0.5rem var(--color-tertiary),
29
+ 0 0 0.05rem #000,
31
30
  0.2rem 0.02rem 0.1rem #000,
32
31
  0.2rem 0.1rem 0.3rem #000,
33
- 0rem 0rem 0.5rem var(--color-secondary);
32
+ 0 0 0.5rem var(--color-secondary);
34
33
  -webkit-font-smoothing: antialiased;
35
34
  -moz-osx-font-smoothing: grayscale;
36
35
  }
@@ -13,9 +13,10 @@
13
13
  height: var(--line-height);
14
14
  min-height: var(--line-height);
15
15
  }
16
+
16
17
  .border {
17
18
  user-select: none;
18
- word-wrap: break-word;
19
+ overflow-wrap: break-word;
19
20
  overflow: hidden;
20
21
  cursor: default;
21
22
  opacity: var(--opacity-secondary);
@@ -4,7 +4,7 @@
4
4
  width: 100%;
5
5
  height: var(--line-height);
6
6
  user-select: none;
7
- word-wrap: break-word;
7
+ overflow-wrap: break-word;
8
8
  cursor: default;
9
9
  }
10
10
 
@@ -12,6 +12,7 @@
12
12
  b {
13
13
  opacity: var(--opacity-secondary);
14
14
  }
15
+
15
16
  i {
16
17
  opacity: var(--opacity-tertiary);
17
18
  }
@@ -21,6 +22,7 @@
21
22
  b {
22
23
  opacity: var(--opacity-primary);
23
24
  }
25
+
24
26
  i {
25
27
  opacity: var(--opacity-secondary);
26
28
  }
@@ -4,9 +4,9 @@
4
4
  margin-right: calc(var(--font-width) - var(--scrollbar-size));
5
5
  width: 100%;
6
6
  height: 100%;
7
- overflow-x: hidden;
8
- overflow-y: scroll;
7
+ overflow: hidden scroll;
9
8
  scroll-snap-type: both mandatory;
9
+
10
10
  li {
11
11
  list-style-type: none;
12
12
  scroll-snap-align: start;
@@ -9,6 +9,7 @@
9
9
 
10
10
  .body {
11
11
  color: var(--color-tertiary);
12
+
12
13
  b {
13
14
  color: var(--color-primary);
14
15
  }
@@ -69,12 +69,10 @@ const Version = () => {
69
69
  <Caret></Caret>
70
70
  ) : (
71
71
  response.map((pkg, i) => (
72
- <>
73
- <div key={i}>
74
- <b>{pkg.name}</b> version <b>{pkg.version.join(".")}</b>
75
- </div>
72
+ <div key={i}>
73
+ <b>{pkg.name}</b> version <b>{pkg.version.join(".")}</b>
76
74
  <ProgressBar value={pkg.size} unit="byte" max={totalSize} />
77
- </>
75
+ </div>
78
76
  ))
79
77
  )}
80
78
  </div>
package/tsconfig.api.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "target": "ES2022",
4
- "module": "ESNext",
5
- "moduleResolution": "node",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
6
6
  "esModuleInterop": true,
7
7
  "skipLibCheck": true,
8
8
  /* linting */
package/tsconfig.json CHANGED
@@ -21,26 +21,25 @@
21
21
  /* paths */
22
22
  "rootDir": "./",
23
23
  "outDir": "./dist/",
24
- "baseUrl": "./src/",
25
24
  "paths": {
26
- "@/*": ["*"],
27
- "@root/*": ["../*"],
28
- "@commons/*": ["commons/*"],
29
- "@api/*": ["commons/api/*"],
30
- "@hooks/*": ["commons/hooks/*"],
31
- "@layout/*": ["commons/layout/*"],
32
- "@styles/*": ["commons/styles/*"],
33
- "@ui/*": ["commons/ui/*"],
34
- "@utils/*": ["commons/utils/*"],
35
- "@chat/*": ["features/chat/*"],
36
- "@cli/*": ["features/cli/*"],
37
- "@console/*": ["features/console/*"],
38
- "@help/*": ["features/help/*"],
39
- "@history/*": ["features/history/*"],
40
- "@home/*": ["features/home/*"],
41
- "@life/*": ["features/life/*"],
42
- "@version/*": ["features/version/*"],
43
- "@images/*": ["/images/*"]
25
+ "@root/*": ["./*"],
26
+ "@/*": ["./src/*"],
27
+ "@commons/*": ["./src/commons/*"],
28
+ "@api/*": ["./src/commons/api/*"],
29
+ "@hooks/*": ["./src/commons/hooks/*"],
30
+ "@layout/*": ["./src/commons/layout/*"],
31
+ "@styles/*": ["./src/commons/styles/*"],
32
+ "@ui/*": ["./src/commons/ui/*"],
33
+ "@utils/*": ["./src/commons/utils/*"],
34
+ "@chat/*": ["./src/features/chat/*"],
35
+ "@cli/*": ["./src/features/cli/*"],
36
+ "@console/*": ["./src/features/console/*"],
37
+ "@help/*": ["./src/features/help/*"],
38
+ "@history/*": ["./src/features/history/*"],
39
+ "@home/*": ["./src/features/home/*"],
40
+ "@life/*": ["./src/features/life/*"],
41
+ "@version/*": ["./src/features/version/*"],
42
+ "@images/*": ["./src/images/*"]
44
43
  }
45
44
  },
46
45
  "include": ["src", "api"]
package/vite.config.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import {defineConfig, loadEnv} from "vite";
2
- import tsconfigPaths from "vite-tsconfig-paths";
3
2
 
4
3
  import pkg from "./package.json";
5
4
 
@@ -28,7 +27,10 @@ export default defineConfig(({mode}) => {
28
27
  "import.meta.env.API_PATH": JSON.stringify(env.API_PATH),
29
28
  "import.meta.env.BASE_PATH": JSON.stringify(process.cwd()),
30
29
  },
31
- plugins: [react(), tsconfigPaths()],
30
+ plugins: [react()],
31
+ resolve: {
32
+ tsconfigPaths: true,
33
+ },
32
34
  server: {
33
35
  host: true,
34
36
  port: 3000,