feat: Timelapse tools and for_timelapse factory#62
Merged
Conversation
Add Timelapse plugin integration so GeoAgent can list imagery types, read the current QGIS extent, initialize Earth Engine, and generate timelapse GIFs. Wire a Timelapse agent mode into the OpenGeoAgent chat dock with inline GIF preview, copyable Python script, and bbox layer.
|
🚀 Deployed on https://69f43eff0c4cac20f31ad9bb--opengeos.netlify.app |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Timelapse integration across the core geoagent library and the QGIS plugin UI, including tools/factory wiring and UI support for Timelapse GIF outputs.
Changes:
- Introduces
geoagent/tools/timelapse.pyand wires it intoassemble_tools()plus a newfor_timelapse()factory/system prompt. - Extends the QGIS chat dock with a “Timelapse” agent mode, “Copy Script” snippet generation for
create_timelapse, and animated GIF preview support. - Adds unit tests covering the new tool factory, snippet builder behavior, and output-image extraction behavior.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_timelapse_tools.py | New unit tests for Timelapse tool surface, dispatch, bbox-layer behavior, and for_timelapse() registration. |
| qgis_geoagent/tests/test_chat_tool_inputs.py | Adds coverage for GIF thumbnails, Timelapse snippet generation, and trusted-output image extraction. |
| qgis_geoagent/open_geoagent/dialogs/chat_dock.py | Adds Timelapse mode, snippet builder, trusted-image extraction, and GIF preview via QMovie. |
| geoagent/tools/timelapse.py | New Timelapse tool adapters: imagery listing, extent, EE init, GIF creation, bbox-layer creation, and panel openers. |
| geoagent/tools/init.py | Exports timelapse_tools. |
| geoagent/core/factory.py | Adds TIMELAPSE_SYSTEM_PROMPT, include_timelapse plumbing, and for_timelapse() factory. |
| geoagent/init.py | Re-exports for_timelapse. |
| .gitignore | Ignores symbology-style.db. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- timelapse.py: insert plugin parent at the front of `sys.path` so the bundled `timelapse` package wins over any pip-installed namesake. - timelapse.py: split QGIS import vs. layer-creation error handling so `_FallbackBboxLayer` is only used when QGIS classes can't be imported; surface other failures with `success=False` and the actual reason. - timelapse.py: expand `~` in user-supplied `output_path` before resolving it to an absolute path. - chat_dock.py: re-apply the allowlist check inside `_local_image_metadata_from_path` so trusted-tool output text can't surface arbitrary local images, and add the Timelapse temp output dir (`open_geoagent_timelapse`) to the allowlist.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
geoagent/tools/timelapse.pywith tools to list imagery types, read the current QGIS extent, initialize Earth Engine, create timelapse GIFs, and open Timelapse plugin panels.for_timelapsefactory that bundles Timelapse and QGIS map tools, plus a Timelapse agent mode in the OpenGeoAgent chat dock with GIF preview, copyable Python snippet, and a bbox polygon layer.Test plan
pre-commit run --all-filespytest tests/test_timelapse_tools.py qgis_geoagent/tests/test_chat_tool_inputs.py -q(only failures are pre-existing onmainand unrelated to this change)