Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

fix:删除对话框中添加会话按钮

xiaoyao42256a3ac47637
diff --git a/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/ChatPanel.css b/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/ChatPanel.css
index 729de8c7a9..dab6cffd27 100644
--- a/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/ChatPanel.css
+++ b/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/ChatPanel.css
@@ -1236,8 +1236,6 @@
width: 30px;
height: 30px;
flex: 0 0 auto;
- border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
- border-radius: 6px;
color: var(--muted-strong);
background: color-mix(in srgb, var(--card) 88%, transparent);
}
diff --git a/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/InputArea.tsx b/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/InputArea.tsx
index 413eea98fb..936fbb78e9 100644
--- a/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/InputArea.tsx
+++ b/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/InputArea.tsx
@@ -638,18 +638,6 @@ export function InputArea({
// [handleVoiceEnd]
// );
- const handleNewSession = useCallback(async () => {
- if (isListening || (isInterruptible && !isTeamMode)) return;
- setInputValue('');
- setPendingVoiceText('');
- setAttachments([]);
- setAttachmentAlerts([]);
- if (textareaRef.current) {
- textareaRef.current.style.height = 'auto';
- }
- await onNewSession();
- }, [isListening, isInterruptible, isTeamMode, onNewSession, setInputValue]);
-
const handleModeSwitch = useCallback(async (targetMode: AgentMode) => {
if (mode === targetMode) return;
@@ -984,21 +972,6 @@ export function InputArea({
</div>
<div className="chat-input-actions">
- <button
- type="button"
- onClick={handleNewSession}
- disabled={isListening || (isInterruptible && !isTeamMode)}
- className={cx(
- 'chat-input-btn',
- (isListening || (isInterruptible && !isTeamMode)) && 'chat-input-btn--disabled',
- )}
- title={isListening || (isInterruptible && !isTeamMode) ? t('chat.newSessionDisabled') : t('chat.newSession')}
- >
- <svg className="chat-input-btn-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24" strokeWidth={1.8}>
- <path strokeLinecap="round" strokeLinejoin="round" d="M12 4.5v15m7.5-7.5h-15" />
- </svg>
- </button>
-
{/* {speechSupported && (
<button
type="button"
diff --git a/jiuwenswarm/channels/web/frontend/src/i18n/locales/en.json b/jiuwenswarm/channels/web/frontend/src/i18n/locales/en.json
index 4c2915e457..6cb63b5439 100644
--- a/jiuwenswarm/channels/web/frontend/src/i18n/locales/en.json
+++ b/jiuwenswarm/channels/web/frontend/src/i18n/locales/en.json
@@ -245,7 +245,6 @@
"modelSelector": {
"tooltip": "Switch the model used for chat"
},
- "newSessionDisabled": "Cannot create session while processing or recording",
"modeSwitchTitle": "Switch Mode",
"modeSwitchConfirm": "Current session has history messages. Switching mode will create a new session. Continue?",
"teamPause": "Pause",
diff --git a/jiuwenswarm/channels/web/frontend/src/i18n/locales/zh.json b/jiuwenswarm/channels/web/frontend/src/i18n/locales/zh.json
index 01a81e7d27..7184cc55ba 100644
--- a/jiuwenswarm/channels/web/frontend/src/i18n/locales/zh.json
+++ b/jiuwenswarm/channels/web/frontend/src/i18n/locales/zh.json
@@ -245,7 +245,6 @@
"modelSelector": {
"tooltip": "切换对话使用的模型"
},
- "newSessionDisabled": "处理中或录音中不可新建",
"modeSwitchTitle": "切换模式",
"modeSwitchConfirm": "当前会话有历史消息,切换模式将新建会话。是否继续?",
"teamPause": "暂停",