Skip to content

Plugin actions#47

Merged
charlesLoder merged 10 commits intomainfrom
plugin-actions
Nov 20, 2025
Merged

Plugin actions#47
charlesLoder merged 10 commits intomainfrom
plugin-actions

Conversation

@charlesLoder
Copy link
Owner

Closes #20

Summary

This PR adds:

  • a PromptInputButtons component API to the Provider class, which allows consumers of the Plugin to extend functionality
  • a demonstration of the above API by adding Tasks (i.e. workflows) to the UserTokenProvider class

@charlesLoder charlesLoder requested a review from Copilot November 20, 2025 17:48
Copy link
Contributor

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 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 to BaseProvider class 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_callback prop 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.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@charlesLoder charlesLoder merged commit 4465a15 into main Nov 20, 2025
4 checks passed
@charlesLoder charlesLoder deleted the plugin-actions branch November 20, 2025 17:57
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.

🔬How could an agent create an annotation?

1 participant

Comments