Skip to content

Conversation

ioanarm
Copy link
Contributor

@ioanarm ioanarm commented Aug 8, 2025

Related to #101

This PR introduces more efficient dashboard update capabilities using JSONPath-based patch operations, addressing context window management for large dashboards.

Ops.Dashboard.Jsonpath.Demo.mp4

Key Features

  • Patch-based Dashboard Updates: Added support for targeted dashboard modifications using JSONPath expressions ($.title, $.panels[0].targets[0].expr, etc.)
  • Context Window Optimization: New tools to reduce memory usage when working with large dashboards:
    get_dashboard_summary - Compact dashboard overview without full JSON
    get_dashboard_property - Extract specific dashboard parts using JSONPath

Benefits

  • Significantly reduced context window usage for dashboard operations
  • More efficient updates for small changes (no need to send full dashboard JSON)
  • Better performance when working with large, complex dashboards
  • Maintains backward compatibility with existing full-dashboard update workflows

@ioanarm ioanarm requested a review from a team as a code owner August 8, 2025 12:51
@ioanarm ioanarm requested a review from Copilot August 8, 2025 12:52
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces efficient dashboard update capabilities using JSONPath-based patch operations to address context window management for large dashboards. The implementation provides targeted dashboard modifications without requiring full dashboard JSON, significantly reducing memory usage.

Key changes:

  • Added patch-based dashboard updates using JSONPath expressions for specific dashboard modifications
  • Introduced context window optimization tools (get_dashboard_summary, get_dashboard_property) for working with large dashboards
  • Enhanced the update_dashboard function to support both full JSON and patch operation modes

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/dashboard.go Core implementation of patch operations, JSONPath handling, and new dashboard tools for context optimization
tools/dashboard_test.go Comprehensive test coverage for new patch operations and context management tools
tests/dashboards_test.py Python integration tests demonstrating patch-based dashboard updates
go.mod Added jsonpath library dependency
README.md Updated documentation describing new features and context window management strategies

@ioanarm ioanarm force-pushed the update-dashboards-jsonpath branch 2 times, most recently from ab288b1 to fd89338 Compare August 8, 2025 13:17
@ioanarm ioanarm changed the title Update dashboards jsonpath feat(tools): Update dashboards with jsonpath Aug 8, 2025
@ioanarm ioanarm force-pushed the update-dashboards-jsonpath branch 2 times, most recently from 001d38c to d323074 Compare August 8, 2025 14:05
@sd2k sd2k linked an issue Aug 8, 2025 that may be closed by this pull request
@ioanarm ioanarm force-pushed the update-dashboards-jsonpath branch from abdd76d to 6d24d11 Compare August 18, 2025 06:25
@SandersAaronD SandersAaronD merged commit 4371d04 into main Aug 19, 2025
15 of 16 checks passed
@SandersAaronD SandersAaronD deleted the update-dashboards-jsonpath branch August 19, 2025 05:10
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.

Strategy for managing context windows with Dashboard JSON
2 participants