The use of ‘i’ for that is an alternative form when the second half of the sentence - on its own - would have been a wnaeth type of thing or a verb plus an ending.
(Ie a completed action in the past or pretorite )
eg nest ti ddweud or dwedest ti
So this gives exposure to a variant form you might encounter. The general advice is pick your favourite or the one used in your area…but take on board the variants so you can understand them if people say them.
There is a summary of the different type of that in this post here
Rich