Migrate built-in extensions to use manifest-based activate hooks (#5435)
* Convert jQuery/IIFE wrappers to exported init() functions and register activate hooks in 8 extension manifests * Convert remaining extensions to exported init() with activate hooks and await initExtensions() - Convert jQuery/IIFE wrappers to exported init() functions in expressions, memory, quick-reply, regex, stable-diffusion, translate, tts, and vectors extensions - Register init functions as activate hooks in extension manifests - Properly await async initExtensions() in firstLoadInit() * Fix eslint --------- Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
This commit is contained in:
@@ -101,7 +101,7 @@ async function doCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
jQuery(() => {
|
||||
export function init() {
|
||||
const buttonHtml = `
|
||||
<div id="token_counter" class="list-group-item flex-container flexGap5">
|
||||
<div class="fa-solid fa-1 extensionsMenuExtensionButton" /></div>` +
|
||||
@@ -115,4 +115,4 @@ jQuery(() => {
|
||||
returns: 'number of tokens',
|
||||
helpString: 'Counts the number of tokens in the current chat.',
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user