Skip to content

Conversation

@jiapingzeng
Copy link

@jiapingzeng jiapingzeng commented Oct 20, 2025

Description

Add page navigation AG-UI tool.

Chat window and session is not currently preserved on navigation. Will address in future PR.

Issues Resolved

Screenshot

Tool can be detected by agent, then tried navigating to visualizations page which worked:
image

Temporarily disabled navigate to show that tool use renders correctly:
image

Testing the changes

Verified that backend agent can see the tool and that I can navigate to visualizations page from chat

Changelog

  • feat: [Context Provider][Tools] Add navigate to page tool

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@github-actions
Copy link
Contributor

❌ Invalid Prefix For Manual Changeset Creation

Invalid description prefix. Found "feat". Only "skip" entry option is permitted for manual commit of changeset files.

If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description.

@github-actions
Copy link
Contributor

❌ Invalid Prefix For Manual Changeset Creation

Invalid description prefix. Found "feat". Only "skip" entry option is permitted for manual commit of changeset files.

If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description.

Signed-off-by: Jiaping Zeng <[email protected]>
@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 95.83333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 60.52%. Comparing base (b175397) to head (138ac9e).

Files with missing lines Patch % Lines
src/plugins/chat/public/components/chat_window.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10759   +/-   ##
=======================================
  Coverage   60.51%   60.52%           
=======================================
  Files        4485     4486    +1     
  Lines      120190   120214   +24     
  Branches    19912    19922   +10     
=======================================
+ Hits        72737    72758   +21     
- Misses      42410    42413    +3     
  Partials     5043     5043           
Flag Coverage Δ
Linux_1 26.58% <ø> (ø)
Linux_2 38.82% <ø> (ø)
Linux_3 39.11% <95.83%> (+0.01%) ⬆️
Linux_4 33.28% <ø> (ø)
Windows_1 26.59% <ø> (ø)
Windows_2 38.79% <ø> (ø)
Windows_3 39.12% <95.83%> (+0.01%) ⬆️
Windows_4 33.28% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

interface NavigateArgs {
appId: string;
path?: string;
description?: string;
Copy link
Member

Choose a reason for hiding this comment

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

navigation has two other optional properties, replace and state. state is used to pass context/data and it might not be the correct way for context sharing for chatbot. It is often used to share some app states which I don't think this tool should manage. for replace, it can control whether navigation creates a new history entry (push) or replaces the current one (replace) which is useful if we need to navigate back and force. let's add replace?: boolean to follow the navigation pattern.

if (!appId || typeof appId !== 'string') {
throw new Error('appId is required and must be a string');
}

Copy link
Member

Choose a reason for hiding this comment

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

should we also validate appId in services.application.applications$.getValue()? it might not be available or accessible. for example, explore is not accessible in analytic workspaces.

@ananzh
Copy link
Member

ananzh commented Oct 21, 2025

Nit: if we want to distinguish between appId not available or no permission, we could use

  const currentApps = services.application.applications$.getValue();
  const targetApp = currentApps.get(args.appId);

   if (!targetApp) {
    ...
   }

  if (targetApp.status === AppStatus.inaccessible) {
     ...
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants