Conversation
for more information, see https://pre-commit.ci
|
🚀 Deployed on https://697fbdef1e35da9e0e38bae3--opengeos.netlify.app |
There was a problem hiding this comment.
Pull request overview
Updates the Solara chat sidebar layout so the message list scrolls while the input/actions remain visible, and adds pipeline stage status updates during query execution.
Changes:
- Refactors the chat sidebar into a flex column with a scrollable messages area and a sticky input/action footer.
- Adds reusable
ChatMessageandChatInputcomponents, including Enter-to-send behavior. - Adds an optional
status_callbackhook toGeoAgent.chatand emits stage updates during planning/fetch/analyze/visualize.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
geoagent/ui/pages/01_chat.py |
Reworks chat sidebar layout/components and wires UI status updates into query execution. |
geoagent/core/agent.py |
Extends GeoAgent.chat to accept a status callback and emits status stage signals from workflow nodes. |
Comments suppressed due to low confidence (1)
geoagent/ui/pages/01_chat.py:86
_run_querygained astatus_callbackargument, but the docstring doesn’t mention it. Please update the docstring to explain what the callback receives and when it will be called.
def _run_query(query: str, target_map, status_callback=None) -> str:
"""Run a GeoAgent query synchronously.
Passes the UI map directly as target_map so the VizAgent adds layers
to the *displayed* widget.
Returns:
Response text to display
"""
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| def _chat_with_status(agent: GeoAgent, query: str, target_map, status_callback=None): | ||
| if status_callback is None: | ||
| return agent.chat(query, target_map=target_map) | ||
| try: | ||
| sig = inspect.signature(agent.chat) | ||
| params = sig.parameters | ||
| accepts_kwargs = any( | ||
| param.kind == inspect.Parameter.VAR_KEYWORD for param in params.values() | ||
| ) | ||
| if "status_callback" in params or accepts_kwargs: | ||
| return agent.chat( | ||
| query, target_map=target_map, status_callback=status_callback | ||
| ) |
There was a problem hiding this comment.
Now that GeoAgent.chat in this repo explicitly supports status_callback, the _chat_with_status wrapper (and its inspect.signature call on every request) is unnecessary complexity/overhead. Consider calling agent.chat(..., status_callback=...) directly and removing the introspection helper unless you have a concrete cross-version compatibility requirement.
| param.kind == inspect.Parameter.VAR_KEYWORD for param in params.values() | ||
| ) | ||
| if "status_callback" in params or accepts_kwargs: | ||
| return agent.chat( |
There was a problem hiding this comment.
'except' clause does nothing but pass and there is no explanatory comment.
No description provided.