|
|
@@ -3,6 +3,7 @@ import type { GlobalStandardProps } from '@deepseek-ai/dsh-client-ui-slots'
|
|
|
import { afterEach, describe, expect, it, vi } from 'vitest'
|
|
|
import { cleanup, fireEvent, render, screen } from '@testing-library/react'
|
|
|
import type { SessionId } from '@deepseek-ai/dsh-session/types'
|
|
|
+import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand'
|
|
|
import {
|
|
|
PendingQuestion, planReviewOf, type QuestionComposerProps, type QuestionWait,
|
|
|
} from '../src/client/contract/slots.ts'
|
|
|
@@ -173,6 +174,16 @@ describe('planReviewOf', () => {
|
|
|
})
|
|
|
})
|
|
|
|
|
|
+ it('retains the logged invocation so the review can reopen its exact plan', () => {
|
|
|
+ const question = questions()[0]!
|
|
|
+ const callId = 'plan-call' as ToolCallId
|
|
|
+ const review = planReviewOf([{
|
|
|
+ ...question,
|
|
|
+ intent: { kind: 'plan-review', approve: 'Approve', callId },
|
|
|
+ }])
|
|
|
+ expect(review).toEqual({ ...planReviewOf([question]), callId })
|
|
|
+ })
|
|
|
+
|
|
|
it('leaves the decline absent when the asker offered approve alone', () => {
|
|
|
const [question] = questions()
|
|
|
const review = planReviewOf([{ ...question as object, options: [{ label: 'Approve' }] } as never])
|