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:修复桌面应用端若选择相同的项目,错误提示一直存在于对话列表中的问题

xiaoyao42d105dea8159e
diff --git a/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/InputArea.tsx b/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/InputArea.tsx
index fb7035c554..786c72722c 100644
--- a/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/InputArea.tsx
+++ b/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/InputArea.tsx
@@ -267,6 +267,13 @@ export function InputArea({
const [projectCreateMode, setProjectCreateMode] = useState<ProjectCreateMode>('blank');
const [menuDirection, setMenuDirection] = useState<'up' | 'down'>('up');
const [hoveredOptionDesc, setHoveredOptionDesc] = useState<string | null>(null);
+
+ useEffect(() => {
+ if (!projectDirError || workDialogOpen) return;
+ const timeoutId = window.setTimeout(() => setProjectDirError(null), 3000);
+ return () => window.clearTimeout(timeoutId);
+ }, [projectDirError, workDialogOpen]);
+
const [composerSuggestion, setComposerSuggestion] = useState<ComposerSuggestionState | null>(null);
const [composerSuggestionIndex, setComposerSuggestionIndex] = useState(0);
const [modeMenuAnchor, setModeMenuAnchor] = useState<DOMRect | null>(null);
@@ -1949,7 +1956,11 @@ export function InputArea({
<CodeBranchSelector project={displayedProject} disabled={isProcessing} compact />
) : null}
{projectDirError && !workDialogOpen ? (
- <div className="chat-work-select__error" role="alert">{projectDirError}</div>
+ <div className="app-toast-wrapper app-toast-wrapper--top-center">
+ <div className="app-session-toast" role="status" aria-live="polite">
+ {projectDirError}
+ </div>
+ </div>
) : null}
</div>
) : null}
diff --git a/jiuwenswarm/channels/web/frontend/src/multi-session/sidebar/ConversationSidebar.tsx b/jiuwenswarm/channels/web/frontend/src/multi-session/sidebar/ConversationSidebar.tsx
index 35a8595e71..6dca7be00c 100644
--- a/jiuwenswarm/channels/web/frontend/src/multi-session/sidebar/ConversationSidebar.tsx
+++ b/jiuwenswarm/channels/web/frontend/src/multi-session/sidebar/ConversationSidebar.tsx
@@ -612,6 +612,13 @@ export function ConversationSidebar({
const addMenuRef = useRef<HTMLDivElement>(null);
const workModeMenuRef = useRef<HTMLDivElement>(null);
const previousProcessing = useRef<Record<string, boolean>>({});
+
+ useEffect(() => {
+ if (!pathDialogError || pathDialogOpen) return;
+ const timeoutId = window.setTimeout(() => setPathDialogError(null), 3000);
+ return () => window.clearTimeout(timeoutId);
+ }, [pathDialogError, pathDialogOpen]);
+
const {
workMode,
projects,
@@ -1152,8 +1159,10 @@ export function ConversationSidebar({
</div>
) : null}
{pathDialogError && !pathDialogOpen ? (
- <div className="conversation-sidebar__error" role="alert">
- {pathDialogError}
+ <div className="app-toast-wrapper app-toast-wrapper--top-center">
+ <div className="app-session-toast" role="status" aria-live="polite">
+ {pathDialogError}
+ </div>
</div>
) : null}
<div className="conversation-sidebar__group conversation-sidebar__project-add" ref={addMenuRef}>