vzcode 0.35.0 → 0.37.0

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/dist/index.html CHANGED
@@ -24,8 +24,8 @@
24
24
  href="https://unpkg.com/boxicons@2.0.7/css/boxicons.min.css"
25
25
  rel="stylesheet"
26
26
  />
27
- <script type="module" crossorigin src="/assets/index-OHcEizsk.js"></script>
28
- <link rel="stylesheet" crossorigin href="/assets/index-esdlTXtH.css">
27
+ <script type="module" crossorigin src="/assets/index--irC_gt8.js"></script>
28
+ <link rel="stylesheet" crossorigin href="/assets/index-ytoSEjV4.css">
29
29
  </head>
30
30
  <body>
31
31
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vzcode",
3
- "version": "0.35.0",
3
+ "version": "0.37.0",
4
4
  "description": "Multiplayer code editor system",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -58,18 +58,18 @@
58
58
  "@replit/codemirror-interact": "^6.3.0",
59
59
  "@teamwork/websocket-json-stream": "^2.0.0",
60
60
  "@typescript/vfs": "^1.5.0",
61
- "@uiw/codemirror-theme-abcdef": "^4.21.20",
62
- "@uiw/codemirror-theme-dracula": "^4.21.20",
63
- "@uiw/codemirror-theme-eclipse": "^4.21.20",
64
- "@uiw/codemirror-theme-github": "^4.21.20",
65
- "@uiw/codemirror-theme-material": "^4.21.20",
66
- "@uiw/codemirror-theme-nord": "^4.21.20",
67
- "@uiw/codemirror-theme-okaidia": "^4.21.20",
68
- "@uiw/codemirror-theme-xcode": "^4.21.20",
69
- "@uiw/codemirror-themes": "^4.21.20",
61
+ "@uiw/codemirror-theme-abcdef": "^4.21.21",
62
+ "@uiw/codemirror-theme-dracula": "^4.21.21",
63
+ "@uiw/codemirror-theme-eclipse": "^4.21.21",
64
+ "@uiw/codemirror-theme-github": "^4.21.21",
65
+ "@uiw/codemirror-theme-material": "^4.21.21",
66
+ "@uiw/codemirror-theme-nord": "^4.21.21",
67
+ "@uiw/codemirror-theme-okaidia": "^4.21.21",
68
+ "@uiw/codemirror-theme-xcode": "^4.21.21",
69
+ "@uiw/codemirror-themes": "^4.21.21",
70
70
  "body-parser": "^1.20.2",
71
71
  "codemirror": "^6.0.1",
72
- "codemirror-ot": "^4.1.0",
72
+ "codemirror-ot": "^4.2.0",
73
73
  "color-hash": "^2.0.2",
74
74
  "d3-array": "^3.2.4",
75
75
  "diff-match-patch": "^1.0.5",
@@ -78,24 +78,23 @@
78
78
  "json0-ot-diff": "^1.1.2",
79
79
  "ngrok": "^4.3.3",
80
80
  "open": "^9.1.0",
81
- "openai": "^4.19.0",
82
- "ot-json1": "^1.0.2",
81
+ "openai": "^4.20.0",
83
82
  "react": "^18.2.0",
84
83
  "react-bootstrap": "^2.9.1",
85
84
  "react-dom": "^18.2.0",
86
85
  "sharedb": "^4.1.1",
87
- "sharedb-client-browser": "^4.3.1",
88
- "vizhub-ui": "^3.5.0",
86
+ "sharedb-client-browser": "^4.4.0",
87
+ "vizhub-ui": "^3.6.0",
89
88
  "ws": "^8.14.2"
90
89
  },
91
90
  "devDependencies": {
92
- "@types/react": "^18.2.37",
93
- "@types/react-dom": "^18.2.15",
91
+ "@types/react": "^18.2.38",
92
+ "@types/react-dom": "^18.2.17",
94
93
  "@vitejs/plugin-react": "^4.2.0",
95
94
  "prettier": "^3.1.0",
96
95
  "sass": "^1.69.5",
97
- "typescript": "^5.2.2",
98
- "vite": "^5.0.0",
96
+ "typescript": "^5.3.2",
97
+ "vite": "^5.0.2",
99
98
  "vitest": "^0.34.6"
100
99
  }
101
100
  }
@@ -1,5 +1,5 @@
1
1
  import { EditorView, keymap } from '@codemirror/view';
2
- import { insertOp, replaceOp } from 'ot-json1';
2
+ import { json1Presence } from '../ot';
3
3
  import {
4
4
  FileId,
5
5
  File,
@@ -10,6 +10,8 @@ import { generateRequestId } from './CodeEditor/typeScriptCompletions';
10
10
 
11
11
  import { TabState } from './vzReducer';
12
12
 
13
+ const { insertOp, replaceOp } = json1Presence;
14
+
13
15
  export const AIAssist = ({
14
16
  shareDBDoc,
15
17
  // The file id of the file the AI should assist with.
@@ -5,7 +5,6 @@ import {
5
5
  Username,
6
6
  VZCodeContent,
7
7
  } from '../../types';
8
- import { useSubmitOperation } from '../useSubmitOperation';
9
8
  import { usePrettier } from '../usePrettier';
10
9
  import { useTypeScript } from '../useTypeScript';
11
10
  import {
@@ -216,6 +216,10 @@ onmessage = async ({ data }) => {
216
216
  // "Binding element 'data' implicitly has an 'any' type."
217
217
  const LINT_ERROR_CODE_ANY = 7031;
218
218
 
219
+ // This code is for errors like:
220
+ // "Parameter 'selection' implicitly has an 'any' type.""
221
+ const LINT_ERROR_CODE_ANY_PARAM = 7006;
222
+
219
223
  // This code is for errors like:
220
224
  // "Cannot find module 'd3' or its corresponding type declarations."
221
225
  const LINT_ERROR_CODE_IMPORT = 2307;
@@ -226,7 +230,8 @@ onmessage = async ({ data }) => {
226
230
  tsErrors = tsErrors.filter(
227
231
  (error: { code: number }) =>
228
232
  error.code !== LINT_ERROR_CODE_ANY &&
229
- error.code !== LINT_ERROR_CODE_IMPORT,
233
+ error.code !== LINT_ERROR_CODE_IMPORT &&
234
+ error.code !== LINT_ERROR_CODE_ANY_PARAM,
230
235
  );
231
236
  }
232
237
  tsErrors = convertToCodeMirrorDiagnostic(tsErrors);
@@ -1,7 +1,7 @@
1
1
  import OpenAI from 'openai';
2
- import json1 from 'ot-json1';
2
+ import { json1Presence } from '../ot.js';
3
3
 
4
- const { editOp, type, replaceOp } = json1;
4
+ const { editOp, type, replaceOp } = json1Presence;
5
5
 
6
6
  // Feature flag to slow down AI for development/testing
7
7
  const slowdown = false;
@@ -10,15 +10,16 @@ import { fileURLToPath } from 'url';
10
10
  import open from 'open';
11
11
  import ngrok from 'ngrok';
12
12
  import dotenv from 'dotenv';
13
- import { computeInitialDocument } from './computeInitialDocument.js';
14
- import { json1Presence } from '../ot.js';
15
13
  import bodyParser from 'body-parser';
14
+ import { json1Presence } from '../ot.js';
15
+ import { computeInitialDocument } from './computeInitialDocument.js';
16
16
  import {
17
17
  generateAIResponse,
18
18
  haltGeneration,
19
19
  handleAIAssist,
20
20
  } from './handleAIAssist.js';
21
- import { replaceOp } from 'ot-json1';
21
+
22
+ const { replaceOp } = json1Presence;
22
23
 
23
24
  dotenv.config({ path: '../../.env' });
24
25