mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
fix test
This commit is contained in:
@@ -1,16 +1,6 @@
|
||||
import type { RawJSONLines } from '@/claude/types'
|
||||
|
||||
const VISIBLE_SYSTEM_SUBTYPES = new Set([
|
||||
'api_error',
|
||||
'turn_duration',
|
||||
'microcompact_boundary',
|
||||
'compact_boundary'
|
||||
])
|
||||
import { isClaudeChatVisibleMessage as isSharedClaudeChatVisibleMessage } from '@hapi/protocol/messages'
|
||||
|
||||
export function isClaudeChatVisibleMessage(message: Pick<RawJSONLines, 'type'> & { subtype?: string }): boolean {
|
||||
if (message.type !== 'system') {
|
||||
return true
|
||||
}
|
||||
|
||||
return typeof message.subtype === 'string' && VISIBLE_SYSTEM_SUBTYPES.has(message.subtype)
|
||||
return isSharedClaudeChatVisibleMessage(message)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user