Skip to content

Conversation

@AdityaHegde
Copy link
Collaborator

@AdityaHegde AdityaHegde commented Jan 20, 2026

Adds support for analyst agent for canvas dashboards.

  1. Sends current filters and active canvas to the completion API.
  2. Adds support for mention like context mentioning canvases or its components.

Closes APP-674

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@AdityaHegde AdityaHegde changed the title feat: add chat support in canvas preview mode feat: add analyst agent support for canvas dashboard Jan 29, 2026
@AdityaHegde AdityaHegde marked this pull request as ready for review January 29, 2026 14:40
@AdityaHegde AdityaHegde requested a review from ericokuma January 29, 2026 14:41
**Phase 1: discovery (setup)**
{{ if .explore }}
Your goal is to analyze the contents of the dashboard "{{ .explore }}", which is powered by the metrics view "{{ .metrics_view }}".
Your goal is to analyze the contents of the dashboard "{{ .explore }}", which is powered by the metrics view "{{ .metrics_views }}".
Copy link
Contributor

Choose a reason for hiding this comment

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

Plural + removing quotes since it's quoted by the code now

Suggested change
Your goal is to analyze the contents of the dashboard "{{ .explore }}", which is powered by the metrics view "{{ .metrics_views }}".
Your goal is to analyze the contents of the dashboard "{{ .explore }}", which is powered by the metrics view(s) {{ .metrics_views }}.

1. Carefully study the metrics view definition to understand the measures and dimensions available for analysis.
2. Remember the time range of available data and use it to inform and filter your queries.
{{ else if .canvas }}
Your goal is to analyze the contents of the canvas "{{ .canvas }}", which is powered by the metrics view "{{ .metrics_views }}".
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Your goal is to analyze the contents of the canvas "{{ .canvas }}", which is powered by the metrics view "{{ .metrics_views }}".
Your goal is to analyze the contents of the canvas "{{ .canvas }}", which is powered by the metrics view(s) {{ .metrics_views }}.

Comment on lines +8 to +15
runtimev1 "github.com/rilldata/rill/proto/gen/rill/runtime/v1"
"github.com/rilldata/rill/runtime/drivers"
"github.com/rilldata/rill/runtime/metricsview/metricssql"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

func (r *Runtime) ResolveCanvas(ctx context.Context, instanceID, canvas string, claims *SecurityClaims) (*runtimev1.ResolveCanvasResponse, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the runtime package is not server-specific, it should not use any of the server types, like codes or runtimev1.ResolveCanvasResponse.

I think the idiomatic way to handle the result here would be to add a ResolveCanvasResult type right in this file.

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.

3 participants