mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
debugger
This commit is contained in:
@ -213,6 +213,7 @@ export class SlashCommandClosure {
|
||||
let done = 0;
|
||||
for (const executor of this.executorList) {
|
||||
this.onProgress?.(done, this.commandCount);
|
||||
this.debugController?.setExecutor(executor);
|
||||
yield executor;
|
||||
if (executor instanceof SlashCommandClosureExecutor) {
|
||||
const closure = this.scope.getVariable(executor.name);
|
||||
|
@ -3,6 +3,7 @@ import { SlashCommandExecutor } from './SlashCommandExecutor.js';
|
||||
|
||||
export class SlashCommandDebugController {
|
||||
/**@type {SlashCommandClosure[]} */ stack = [];
|
||||
/**@type {SlashCommandExecutor[]} */ cmdStack = [];
|
||||
/**@type {boolean[]} */ stepStack = [];
|
||||
/**@type {boolean} */ isStepping = false;
|
||||
/**@type {boolean} */ isSteppingInto = false;
|
||||
@ -31,9 +32,14 @@ export class SlashCommandDebugController {
|
||||
}
|
||||
up() {
|
||||
this.stack.pop();
|
||||
while (this.cmdStack.length > this.stack.length) this.cmdStack.pop();
|
||||
this.stepStack.pop();
|
||||
}
|
||||
|
||||
setExecutor(executor) {
|
||||
this.cmdStack[this.stack.length - 1] = executor;
|
||||
}
|
||||
|
||||
|
||||
|
||||
resume() {
|
||||
|
Reference in New Issue
Block a user