Repository Analysis

khoj-ai/khoj

Your AI second brain. Self-hostable. Get answers from the web or your docs. Build custom agents, schedule automations, do deep research. Turn any online or local LLM into your personal, autonomous AI (gpt, claude, gemini, llama, qwen, mistral). Get started - free.

16.5 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of khoj-ai/khoj, a Python project with 35,696 GitHub stars. SynthScan v2.0 examined 94,892 lines of code across 398 source files, recording 956 pattern matches distributed across 16 syntactic categories. The overall adjusted score of 16.5 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

16.5
Adjusted Score
16.5
Raw Score
100%
Time Factor
2026-06-24
Last Push
35.7K
Stars
Python
Language
94.9K
Lines of Code
398
Files
956
Pattern Hits
2026-07-14
Scan Date
0.11
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 42HIGH 2MEDIUM 151LOW 761

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 956 distinct pattern matches across 16 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hallucination Indicators42 hits · 430 pts
SeverityFileLineSnippetContext
CRITICALtests/test_online_chat_actors.py19from khoj.utils.helpers import ConversationCommandCODE
CRITICALtests/test_org_to_entries.py7from khoj.utils.helpers import is_none_or_emptyCODE
CRITICALtests/helpers.py27from khoj.utils.helpers import get_absolute_path, is_none_or_emptyCODE
CRITICALtests/test_agents.py11from khoj.utils.helpers import get_absolute_pathCODE
CRITICALsrc/khoj/configure.py57from khoj.utils.helpers import is_none_or_emptyCODE
CRITICALsrc/khoj/main.py18from khoj.utils.helpers import in_debug_mode, is_env_var_trueCODE
CRITICALsrc/khoj/routers/api_automation.py18from khoj.utils.helpers import is_none_or_emptyCODE
CRITICALsrc/khoj/routers/auth.py34from khoj.utils.helpers import in_debug_modeCODE
CRITICALsrc/khoj/routers/email.py10from khoj.utils.helpers import is_none_or_emptyCODE
CRITICALsrc/khoj/routers/api_agents.py8from django.core.exceptions import ValidationErrorCODE
CRITICALsrc/khoj/database/admin.py43from khoj.utils.helpers import ImageIntentTypeCODE
CRITICAL…ase/management/commands/change_generated_images_url.py5from khoj.utils.helpers import ImageIntentType, is_none_or_emptyCODE
CRITICAL…base/management/commands/convert_images_png_to_webp.py8from khoj.utils.helpers import ImageIntentTypeCODE
CRITICALsrc/khoj/database/models/__init__.py10from django.core.exceptions import ValidationErrorCODE
CRITICALsrc/khoj/app/settings.py20from khoj.utils.helpers import is_env_var_trueCODE
CRITICALsrc/khoj/search_type/text_search.py16from khoj.utils.helpers import get_absolute_path, timerCODE
CRITICALsrc/khoj/processor/content/text_to_entries.py21from khoj.utils.helpers import batcher, is_none_or_empty, timerCODE
CRITICALsrc/khoj/processor/content/org_mode/org_to_entries.py11from khoj.utils.helpers import timerCODE
CRITICAL…oj/processor/content/plaintext/plaintext_to_entries.py11from khoj.utils.helpers import timerCODE
CRITICALsrc/khoj/processor/content/images/image_to_entries.py9from khoj.utils.helpers import timerCODE
CRITICAL…khoj/processor/content/markdown/markdown_to_entries.py10from khoj.utils.helpers import timerCODE
CRITICALsrc/khoj/processor/content/pdf/pdf_to_entries.py10from khoj.utils.helpers import timerCODE
CRITICALsrc/khoj/processor/content/notion/notion_to_entries.py10from khoj.utils.helpers import timerCODE
CRITICALsrc/khoj/processor/content/github/github_to_entries.py14from khoj.utils.helpers import is_none_or_empty, timerCODE
CRITICALsrc/khoj/processor/content/docx/docx_to_entries.py10from khoj.utils.helpers import timerCODE
CRITICALsrc/khoj/processor/image/generate.py35from khoj.utils.helpers import convert_image_to_webp, is_none_or_empty, timerCODE
CRITICAL…oj/processor/operator/operator_environment_computer.py18from khoj.utils.helpers import convert_image_to_webpCODE
CRITICALsrc/khoj/processor/operator/operator_agent_base.py19from khoj.utils.helpers import get_chat_usage_metrics, is_promptrace_enabledCODE
CRITICALsrc/khoj/processor/operator/operator_agent_openai.py35from khoj.utils.helpers import get_openai_async_client, is_none_or_emptyCODE
CRITICALsrc/khoj/processor/operator/__init__.py27from khoj.utils.helpers import timerCODE
CRITICALsrc/khoj/processor/operator/grounding_agent.py26from khoj.utils.helpers import get_chat_usage_metricsCODE
CRITICAL…hoj/processor/operator/operator_environment_browser.py14from khoj.utils.helpers import convert_image_to_webpCODE
CRITICALsrc/khoj/processor/operator/grounding_agent_uitars.py38from khoj.utils.helpers import get_chat_usage_metricsCODE
CRITICALsrc/khoj/processor/operator/operator_agent_anthropic.py46from khoj.utils.helpers import get_anthropic_async_client, is_none_or_emptyCODE
CRITICALsrc/khoj/processor/operator/operator_agent_binary.py23from khoj.utils.helpers import get_openai_async_client, is_none_or_emptyCODE
CRITICALsrc/khoj/processor/conversation/openai/gpt.py22from khoj.utils.helpers import ToolDefinitionCODE
CRITICALsrc/khoj/utils/jsonl.py6from khoj.utils.helpers import get_absolute_pathCODE
CRITICALsrc/khoj/utils/rawconfig.py8from khoj.utils.helpers import to_snake_case_from_dashCODE
CRITICALsrc/khoj/utils/state.py14from khoj.utils.helpers import LRU, get_device, is_env_var_trueCODE
CRITICALsrc/khoj/search_filter/file_filter.py7from khoj.utils.helpers import LRUCODE
CRITICALsrc/khoj/search_filter/word_filter.py7from khoj.utils.helpers import LRUCODE
CRITICALsrc/khoj/search_filter/date_filter.py13from khoj.utils.helpers import LRU, merge_dicts, timerCODE
Decorative Section Separators122 hits · 360 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_multiple_users.py11# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_multiple_users.py24# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_multiple_users.py64# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py34# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py54# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py71# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py92# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py107# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py125# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py144# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py163# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py182# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py203# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py231# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py262# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py290# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py327# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py373# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py416# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py446# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py492# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py530# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py551# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py567# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py614# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py638# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py652# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py701# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_actors.py744# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_orgnode.py7# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_orgnode.py29# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_orgnode.py53# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_orgnode.py88# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_orgnode.py216# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_orgnode.py240# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_orgnode.py265# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_orgnode.py313# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_orgnode.py115# ----------------------------------------------------------------------------------------------------STRING
MEDIUMtests/test_orgnode.py143# ----------------------------------------------------------------------------------------------------STRING
MEDIUMtests/test_orgnode.py193# ----------------------------------------------------------------------------------------------------STRING
MEDIUMtests/test_orgnode.py289# ----------------------------------------------------------------------------------------------------STRING
MEDIUMtests/test_orgnode.py335# ----------------------------------------------------------------------------------------------------STRING
MEDIUMtests/test_orgnode.py361# ----------------------------------------------------------------------------------------------------STRING
MEDIUMtests/test_word_filter.py13# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_word_filter.py28# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_word_filter.py43# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_word_filter.py56# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_word_filter.py69# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_director.py21# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_director.py31# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_director.py47# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_director.py67# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_director.py84# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_director.py107# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_director.py131# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_director.py157# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_director.py182# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_director.py215# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_director.py233# ----------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_online_chat_director.py251# ----------------------------------------------------------------------------------------------------COMMENT
62 more matches not shown…
Hyper-Verbose Identifiers379 hits · 301 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py43def enable_db_access_for_all_tests(db):CODE
LOWtests/conftest.py171def default_openai_chat_model_option():CODE
LOWtests/conftest.py207def chat_client_no_background(search_config, default_user2: KhojUser):CODE
LOWtests/conftest.py212def chat_client_with_large_kb(search_config, default_user2: KhojUser):CODE
LOWtests/conftest.py256def large_kb_chat_client_builder(search_config, user):CODE
LOWtests/test_conversation_utils.py14 def test_truncate_message_all_small(self):CODE
LOWtests/test_conversation_utils.py28 def test_truncate_message_only_oldest_big(self):CODE
LOWtests/test_conversation_utils.py43 def test_truncate_message_with_image(self):CODE
LOWtests/test_conversation_utils.py64 def test_truncate_message_with_content_list(self):CODE
LOWtests/test_conversation_utils.py90 def test_truncate_message_first_large(self):CODE
LOWtests/test_conversation_utils.py112 def test_truncate_message_large_system_message_first(self):CODE
LOWtests/test_conversation_utils.py134 def test_truncate_single_large_non_system_message(self):CODE
LOWtests/test_conversation_utils.py155 def test_truncate_single_large_question(self):CODE
LOWtests/test_conversation_utils.py178 def test_load_complex_raw_json_string(self):CODE
LOWtests/test_conversation_utils.py189 def test_load_complex_json_with_python_code(self):CODE
LOWtests/test_conversation_utils.py202 def test_load_complex_json_inline(self):CODE
LOWtests/test_pdf_to_entries.py9def test_single_page_pdf_to_jsonl():CODE
LOWtests/test_pdf_to_entries.py25def test_multi_page_pdf_to_jsonl():CODE
LOWtests/test_pdf_to_entries.py41def test_ocr_page_pdf_to_jsonl():CODE
LOWtests/test_file_filter.py13def test_can_filter_no_file_filter():CODE
LOWtests/test_file_filter.py25def test_can_filter_non_existent_file():CODE
LOWtests/test_file_filter.py37def test_can_filter_single_file_include():CODE
LOWtests/test_file_filter.py49def test_can_filter_single_file_exclude():CODE
LOWtests/test_file_filter.py61def test_can_filter_file_with_regex_match():CODE
LOWtests/test_file_filter.py73def test_can_filter_multiple_file_includes():CODE
LOWtests/test_file_filter.py85def test_get_single_include_file_filter_terms():CODE
LOWtests/test_file_filter.py97def test_get_single_exclude_file_filter_terms():CODE
LOWtests/test_file_filter.py109def test_get_single_include_exclude_file_filter_terms():CODE
LOWtests/test_file_filter.py121def test_get_multiple_include_exclude_file_filter_terms():CODE
LOWtests/test_markdown_to_entries.py8def test_extract_markdown_with_no_headings(tmp_path):CODE
LOWtests/test_markdown_to_entries.py35def test_extract_single_markdown_entry(tmp_path):STRING
LOWtests/test_markdown_to_entries.py55def test_extract_multiple_markdown_entries(tmp_path):STRING
LOWtests/test_markdown_to_entries.py81def test_extract_entries_with_different_level_headings(tmp_path):STRING
LOWtests/test_markdown_to_entries.py104def test_extract_entries_with_non_incremental_heading_levels(tmp_path):STRING
LOWtests/test_markdown_to_entries.py129def test_extract_entries_with_text_before_headings(tmp_path):STRING
LOWtests/test_markdown_to_entries.py157def test_parse_markdown_file_into_single_entry_if_small(tmp_path):STRING
LOWtests/test_markdown_to_entries.py180def test_parse_markdown_entry_with_children_as_single_entry_if_small(tmp_path):STRING
LOWtests/test_markdown_to_entries.py213def test_line_number_tracking_in_recursive_split():STRING
LOWtests/test_multiple_users.py66def test_different_user_data_not_accessed(client, sample_org_data, default_user: KhojUser):CODE
LOWtests/test_online_chat_actors.py39async def test_extract_question_with_date_filter_from_relative_day(chat_client, default_user2):CODE
LOWtests/test_online_chat_actors.py59async def test_extract_question_with_date_filter_from_relative_month(chat_client, default_user2):CODE
LOWtests/test_online_chat_actors.py76async def test_extract_question_with_date_filter_from_relative_year(chat_client, default_user2):CODE
LOWtests/test_online_chat_actors.py96async def test_extract_multiple_explicit_questions_from_message(chat_client, default_user2):CODE
LOWtests/test_online_chat_actors.py111async def test_extract_multiple_implicit_questions_from_message(chat_client, default_user2):CODE
LOWtests/test_online_chat_actors.py129async def test_generate_search_query_using_question_from_chat_history(chat_client, default_user2):CODE
LOWtests/test_online_chat_actors.py148async def test_generate_search_query_using_answer_from_chat_history(chat_client, default_user2):CODE
LOWtests/test_online_chat_actors.py167async def test_generate_search_query_using_question_and_answer_from_chat_history(chat_client, default_user2):CODE
LOWtests/test_online_chat_actors.py186async def test_chat_with_no_chat_history_or_retrieved_content():CODE
LOWtests/test_online_chat_actors.py207async def test_answer_from_chat_history_and_no_content():CODE
LOWtests/test_online_chat_actors.py235async def test_answer_from_chat_history_and_previously_retrieved_content():CODE
LOWtests/test_online_chat_actors.py266async def test_answer_from_chat_history_and_currently_retrieved_content():CODE
LOWtests/test_online_chat_actors.py294async def test_refuse_answering_unanswerable_question():CODE
LOWtests/test_online_chat_actors.py331async def test_answer_requires_current_date_awareness():CODE
LOWtests/test_online_chat_actors.py377async def test_answer_requires_date_aware_aggregation_across_provided_notes():CODE
LOWtests/test_online_chat_actors.py420async def test_answer_general_question_not_in_chat_history_or_retrieved_content():CODE
LOWtests/test_online_chat_actors.py450async def test_ask_for_clarification_if_not_enough_context_in_question():CODE
LOWtests/test_online_chat_actors.py496async def test_agent_prompt_should_be_used(openai_agent):CODE
LOWtests/test_online_chat_actors.py534async def test_websearch_with_operators(chat_client, default_user2):CODE
LOWtests/test_online_chat_actors.py554async def test_websearch_khoj_website_for_info_about_khoj(chat_client, default_user2):CODE
LOWtests/test_online_chat_actors.py603async def test_select_data_sources_actor_chooses_to_search_notes(CODE
319 more matches not shown…
Excessive Try-Catch Wrapping147 hits · 136 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py335 except Exception as e:STRING
LOWtests/helpers.py201 except Exception as e:STRING
LOWtests/test_agents.py398 except Exception as e:CODE
LOWtests/evals/eval.py461 except Exception as e:CODE
LOWtests/evals/eval.py107 except Exception as e:CODE
LOWtests/evals/eval.py129 except Exception as e:CODE
LOWtests/evals/eval.py176 except Exception as e:CODE
LOWtests/evals/eval.py180 except Exception as e:CODE
LOWtests/evals/eval.py203 except Exception as e:CODE
LOWtests/evals/eval.py246 except Exception as e:CODE
MEDIUMtests/evals/eval.py343 print(f"Error loading and formatting MATH500 dataset: {e}")STRING
LOWtests/evals/eval.py373 except Exception as e:CODE
LOWtests/evals/eval.py429 except Exception as e:CODE
LOWtests/evals/eval.py318 except Exception as e:STRING
LOWtests/evals/eval.py342 except Exception as e:STRING
LOWtests/evals/eval.py514 except Exception as e:STRING
LOWsrc/khoj/configure.py295 except Exception as e:CODE
LOWsrc/khoj/configure.py315 except Exception as e:CODE
LOWsrc/khoj/configure.py453 except Exception as e:CODE
LOWsrc/khoj/main.py115 except Exception as e:CODE
LOWsrc/khoj/routers/api_automation.py109 except Exception as e:CODE
LOWsrc/khoj/routers/research.py138 except Exception as e:CODE
LOWsrc/khoj/routers/research.py269 except Exception as e:CODE
LOWsrc/khoj/routers/research.py390 except Exception as e:CODE
LOWsrc/khoj/routers/research.py430 except Exception as e:CODE
LOWsrc/khoj/routers/research.py442 except Exception:CODE
LOWsrc/khoj/routers/research.py618 except Exception as e:CODE
LOWsrc/khoj/routers/api_chat.py157 except Exception as e:CODE
LOWsrc/khoj/routers/api_chat.py170 except Exception as e:CODE
LOWsrc/khoj/routers/api_chat.py778 except Exception as e:CODE
LOWsrc/khoj/routers/api_chat.py862 except Exception as e:CODE
LOWsrc/khoj/routers/api_chat.py1107 except Exception as e:CODE
LOWsrc/khoj/routers/api_chat.py1155 except Exception as e:CODE
LOWsrc/khoj/routers/api_chat.py1194 except Exception as e:CODE
LOWsrc/khoj/routers/api_chat.py1429 except Exception as e:CODE
LOWsrc/khoj/routers/api_chat.py1574 except Exception as e:CODE
LOWsrc/khoj/routers/api_chat.py1719 except Exception as e:CODE
LOWsrc/khoj/routers/api.py91 except Exception as e:CODE
LOWsrc/khoj/routers/api_content.py186 except Exception as e:CODE
LOWsrc/khoj/routers/api_content.py216 except Exception as e:CODE
LOWsrc/khoj/routers/api_content.py596 except Exception as e:CODE
LOWsrc/khoj/routers/storage.py42 except Exception as e:CODE
LOWsrc/khoj/routers/helpers.py354 except Exception:CODE
LOWsrc/khoj/routers/helpers.py472 except Exception as e:CODE
LOWsrc/khoj/routers/helpers.py545 except Exception:CODE
LOWsrc/khoj/routers/helpers.py614 except Exception:CODE
LOWsrc/khoj/routers/helpers.py643 except Exception:CODE
LOWsrc/khoj/routers/helpers.py676 except Exception:CODE
LOWsrc/khoj/routers/helpers.py816 except Exception as e:CODE
LOWsrc/khoj/routers/helpers.py864 except Exception as e:CODE
LOWsrc/khoj/routers/helpers.py979 except Exception:CODE
LOWsrc/khoj/routers/helpers.py1033 except Exception:CODE
LOWsrc/khoj/routers/helpers.py1283 except Exception:CODE
LOWsrc/khoj/routers/helpers.py1480 except Exception:CODE
LOWsrc/khoj/routers/helpers.py1713 except Exception as e:CODE
LOWsrc/khoj/routers/helpers.py2018 except Exception as e:CODE
LOWsrc/khoj/routers/helpers.py2517 except Exception as e:CODE
LOWsrc/khoj/routers/helpers.py3049 except Exception as e:CODE
LOWsrc/khoj/routers/helpers.py3067 except Exception as e:CODE
LOWsrc/khoj/routers/helpers.py3085 except Exception as e:CODE
87 more matches not shown…
Redundant / Tautological Comments49 hits · 82 pts
SeverityFileLineSnippetContext
LOWtests/evals/eval.py455 # Check if extracted answer matches ground truthCOMMENT
LOWscripts/dev_setup.sh132 # Check if any files were modified by prettierCOMMENT
LOWsrc/khoj/configure.py386 # Check if this is a server error (5xx) that we want to handleCOMMENT
LOWsrc/khoj/configure.py388 # Check if this is a web route (not API route)COMMENT
LOWsrc/khoj/configure.py444 # Check if the value for the field is JSON serializableCOMMENT
LOWsrc/khoj/configure.py484 # Check if the process lock is still active. If not, create a new process lock. This worker will become the scheduleCOMMENT
LOWsrc/khoj/routers/api_chat.py784 # Check if any interrupt query is receivedCOMMENT
LOWsrc/khoj/routers/api_chat.py876 # Check if the client is still connectedCOMMENT
LOWsrc/khoj/routers/api_chat.py1373 # Check if the user has disconnectedCOMMENT
LOWsrc/khoj/routers/api_chat.py1434 # Check if the user has disconnectedCOMMENT
LOWsrc/khoj/routers/api_chat.py1523 # Check if this is an interrupt messageCOMMENT
LOWsrc/khoj/routers/api_chat.py1676 # Check if there's still content to flushCOMMENT
LOWsrc/khoj/routers/api_chat.py1709 # Check if there's still content to flushCOMMENT
LOWsrc/khoj/routers/api_subscription.py60 # Check if any subscription item matches the official product IDCOMMENT
LOWsrc/khoj/routers/helpers.py2093 # Check if the user has exceeded the rate limitCOMMENT
LOWsrc/khoj/routers/helpers.py2128 # Check if the user has exceeded the rate limitCOMMENT
LOWsrc/khoj/routers/helpers.py2178 # Check if the user has exceeded the rate limitCOMMENT
LOWsrc/khoj/routers/helpers.py3029 # Check if client sent any documents of the supported typesCOMMENT
LOWsrc/khoj/routers/helpers.py3366 # Check if no results foundCOMMENT
LOWsrc/khoj/routers/api_agents.py454 # Check if the new persona is safeCOMMENT
LOW…c/khoj/database/management/commands/manage_memories.py107 # Check if user already processed in checkpointCOMMENT
LOWsrc/khoj/database/adapters/__init__.py273 # Check if verification code exists for the userCOMMENT
LOWsrc/khoj/database/adapters/__init__.py278 # Check if the code has expiredCOMMENT
LOWsrc/khoj/database/adapters/__init__.py2239 # Check if user is allowed to retrieve this automation idCOMMENT
LOWsrc/khoj/database/adapters/__init__.py2242 # Check if automation with this id existCOMMENT
LOWsrc/khoj/database/adapters/__init__.py2252 # Check if user is allowed to retrieve this automation idCOMMENT
LOWsrc/khoj/database/adapters/__init__.py2255 # Check if automation with this id existCOMMENT
LOWsrc/khoj/database/adapters/__init__.py380 # Check if the trial has expiredCOMMENT
LOWsrc/khoj/database/adapters/__init__.py2196 # Check if user is allowed to delete this automation idCOMMENT
LOWsrc/khoj/database/adapters/__init__.py2217 # Check if user is allowed to delete this automation idCOMMENT
LOWsrc/khoj/app/settings.py28# Set KHOJ_DOMAIN to custom domain for production deployments.COMMENT
LOWsrc/khoj/app/settings.py31# Set KHOJ_ALLOWED_DOMAIN to the i.p or domain of the Khoj service on the internal network.COMMENT
LOW…oj/processor/content/plaintext/plaintext_to_entries.py98 # Check if raw_filename is a URL. If so, save it as is. If not, convert it to a Path.COMMENT
LOW…khoj/processor/content/markdown/markdown_to_entries.py161 # Check if raw_filename is a URL. If so, save it as is. If not, convert it to a Path.COMMENT
LOWsrc/khoj/processor/operator/__init__.py194 # Check if termination conditions are metCOMMENT
LOWsrc/khoj/processor/operator/operator_agent_anthropic.py315 # Check if thinking content exists before appendingCOMMENT
LOWsrc/khoj/processor/operator/operator_agent_binary.py250 # Set summary to last action messageCOMMENT
LOWsrc/khoj/processor/conversation/prompts.py920# Print results with formattingCOMMENT
LOWsrc/khoj/processor/conversation/utils.py1159 # Write files and stage themCOMMENT
LOWsrc/khoj/processor/conversation/utils.py191 if hasattr(msg, "model_dump"): # Check if it's a Pydantic modelCODE
LOWsrc/khoj/processor/conversation/utils.py1057 response.raise_for_status() # Check if the request was successfulCODE
LOWsrc/khoj/processor/conversation/google/utils.py417 # Check if the response was blocked due to safety concerns with the promptCOMMENT
LOWsrc/khoj/processor/conversation/google/utils.py425 # Check if finish reason is empty, therefore generation is in progressCOMMENT
LOWsrc/khoj/processor/conversation/google/utils.py429 # Check if the response was blocked due to safety concerns with the generated contentCOMMENT
LOWsrc/khoj/processor/conversation/google/utils.py433 # Check if the response was stopped due to reaching maximum token limit or other reasonsCOMMENT
LOWsrc/khoj/processor/conversation/openai/utils.py1100 # Check if buffer ends with a prefix of end_tagCOMMENT
LOWsrc/khoj/processor/conversation/openai/utils.py1204 # Check if buffer ends with a prefix of end_tagCOMMENT
LOWsrc/khoj/utils/helpers.py239 # Check if the file existsCOMMENT
LOWsrc/khoj/utils/helpers.py1131 # Check if AI model to be used via GCP Vertex APICOMMENT
Deep Nesting82 hits · 72 pts
SeverityFileLineSnippetContext
LOWtests/helpers.py32CODE
LOWtests/evals/eval.py623CODE
LOWsrc/khoj/configure.py435CODE
LOWsrc/khoj/routers/research.py64CODE
LOWsrc/khoj/routers/research.py277CODE
LOWsrc/khoj/routers/research.py476CODE
LOWsrc/khoj/routers/api_chat.py668CODE
LOWsrc/khoj/routers/api_chat.py1483CODE
LOWsrc/khoj/routers/api_chat.py1584CODE
LOWsrc/khoj/routers/api_chat.py745CODE
LOWsrc/khoj/routers/api_chat.py835CODE
LOWsrc/khoj/routers/api.py110CODE
LOWsrc/khoj/routers/api_content.py467CODE
LOWsrc/khoj/routers/api_subscription.py125CODE
LOWsrc/khoj/routers/helpers.py256CODE
LOWsrc/khoj/routers/helpers.py876CODE
LOWsrc/khoj/routers/helpers.py1118CODE
LOWsrc/khoj/routers/helpers.py1636CODE
LOWsrc/khoj/routers/helpers.py1903CODE
LOWsrc/khoj/routers/helpers.py3268CODE
LOWsrc/khoj/routers/helpers.py2794CODE
LOW…base/management/commands/convert_images_png_to_webp.py22CODE
LOW…c/khoj/database/management/commands/manage_memories.py187CODE
LOWsrc/khoj/database/models/__init__.py430CODE
LOWsrc/khoj/database/adapters/__init__.py369CODE
LOWsrc/khoj/database/adapters/__init__.py1289CODE
LOWsrc/khoj/processor/tools/run_code.py232CODE
LOWsrc/khoj/processor/tools/online_search.py56CODE
LOWsrc/khoj/processor/content/text_to_entries.py61CODE
LOWsrc/khoj/processor/content/text_to_entries.py142CODE
LOWsrc/khoj/processor/content/org_mode/orgnode.py61CODE
LOWsrc/khoj/processor/content/images/image_to_entries.py51CODE
LOWsrc/khoj/processor/content/notion/notion_to_entries.py82CODE
LOWsrc/khoj/processor/content/notion/notion_to_entries.py218CODE
LOWsrc/khoj/processor/content/github/github_to_entries.py116CODE
LOWsrc/khoj/processor/image/generate.py41CODE
LOWsrc/khoj/processor/image/generate.py374CODE
LOW…oj/processor/operator/operator_environment_computer.py150CODE
LOWsrc/khoj/processor/operator/operator_agent_openai.py42CODE
LOWsrc/khoj/processor/operator/operator_agent_openai.py157CODE
LOWsrc/khoj/processor/operator/operator_agent_openai.py230CODE
LOWsrc/khoj/processor/operator/operator_agent_openai.py268CODE
LOWsrc/khoj/processor/operator/operator_agent_openai.py319CODE
LOWsrc/khoj/processor/operator/operator_agent_openai.py444CODE
LOWsrc/khoj/processor/operator/__init__.py34CODE
LOWsrc/khoj/processor/operator/grounding_agent.py93CODE
LOW…hoj/processor/operator/operator_environment_browser.py132CODE
LOWsrc/khoj/processor/operator/grounding_agent_uitars.py197CODE
LOWsrc/khoj/processor/operator/grounding_agent_uitars.py389CODE
LOWsrc/khoj/processor/operator/grounding_agent_uitars.py482CODE
LOWsrc/khoj/processor/operator/grounding_agent_uitars.py583CODE
LOWsrc/khoj/processor/operator/grounding_agent_uitars.py753CODE
LOWsrc/khoj/processor/operator/operator_agent_anthropic.py53CODE
LOWsrc/khoj/processor/operator/operator_agent_anthropic.py224CODE
LOWsrc/khoj/processor/operator/operator_agent_anthropic.py281CODE
LOWsrc/khoj/processor/operator/operator_agent_anthropic.py322CODE
LOWsrc/khoj/processor/operator/operator_agent_anthropic.py525CODE
LOWsrc/khoj/processor/operator/operator_agent_binary.py151CODE
LOWsrc/khoj/processor/conversation/utils.py323CODE
LOWsrc/khoj/processor/conversation/utils.py350CODE
22 more matches not shown…
Modern Structural Boilerplate62 hits · 62 pts
SeverityFileLineSnippetContext
LOWtests/test_text_search.py16logger = logging.getLogger(__name__)CODE
LOWtests/helpers.py29logger = logging.getLogger(__name__)CODE
LOWtests/test_grep_files.py9logger = logging.getLogger(__name__)CODE
LOWtests/evals/eval.py31logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/configure.py59logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/routers/api_automation.py22logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/routers/auth.py36logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/routers/research.py48logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/routers/api_chat.py100logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/routers/api_memories.py15logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/routers/api_phone.py13logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/routers/api.py32logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/routers/api_content.py45logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/routers/api_subscription.py21logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/routers/email.py12logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/routers/storage.py5logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/routers/notion.py25logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/routers/twilio.py6logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/routers/helpers.py147logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/routers/api_agents.py24logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/routers/api_model.py19logger = logging.getLogger(__name__)CODE
LOW…j/database/management/commands/change_default_model.py14logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/database/models/__init__.py19logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/database/adapters/__init__.py88logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/search_type/text_search.py22logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/embeddings.py26logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/tools/mcp.py10logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/tools/run_code.py40logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/tools/online_search.py35logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/content/text_to_entries.py24logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/content/org_mode/org_to_entries.py14logger = logging.getLogger(__name__)CODE
LOW…oj/processor/content/plaintext/plaintext_to_entries.py14logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/content/images/image_to_entries.py12logger = logging.getLogger(__name__)CODE
LOW…khoj/processor/content/markdown/markdown_to_entries.py13logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/content/pdf/pdf_to_entries.py13logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/content/notion/notion_to_entries.py13logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/content/github/github_to_entries.py17logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/content/docx/docx_to_entries.py13logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/image/generate.py38logger = logging.getLogger(__name__)CODE
LOW…oj/processor/operator/operator_environment_computer.py20logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/operator/operator_agent_base.py21logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/operator/operator_agent_openai.py37logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/operator/__init__.py30logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/operator/grounding_agent.py28logger = logging.getLogger(__name__)CODE
LOW…hoj/processor/operator/operator_environment_browser.py16logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/operator/grounding_agent_uitars.py40logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/operator/operator_agent_anthropic.py48logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/operator/operator_agent_binary.py25logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/conversation/utils.py49logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/conversation/google/gemini_chat.py15logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/conversation/google/utils.py41logger = logging.getLogger(__name__)CODE
LOW…hoj/processor/conversation/anthropic/anthropic_chat.py15logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/conversation/anthropic/utils.py35logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/conversation/openai/utils.py53logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/processor/conversation/openai/gpt.py24logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/utils/initialization.py22logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/utils/jsonl.py8logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/utils/cli.py6logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/utils/helpers.py55logger = logging.getLogger(__name__)CODE
LOWsrc/khoj/search_filter/file_filter.py9logger = logging.getLogger(__name__)CODE
2 more matches not shown…
Self-Referential Comments20 hits · 62 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_memory_settings.py285 # Create a custom agentCOMMENT
MEDIUMtests/test_memory_settings.py352 # Create a custom agentCOMMENT
MEDIUMsrc/khoj/routers/research.py93 # Create a status collector that captures messages for later batch yieldCOMMENT
MEDIUMsrc/khoj/routers/api_chat.py742 # Create a task to monitor for disconnectionsCOMMENT
MEDIUMsrc/khoj/routers/api_chat.py974 # Create a de-duped set of memoriesCOMMENT
MEDIUMsrc/khoj/routers/api_chat.py1567 # Create a new task for processing the chat requestCOMMENT
MEDIUMsrc/khoj/routers/api_memories.py99 # Create a new memory with the updated contentCOMMENT
MEDIUMsrc/khoj/routers/helpers.py2759 # Create the automation responseCOMMENT
MEDIUM…j/database/management/commands/change_default_model.py16BATCH_SIZE = 1000 # Define an appropriate batch sizeCODE
MEDIUM…j/database/management/commands/change_default_model.py92 # Create an entry filter with no conditionsCOMMENT
MEDIUMsrc/khoj/database/adapters/__init__.py1772 # Create a custom queryset for prefetching settings__ai_model_api, handling null casesCOMMENT
MEDIUM…khoj/processor/content/markdown/markdown_to_entries.py151 # Create a mapping from parsed entry to file infoCOMMENT
MEDIUM…hoj/processor/operator/operator_environment_browser.py56 # Define a handler for page load events to capture URLsCOMMENT
MEDIUM…hoj/processor/operator/operator_environment_browser.py72 # Define a handler for new pagesCOMMENT
MEDIUMsrc/khoj/processor/conversation/prompts.py941# Define the variableCOMMENT
MEDIUMsrc/khoj/processor/conversation/prompts.py944# Define the expressionCOMMENT
MEDIUMsrc/khoj/processor/conversation/prompts.py966# Create a DataFrame of world population from the provided dataCOMMENT
MEDIUMsrc/khoj/processor/conversation/utils.py1128 # Create an initial commit if the repository is newly createdCOMMENT
MEDIUMsrc/khoj/utils/helpers.py913 # Create a deep copy of the code results to avoid modifying the original dataCOMMENT
MEDIUMsrc/telemetry/telemetry.py44 # Create a table if it doesn't existCOMMENT
Over-Commented Block15 hits · 15 pts
SeverityFileLineSnippetContext
LOWdocker-compose.yml81 # Uncomment line below to use with Ollama running on your local machine at localhost:11434.COMMENT
LOWdocker-compose.yml101 # - OLOSTEP_API_KEY=your_olostep_api_keyCOMMENT
LOW…face/web/app/components/suggestions/suggestionsData.ts121 color: suggestionToColorMap[SuggestionType.Language] || DEFAULT_COLOR,COMMENT
LOW…face/web/app/components/suggestions/suggestionsData.ts141 // actionTagline: "Career advice",COMMENT
LOWsrc/interface/desktop/assets/markdown-it.min.js2341 };COMMENT
LOWsrc/interface/desktop/assets/markdown-it.min.js2441 }COMMENT
LOWsrc/interface/desktop/assets/markdown-it.min.js2861 // .toLowerCase().toUpperCase() should get rid of all differencesCOMMENT
LOWsrc/interface/desktop/assets/markdown-it.min.js2881 // and .toUpperCase() doesn't change ϴ (already uppercase).COMMENT
LOWsrc/interface/desktop/assets/markdown-it.min.js4601 // ```COMMENT
LOWsrc/interface/desktop/assets/markdown-it.min.js5461COMMENT
LOWsrc/interface/desktop/assets/markdown-it.min.js5481 this.bsCount = [];COMMENT
LOWsrc/interface/desktop/assets/markdown-it.min.js6901 // Defined via punctuation & spaces to save spaceCOMMENT
LOWsrc/interface/desktop/assets/markdown-it.min.js7881 // Convert '\n' in paragraphs into <br>COMMENT
LOWsrc/khoj/app/settings.py241COMMENT
LOWsrc/khoj/processor/content/org_mode/orgnode.py1# Copyright (c) 2010 Charles CaveCOMMENT
AI Structural Patterns17 hits · 12 pts
SeverityFileLineSnippetContext
LOWsrc/khoj/routers/research.py277CODE
LOWsrc/khoj/routers/research.py476CODE
LOWsrc/khoj/routers/helpers.py822CODE
LOWsrc/khoj/routers/helpers.py1070CODE
LOWsrc/khoj/routers/helpers.py1213CODE
LOWsrc/khoj/routers/helpers.py1288CODE
LOWsrc/khoj/routers/helpers.py1399CODE
LOWsrc/khoj/routers/helpers.py1636CODE
LOWsrc/khoj/routers/helpers.py1732CODE
LOWsrc/khoj/routers/helpers.py1802CODE
LOWsrc/khoj/routers/helpers.py1903CODE
LOWsrc/khoj/processor/tools/online_search.py56CODE
LOWsrc/khoj/processor/tools/online_search.py440CODE
LOWsrc/khoj/processor/operator/__init__.py34CODE
LOWsrc/khoj/processor/conversation/utils.py541CODE
LOWsrc/khoj/processor/conversation/utils.py677CODE
LOWsrc/khoj/processor/conversation/anthropic/utils.py51CODE
Cross-Language Confusion2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHtests/test_text_search.py171git clone https://github.com/khoj-ai/khoj && cd khojCODE
HIGHtests/helpers.py128 git clone https://github.com/khoj-ai/khoj && cd khojCODE
AI Slop Vocabulary3 hits · 7 pts
SeverityFileLineSnippetContext
MEDIUMsrc/interface/obsidian/src/main.ts239 // Use a more robust way to get the input, or ensure it's always present after onOpenCOMMENT
MEDIUMsrc/khoj/routers/research.py296 """Given a query, determine which of the available tools the agent should use in order to answer appropriately."""STRING
MEDIUMsrc/khoj/utils/initialization.py217 # TODO: This is hacky. Will be replaced with more robust solution based on provider type enumCOMMENT
Verbosity Indicators3 hits · 6 pts
SeverityFileLineSnippetContext
LOWsrc/khoj/processor/operator/grounding_agent_uitars.py968 # Step 1: Split the string into individual actionsCOMMENT
LOWsrc/khoj/processor/operator/grounding_agent_uitars.py975 # Step 2: Extract coordinates (start_box or end_box) using regexCOMMENT
LOWsrc/khoj/processor/operator/grounding_agent_uitars.py986 # Step 5: Reconstruct the final stringCOMMENT
Structural Annotation Overuse3 hits · 6 pts
SeverityFileLineSnippetContext
LOWsrc/khoj/processor/operator/grounding_agent_uitars.py968 # Step 1: Split the string into individual actionsCOMMENT
LOWsrc/khoj/processor/operator/grounding_agent_uitars.py975 # Step 2: Extract coordinates (start_box or end_box) using regexCOMMENT
LOWsrc/khoj/processor/operator/grounding_agent_uitars.py986 # Step 5: Reconstruct the final stringCOMMENT
Unused Imports6 hits · 6 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py12CODE
LOWtests/conftest.py12CODE
LOWtests/test_pdf_to_entries.py1CODE
LOWtests/test_client.py9CODE
LOWsrc/khoj/utils/config.py2CODE
LOWsrc/khoj/utils/helpers.py1CODE
Fake / Example Data4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/test_conversation_utils.py45 image_content_item = {"type": "image_url", "image_url": {"url": "placeholder"}}CODE
LOWsrc/interface/desktop/assets/purify.min.js2!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&defineCODE
LOWsrc/khoj/database/adapters/__init__.py789 default_personality = prompts.personality.format(current_date="placeholder", day_of_week="placeholder")CODE
LOWsrc/khoj/utils/initialization.py47 openai_api_key = os.getenv("OPENAI_API_KEY", "placeholder" if openai_base_url else None)CODE