fix(ai): 保留拆解生成结果
This commit is contained in:
@@ -27,9 +27,21 @@ interface Props {
|
||||
target: AgentDecomposeTarget;
|
||||
dedupeSummary?: { removedDevTaskCount: number; removedTestCaseCount: number };
|
||||
onClose: () => void;
|
||||
onAdopted?: () => void;
|
||||
onRejected?: () => void;
|
||||
}
|
||||
|
||||
export function DecomposeReportModal({ result, version, plan, requirements, target, dedupeSummary, onClose }: Props) {
|
||||
export function DecomposeReportModal({
|
||||
result,
|
||||
version,
|
||||
plan,
|
||||
requirements,
|
||||
target,
|
||||
dedupeSummary,
|
||||
onClose,
|
||||
onAdopted,
|
||||
onRejected,
|
||||
}: Props) {
|
||||
const { createTask } = useDevTaskStore();
|
||||
const { createTestCase } = useTestCaseStore();
|
||||
const { categories } = useTaskCategoryStore();
|
||||
@@ -163,7 +175,10 @@ export function DecomposeReportModal({ result, version, plan, requirements, targ
|
||||
setSubmitting(false);
|
||||
|
||||
// 1.5 秒后自动关闭
|
||||
setTimeout(() => onClose(), 1500);
|
||||
setTimeout(() => {
|
||||
onAdopted?.();
|
||||
onClose();
|
||||
}, 1500);
|
||||
};
|
||||
|
||||
const visibleRecommendationCount = useMemo(() => {
|
||||
@@ -438,10 +453,21 @@ export function DecomposeReportModal({ result, version, plan, requirements, targ
|
||||
</div>
|
||||
<div className="flex gap-2">
|
||||
<button
|
||||
onClick={onClose}
|
||||
onClick={() => {
|
||||
onRejected?.();
|
||||
onClose();
|
||||
}}
|
||||
disabled={submitting || submitted}
|
||||
className="h-8 px-3 rounded-lg text-[12px] font-medium border border-[var(--line)] text-[var(--ink-soft)] hover:bg-[var(--bg-subtle)]"
|
||||
>
|
||||
取消
|
||||
不采纳
|
||||
</button>
|
||||
<button
|
||||
onClick={onClose}
|
||||
disabled={submitting || submitted}
|
||||
className="h-8 px-3 rounded-lg text-[12px] font-medium border border-[var(--line)] text-[var(--ink-soft)] hover:bg-[var(--bg-subtle)]"
|
||||
>
|
||||
稍后处理
|
||||
</button>
|
||||
<button
|
||||
onClick={handleAdopt}
|
||||
|
||||
Reference in New Issue
Block a user