Expand description
Central constants for codesearch configuration
All string literals for paths, filenames, and configuration should be defined here to avoid duplication and ensure consistency across the codebase.
Constants§
- ALWAYS_
EXCLUDED - Directories and files that should always be excluded from indexing These are added to both .gitignore and .codesearchignore automatically
- CONFIG_
DIR_ NAME - Name of the global config directory in user home
- DB_
DIR_ NAME - Name of the database directory in project roots
- DEFAULT_
CACHE_ MAX_ MEMORY_ MB - Default embedding cache memory limit in MB.
- DEFAULT_
FSW_ DEBOUNCE_ MS - File watcher debounce time in milliseconds
- DEFAULT_
LMDB_ MAP_ SIZE_ MB - Default LMDB map size in megabytes (256MB).
- DEFAULT_
LOG_ MAX_ FILES - Default number of log files to retain
- DEFAULT_
LOG_ RETENTION_ DAYS - Default log retention period in days
- FILE_
META_ DB_ NAME - Name of the file metadata database
- LOG_
DIR_ NAME - Log directory name within .codesearch.db
- LOG_
FILE_ NAME - Default log file name
- REPOS_
CONFIG_ FILE - Name of the repos configuration file
- WRITER_
LOCK_ FILE - Lock file name to indicate an active writer instance This prevents multiple processes from writing to the same database
Statics§
- SHUTDOWN_
REQUESTED - Global shutdown flag, set by the CTRL-C handler.
Functions§
- check_
shutdown - Check whether a graceful shutdown has been requested via either the global AtomicBool (OS signal) or a CancellationToken.
- get_
global_ models_ cache_ dir - Get the global models cache directory (~/.codesearch/models/).
- is_
shutdown_ requested - Check whether a graceful shutdown has been requested (CTRL-C).