| 1 | import { useAppSelector } from "../../redux/hooks"; |
| 2 | import IndexingProgress from "./IndexingProgress"; |
| 3 | |
| 4 | export function IndexingSettingsSection() { |
| 5 | const config = useAppSelector((state) => state.config.config); |
| 6 | return ( |
| 7 | <div className="py-5"> |
| 8 | <div> |
| 9 | <h3 className="mx-auto mb-1 mt-0 text-xl">@codebase index</h3> |
| 10 | <span className="text-lightgray w-3/4 text-xs"> |
| 11 | Local embeddings of your codebase |
| 12 | </span> |
| 13 | </div> |
| 14 | {config.disableIndexing ? ( |
| 15 | <div className="pb-2 pt-5"> |
| 16 | <p className="py-1 text-center font-semibold">Indexing is disabled</p> |
| 17 | <p className="text-lightgray cursor-pointer text-center text-xs"> |
| 18 | Open settings and toggle <code>Disable Indexing</code> to re-enable |
| 19 | </p> |
| 20 | </div> |
| 21 | ) : ( |
| 22 | <IndexingProgress /> |
| 23 | )} |
| 24 | </div> |
| 25 | ); |
| 26 | } |