mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-11 17:07:07 +01:00
remove SlashCommandClosureExecutor
has long since been replaced with /:
This commit is contained in:
parent
45eeb63a0d
commit
914e8eb4cf
@ -3,7 +3,6 @@ import { delay, escapeRegex } from '../utils.js';
|
|||||||
import { SlashCommand } from './SlashCommand.js';
|
import { SlashCommand } from './SlashCommand.js';
|
||||||
import { SlashCommandAbortController } from './SlashCommandAbortController.js';
|
import { SlashCommandAbortController } from './SlashCommandAbortController.js';
|
||||||
import { SlashCommandBreakPoint } from './SlashCommandBreakPoint.js';
|
import { SlashCommandBreakPoint } from './SlashCommandBreakPoint.js';
|
||||||
import { SlashCommandClosureExecutor } from './SlashCommandClosureExecutor.js';
|
|
||||||
import { SlashCommandClosureResult } from './SlashCommandClosureResult.js';
|
import { SlashCommandClosureResult } from './SlashCommandClosureResult.js';
|
||||||
import { SlashCommandDebugController } from './SlashCommandDebugController.js';
|
import { SlashCommandDebugController } from './SlashCommandDebugController.js';
|
||||||
import { SlashCommandExecutor } from './SlashCommandExecutor.js';
|
import { SlashCommandExecutor } from './SlashCommandExecutor.js';
|
||||||
@ -233,14 +232,7 @@ export class SlashCommandClosure {
|
|||||||
this.onProgress?.(done, this.commandCount);
|
this.onProgress?.(done, this.commandCount);
|
||||||
this.debugController?.setExecutor(executor);
|
this.debugController?.setExecutor(executor);
|
||||||
yield executor;
|
yield executor;
|
||||||
if (executor instanceof SlashCommandClosureExecutor) {
|
if (executor instanceof SlashCommandBreakPoint) {
|
||||||
const closure = this.scope.getVariable(executor.name);
|
|
||||||
if (!closure || !(closure instanceof SlashCommandClosure)) throw new Error(`${executor.name} is not a closure.`);
|
|
||||||
closure.scope.parent = this.scope;
|
|
||||||
closure.providedArgumentList = executor.providedArgumentList;
|
|
||||||
const result = await closure.execute();
|
|
||||||
this.scope.pipe = result.pipe;
|
|
||||||
} else if (executor instanceof SlashCommandBreakPoint) {
|
|
||||||
// no execution for breakpoints, just raise counter
|
// no execution for breakpoints, just raise counter
|
||||||
done++;
|
done++;
|
||||||
yield executor;
|
yield executor;
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
import { SlashCommandNamedArgumentAssignment } from './SlashCommandNamedArgumentAssignment.js';
|
|
||||||
|
|
||||||
export class SlashCommandClosureExecutor {
|
|
||||||
/**@type {String}*/ name = '';
|
|
||||||
// @ts-ignore
|
|
||||||
/**@type {SlashCommandNamedArgumentAssignment[]}*/ providedArgumentList = [];
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user