mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-31 19:45:35 +01:00
add unresolved note
This commit is contained in:
parent
0eecc2dd4c
commit
3a60b45253
@ -820,22 +820,26 @@ export class QuickReply {
|
||||
const vResolved = document.createElement('div'); {
|
||||
vResolved.classList.add('qr--val');
|
||||
vResolved.classList.add('qr--singleCol');
|
||||
const val = this.debugController.namedArguments[key];
|
||||
if (val instanceof SlashCommandClosure) {
|
||||
vResolved.classList.add('qr--closure');
|
||||
vResolved.title = val.rawText;
|
||||
vResolved.textContent = val.toString();
|
||||
} else if (val === undefined) {
|
||||
vResolved.classList.add('qr--undefined');
|
||||
vResolved.textContent = 'undefined';
|
||||
if (this.debugController.namedArguments === undefined) {
|
||||
vResolved.classList.add('qr--unresolved');
|
||||
} else {
|
||||
let jsonVal;
|
||||
try { jsonVal = JSON.parse(val); } catch { /* empty */ }
|
||||
if (jsonVal && typeof jsonVal == 'object') {
|
||||
vResolved.textContent = JSON.stringify(jsonVal, null, 2);
|
||||
const val = this.debugController.namedArguments?.[key];
|
||||
if (val instanceof SlashCommandClosure) {
|
||||
vResolved.classList.add('qr--closure');
|
||||
vResolved.title = val.rawText;
|
||||
vResolved.textContent = val.toString();
|
||||
} else if (val === undefined) {
|
||||
vResolved.classList.add('qr--undefined');
|
||||
vResolved.textContent = 'undefined';
|
||||
} else {
|
||||
vResolved.textContent = val;
|
||||
vResolved.classList.add('qr--simple');
|
||||
let jsonVal;
|
||||
try { jsonVal = JSON.parse(val); } catch { /* empty */ }
|
||||
if (jsonVal && typeof jsonVal == 'object') {
|
||||
vResolved.textContent = JSON.stringify(jsonVal, null, 2);
|
||||
} else {
|
||||
vResolved.textContent = val;
|
||||
vResolved.classList.add('qr--simple');
|
||||
}
|
||||
}
|
||||
}
|
||||
item.append(vResolved);
|
||||
|
Loading…
x
Reference in New Issue
Block a user