codex-lens 0.1.15 → 0.1.16

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.
@@ -3,9 +3,9 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Codex Viewer</title>
7
- <script type="module" crossorigin src="./assets/main-DHXlOYFo.js"></script>
8
- <link rel="stylesheet" crossorigin href="./assets/main-OkH3Xq_f.css">
6
+ <title>Codex Lens</title>
7
+ <script type="module" crossorigin src="./assets/main-ssN8akn5.js"></script>
8
+ <link rel="stylesheet" crossorigin href="./assets/main-7-y-Utze.css">
9
9
  </head>
10
10
  <body>
11
11
  <div id="root"></div>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "codex-lens",
3
- "version": "0.1.15",
4
- "description": "A visualization tool for Codex that monitors API requests and file system changes with task snapshot rollback",
3
+ "version": "0.1.16",
4
+ "description": "A visualization tool for Codex that monitors API requests and file system changes",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "dist/aggregator.js",
@@ -17,11 +17,10 @@
17
17
  "keywords": [
18
18
  "codex",
19
19
  "openai",
20
- "codex-viewer",
20
+ "codex-lens",
21
21
  "ai-coding",
22
22
  "file-watcher",
23
- "snapshot",
24
- "rollback"
23
+ "terminal"
25
24
  ],
26
25
  "dependencies": {
27
26
  "@codemirror/lang-cpp": "^6.0.3",
package/src/aggregator.js CHANGED
@@ -265,7 +265,7 @@ class Aggregator {
265
265
  <head>
266
266
  <meta charset="UTF-8">
267
267
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
268
- <title>Codex Viewer</title>
268
+ <title>Codex Lens</title>
269
269
  <link rel="stylesheet" href="/lib/xterm/xterm.css">
270
270
  <style>
271
271
  :root {
package/src/cli.js CHANGED
@@ -58,7 +58,7 @@ function findProjectRoot() {
58
58
 
59
59
  async function main() {
60
60
  logger.info('========================================');
61
- logger.info(' Codex Viewer Starting');
61
+ logger.info(' Codex Lens Starting');
62
62
  logger.info('========================================');
63
63
 
64
64
  const projectRoot = findProjectRoot();
@@ -1,6 +1,6 @@
1
1
  import React, { useMemo, useRef } from 'react';
2
2
  import CodeMirror from '@uiw/react-codemirror';
3
- import { EditorView, Decoration } from '@codemirror/view';
3
+ import { EditorView } from '@codemirror/view';
4
4
  import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';
5
5
  import { tags as t } from '@lezer/highlight';
6
6
  import { javascript } from '@codemirror/lang-javascript';
@@ -15,6 +15,7 @@ import { markdown } from '@codemirror/lang-markdown';
15
15
  import { css } from '@codemirror/lang-css';
16
16
  import { sql } from '@codemirror/lang-sql';
17
17
  import { html } from '@codemirror/lang-html';
18
+ import { showMinimap } from '@replit/codemirror-minimap';
18
19
 
19
20
  const LANG_MAP = {
20
21
  js: javascript,
@@ -83,15 +84,33 @@ const darkTheme = EditorView.theme({
83
84
  fontFamily: "'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace",
84
85
  fontSize: '13px',
85
86
  lineHeight: '1.6',
87
+ overflow: 'auto',
86
88
  },
87
- '.cm-minimap': {
89
+ '.cm-content': {
90
+ minHeight: '100%',
91
+ },
92
+ '.cm-minimap-gutter': {
88
93
  background: '#0a0a0a',
89
94
  borderLeft: '1px solid #1f1f1f',
90
95
  },
91
- '.cm-minimap-viewport': {
92
- border: '1px solid rgba(34, 197, 94, 0.5)',
93
- background: 'rgba(34, 197, 94, 0.15)',
96
+ '.cm-minimap-overlay-container': {
97
+ cursor: 'pointer',
98
+ },
99
+ '.cm-minimap-overlay': {
100
+ border: '1px solid rgba(34, 197, 94, 0.6)',
101
+ background: 'rgba(34, 197, 94, 0.2)',
94
102
  borderRadius: '2px',
103
+ cursor: 'grab',
104
+ transition: 'background 0.15s ease',
105
+ },
106
+ '.cm-minimap-overlay:hover': {
107
+ border: '1px solid rgba(34, 197, 94, 0.9)',
108
+ background: 'rgba(34, 197, 94, 0.35)',
109
+ },
110
+ '.cm-minimap-overlay-container.cm-minimap-overlay-active .cm-minimap-overlay': {
111
+ border: '1px solid rgba(34, 197, 94, 1)',
112
+ background: 'rgba(34, 197, 94, 0.4)',
113
+ cursor: 'grabbing',
95
114
  },
96
115
  }, { dark: true });
97
116
 
@@ -123,6 +142,14 @@ export function CodeViewer({ content, diff, isDiff, filePath }) {
123
142
  ...getLanguageExtension(filePath),
124
143
  syntaxTheme,
125
144
  EditorView.lineWrapping,
145
+ showMinimap.compute(['doc'], (state) => ({
146
+ create: (view) => {
147
+ const dom = document.createElement('div');
148
+ return { dom };
149
+ },
150
+ displayText: 'characters',
151
+ showOverlay: 'always',
152
+ })),
126
153
  ];
127
154
  return exts;
128
155
  }, [filePath]);
package/src/global.css CHANGED
@@ -538,15 +538,28 @@ body {
538
538
  .code-viewer-codemirror {
539
539
  height: 100%;
540
540
  width: 100%;
541
- overflow: hidden;
541
+ display: flex;
542
+ min-height: 0;
543
+ min-width: 0;
544
+ }
545
+
546
+ .code-viewer-codemirror .cm-theme {
547
+ flex: 1;
548
+ display: flex;
549
+ min-height: 0;
550
+ min-width: 0;
542
551
  }
543
552
 
544
553
  .code-viewer-codemirror .cm-editor {
545
- height: 100%;
554
+ flex: 1;
555
+ min-width: 0;
556
+ min-height: 0;
546
557
  }
547
558
 
548
559
  .code-viewer-codemirror .cm-scroller {
549
- overflow: auto;
560
+ flex: 1;
561
+ overflow: auto !important;
562
+ min-height: 0;
550
563
  }
551
564
 
552
565
  .code-content {
package/src/index.html CHANGED
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Codex Viewer</title>
6
+ <title>Codex Lens</title>
7
7
  </head>
8
8
  <body>
9
9
  <div id="root"></div>