Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions codebase_rag/cli_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ class CLICommandName(StrEnum):
HELP_REPO_PATH_OPTIMIZE = "Path to the repository to optimize"
HELP_REPO_PATH_WATCH = "Path to the repository to watch."

HELP_DEBOUNCE = "Debounce delay in seconds. Set to 0 to disable debouncing."
HELP_MAX_WAIT = (
"Maximum wait time in seconds before forcing an update during continuous edits."
)

HELP_UPDATE_GRAPH = "Update the knowledge graph by parsing the repository"
HELP_CLEAN_DB = "Clean the database before updating (use when adding first repo)"
HELP_OUTPUT_GRAPH = "Export graph to JSON file after updating (requires --update-graph)"
Expand Down
4 changes: 4 additions & 0 deletions codebase_rag/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,10 @@ class EventType(StrEnum):
WATCHER_SLEEP_INTERVAL = 1
LOG_LEVEL_INFO = "INFO"

# (H) Debounce settings for realtime watcher
DEFAULT_DEBOUNCE_SECONDS = 5
DEFAULT_MAX_WAIT_SECONDS = 30


class Architecture(StrEnum):
X86_64 = "x86_64"
Expand Down
13 changes: 13 additions & 0 deletions codebase_rag/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,21 @@

# (H) File watcher logs
WATCHER_ACTIVE = "File watcher is now active."
WATCHER_DEBOUNCE_ACTIVE = (
"File watcher active with debouncing (debounce={debounce}s, max_wait={max_wait}s)"
)
WATCHER_SKIP_NO_QUERY = "Ingestor does not support querying, skipping real-time update."
CHANGE_DETECTED = "Change detected: {event_type} on {path}. Updating graph."
CHANGE_DEBOUNCING = (
"Change detected: {event_type} on {name} (debouncing for {debounce}s)"
)
DEBOUNCE_RESET = "Reset debounce timer for {path}"
DEBOUNCE_MAX_WAIT = "Max wait ({max_wait}s) exceeded for {path}, processing now"
DEBOUNCE_SCHEDULED = (
"Scheduled update for {path} in {debounce}s (max wait: {remaining}s remaining)"
)
DEBOUNCE_PROCESSING = "Processing debounced change: {path}"
DEBOUNCE_NO_EVENT = "No pending event for {path}, skipping"
DELETION_QUERY = "Ran deletion query for path: {path}"
RECALC_CALLS = "Recalculating all function call relationships for consistency..."
GRAPH_UPDATED = "Graph updated successfully for change in: {name}"
Expand Down
Loading