Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions codeflash/lsp/lsp_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ def enhanced_log(
actual_log_fn(clean_msg, *args, **kwargs)
return

if not lsp_enabled:
# it's for LSP and LSP is disabled
return

# ---- LSP logging path ----
if is_normal_text_message:
clean_msg = add_heading_tags(clean_msg, tags)
Expand Down
4 changes: 3 additions & 1 deletion codeflash/lsp/lsp_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pathlib import Path
from typing import Any, Optional

from codeflash.lsp.helpers import replace_quotes_with_backticks, simplify_worktree_paths
from codeflash.lsp.helpers import is_LSP_enabled, replace_quotes_with_backticks, simplify_worktree_paths

json_primitive_types = (str, float, int, bool)
max_code_lines_before_collapse = 45
Expand Down Expand Up @@ -34,6 +34,8 @@ def type(self) -> str:
raise NotImplementedError

def serialize(self) -> str:
if not is_LSP_enabled():
return ""
from codeflash.lsp.beta import server

execution_ctx = server.execution_context_vars.get()
Expand Down
Loading