Skip to content

Commit df54d80

Browse files
committed
address review comment
1 parent c450f64 commit df54d80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

browsergym/core/src/browsergym/utils/mcp_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ async def decorator(*args, **kwargs):
139139
"""
140140
gym: BrowserEnv = mcp.get_context().request_context.lifespan_context.gym # type: ignore
141141
while not isinstance(gym, BrowserEnv):
142-
gym = gym.env
142+
gym = gym.env # gym library wraps the BrowserEnv in a few layers (usually 2) of wrappers, this loop unwraps them
143143

144144
# Load the parent module of the function to use as function context
145145
import browsergym.core.action.functions as fn_context

0 commit comments

Comments
 (0)