fix(ssa): Fix Agent mode chat leaking plan/result details + navigation reset
Backend (ChatHandlerService): - Replace LLM-generated hints with fixed-text hints for plan/code/result steps to prevent SystemPrompt intent instruction conflict causing verbose chat output - Add sendFixedHint() helper for deterministic SSE text delivery (no LLM call) - Cancel old plan_pending/code_pending executions when regenerating plan - Eliminates 3 unnecessary LLM calls per analysis cycle (faster response) Frontend (SSAModule): - Use location.key as useEffect dependency to ensure store reset on every navigation (fixes stale session when re-entering from other modules) - TopNavigation uses replace:true for active module re-click to avoid browser history clutter Tested: Agent mode plan/code/result hints now show brief fixed text in chat, detailed content exclusively in right workspace panel Made-with: Cursor
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
* - 右侧工作区(动态 60% 宽度)
|
||||
*/
|
||||
import React, { useEffect } from 'react';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
import { useSSAStore } from './stores/ssaStore';
|
||||
import SSAWorkspace from './SSAWorkspace';
|
||||
import './styles/ssa.css';
|
||||
@@ -14,11 +15,13 @@ import './styles/ssa-workspace.css';
|
||||
|
||||
const SSAModule: React.FC = () => {
|
||||
const { reset } = useSSAStore();
|
||||
const location = useLocation();
|
||||
|
||||
// 组件挂载时重置 store,确保不同用户看到独立的状态
|
||||
// location.key 在每次 navigate() 调用时都会变化(即使 URL 相同),
|
||||
// 确保从其他模块返回或重复点击导航栏都能重置到全新状态
|
||||
useEffect(() => {
|
||||
reset();
|
||||
}, [reset]);
|
||||
}, [location.key, reset]);
|
||||
|
||||
return <SSAWorkspace />;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user