Skip to content

Commit c4df2d1

Browse files
committed
Clear console on toggle
1 parent 5b45750 commit c4df2d1

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/subcommands/chat/react/slashCommands.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,13 @@ export function createSlashCommands({
181181
name: "system-as-user",
182182
description: "Toggle sending system messages as user messages",
183183
handler: async () => {
184+
setMessages([]);
185+
setUserInputState({
186+
segments: [{ type: "text", content: "" }],
187+
cursorOnSegmentIndex: 0,
188+
cursorInSegmentOffset: 0,
189+
});
190+
console.clear();
184191
setSystemAsUser(!systemAsUser);
185192

186193
const systemPrompt = systemAsUser

0 commit comments

Comments
 (0)