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
30 lines
876 B
TypeScript
30 lines
876 B
TypeScript
/**
|
||
* SSA 智能统计分析模块主入口
|
||
*
|
||
* V11 版本 - 100% 还原原型图设计
|
||
* - 左侧抽屉栏(可展开/收起)
|
||
* - 中间对话区(居中布局 max-w-3xl)
|
||
* - 右侧工作区(动态 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';
|
||
import './styles/ssa-workspace.css';
|
||
|
||
const SSAModule: React.FC = () => {
|
||
const { reset } = useSSAStore();
|
||
const location = useLocation();
|
||
|
||
// location.key 在每次 navigate() 调用时都会变化(即使 URL 相同),
|
||
// 确保从其他模块返回或重复点击导航栏都能重置到全新状态
|
||
useEffect(() => {
|
||
reset();
|
||
}, [location.key, reset]);
|
||
|
||
return <SSAWorkspace />;
|
||
};
|
||
|
||
export default SSAModule;
|