(paths)
| 1842 | raw_dir.mkdir(exist_ok=True) |
| 1843 | |
| 1844 | def on_new_files(paths): |
| 1845 | for p in paths: |
| 1846 | fp = Path(p) |
| 1847 | if fp.suffix.lower() not in SUPPORTED_EXTENSIONS: |
| 1848 | click.echo( |
| 1849 | f"Skipping unsupported file type: {fp.suffix}. " |
| 1850 | f"Supported: {', '.join(sorted(SUPPORTED_EXTENSIONS))}" |
| 1851 | ) |
| 1852 | continue |
| 1853 | add_single_file(fp, kb_dir) |
| 1854 | |
| 1855 | click.echo(f"Watching {raw_dir} for new documents. Press Ctrl+C to stop.") |
| 1856 | watch_directory(raw_dir, on_new_files) |
nothing calls this directly
no test coverage detected