mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Allow running generate interceptors on quiet prompts
This commit is contained in:
@ -1209,9 +1209,10 @@ async function autoUpdateExtensions(forceAll) {
|
||||
* Runs the generate interceptors for all extensions.
|
||||
* @param {any[]} chat Chat array
|
||||
* @param {number} contextSize Context size
|
||||
* @param {string} type Generation type
|
||||
* @returns {Promise<boolean>} True if generation should be aborted
|
||||
*/
|
||||
export async function runGenerationInterceptors(chat, contextSize) {
|
||||
export async function runGenerationInterceptors(chat, contextSize, type) {
|
||||
let aborted = false;
|
||||
let exitImmediately = false;
|
||||
|
||||
@ -1224,7 +1225,7 @@ export async function runGenerationInterceptors(chat, contextSize) {
|
||||
const interceptorKey = manifest.generate_interceptor;
|
||||
if (typeof globalThis[interceptorKey] === 'function') {
|
||||
try {
|
||||
await globalThis[interceptorKey](chat, contextSize, abort);
|
||||
await globalThis[interceptorKey](chat, contextSize, abort, type);
|
||||
} catch (e) {
|
||||
console.error(`Failed running interceptor for ${manifest.display_name}`, e);
|
||||
}
|
||||
|
Reference in New Issue
Block a user