export type ConnectorTextBlock = {
  type: 'connector_text'
  connector_text: string
  signature?: string
}

export type ConnectorTextDelta = {
  type: 'connector_text_delta'
  connector_text: string
}

export function isConnectorTextBlock(
  block: unknown,
): block is ConnectorTextBlock {
  if (!block || typeof block !== 'object') return false

  const typedBlock = block as Partial<ConnectorTextBlock>
  return (
    typedBlock.type === 'connector_text' &&
    typeof typedBlock.connector_text === 'string'
  )
}
