Skip to content
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

[FEATURE_REQUEST] Add events when importing and saving character cards/json #2252

Open
JasonLWalker opened this issue May 16, 2024 · 0 comments
Labels
🦄 Feature Request [ISSUE] Suggestion for new feature, update or change

Comments

@JasonLWalker
Copy link

Have you searched for similar requests?

Yes

Is your feature request related to a problem? If so, please describe.

It would be good to have some sort of events that fire when a character is being imported or saved/exported. This would allow plugin developers to add additional import/export types and handlers that could listen for, intercept and handle these new types without having to modify the main SillyTavern source code.

Describe the solution you'd like

a slight modification to /src/endpoints/characters.js would allow the importFromPng, importFromYaml, and importFromJson to fire events that could then be consumed by plugins. If a plugin handles the event, then it could indicate so, and further plugins could then ignore the event.

This could also allow the existing handling of special cases such as CHUB, JanitorAi, and Pygmalion to be moved to plugins to make it easier to maintain them, and additional import/export modules (such as NovelAI/HoloAI) could be more easily build by third-party developers.

I'm looking at building a NovelAI importer for 1.12.0, and would be willing to provide a PR to implement all this if I get to it before someone else does.

Describe alternatives you've considered

No response

Additional context

No response

Priority

Medium (Would be very useful)

Are you willing to test this on staging/unstable branch if this is implemented?

Yes

@JasonLWalker JasonLWalker added the 🦄 Feature Request [ISSUE] Suggestion for new feature, update or change label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦄 Feature Request [ISSUE] Suggestion for new feature, update or change
Projects
None yet
Development

No branches or pull requests

1 participant