Skip to content

feat: Timelapse tools and for_timelapse factory#62

Merged
giswqs merged 2 commits into
mainfrom
feat/timelapse-tools
May 1, 2026
Merged

feat: Timelapse tools and for_timelapse factory#62
giswqs merged 2 commits into
mainfrom
feat/timelapse-tools

Conversation

@giswqs

@giswqs giswqs commented May 1, 2026

Copy link
Copy Markdown
Member

Summary

  • Add geoagent/tools/timelapse.py with tools to list imagery types, read the current QGIS extent, initialize Earth Engine, create timelapse GIFs, and open Timelapse plugin panels.
  • Add for_timelapse factory 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.
  • Cover the new factory, tool dispatch, snippet builder, and trusted-image extraction with unit tests.

Test plan

  • pre-commit run --all-files
  • pytest tests/test_timelapse_tools.py qgis_geoagent/tests/test_chat_tool_inputs.py -q (only failures are pre-existing on main and unrelated to this change)

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.
Copilot AI review requested due to automatic review settings May 1, 2026 05:39
@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot temporarily deployed to pull request May 1, 2026 05:40 Inactive

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.py and wires it into assemble_tools() plus a new for_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.

Comment thread qgis_geoagent/open_geoagent/dialogs/chat_dock.py
Comment thread geoagent/tools/timelapse.py Outdated
Comment thread geoagent/tools/timelapse.py Outdated
Comment thread geoagent/tools/timelapse.py Outdated
- 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.
@github-actions github-actions Bot temporarily deployed to pull request May 1, 2026 05:49 Inactive
@giswqs giswqs merged commit 1a78ffc into main May 1, 2026
9 checks passed
@giswqs giswqs deleted the feat/timelapse-tools branch May 1, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants