From 23160be05555b79dc342531c23387e9eeb68d5fe Mon Sep 17 00:00:00 2001 From: chiguyong Date: Thu, 2 Jul 2026 22:13:28 +0800 Subject: [PATCH] fix(types): resolve 3 pre-existing typecheck errors in transient-state test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit message_type: 'board_started' as const (line 93) fixes TS2322 on lines 107 and 122 — TypeScript was inferring message_type as string instead of the literal 'board_started'. boardState local variable: replace 'as never' with proper shape + 'status: discussing' as const (line 159-160) fixes TS2339 on line 168 where .topic was accessed on type 'never'. All 5 transient-state tests still pass. vue-tsc --noEmit now clean. --- .../tests/unit/stores/chatStore.transient-state.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/agentkit/server/frontend/tests/unit/stores/chatStore.transient-state.test.ts b/src/agentkit/server/frontend/tests/unit/stores/chatStore.transient-state.test.ts index c80f12f..e0924f1 100644 --- a/src/agentkit/server/frontend/tests/unit/stores/chatStore.transient-state.test.ts +++ b/src/agentkit/server/frontend/tests/unit/stores/chatStore.transient-state.test.ts @@ -90,7 +90,7 @@ describe('transient state reset matrix', () => { content: '私董会开始:测试主题', timestamp: '2026-07-01T10:00:00Z', status: 'completed' as const, - message_type: 'board_started', + message_type: 'board_started' as const, board_started: { team_id: 'team-1', topic: '测试主题', @@ -156,8 +156,8 @@ describe('transient state reset matrix', () => { ] store.currentConversationId = 'conv-a' - const boardState = { topic: 'board in A', experts: [], max_rounds: 1, current_round: 0, status: 'discussing' } - store.boardState = boardState as never + const boardState = { topic: 'board in A', experts: [], max_rounds: 1, current_round: 0, status: 'discussing' as const } + store.boardState = boardState store.debateState = { topic: 'debate' } as never store.collaborationState = { contracts: [], notices: [], reviews: [], risks: [] } as never