mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-18 21:20:39 +01:00
Fix reasoning-get with no argument
This commit is contained in:
parent
acf71fd702
commit
ed46b96ba2
@ -153,7 +153,7 @@ function registerReasoningSlashCommands() {
|
||||
}),
|
||||
],
|
||||
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 reasoning = String(message?.extra?.reasoning ?? '');
|
||||
return reasoning.replace(PromptReasoning.REASONING_PLACEHOLDER_REGEX, '');
|
||||
|
Loading…
x
Reference in New Issue
Block a user