codex-lens 0.1.20 → 0.1.21

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.
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Codex Lens</title>
7
- <script type="module" crossorigin src="./assets/main-CtA0UO3o.js"></script>
7
+ <script type="module" crossorigin src="./assets/main-Dv8f8BcE.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="./assets/main-CYNmzqDG.css">
9
9
  </head>
10
10
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-lens",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "A visualization tool for Codex that monitors API requests and file system changes",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -21,9 +21,18 @@ export function App() {
21
21
  document.addEventListener('click', handleDocumentClick);
22
22
  document.addEventListener('keydown', handleKeyDown);
23
23
 
24
+ const preventBrowserSave = (e) => {
25
+ if (e.ctrlKey && e.key === 's') {
26
+ e.preventDefault();
27
+ e.stopPropagation();
28
+ }
29
+ };
30
+ window.addEventListener('keydown', preventBrowserSave, true);
31
+
24
32
  return () => {
25
33
  document.removeEventListener('click', handleDocumentClick);
26
34
  document.removeEventListener('keydown', handleKeyDown);
35
+ window.removeEventListener('keydown', preventBrowserSave, true);
27
36
  if (wsRef.current) {
28
37
  wsRef.current.close();
29
38
  }
@@ -55,6 +64,14 @@ export function App() {
55
64
  }
56
65
 
57
66
  function handleKeyDown(e) {
67
+ if (e.ctrlKey && e.key === 's') {
68
+ e.preventDefault();
69
+ if (activeTabId) {
70
+ saveCurrentFile();
71
+ }
72
+ return;
73
+ }
74
+
58
75
  if (!activeTabId) return;
59
76
 
60
77
  if (e.ctrlKey && e.key === 'w') {
@@ -67,9 +84,6 @@ export function App() {
67
84
  } else {
68
85
  switchToNextTab();
69
86
  }
70
- } else if (e.ctrlKey && e.key === 's') {
71
- e.preventDefault();
72
- saveCurrentFile();
73
87
  }
74
88
  }
75
89