update for 1. 优化 2.中英切换
This commit is contained in:
@@ -36,6 +36,8 @@ const INITIAL_STATE: ComplianceState = {
|
||||
findings: [],
|
||||
done: null,
|
||||
errorText: '',
|
||||
analysisId: null,
|
||||
isReadOnly: false,
|
||||
};
|
||||
|
||||
export function useComplianceAnalysis() {
|
||||
@@ -116,6 +118,8 @@ export function useComplianceAnalysis() {
|
||||
para_text: j.para_text ?? '',
|
||||
};
|
||||
setState(s => ({ ...s, status: 'done', done: payload, stageKey: 'concluding', stageLabel: 'Complete' }));
|
||||
} else if (j.type === 'saved') {
|
||||
setState(s => ({ ...s, analysisId: j.analysis_id ?? null }));
|
||||
} else if (j.type === 'error') {
|
||||
setState(s => ({ ...s, status: 'error', errorText: j.text ?? 'Unknown error' }));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user