mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix reasoning-get with no argument
This commit is contained in:
@ -153,7 +153,7 @@ function registerReasoningSlashCommands() {
|
|||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
callback: (_args, value) => {
|
callback: (_args, value) => {
|
||||||
const messageId = !isNaN(Number(value)) ? Number(value) : chat.length - 1;
|
const messageId = !isNaN(parseInt(value.toString())) ? parseInt(value.toString()) : chat.length - 1;
|
||||||
const message = chat[messageId];
|
const message = chat[messageId];
|
||||||
const reasoning = String(message?.extra?.reasoning ?? '');
|
const reasoning = String(message?.extra?.reasoning ?? '');
|
||||||
return reasoning.replace(PromptReasoning.REASONING_PLACEHOLDER_REGEX, '');
|
return reasoning.replace(PromptReasoning.REASONING_PLACEHOLDER_REGEX, '');
|
||||||
|
Reference in New Issue
Block a user