vibesurf 0.1.5__tar.gz → 0.1.7__tar.gz

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.

Files changed (85) hide show
  1. {vibesurf-0.1.5 → vibesurf-0.1.7}/PKG-INFO +1 -1
  2. {vibesurf-0.1.5 → vibesurf-0.1.7}/tests/test_backend_api.py +1 -1
  3. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/_version.py +3 -3
  4. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/agents/vibe_surf_agent.py +10 -12
  5. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/utils/llm_factory.py +10 -10
  6. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/scripts/session-manager.js +53 -13
  7. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/scripts/ui-manager.js +34 -3
  8. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/styles/main.css +31 -0
  9. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/cli.py +7 -1
  10. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibesurf.egg-info/PKG-INFO +1 -1
  11. {vibesurf-0.1.5 → vibesurf-0.1.7}/.env.example +0 -0
  12. {vibesurf-0.1.5 → vibesurf-0.1.7}/.github/workflows/publish.yml +0 -0
  13. {vibesurf-0.1.5 → vibesurf-0.1.7}/.gitignore +0 -0
  14. {vibesurf-0.1.5 → vibesurf-0.1.7}/.python-version +0 -0
  15. {vibesurf-0.1.5 → vibesurf-0.1.7}/LICENSE +0 -0
  16. {vibesurf-0.1.5 → vibesurf-0.1.7}/MANIFEST.in +0 -0
  17. {vibesurf-0.1.5 → vibesurf-0.1.7}/README.md +0 -0
  18. {vibesurf-0.1.5 → vibesurf-0.1.7}/docs/PYPI_SETUP.md +0 -0
  19. {vibesurf-0.1.5 → vibesurf-0.1.7}/pyproject.toml +0 -0
  20. {vibesurf-0.1.5 → vibesurf-0.1.7}/setup.cfg +0 -0
  21. {vibesurf-0.1.5 → vibesurf-0.1.7}/tests/test_agents.py +0 -0
  22. {vibesurf-0.1.5 → vibesurf-0.1.7}/tests/test_browser.py +0 -0
  23. {vibesurf-0.1.5 → vibesurf-0.1.7}/tests/test_controller.py +0 -0
  24. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/__init__.py +0 -0
  25. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/agents/__init__.py +0 -0
  26. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/agents/browser_use_agent.py +0 -0
  27. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/agents/prompts/__init__.py +0 -0
  28. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/agents/prompts/vibe_surf_prompt.py +0 -0
  29. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/agents/report_writer_agent.py +0 -0
  30. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/__init__.py +0 -0
  31. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/api/__init__.py +0 -0
  32. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/api/activity.py +0 -0
  33. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/api/config.py +0 -0
  34. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/api/files.py +0 -0
  35. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/api/models.py +0 -0
  36. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/api/task.py +0 -0
  37. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/database/__init__.py +0 -0
  38. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/database/manager.py +0 -0
  39. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/database/models.py +0 -0
  40. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/database/queries.py +0 -0
  41. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/database/schemas.py +0 -0
  42. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/llm_config.py +0 -0
  43. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/main.py +0 -0
  44. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/migrations/__init__.py +0 -0
  45. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/migrations/init_db.py +0 -0
  46. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/migrations/seed_data.py +0 -0
  47. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/shared_state.py +0 -0
  48. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/utils/__init__.py +0 -0
  49. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/backend/utils/encryption.py +0 -0
  50. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/browser/__init__.py +0 -0
  51. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/browser/agen_browser_profile.py +0 -0
  52. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/browser/agent_browser_session.py +0 -0
  53. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/browser/browser_manager.py +0 -0
  54. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/browser/utils.py +0 -0
  55. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/browser/watchdogs/__init__.py +0 -0
  56. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/browser/watchdogs/action_watchdog.py +0 -0
  57. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/browser/watchdogs/dom_watchdog.py +0 -0
  58. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/background.js +0 -0
  59. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/config.js +0 -0
  60. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/content.js +0 -0
  61. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/dev-reload.js +0 -0
  62. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/icons/convert-svg.js +0 -0
  63. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/icons/logo-preview.html +0 -0
  64. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/icons/logo.png +0 -0
  65. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/manifest.json +0 -0
  66. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/popup.html +0 -0
  67. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/scripts/api-client.js +0 -0
  68. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/scripts/main.js +0 -0
  69. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/scripts/markdown-it.min.js +0 -0
  70. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/sidepanel.html +0 -0
  71. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/styles/animations.css +0 -0
  72. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/styles/components.css +0 -0
  73. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/chrome_extension/styles/settings.css +0 -0
  74. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/controller/__init__.py +0 -0
  75. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/controller/file_system.py +0 -0
  76. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/controller/mcp_client.py +0 -0
  77. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/controller/vibesurf_controller.py +0 -0
  78. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/controller/views.py +0 -0
  79. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/llm/__init__.py +0 -0
  80. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibe_surf/llm/openai_compatible.py +0 -0
  81. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibesurf.egg-info/SOURCES.txt +0 -0
  82. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibesurf.egg-info/dependency_links.txt +0 -0
  83. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibesurf.egg-info/entry_points.txt +0 -0
  84. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibesurf.egg-info/requires.txt +0 -0
  85. {vibesurf-0.1.5 → vibesurf-0.1.7}/vibesurf.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vibesurf
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: VibeSurf: A powerful browser assistant for vibe surfing
5
5
  Author: Shao Warm
6
6
  License: Apache-2.0
@@ -770,7 +770,7 @@ async def run_all_tests():
770
770
  if __name__ == "__main__":
771
771
  print("VibeSurf Backend API Tester")
772
772
  print("Make sure your backend is running on http://127.0.0.1:9335")
773
- print("Command: uvicorn backend.main:app --host 127.0.0.1 --port 9335")
773
+ print("Command: uvicorn vibe_surf.backend.main:app --host 127.0.0.1 --port 9335")
774
774
  print()
775
775
 
776
776
  asyncio.run(run_all_tests())
@@ -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.5'
32
- __version_tuple__ = version_tuple = (0, 1, 5)
31
+ __version__ = version = '0.1.7'
32
+ __version_tuple__ = version_tuple = (0, 1, 7)
33
33
 
34
- __commit_id__ = commit_id = 'g9ac8f3cab'
34
+ __commit_id__ = commit_id = 'gf7b3cb503'
@@ -47,7 +47,6 @@ class TodoItem(BaseModel):
47
47
  class ExecutionMode(BaseModel):
48
48
  """Execution mode configuration"""
49
49
  mode: Literal["single", "parallel"] = "single"
50
- max_parallel_agents: int = 5
51
50
  reason: str = Field(description="LLM reasoning for mode selection")
52
51
 
53
52
 
@@ -229,14 +228,12 @@ def parse_execution_planning_response(response_text: str) -> ExecutionMode:
229
228
  """Parse execution planning JSON response"""
230
229
  fallback = {
231
230
  "execution_mode": "single",
232
- "max_parallel_agents": 3,
233
231
  "reasoning": "Default single mode"
234
232
  }
235
233
  result = parse_json_response(response_text, fallback)
236
234
 
237
235
  return ExecutionMode(
238
236
  mode=result.get("execution_mode", "single"),
239
- max_parallel_agents=result.get("max_parallel_agents", 3),
240
237
  reason=result.get("reasoning", "Default execution mode")
241
238
  )
242
239
 
@@ -558,7 +555,6 @@ async def _supervisor_agent_node_impl(state: VibeSurfState) -> VibeSurfState:
558
555
 
559
556
  state.execution_mode = ExecutionMode(
560
557
  mode=task_type,
561
- max_parallel_agents=5 if task_type == "parallel" else 1,
562
558
  reason=reasoning
563
559
  )
564
560
  state.pending_tasks = tasks_to_execute_new
@@ -755,7 +751,7 @@ async def execute_parallel_browser_tasks(state: VibeSurfState) -> List[BrowserTa
755
751
 
756
752
  # Register agents with browser manager
757
753
  agents = []
758
- pending_tasks = state.pending_tasks[:state.execution_mode.max_parallel_agents]
754
+ pending_tasks = state.pending_tasks
759
755
  bu_agent_ids = []
760
756
  register_sessions = []
761
757
  for i, task in enumerate(pending_tasks):
@@ -801,7 +797,8 @@ async def execute_parallel_browser_tasks(state: VibeSurfState) -> List[BrowserTa
801
797
  task_id=f"{state.task_id}-{i + 1}",
802
798
  file_system_path=state.task_dir,
803
799
  register_new_step_callback=step_callback,
804
- extend_system_message="Please make sure the language of your output in JSON value should remain the same as the user's request or task."
800
+ extend_system_message="Please make sure the language of your output in JSON value should remain the same as the user's request or task.",
801
+ preload=False
805
802
  )
806
803
  agents.append(agent)
807
804
 
@@ -899,6 +896,7 @@ async def execute_single_browser_tasks(state: VibeSurfState) -> List[BrowserTask
899
896
  task_id=f"{state.task_id}-{i}",
900
897
  file_system_path=state.task_dir,
901
898
  register_new_step_callback=step_callback,
899
+ preload=False,
902
900
  extend_system_message="Please make sure the language of your output in JSON values should remain the same as the user's request or task."
903
901
  )
904
902
 
@@ -1444,7 +1442,7 @@ class VibeSurfAgent:
1444
1442
  # Also try to pause if available as a fallback
1445
1443
  if agent and hasattr(agent, 'stop'):
1446
1444
  await agent.stop()
1447
- logger.debug(f"⏸️ stop agent {agent_id}")
1445
+ logger.info(f"⏸️ stop agent {agent_id}")
1448
1446
  except Exception as e:
1449
1447
  logger.warning(f"⚠️ Failed to stop agent {agent_id}: {e}")
1450
1448
 
@@ -1454,7 +1452,7 @@ class VibeSurfAgent:
1454
1452
  try:
1455
1453
  if hasattr(agent, 'pause'):
1456
1454
  await agent.pause()
1457
- logger.debug(f"⏸️ Paused agent {agent_id}")
1455
+ logger.info(f"⏸️ Paused agent {agent_id}")
1458
1456
  if self._current_state:
1459
1457
  self._current_state.paused_agents.add(agent_id)
1460
1458
  except Exception as e:
@@ -1466,7 +1464,7 @@ class VibeSurfAgent:
1466
1464
  try:
1467
1465
  if hasattr(agent, 'resume'):
1468
1466
  await agent.resume()
1469
- logger.debug(f"▶️ Resumed agent {agent_id}")
1467
+ logger.info(f"▶️ Resumed agent {agent_id}")
1470
1468
  if self._current_state:
1471
1469
  self._current_state.paused_agents.discard(agent_id)
1472
1470
  except Exception as e:
@@ -1586,9 +1584,6 @@ class VibeSurfAgent:
1586
1584
  agent_activity_logs.append(activity_entry)
1587
1585
  return f"# Task Execution Failed\n\n**Task:** {task}\n\n**Error:** {str(e)}\n\nPlease try again or contact support."
1588
1586
  finally:
1589
- # Reset state
1590
- self.save_message_history()
1591
- self.save_activity_logs()
1592
1587
  if agent_activity_logs:
1593
1588
  activity_entry = {
1594
1589
  "agent_name": "VibeSurfAgent",
@@ -1596,6 +1591,9 @@ class VibeSurfAgent:
1596
1591
  "agent_msg": "Finish Task."
1597
1592
  }
1598
1593
  agent_activity_logs.append(activity_entry)
1594
+ # Reset state
1595
+ self.save_message_history()
1596
+ self.save_activity_logs()
1599
1597
  async with self._control_lock:
1600
1598
  self._current_state = None
1601
1599
  self._execution_task = None
@@ -43,21 +43,21 @@ def create_llm_from_profile(llm_profile):
43
43
 
44
44
  # Define provider-specific parameter support
45
45
  provider_param_support = {
46
- "openai": ["temperature", "top_p", "frequency_penalty", "seed"],
47
- "anthropic": ["temperature", "top_p"],
48
- "google": ["temperature", "top_p"],
49
- "azure_openai": ["temperature", "top_p", "frequency_penalty", "seed"],
50
- "groq": ["temperature", "top_p"],
51
- "ollama": ["temperature"],
52
- "openrouter": ["temperature", "top_p"], # OpenRouter doesn't support max_tokens
53
- "deepseek": ["temperature", "top_p"],
46
+ "openai": ["temperature"],
47
+ "anthropic": ["temperature"],
48
+ "google": ["temperature"],
49
+ "azure_openai": ["temperature"],
50
+ "groq": ["temperature"],
51
+ "ollama": [],
52
+ "openrouter": ["temperature"], # OpenRouter doesn't support max_tokens
53
+ "deepseek": ["temperature"],
54
54
  "aws_bedrock": ["temperature"],
55
55
  "anthropic_bedrock": ["temperature"],
56
- "openai_compatible": ["temperature", "top_p", "frequency_penalty", "seed"]
56
+ "openai_compatible": ["temperature"]
57
57
  }
58
58
 
59
59
  # Build common parameters based on provider support
60
- supported_params = provider_param_support.get(provider, ["temperature", "top_p", "frequency_penalty", "seed"])
60
+ supported_params = provider_param_support.get(provider, [])
61
61
  common_params = {}
62
62
 
63
63
  if temperature is not None and "temperature" in supported_params:
@@ -200,12 +200,15 @@ class VibeSurfSessionManager {
200
200
  throw new Error('No active session. Please create a session first.');
201
201
  }
202
202
 
203
- const taskPayload = {
204
- session_id: this.currentSession.id,
205
- ...taskData
206
- };
207
-
208
203
  try {
204
+ console.log('[SessionManager] 🔄 Syncing activity logs before task submission...');
205
+ await this.syncActivityLogsFromServer();
206
+
207
+ const taskPayload = {
208
+ session_id: this.currentSession.id,
209
+ ...taskData
210
+ };
211
+
209
212
  const response = await this.apiClient.submitTask(taskPayload);
210
213
 
211
214
  // Update current session with task info
@@ -339,7 +342,6 @@ class VibeSurfSessionManager {
339
342
  }
340
343
 
341
344
  try {
342
- // ✅ 使用当前logs数量作为message_index,确保获取下一个预期的log
343
345
  const requestIndex = this.activityLogs.length;
344
346
 
345
347
  console.log(`[SessionManager] 🔄 Polling activity at index ${requestIndex}, current logs: ${this.activityLogs.length}`);
@@ -353,8 +355,7 @@ class VibeSurfSessionManager {
353
355
  // Check both possible response formats
354
356
  const activityLog = response?.activity_log || response?.data?.activity_log;
355
357
  const totalAvailable = response?.total_available || response?.data?.total_available;
356
-
357
- // ✅ 关键逻辑:只有当获取到新log且与上一个不同时才处理
358
+
358
359
  if (response && activityLog) {
359
360
  const prevActivityLog = this.activityLogs.length > 0 ? this.activityLogs[this.activityLogs.length - 1] : null;
360
361
 
@@ -371,8 +372,8 @@ class VibeSurfSessionManager {
371
372
  }
372
373
 
373
374
  this.activityLogs.push(newLog);
374
-
375
- console.log(`[SessionManager] ✅ New unique activity received: ${newLog.agent_name} - ${newLog.agent_status}`);
375
+
376
+ console.log(`[SessionManager] ✅ New activity received: ${newLog.agent_name} - ${newLog.agent_status}`);
376
377
 
377
378
  await this.handleActivityUpdate(newLog);
378
379
 
@@ -383,8 +384,7 @@ class VibeSurfSessionManager {
383
384
  });
384
385
 
385
386
  // Check if task is completed or terminated
386
- const terminalStatuses = ['done', 'completed', 'finished', 'error', 'failed',
387
- 'terminated', 'stopped', 'cancelled', 'aborted'];
387
+ const terminalStatuses = ['done'];
388
388
 
389
389
  if (terminalStatuses.includes(newLog.agent_status?.toLowerCase())) {
390
390
  this.stopActivityPolling();
@@ -430,7 +430,6 @@ class VibeSurfSessionManager {
430
430
  }
431
431
  }
432
432
 
433
- // ✅ 新增:比较两个activity log是否相等的辅助方法
434
433
  areLogsEqual(log1, log2) {
435
434
  if (!log1 || !log2) return false;
436
435
 
@@ -477,6 +476,47 @@ class VibeSurfSessionManager {
477
476
  }
478
477
  }
479
478
 
479
+ async syncActivityLogsFromServer() {
480
+ if (!this.currentSession) return;
481
+
482
+ try {
483
+ console.log(`[SessionManager] 🔄 Syncing all activity logs from server for session: ${this.currentSession.id}`);
484
+
485
+ // Get all activity logs from server
486
+ const response = await this.apiClient.getSessionActivity(this.currentSession.id);
487
+
488
+ // Check both possible response formats
489
+ const serverLogs = response?.activity_logs || response?.data?.activity_logs || [];
490
+
491
+ if (Array.isArray(serverLogs)) {
492
+ // 完全同步:用服务器端的logs替换本地logs
493
+ const previousCount = this.activityLogs.length;
494
+
495
+ // 添加timestamp给没有的logs
496
+ const processedLogs = serverLogs.map(log => ({
497
+ ...log,
498
+ timestamp: log.timestamp || new Date().toISOString()
499
+ }));
500
+
501
+ this.activityLogs = processedLogs;
502
+
503
+ console.log(`[SessionManager] ✅ Activity logs synced: ${previousCount} -> ${this.activityLogs.length} logs`);
504
+
505
+ // 触发日志加载事件,让UI更新
506
+ this.emit('activityLogsLoaded', {
507
+ sessionId: this.currentSession.id,
508
+ logs: this.activityLogs
509
+ });
510
+ } else {
511
+ console.log(`[SessionManager] 📝 No activity logs found on server for session: ${this.currentSession.id}`);
512
+ this.activityLogs = [];
513
+ }
514
+ } catch (error) {
515
+ console.error(`[SessionManager] ❌ Failed to sync activity logs from server:`, error);
516
+ // 不抛出错误,允许任务提交继续进行
517
+ }
518
+ }
519
+
480
520
  async handleActivityUpdate(activityLog) {
481
521
  // Update current task status based on activity
482
522
  if (this.currentSession?.currentTask && activityLog.agent_status) {
@@ -506,7 +506,7 @@ class VibeSurfUIManager {
506
506
  if (this.controlPanelMinVisibilityActive) {
507
507
  console.log('[UIManager] Task completed during minimum visibility period, delaying control panel hide');
508
508
  // Wait for minimum visibility period to end before hiding
509
- const remainingTime = 2000; // Could be calculated more precisely, but 2s is reasonable
509
+ const remainingTime = 1000; // Could be calculated more precisely, but 2s is reasonable
510
510
  setTimeout(() => {
511
511
  console.log('[UIManager] Minimum visibility period respected, now hiding control panel');
512
512
  this.updateControlPanel('ready');
@@ -543,7 +543,25 @@ class VibeSurfUIManager {
543
543
  handleTaskError(data) {
544
544
  console.error('[UIManager] Task error:', data.error);
545
545
  this.showNotification(`Task error: ${data.error}`, 'error');
546
- this.updateControlPanel('ready');
546
+
547
+ // ✅ FIXED: Keep control panel visible during errors
548
+ // Don't assume task stopped - it might still be running server-side
549
+ this.updateControlPanel('error');
550
+
551
+ // Optional: Verify task status after a delay
552
+ setTimeout(() => {
553
+ this.checkTaskStatus().then(status => {
554
+ if (!status.isRunning) {
555
+ console.log('[UIManager] Task confirmed stopped after error, hiding controls');
556
+ this.updateControlPanel('ready');
557
+ } else {
558
+ console.log('[UIManager] Task still running after error, keeping controls visible');
559
+ }
560
+ }).catch(err => {
561
+ console.warn('[UIManager] Could not verify task status after error:', err);
562
+ // If we can't verify, keep controls visible for safety
563
+ });
564
+ }, 1000);
547
565
  }
548
566
 
549
567
  // Task Status Monitoring
@@ -571,7 +589,7 @@ class VibeSurfUIManager {
571
589
  // Check task status every 2 seconds
572
590
  this.taskStatusInterval = setInterval(() => {
573
591
  this.checkTaskStatus();
574
- }, 2000);
592
+ }, 500);
575
593
  }
576
594
 
577
595
  stopTaskStatusMonitoring() {
@@ -2413,11 +2431,13 @@ class VibeSurfUIManager {
2413
2431
  case 'ready':
2414
2432
  console.log('[UIManager] Setting control panel to ready (hidden)');
2415
2433
  panel.classList.add('hidden');
2434
+ panel.classList.remove('error-state');
2416
2435
  break;
2417
2436
 
2418
2437
  case 'running':
2419
2438
  console.log('[UIManager] Setting control panel to running (showing cancel button)');
2420
2439
  panel.classList.remove('hidden');
2440
+ panel.classList.remove('error-state');
2421
2441
  cancelBtn?.classList.remove('hidden');
2422
2442
  resumeBtn?.classList.add('hidden');
2423
2443
  terminateBtn?.classList.add('hidden');
@@ -2429,14 +2449,25 @@ class VibeSurfUIManager {
2429
2449
  case 'paused':
2430
2450
  console.log('[UIManager] Setting control panel to paused (showing resume/terminate buttons)');
2431
2451
  panel.classList.remove('hidden');
2452
+ panel.classList.remove('error-state');
2432
2453
  cancelBtn?.classList.add('hidden');
2433
2454
  resumeBtn?.classList.remove('hidden');
2434
2455
  terminateBtn?.classList.remove('hidden');
2435
2456
  break;
2436
2457
 
2458
+ case 'error':
2459
+ console.log('[UIManager] Setting control panel to error (keeping cancel/terminate buttons visible)');
2460
+ panel.classList.remove('hidden');
2461
+ panel.classList.add('error-state');
2462
+ cancelBtn?.classList.remove('hidden');
2463
+ resumeBtn?.classList.add('hidden');
2464
+ terminateBtn?.classList.remove('hidden');
2465
+ break;
2466
+
2437
2467
  default:
2438
2468
  console.log(`[UIManager] Unknown control panel status: ${status}, hiding panel`);
2439
2469
  panel.classList.add('hidden');
2470
+ panel.classList.remove('error-state');
2440
2471
  }
2441
2472
  }
2442
2473
 
@@ -417,6 +417,37 @@ body {
417
417
  background-color: rgba(220, 53, 69, 0.1);
418
418
  }
419
419
 
420
+ /* Control Panel Error State */
421
+ .control-panel.error-state {
422
+ background-color: rgba(220, 53, 69, 0.05);
423
+ border-left: 4px solid var(--danger-color);
424
+ border-color: rgba(220, 53, 69, 0.2);
425
+ box-shadow: 0 2px 8px rgba(220, 53, 69, 0.1);
426
+ }
427
+
428
+ .control-panel.error-state::before {
429
+ content: '⚠️ Error occurred - task controls remain available';
430
+ display: block;
431
+ font-size: var(--font-size-xs);
432
+ color: var(--danger-color);
433
+ margin-bottom: var(--spacing-sm);
434
+ padding: var(--spacing-xs) var(--spacing-sm);
435
+ background-color: rgba(220, 53, 69, 0.1);
436
+ border-radius: var(--radius-sm);
437
+ border: 1px solid rgba(220, 53, 69, 0.2);
438
+ font-weight: var(--font-weight-medium);
439
+ }
440
+
441
+ .control-panel.error-state .control-btn {
442
+ border-color: rgba(220, 53, 69, 0.3);
443
+ background-color: rgba(255, 255, 255, 0.9);
444
+ }
445
+
446
+ .control-panel.error-state .control-btn:hover {
447
+ background-color: var(--bg-primary);
448
+ box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
449
+ }
450
+
420
451
  /* Input Section */
421
452
  .input-section {
422
453
  background-color: var(--bg-primary);
@@ -13,6 +13,10 @@ import platform
13
13
  import importlib.util
14
14
  from pathlib import Path
15
15
  from typing import Optional
16
+ import os
17
+
18
+ # In case user has a proxy in localhost
19
+ os.environ['no_proxy'] = 'localhost,127.0.0.1,::1'
16
20
 
17
21
  try:
18
22
  from rich.console import Console
@@ -388,7 +392,9 @@ def main():
388
392
  try:
389
393
  # Display logo
390
394
  console.print(Panel(VIBESURF_LOGO, title="[bold cyan]VibeSurf CLI[/bold cyan]", border_style="cyan"))
391
- console.print("[dim]A powerful browser automation tool for vibe surfing 🏄‍♂️[/dim]\n")
395
+ console.print("[dim]A powerful browser automation tool for vibe surfing 🏄‍♂️[/dim]")
396
+ import vibe_surf
397
+ console.print(f"[dim]Version: {vibe_surf.__version__}[/dim]\n")
392
398
 
393
399
  # Check for existing browser path from configuration
394
400
  browser_path = get_browser_execution_path()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vibesurf
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: VibeSurf: A powerful browser assistant for vibe surfing
5
5
  Author: Shao Warm
6
6
  License: Apache-2.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes