dev3000 0.0.43 → 0.0.44

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.
@@ -354,7 +354,7 @@ async function executeBrowserActions(replayData: ReplayData, speed: number): Pro
354
354
  results.push({
355
355
  event,
356
356
  result,
357
- description: `${event.eventType}: ${event.eventType === 'navigation' ? event.url : event.type}`
357
+ description: `${event.eventType}: ${event.eventType === 'navigation' ? event.url : ('type' in event ? event.type : 'unknown')}`
358
358
  });
359
359
  }
360
360
 
@@ -395,7 +395,7 @@ function LogEntryComponent({ entry }: { entry: LogEntry }) {
395
395
  {/* Table-like layout using CSS Grid */}
396
396
  <div className="grid grid-cols-[auto_auto_1fr] gap-3 items-start">
397
397
  {/* Column 1: Timestamp */}
398
- <div className="text-xs text-gray-500 dark:text-gray-400 font-mono whitespace-nowrap">
398
+ <div className="text-xs text-gray-500 dark:text-gray-400 font-mono whitespace-nowrap pt-1">
399
399
  {new Date(entry.timestamp).toLocaleTimeString()}
400
400
  </div>
401
401
 
@@ -653,16 +653,38 @@ export default function LogsClient({ version }: LogsClientProps) {
653
653
  }
654
654
  };
655
655
 
656
- const loadReplayPreview = async () => {
657
- try {
658
- const response = await fetch('/api/replay?action=parse');
659
- if (response.ok) {
660
- const data = await response.json();
661
- setReplayEvents(data.interactions || []);
662
- }
663
- } catch (error) {
664
- console.error('Error loading replay preview:', error);
665
- }
656
+ const loadReplayPreview = () => {
657
+ // Extract interactions from current logs instead of making API call
658
+ const interactions = logs
659
+ .filter(log => log.message.includes('[INTERACTION]'))
660
+ .map(log => {
661
+ const match = log.message.match(/\[INTERACTION\] (.+)/);
662
+ if (match) {
663
+ try {
664
+ // Try parsing as JSON (new format)
665
+ const data = JSON.parse(match[1]);
666
+ return {
667
+ timestamp: log.timestamp,
668
+ type: data.type,
669
+ details: data
670
+ };
671
+ } catch {
672
+ // Fallback to old format parsing
673
+ const oldMatch = match[1].match(/(CLICK|TAP|SCROLL|KEY) (.+)/);
674
+ if (oldMatch) {
675
+ return {
676
+ timestamp: log.timestamp,
677
+ type: oldMatch[1],
678
+ details: oldMatch[2]
679
+ };
680
+ }
681
+ }
682
+ }
683
+ return null;
684
+ })
685
+ .filter(Boolean);
686
+
687
+ setReplayEvents(interactions);
666
688
  };
667
689
 
668
690
  const handleRotateLog = async () => {
@@ -817,26 +839,8 @@ export default function LogsClient({ version }: LogsClientProps) {
817
839
  )}
818
840
  </div>
819
841
 
820
- {/* Dark Mode Toggle, Mode Toggle with Replay Button */}
842
+ {/* Mode Toggle with Replay Button */}
821
843
  <div className="flex items-center gap-2">
822
- {/* Dark Mode Toggle */}
823
- <button
824
- onClick={() => setDarkMode(!darkMode)}
825
- className="p-2 rounded-md text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors"
826
- title={darkMode ? 'Switch to light mode' : 'Switch to dark mode'}
827
- >
828
- {darkMode ? (
829
- // Sun icon for light mode
830
- <svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
831
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" />
832
- </svg>
833
- ) : (
834
- // Moon icon for dark mode
835
- <svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
836
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" />
837
- </svg>
838
- )}
839
- </button>
840
844
  {/* Replay Button with Hover Preview */}
841
845
  <div className="relative">
842
846
  <button
@@ -983,6 +987,25 @@ export default function LogsClient({ version }: LogsClientProps) {
983
987
  Tail
984
988
  </button>
985
989
  </div>
990
+
991
+ {/* Dark Mode Toggle */}
992
+ <button
993
+ onClick={() => setDarkMode(!darkMode)}
994
+ className="p-2 rounded-md text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors"
995
+ title={darkMode ? 'Switch to light mode' : 'Switch to dark mode'}
996
+ >
997
+ {darkMode ? (
998
+ // Sun icon for light mode
999
+ <svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
1000
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" />
1001
+ </svg>
1002
+ ) : (
1003
+ // Moon icon for dark mode
1004
+ <svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
1005
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" />
1006
+ </svg>
1007
+ )}
1008
+ </button>
986
1009
  </div>
987
1010
  </div>
988
1011
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dev3000",
3
- "version": "0.0.43",
3
+ "version": "0.0.44",
4
4
  "description": "AI-powered development tools with browser monitoring and MCP server integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",