Skip to content

Commit f288568

Browse files
authored
Merge pull request #658 from Yumiue/codex/web-verification-cleanup
refactor(web): 对齐 PR #655,移除 legacy verification 事件链路
2 parents c613cdc + 209809e commit f288568

10 files changed

Lines changed: 124 additions & 439 deletions

web/src/api/protocol.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -417,25 +417,6 @@ export interface TodoEventPayload {
417417
export type ListSessionTodosResult = RPCResult<TodoSnapshot>;
418418
export type GetRuntimeSnapshotResult = RPCResult<RuntimeSnapshotPayload>;
419419

420-
export interface VerificationStartedPayload {
421-
completion_passed: boolean;
422-
completion_blocked_reason?: string;
423-
}
424-
425-
export interface VerificationStageFinishedPayload {
426-
name: string;
427-
status: string;
428-
summary?: string;
429-
reason?: string;
430-
error_class?: string;
431-
}
432-
433-
export interface VerificationFinishedPayload {
434-
acceptance_status: string;
435-
stop_reason?: string;
436-
error_class?: string;
437-
}
438-
439420
export interface VerificationCompletedPayload {
440421
stop_reason?: string;
441422
}

web/src/components/chat/MessageItem.test.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { fireEvent, render, screen } from '@testing-library/react'
33
import MessageItem from './MessageItem'
44

55
vi.mock('./ToolCallCard', () => ({ default: () => <div>tool-card</div> }))
6-
vi.mock('./VerificationMessage', () => ({ default: () => <div>verification-card</div> }))
76
vi.mock('./AcceptanceMessage', () => ({ default: () => <div>acceptance-card</div> }))
87
vi.mock('./CodeBlock', () => ({ default: ({ code }: { code: string }) => <pre>{code}</pre> }))
98
vi.mock('./MarkdownContent', () => ({ default: ({ content }: { content: string }) => <span>{content}</span> }))
@@ -30,11 +29,9 @@ describe('MessageItem', () => {
3029
expect(screen.getByText('reasoning')).toBeInTheDocument()
3130
})
3231

33-
it('renders tool/verification/acceptance delegates', () => {
32+
it('renders tool and acceptance delegates', () => {
3433
const { rerender } = render(<MessageItem message={{ id: 'm1', role: 'tool', type: 'tool_call', content: '', timestamp: 1 } as any} />)
3534
expect(screen.getByText('tool-card')).toBeInTheDocument()
36-
rerender(<MessageItem message={{ id: 'm2', role: 'assistant', type: 'verification', content: '', timestamp: 1 } as any} />)
37-
expect(screen.getByText('verification-card')).toBeInTheDocument()
3835
rerender(<MessageItem message={{ id: 'm3', role: 'assistant', type: 'acceptance', content: '', timestamp: 1 } as any} />)
3936
expect(screen.getByText('acceptance-card')).toBeInTheDocument()
4037
})

web/src/components/chat/MessageItem.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { memo, useState } from 'react'
22
import { type ChatMessage } from '@/stores/useChatStore'
33
import ToolCallCard from './ToolCallCard'
4-
import VerificationMessage from './VerificationMessage'
54
import AcceptanceMessage from './AcceptanceMessage'
65
import CodeBlock from './CodeBlock'
76
import MarkdownContent from './MarkdownContent'
@@ -32,10 +31,6 @@ const MessageItem = memo(function MessageItem({ message, isLast = false, grouped
3231
return <ToolCallCard message={message} groupedWithPrev={groupedWithPrev} />
3332
}
3433

35-
if (message.type === 'verification') {
36-
return <VerificationMessage message={message} groupedWithPrev={groupedWithPrev} />
37-
}
38-
3934
if (message.type === 'acceptance') {
4035
return <AcceptanceMessage message={message} groupedWithPrev={groupedWithPrev} />
4136
}

web/src/components/chat/VerificationMessage.test.tsx

Lines changed: 0 additions & 32 deletions
This file was deleted.

web/src/components/chat/VerificationMessage.tsx

Lines changed: 0 additions & 185 deletions
This file was deleted.

0 commit comments

Comments
 (0)