@minded-ai/mindedjs 2.0.26-beta.6 → 2.0.26-beta.7
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.
|
@@ -77,18 +77,11 @@ class ScreenshotCapture:
|
|
|
77
77
|
# Get current page
|
|
78
78
|
page = await agent.browser_session.get_current_page()
|
|
79
79
|
|
|
80
|
-
# Get current URL for logging (browser-use might use method instead of property)
|
|
81
|
-
try:
|
|
82
|
-
current_url = page.url if hasattr(page, 'url') else page.url()
|
|
83
|
-
except Exception as e:
|
|
84
|
-
logger.warning(f"⚠️ Failed to get current URL: {str(e)}")
|
|
85
|
-
return
|
|
86
|
-
|
|
87
80
|
# Update step counter
|
|
88
81
|
step_number = self.step_counter
|
|
89
82
|
self.step_counter += 1
|
|
90
83
|
|
|
91
|
-
logger.info(f"📸 Capturing screenshot #{step_number}
|
|
84
|
+
logger.info(f"📸 Capturing screenshot #{step_number}")
|
|
92
85
|
|
|
93
86
|
# Take screenshot - browser-use takes viewport by default
|
|
94
87
|
# Set timeout to prevent hanging (30 seconds)
|
|
@@ -192,20 +185,15 @@ class LogsCapture:
|
|
|
192
185
|
try:
|
|
193
186
|
model_outputs = history.model_outputs() if hasattr(history, 'model_outputs') else []
|
|
194
187
|
for model_output in model_outputs:
|
|
195
|
-
print(f"model_output")
|
|
196
188
|
if hasattr(model_output, 'current_state'):
|
|
197
|
-
print(f"model_output.current_state")
|
|
198
189
|
if model_output.current_state.thinking:
|
|
199
190
|
self.log_entries.append('💡 Thinking: ' + model_output.current_state.thinking)
|
|
200
191
|
if model_output.current_state.memory:
|
|
201
192
|
self.log_entries.append('🧠 Memory: ' + model_output.current_state.memory)
|
|
202
193
|
if model_output.current_state.next_goal:
|
|
203
194
|
self.log_entries.append('🎯 Next goal: ' + model_output.current_state.next_goal)
|
|
204
|
-
print("Finished adding log entries")
|
|
205
195
|
except Exception as e:
|
|
206
196
|
logger.warning(f"Could not extract model outputs: {e}")
|
|
207
|
-
|
|
208
|
-
print(f"self.log_entries count: {len(self.log_entries)}")
|
|
209
197
|
|
|
210
198
|
# Upload to S3
|
|
211
199
|
s3_key = f"{self.s3_prefix}{self.session_id}/{self.tool_call_id}/operator.log"
|
package/package.json
CHANGED
|
@@ -77,18 +77,11 @@ class ScreenshotCapture:
|
|
|
77
77
|
# Get current page
|
|
78
78
|
page = await agent.browser_session.get_current_page()
|
|
79
79
|
|
|
80
|
-
# Get current URL for logging (browser-use might use method instead of property)
|
|
81
|
-
try:
|
|
82
|
-
current_url = page.url if hasattr(page, 'url') else page.url()
|
|
83
|
-
except Exception as e:
|
|
84
|
-
logger.warning(f"⚠️ Failed to get current URL: {str(e)}")
|
|
85
|
-
return
|
|
86
|
-
|
|
87
80
|
# Update step counter
|
|
88
81
|
step_number = self.step_counter
|
|
89
82
|
self.step_counter += 1
|
|
90
83
|
|
|
91
|
-
logger.info(f"📸 Capturing screenshot #{step_number}
|
|
84
|
+
logger.info(f"📸 Capturing screenshot #{step_number}")
|
|
92
85
|
|
|
93
86
|
# Take screenshot - browser-use takes viewport by default
|
|
94
87
|
# Set timeout to prevent hanging (30 seconds)
|
|
@@ -192,20 +185,15 @@ class LogsCapture:
|
|
|
192
185
|
try:
|
|
193
186
|
model_outputs = history.model_outputs() if hasattr(history, 'model_outputs') else []
|
|
194
187
|
for model_output in model_outputs:
|
|
195
|
-
print(f"model_output")
|
|
196
188
|
if hasattr(model_output, 'current_state'):
|
|
197
|
-
print(f"model_output.current_state")
|
|
198
189
|
if model_output.current_state.thinking:
|
|
199
190
|
self.log_entries.append('💡 Thinking: ' + model_output.current_state.thinking)
|
|
200
191
|
if model_output.current_state.memory:
|
|
201
192
|
self.log_entries.append('🧠 Memory: ' + model_output.current_state.memory)
|
|
202
193
|
if model_output.current_state.next_goal:
|
|
203
194
|
self.log_entries.append('🎯 Next goal: ' + model_output.current_state.next_goal)
|
|
204
|
-
print("Finished adding log entries")
|
|
205
195
|
except Exception as e:
|
|
206
196
|
logger.warning(f"Could not extract model outputs: {e}")
|
|
207
|
-
|
|
208
|
-
print(f"self.log_entries count: {len(self.log_entries)}")
|
|
209
197
|
|
|
210
198
|
# Upload to S3
|
|
211
199
|
s3_key = f"{self.s3_prefix}{self.session_id}/{self.tool_call_id}/operator.log"
|