mirror of
https://github.com/SillyTavern/SillyTavern-Docs.git
synced 2026-10-15 18:01:56 +00:00
[PR #195] [MERGED] Comprehensive update to UI Extensions documentation — lifecycle hooks, tool calling, action loader, popups, macros, and more #197
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
SillyTavern/SillyTavern-Docs#197
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/SillyTavern/SillyTavern-Docs/pull/195
Author: @Wolfsblvt
Created: 3/24/2026
Status: ✅ Merged
Merged: 5/3/2026
Merged by: @Cohee1207
Base:
main← Head:doc/writing-extensions-extensions📝 Commits (4)
84a5b0fDocument lifecycle hooks, HTML templates, function tool calling, action loader, and expand macro/event/library documentation9d456d2Improve function calling documentation: add canPerformToolCalls, clarify examples, and expand tips0fbf0f1Merge branch 'main' into doc/writing-extensions-extensionsed1ca0cAdd 'clean' hook📊 Changes
1 file changed (+12 additions, -1 deletions)
View changed files
📝
For_Contributors/Writing-Extensions.md(+12 -1)📄 Description
Summary
Major overhaul of the Writing Extensions guide to reflect the current state of SillyTavern's extension API. The document was significantly behind the actual codebase — missing entire feature categories like lifecycle hooks, function tool calling, and the action loader system. This update brings it up to date so extension authors have a single, reliable reference.
What Changed
hooksmanifest field (install, update, delete, enable, disable, activate) with implementation examples and timeout behaviorloaderAPI that replaces the deprecatedshowLoader/hideLoader, covering blocking/non-blocking modes and stackingrenderExtensionTemplateAsync()with template file examples using the inline-drawer patternregisterDebugFunction()for the Debug Menumacros.register()system with categories, arguments, and handler context; marks the legacy registerMacro()/unregisterMacro() as deprecatedWhy These Changes
The Writing Extensions doc is meant to be the primary reference for anyone building a SillyTavern extension. It had fallen behind — entire systems like tool calling and lifecycle hooks weren't mentioned at all, the macro section described a now-deprecated API, the shared library list was missing 18 entries, and the event list was a small subset of what's available. Extension authors were left reading source code for features that should be front and center in the docs.
Impact
Extension authors now have documented guidance for all major extension APIs in one place, with working code examples and clear deprecation notices for legacy APIs. The document grew from ~920 to ~1380 lines, covering the full breadth of what getContext() offers for the most commonly needed features.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.