vibesurf 0.1.27__py3-none-any.whl → 0.1.29__py3-none-any.whl

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.

Potentially problematic release.


This version of vibesurf might be problematic. Click here for more details.

vibe_surf/_version.py CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.1.27'
32
- __version_tuple__ = version_tuple = (0, 1, 27)
31
+ __version__ = version = '0.1.29'
32
+ __version_tuple__ = version_tuple = (0, 1, 29)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -353,13 +353,13 @@ async def initialize_vibesurf_components():
353
353
  browser_execution_path = os.getenv("BROWSER_EXECUTION_PATH", "")
354
354
  assert os.path.exists(browser_execution_path), "Please set the BROWSER_EXECUTION_PATH environment variable"
355
355
  browser_user_data = os.getenv("BROWSER_USER_DATA", "")
356
- if not browser_user_data:
356
+ if not browser_user_data or not os.path.exists(browser_user_data):
357
357
  browser_user_data = os.path.join(workspace_dir, "browser_user_data",
358
358
  f"{os.path.basename(browser_execution_path)}-profile")
359
359
 
360
360
  # Get VibeSurf extension path
361
361
  vibesurf_extension = os.getenv("VIBESURF_EXTENSION", "")
362
- if not vibesurf_extension.strip():
362
+ if not vibesurf_extension.strip() or not os.path.exists(vibesurf_extension):
363
363
  current_file = Path(__file__)
364
364
  project_root = current_file.parent.parent.absolute()
365
365
  vibesurf_extension = str(project_root / "chrome_extension")
@@ -27,6 +27,14 @@ const VIBESURF_CONFIG = {
27
27
  autoScroll: true,
28
28
  compactMode: false
29
29
  },
30
+
31
+ // Social media links
32
+ SOCIAL_LINKS: {
33
+ github: "https://github.com/vibesurf-ai/VibeSurf",
34
+ discord: "https://discord.gg/EZ2YnUXP",
35
+ x: "https://x.com/warmshao",
36
+ website: "https://vibe-surf.com/"
37
+ },
30
38
 
31
39
  // Debug mode
32
40
  DEBUG: false
@@ -31,6 +31,7 @@ class VibeSurfUIManager {
31
31
  this.initializeManagers();
32
32
  this.bindEvents();
33
33
  this.setupSessionListeners();
34
+ this.initializeSocialLinks();
34
35
  }
35
36
 
36
37
  bindElements() {
@@ -3468,6 +3469,151 @@ class VibeSurfUIManager {
3468
3469
  return skills.length > 0 ? skills : null;
3469
3470
  }
3470
3471
 
3472
+ // Initialize social links from config
3473
+ initializeSocialLinks() {
3474
+ const socialLinksContainer = document.getElementById('social-links-container');
3475
+ if (!socialLinksContainer) {
3476
+ console.warn('[UIManager] Social links container not found');
3477
+ return;
3478
+ }
3479
+
3480
+ // Get social links from config
3481
+ const socialLinks = window.VIBESURF_CONFIG?.SOCIAL_LINKS;
3482
+ if (!socialLinks) {
3483
+ console.warn('[UIManager] Social links not found in config');
3484
+ return;
3485
+ }
3486
+
3487
+ // Clear existing content
3488
+ socialLinksContainer.innerHTML = '';
3489
+
3490
+ // Handle website link separately by making VibeSurf logo/text clickable
3491
+ const websiteUrl = socialLinks.website;
3492
+ if (websiteUrl) {
3493
+ this.initializeVibeSurfWebsiteLink(websiteUrl);
3494
+ }
3495
+
3496
+ // Create social link elements (excluding website)
3497
+ Object.entries(socialLinks).forEach(([platform, url]) => {
3498
+ if (platform !== 'website') {
3499
+ const link = this.createSocialLink(platform, url);
3500
+ if (link) {
3501
+ socialLinksContainer.appendChild(link);
3502
+ }
3503
+ }
3504
+ });
3505
+ }
3506
+
3507
+ // Make VibeSurf text clickable to link to website
3508
+ initializeVibeSurfWebsiteLink(websiteUrl) {
3509
+ // Only find elements that contain "VibeSurf" text specifically
3510
+ const allElements = document.querySelectorAll('*');
3511
+ const vibeSurfTextElements = [];
3512
+
3513
+ allElements.forEach(element => {
3514
+ // Only target elements that contain "VibeSurf" text and are likely text elements
3515
+ if (element.textContent &&
3516
+ element.textContent.trim() === 'VibeSurf' &&
3517
+ element.children.length === 0) { // Only leaf text nodes, not containers
3518
+ vibeSurfTextElements.push(element);
3519
+ }
3520
+ });
3521
+
3522
+ // Make only VibeSurf text elements clickable
3523
+ vibeSurfTextElements.forEach(element => {
3524
+ if (element && !element.querySelector('a')) { // Don't double-wrap already linked elements
3525
+ element.style.cursor = 'pointer';
3526
+ element.style.transition = 'opacity 0.2s ease';
3527
+ element.setAttribute('title', 'Login to early access alpha features');
3528
+
3529
+ // Add hover effect
3530
+ element.addEventListener('mouseenter', () => {
3531
+ element.style.opacity = '0.8';
3532
+ });
3533
+
3534
+ element.addEventListener('mouseleave', () => {
3535
+ element.style.opacity = '1';
3536
+ });
3537
+
3538
+ // Add click handler
3539
+ element.addEventListener('click', (e) => {
3540
+ e.preventDefault();
3541
+ e.stopPropagation();
3542
+ this.openWebsiteLink(websiteUrl);
3543
+ });
3544
+ }
3545
+ });
3546
+ }
3547
+
3548
+ // Open website link in new tab
3549
+ async openWebsiteLink(url) {
3550
+ try {
3551
+ console.log('[UIManager] Opening VibeSurf website:', url);
3552
+
3553
+ const result = await chrome.runtime.sendMessage({
3554
+ type: 'OPEN_FILE_URL',
3555
+ data: { fileUrl: url }
3556
+ });
3557
+
3558
+ if (!result || !result.success) {
3559
+ throw new Error(result?.error || 'Failed to open website');
3560
+ }
3561
+
3562
+ console.log('[UIManager] Successfully opened website tab:', result.tabId);
3563
+ } catch (error) {
3564
+ console.error('[UIManager] Error opening website:', error);
3565
+ this.showNotification(`Failed to open website: ${error.message}`, 'error');
3566
+ }
3567
+ }
3568
+
3569
+ // Create individual social link element
3570
+ createSocialLink(platform, url) {
3571
+ const link = document.createElement('a');
3572
+ link.href = url;
3573
+ link.className = 'social-link';
3574
+ link.setAttribute('data-platform', platform);
3575
+ link.setAttribute('target', '_blank');
3576
+ link.setAttribute('rel', 'noopener noreferrer');
3577
+
3578
+ // Set title and tooltip based on platform
3579
+ let title = '';
3580
+ let svg = '';
3581
+
3582
+ switch (platform.toLowerCase()) {
3583
+ case 'github':
3584
+ title = 'GitHub';
3585
+ svg = `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3586
+ <path d="M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.509 11.509 0 0112 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12z" fill="currentColor"/>
3587
+ </svg>`;
3588
+ break;
3589
+
3590
+ case 'discord':
3591
+ title = 'Discord';
3592
+ svg = `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3593
+ <path d="M20.317 4.37a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 00-5.487 0 12.64 12.64 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.37a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 00.031.057 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 00-.041-.106 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128 10.2 10.2 0 00.372-.292.074.074 0 01.077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 01.078.01c.12.098.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z" fill="currentColor"/>
3594
+ </svg>`;
3595
+ break;
3596
+
3597
+ case 'x':
3598
+ case 'twitter':
3599
+ title = 'X (Twitter)';
3600
+ svg = `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3601
+ <path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" fill="currentColor"/>
3602
+ </svg>`;
3603
+ break;
3604
+
3605
+
3606
+ default:
3607
+ console.warn(`[UIManager] Unknown social platform: ${platform}`);
3608
+ return null;
3609
+ }
3610
+
3611
+ link.setAttribute('title', title);
3612
+ link.innerHTML = svg;
3613
+
3614
+ return link;
3615
+ }
3616
+
3471
3617
  // Export for use in other modules
3472
3618
  static exportToWindow() {
3473
3619
  if (typeof window !== 'undefined') {
@@ -36,22 +36,8 @@
36
36
  <div class="logo-brand">
37
37
  <img src="icons/logo.png" alt="VibeSurf" class="logo-image">
38
38
  <span class="logo-text">VibeSurf</span>
39
- <div class="social-links">
40
- <a href="https://github.com/vvincent1234/VibeSurf" class="social-link" title="GitHub" data-platform="github" target="_blank" rel="noopener noreferrer">
41
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
42
- <path d="M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.509 11.509 0 0112 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12z" fill="currentColor"/>
43
- </svg>
44
- </a>
45
- <a href="https://discord.gg/WSeRwW2M" class="social-link" title="Discord" data-platform="discord" target="_blank" rel="noopener noreferrer">
46
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
47
- <path d="M20.317 4.37a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 00-5.487 0 12.64 12.64 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.37a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 00.031.057 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 00-.041-.106 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128 10.2 10.2 0 00.372-.292.074.074 0 01.077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 01.078.01c.12.098.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z" fill="currentColor"/>
48
- </svg>
49
- </a>
50
- <a href="https://x.com/warmshao" class="social-link" title="X (Twitter)" data-platform="x" target="_blank" rel="noopener noreferrer">
51
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
52
- <path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" fill="currentColor"/>
53
- </svg>
54
- </a>
39
+ <div class="social-links" id="social-links-container">
40
+ <!-- Social links will be populated dynamically from config -->
55
41
  </div>
56
42
  </div>
57
43
  <div class="session-info">
File without changes
File without changes