Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for plugin actions by introducing a PromptInputButtons component API to the Provider class, allowing providers to extend functionality with custom workflows. The UserTokenProvider demonstrates this API by implementing two task workflows: text transcription and annotation creation.
Key Changes:
- Added
PromptInputButtons()method toBaseProviderclass to enable custom action buttons in the prompt input area - Implemented two task workflows in
UserTokenProvider: transcribe text and create annotations - Added
viewer_iiif_content_callbackprop to enable updating viewer content from task results
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/plugin/base_provider.tsx | Added PromptInputButtons() API method and improved documentation |
| src/plugin/Panel/index.tsx | Updated method name from update_dispatch to update_plugin_dispatch |
| src/plugin/Panel/ChatInput/index.tsx | Integrated PromptInputButtons component and fixed button type attributes |
| src/providers/userTokenProvider/index.tsx | Implemented tasks functionality with transcription and annotation workflows |
| src/providers/userTokenProvider/style.module.css | Added styling for tasks UI components |
| src/components/Button/index.tsx | Added default type="button" attribute |
| src/components/PromptInput/index.tsx | Made aria-label customizable via props |
| src/icons/BulletList.tsx | Added new BulletList icon component |
| dev/index.tsx | Updated development app to demonstrate viewer content callback |
| stories/docs/creating-a-provider.mdx | Updated documentation to reflect renamed method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #20
Summary
This PR adds:
PromptInputButtonscomponent API to the Provider class, which allows consumers of the Plugin to extend functionalityUserTokenProviderclass