diff --git a/app/components/chat.module.scss b/app/components/chat.module.scss
index 3649dfe0..0e2741e7 100644
--- a/app/components/chat.module.scss
+++ b/app/components/chat.module.scss
@@ -120,7 +120,6 @@
justify-content: center;
align-items: center;
- opacity: 0.5;
color: var(--black);
transition: all ease 0.3s;
cursor: pointer;
@@ -128,6 +127,8 @@
position: relative;
font-size: 12px;
+ animation: slide-in ease 0.3s;
+
$linear: linear-gradient(
to right,
rgba(0, 0, 0, 0),
@@ -152,6 +153,7 @@
&-tips {
@include show;
+ opacity: 0.5;
}
&-revert-btn {
diff --git a/app/components/chat.tsx b/app/components/chat.tsx
index f2ee8943..d736d18d 100644
--- a/app/components/chat.tsx
+++ b/app/components/chat.tsx
@@ -303,8 +303,12 @@ function ClearContextDivider() {
)
}
>
-
上下文已清除
- 取消清除
+
+ {Locale.Context.Clear}
+
+
+ {Locale.Context.Revert}
+
);
}
@@ -417,7 +421,7 @@ export function ChatActions(props: {
className={`${chatStyle["chat-input-action"]} clickable`}
onClick={() => {
chatStore.updateCurrentSession((session) => {
- if ((session.clearContextIndex ?? -1) > 0) {
+ if (session.clearContextIndex === session.messages.length) {
session.clearContextIndex = -1;
} else {
session.clearContextIndex = session.messages.length;
diff --git a/app/icons/break.svg b/app/icons/break.svg
index 64e61709..fbfe04f4 100644
--- a/app/icons/break.svg
+++ b/app/icons/break.svg
@@ -1 +1 @@
-
+
diff --git a/app/locales/cn.ts b/app/locales/cn.ts
index 9a29ecf8..ce0108f2 100644
--- a/app/locales/cn.ts
+++ b/app/locales/cn.ts
@@ -175,6 +175,8 @@ const cn = {
Toast: (x: any) => `包含 ${x} 条预设提示词`,
Edit: "当前对话设置",
Add: "新增预设对话",
+ Clear: "上下文已清除",
+ Revert: "恢复上下文",
},
Plugin: {
Name: "插件",
diff --git a/app/locales/en.ts b/app/locales/en.ts
index 0dd3308c..12ad101a 100644
--- a/app/locales/en.ts
+++ b/app/locales/en.ts
@@ -178,6 +178,8 @@ const en: RequiredLocaleType = {
Toast: (x: any) => `With ${x} contextual prompts`,
Edit: "Contextual and Memory Prompts",
Add: "Add a Prompt",
+ Clear: "Context Cleared",
+ Revert: "Revert",
},
Plugin: {
Name: "Plugin",