Fix reasoning-get with no argument

ed46b96ba2b92ea2df99736fb59e01acf49cc8bc

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +1 -1Showing whitespace changes
public/scripts/reasoning.js+1 -1
@@ -153,7 +153,7 @@ function registerReasoningSlashCommands() {
153 }),153 }),
154 ],154 ],
155 callback: (_args, value) => {155 callback: (_args, value) => {
156 const messageId = !isNaN(Number(value)) ? Number(value) : chat.length - 1;156 const messageId = !isNaN(parseInt(value.toString())) ? parseInt(value.toString()) : chat.length - 1;
157 const message = chat[messageId];157 const message = chat[messageId];
158 const reasoning = String(message?.extra?.reasoning ?? '');158 const reasoning = String(message?.extra?.reasoning ?? '');
159 return reasoning.replace(PromptReasoning.REASONING_PLACEHOLDER_REGEX, '');159 return reasoning.replace(PromptReasoning.REASONING_PLACEHOLDER_REGEX, '');