Add /clear command
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4423148552
commit
4c7d67cabf
8 files changed
+60
-2
No files matched your search
@@ -459,13 +459,15 @@ const MessageItem = memo(function MessageItem({ m, canEdit, onRewind, highlight
|
||||
return (
|
||||
<details className="summary-divider" data-mid={m.id} onToggle={(e) => setSummaryOpen((e.currentTarget as HTMLDetailsElement).open)}>
|
||||
<summary>
|
||||
{summary.auto
|
||||
{summary.text.startsWith("[Context cleared")
|
||||
? t("chat.cleared")
|
||||
: summary.auto
|
||||
? t("chat.compactedAuto", { tokens: summary.tokens ? fmtCompact(summary.tokens) : "?" })
|
||||
: summary.tokens
|
||||
? t("chat.compactedManual", { tokens: fmtCompact(summary.tokens) })
|
||||
: t("chat.compacted")}
|
||||
</summary>
|
||||
{summaryOpen && <Markdown text={summary.text} />}
|
||||
{summaryOpen && !summary.text.startsWith("[Context cleared") && <Markdown text={summary.text} />}
|
||||
</details>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ interface Suggestion {
|
||||
|
||||
const BUILTIN: { name: string; key: Key }[] = [
|
||||
{ name: "compact", key: "command.compact" },
|
||||
{ name: "clear", key: "command.clear" },
|
||||
{ name: "new", key: "command.new" },
|
||||
];
|
||||
|
||||
|
||||
Reference in new issue
Block a user