-
Notifications
You must be signed in to change notification settings - Fork 2k
AI-807: Integrate the show-component ability #107900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AI-807: Integrate the show-component ability #107900
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
|
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Async-loaded Components (~182 bytes added 📈 [gzipped]) DetailsReact components that are loaded lazily, when a certain part of UI is displayed for the first time. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
|
Also need to address the |
There was a problem hiding this 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 integrates Big Sky's show-component ability into Calypso's agents manager, enabling users to interactively request UI components like fonts, layouts, and colors. Additionally, it includes several improvements to the chat UI including font picker styling fixes, a broken save confirmation panel fix, and cleanup of unused code.
Key Changes:
- Extended the
AbilitiesSetupHooktype to accept action handlers for managing messages, thinking state, and suggestions - Added message filtering to hide local tool running messages and support message deletion
- Updated empty view suggestions to dynamically use agent-provided suggestions when available
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
packages/agents-manager/src/utils/load-external-providers.ts |
Updated AbilitiesSetupHook type signature to accept action handlers for message management and chat interaction |
packages/agents-manager/src/hooks/use-agent-layout-manager/style.scss |
Simplified editor-save-panel-open mixin by removing unused parameter; fixed font picker outline styles; added undocked chat font picker styles |
packages/agents-manager/src/constants.ts |
Added LOCAL_TOOL_RUNNING_MESSAGE constant for filtering internal messages |
packages/agents-manager/src/components/agent-dock/index.tsx |
Implemented message filtering, thinking state management, deleted messages tracking, and invoked abilities setup with action handlers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| messages.filter( | ||
| ( message ) => | ||
| ! deletedMessageIds.has( message.id ) && | ||
| ! message.content.some( ( content ) => content.text === LOCAL_TOOL_RUNNING_MESSAGE ) |
Copilot
AI
Jan 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filtering logic assumes that message.content is always an array and that content items have a 'text' property. However, there's no null or undefined check for the content array or the text property. If a message has null/undefined content or if content items lack a text property, this could throw a runtime error. Consider adding optional chaining or type guards to safely handle these cases.
| ! message.content.some( ( content ) => content.text === LOCAL_TOOL_RUNNING_MESSAGE ) | |
| ! message.content?.some( | |
| ( content ) => content?.text === LOCAL_TOOL_RUNNING_MESSAGE | |
| ) |
jcheringer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, and it worked well.
I just noticed that we might need to adjust the message preview shown in the chat history list. You can see that at the end of the video below.
Screen.Recording.2026-01-07.at.11.33.18.mov
@jcheringer Thank you for the review. The chat history is new to the Big Sky AI chat, so all the relevant cases haven't been covered. I have created a Linear task for the issue: AI-811 |
* AI-807: Integrate the show-component ability * Pass `getAgentManager()` * Add custom `setIsThinking()` action * Implement `deleteMarkedMessages()` action * Fix: Broken saving confirmation panel * Fix: Font picker styles * Filter the `LOCAL_TOOL_RUNNING_MESSAGE` out * Fix: Font picker border-radius * Merge `registerCustomActions` with `useAbilitiesSetup` * Update comment * Perf: Memo `visibleMessages` variable * Use agent `suggestions` for the empty view as well * Address `clearSuggestions` case * Address GH review feedback --------- Co-authored-by: Welly Shen <[email protected]>
Part of AI-807
Proposed Changes
Why are these changes being made?
Testing Instructions
/wp-admin/profile.phpbig-sky-plugin, check out to5359-gh-Automattic/big-sky-plugin, and runWPCOM_USERNAME=<YOUR_WPCOM_ID> pnpm build:wpcom -- --skip-i18ncd apps/help-center && yarn dev --syncLOCAL_TOOL_RUNNING_MESSAGEmessage has been filtered out2025-12-31.4.15.29.mov
Pre-merge Checklist