CreateKbModal's reset effect was keyed on the providers array, which the
4s background-indexing poll replaces on every tick, so typed input and
loaded files vanished while another KB was indexing. Reset only on the
closed-to-open transition, and keep the providers reference stable in
useKnowledgeBases when a refresh returns identical content.