mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix /checkpoints-list with ids
This commit is contained in:
@ -35,6 +35,7 @@ import { renderTemplateAsync } from './templates.js';
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
getUniqueName,
|
getUniqueName,
|
||||||
|
isTrueBoolean,
|
||||||
} from './utils.js';
|
} from './utils.js';
|
||||||
|
|
||||||
const bookmarkNameToken = 'Checkpoint #';
|
const bookmarkNameToken = 'Checkpoint #';
|
||||||
@ -578,7 +579,7 @@ function registerBookmarksSlashCommands() {
|
|||||||
callback: async (args, _) => {
|
callback: async (args, _) => {
|
||||||
const result = Object.entries(chat)
|
const result = Object.entries(chat)
|
||||||
.filter(([_, message]) => message.extra?.bookmark_link)
|
.filter(([_, message]) => message.extra?.bookmark_link)
|
||||||
.map(([mesId, message]) => args.links ? message.extra.bookmark_link : Number(mesId));
|
.map(([mesId, message]) => isTrueBoolean(args.links) ? message.extra.bookmark_link : Number(mesId));
|
||||||
return JSON.stringify(result);
|
return JSON.stringify(result);
|
||||||
},
|
},
|
||||||
namedArgumentList: [
|
namedArgumentList: [
|
||||||
|
Reference in New Issue
Block a user