fix: 修正入口熔断与跳一跳草稿判定

This commit is contained in:
2026-06-04 17:43:56 +08:00
parent bbb9269bab
commit b60382a752
5 changed files with 116 additions and 57 deletions

View File

@@ -337,6 +337,24 @@ describe('platformDraftGenerationShelfModel', () => {
).toMatchObject({
type: 'load-detail',
});
expect(
resolveJumpHopDraftOpenIntent({
item: buildJumpHopWork({ sourceSessionId: null }),
notices: {
'jump-hop:jump-hop-work-base': {
status: 'failed',
seen: false,
},
},
generation: emptyGenerationFacts({
activeSessionId: null,
hasActiveGenerationFailure: true,
}),
}),
).toMatchObject({
type: 'load-detail',
});
});
test('resolveWoodenFishDraftOpenIntent uses profile fallback and failure fallback stage', () => {

View File

@@ -897,8 +897,9 @@ export function resolveJumpHopDraftOpenIntent(params: {
noticeIds,
'failed',
);
const activeSessionId = normalizeDraftNoticeId(generation.activeSessionId);
const isCurrentSession =
sourceSessionId === normalizeDraftNoticeId(generation.activeSessionId);
sourceSessionId !== null && sourceSessionId === activeSessionId;
if (
hasFailedNotice &&