Repository Analysis

SuanmoSuanyangTechnology/MemoryBear

MemoryBear Equip AI with human-like memory capability

17.9 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of SuanmoSuanyangTechnology/MemoryBear, a Python project with 4,771 GitHub stars. SynthScan v2.0 examined 395,415 lines of code across 1611 source files, recording 5584 pattern matches distributed across 23 syntactic categories. The overall adjusted score of 17.9 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).

17.9
Adjusted Score
17.9
Raw Score
100%
Time Factor
2026-07-14
Last Push
4.8K
Stars
Python
Language
395.4K
Lines of Code
1.6K
Files
5.6K
Pattern Hits
2026-07-14
Scan Date
0.18
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 0HIGH 290MEDIUM 333LOW 4961

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 5584 distinct pattern matches across 23 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.

Excessive Try-Catch Wrapping1725 hits · 1636 pts
SeverityFileLineSnippetContext
LOWsandbox/app/dependencies.py28 except Exception as e:CODE
LOWsandbox/app/dependencies.py83 except Exception as e:CODE
LOWsandbox/app/dependencies.py132 except Exception as e:CODE
LOWsandbox/app/dependencies.py164 except Exception as e:CODE
LOWsandbox/app/middleware/concurrency.py75 except Exception as exc:CODE
LOWsandbox/app/middleware/concurrency.py82 except Exception:CODE
LOWsandbox/app/core/executor.py46 except Exception as e:CODE
LOWsandbox/app/services/nodejs_service.py41 except Exception as e:CODE
LOWsandbox/app/services/python_service.py48 except Exception as e:CODE
LOWsandbox/app/services/python_service.py66 except Exception as e:CODE
LOWsandbox/app/services/python_service.py79 except Exception as e:CODE
LOWapi/check_code.py37 except Exception as e:CODE
LOWapi/app/aioRedis.py85 except Exception as e:CODE
LOWapi/app/aioRedis.py106 except Exception as e:CODE
LOWapi/app/aioRedis.py114 except Exception as e:CODE
LOWapi/app/aioRedis.py123 except Exception as e:CODE
LOWapi/app/aioRedis.py136 except Exception as e:CODE
LOWapi/app/aioRedis.py179 except Exception as e:CODE
LOWapi/app/aioRedis.py184 except Exception as e:CODE
LOWapi/app/aioRedis.py197 except Exception:CODE
LOWapi/app/aioRedis.py202 except Exception:CODE
LOWapi/app/aioRedis.py213 except Exception as e:CODE
LOWapi/app/tasks.py209 except Exception:CODE
LOWapi/app/tasks.py212 except Exception:CODE
LOWapi/app/tasks.py218 except Exception:CODE
LOWapi/app/tasks.py1865 except Exception as _count_e:CODE
LOWapi/app/tasks.py1873 except Exception as _wt_e:CODE
LOWapi/app/tasks.py1878 except Exception:CODE
LOWapi/app/tasks.py2662 except Exception as e:CODE
LOWapi/app/tasks.py2970 except Exception as e:CODE
LOWapi/app/tasks.py3557 except Exception as e:CODE
LOWapi/app/tasks.py3819 except Exception as e:CODE
LOWapi/app/tasks.py3986 except Exception as e:CODE
LOWapi/app/tasks.py3989 except Exception as e:CODE
LOWapi/app/tasks.py3995 except Exception:CODE
LOWapi/app/tasks.py129 except Exception:CODE
LOWapi/app/tasks.py195 except Exception:CODE
LOWapi/app/tasks.py247 except Exception as e:CODE
LOWapi/app/tasks.py271 except Exception as e:CODE
LOWapi/app/tasks.py296 except Exception as e:CODE
LOWapi/app/tasks.py334 except Exception:CODE
LOWapi/app/tasks.py408 except Exception:CODE
LOWapi/app/tasks.py674 except Exception as e:CODE
LOWapi/app/tasks.py796 except Exception as exc:CODE
LOWapi/app/tasks.py800 except Exception as retry_exc:CODE
LOWapi/app/tasks.py880 except Exception as e:CODE
LOWapi/app/tasks.py893 except Exception:CODE
LOWapi/app/tasks.py976 except Exception as e:CODE
LOWapi/app/tasks.py1061 except Exception as e:CODE
LOWapi/app/tasks.py1163 except Exception as e:CODE
LOWapi/app/tasks.py1227 except Exception as e:CODE
LOWapi/app/tasks.py1239 except Exception:CODE
LOWapi/app/tasks.py1246 except Exception:CODE
LOWapi/app/tasks.py1441 except Exception:CODE
LOWapi/app/tasks.py1535 except Exception as e:CODE
LOWapi/app/tasks.py1630 except Exception as e:CODE
LOWapi/app/tasks.py1693 except Exception:CODE
LOWapi/app/tasks.py1714 except Exception as e:CODE
LOWapi/app/tasks.py1721 except Exception as e:CODE
LOWapi/app/tasks.py1794 except Exception as e:CODE
1665 more matches not shown…
Docstring Block Structure251 hits · 1255 pts
SeverityFileLineSnippetContext
HIGHapi/app/dependencies.py42Extract API Key from request headers Args: request: FastAPI Request object STRING
HIGHapi/app/dependencies.py568 Get App or Workspace from API Key Supports two API Key formats: 1. Authorization: Bearer <api_key> STRING
HIGHapi/app/core/language_utils.py25 校验语言参数,确保其为有效值。 Args: language: 待校验的语言代码,可以是 None、"zh"、"en" 或其他值 Returns: 有效的STRING
HIGHapi/app/core/language_utils.py67 从请求头获取并校验语言参数。 这是一个便捷函数,用于在 controller 层统一处理 X-Language-Type Header。 Args: language_type:STRING
HIGHapi/app/core/storage_strategy.py183 Get the appropriate storage strategy for the given context. Args: context: The uplSTRING
HIGHapi/app/core/api_key_utils.py97校验 end_user 是否存在且属于指定 workspace。 Args: db: 数据库会话 end_user_id: 终端用户 ID workspace_id: 工作空间 IDSTRING
HIGHapi/app/core/upload_policies.py66 根据上传上下文获取对应的上传策略 Args: context: 上传上下文 Returns: 对应的上传策略 Raises: STRING
HIGHapi/app/core/tools/langchain_adapter.py198根据工具参数创建Pydantic schema Args: parameters: 工具参数列表 operation: 特定操作(用于过滤参数) STRING
HIGHapi/app/core/tools/base.py80验证参数 Args: parameters: 输入参数 Returns: 验证错误字典,空字典表示验证通过 STRING
HIGHapi/app/core/memory/llm_tools/openai_embedder.py62 生成嵌入向量实现 Args: messages: 文本列表 **kwargs: 额外参数 Returns: 嵌入向STRING
HIGHapi/app/core/memory/llm_tools/embedder_client.py68 生成嵌入向量 Args: messages: 文本列表 **kwargs: 额外参数 Returns: 嵌入向量列STRING
HIGHapi/app/core/memory/llm_tools/embedder_client.py107 带重试机制的嵌入向量生成接口 Args: messages: 文本列表 **kwargs: 额外参数 Returns: STRING
HIGHapi/app/core/memory/llm_tools/embedder_client.py133 为单个文本生成嵌入向量 Args: text: 单个文本 **kwargs: 额外参数 Returns: 嵌入向量STRING
HIGHapi/app/core/memory/llm_tools/embedder_client.py155 批量生成嵌入向量(支持大批量文本) Args: texts: 文本列表 batch_size: 每批处理的文本数量 **kwargsSTRING
HIGHapi/app/core/memory/llm_tools/llm_client.py68 聊天接口 Args: messages: 消息列表,每个消息包含 role 和 content **kwargs: 额外参数 ReturnSTRING
HIGHapi/app/core/memory/llm_tools/llm_client.py90 结构化输出接口 Args: messages: 消息列表 response_model: 期望的响应模型类型(Pydantic BaseModel) STRING
HIGHapi/app/core/memory/llm_tools/llm_client.py130 带重试机制的聊天接口 Args: messages: 消息列表 **kwargs: 额外参数 Returns: LSTRING
HIGHapi/app/core/memory/llm_tools/llm_client.py161 带重试机制的结构化输出接口 Args: messages: 消息列表 response_model: 期望的响应模型类型 **kwaSTRING
HIGHapi/app/core/memory/llm_tools/openai_client.py73 聊天接口实现 Args: messages: 消息列表 **kwargs: 额外参数 Returns: LLM 响STRING
HIGHapi/app/core/memory/llm_tools/openai_client.py109 结构化输出接口实现 Args: messages: 消息列表 response_model: 期望的响应模型类型 **kwargs:STRING
HIGHapi/app/core/memory/utils/llm/llm_utils.py146Get LLM client from MemoryConfig object. Args: memory_config: Configuration containing llm_STRING
HIGHapi/app/core/memory/utils/llm/llm_utils.py164Get embedder client from MemoryConfig object. Args: memory_config: Configuration containingSTRING
HIGHapi/app/core/memory/utils/llm/llm_utils.py182Get reranker client from MemoryConfig object. Args: memory_config: Configuration containingSTRING
HIGHapi/app/core/memory/utils/llm/llm_utils.py202Get LLM client from MemoryConfig object. DEPRECATED: Use MemoryClientFactory(db).get_llm_client_from_config(memSTRING
HIGHapi/app/core/memory/utils/embedder/embedder_utils.py18 Get embedder client from MemoryConfig object. **PREFERRED METHOD**: Use this function in production code wSTRING
HIGHapi/app/core/memory/utils/embedder/embedder_utils.py44 Get embedder client by model ID. **LEGACY/TEST METHOD**: Use this function only for: - Test/evaluationSTRING
HIGH…app/core/memory/utils/validation/ontology_validator.py49Validate that a class name follows OWL naming conventions. Validation rules: 1. Must not be empSTRING
HIGH…app/core/memory/utils/validation/ontology_validator.py115Attempt to sanitize an invalid class name into a valid format. Sanitization steps: 1. Strip whiSTRING
HIGH…app/core/memory/utils/validation/ontology_validator.py179Remove duplicate ontology classes based on case-insensitive name comparison. When duplicates are found,STRING
HIGH…app/core/memory/utils/validation/ontology_validator.py234Truncate a description to a maximum length. If the description exceeds max_length, it will be truncatedSTRING
HIGHapi/app/core/memory/utils/validation/owl_validator.py53Validate extracted ontology classes against OWL standards. This method creates an OWL ontology from theSTRING
HIGHapi/app/core/memory/utils/validation/owl_validator.py256Export ontology to OWL file in specified format. Supported formats: - rdfxml: RDF/XML format (dSTRING
HIGHapi/app/core/memory/utils/validation/owl_validator.py521Validate that ontology classes are compatible with Protégé editor. Protégé compatibility checks: STRING
HIGHapi/app/core/memory/utils/validation/owl_validator.py592从 OWL 内容解析出本体类型 支持解析 RDF/XML、Turtle 和 JSON 格式的 OWL 文件, 提取其中定义的 owl:Class 及其 rdfs:label 和 rdfs:cSTRING
HIGHapi/app/core/memory/agent/utils/template_tools.py49 Load a template from disk with caching. Args: template_name: Relative path to tempSTRING
HIGHapi/app/core/memory/agent/utils/template_tools.py77 Load and render a Jinja2 template. Args: template_name: Relative path to template STRING
HIGHapi/app/core/memory/models/base_response.py36Handle cases where LLM returns a list instead of a dict. Some LLMs may wrap the response in a list like [{"fielSTRING
HIGHapi/app/core/memory/models/ontology_scenario_models.py74Validate that the class name follows PascalCase convention. PascalCase rules: - Must start with an uppeSTRING
HIGH…/extraction_engine/extraction_pipeline_orchestrator.py145Run a critical coroutine concurrently with sidecar steps. Args: critical_coro: The awaitable for thSTRING
HIGH…es/extraction_engine/deduplication/entity_dedup_llm.py295 Use LLM to assist fuzzy deduplication among candidate entity pairs and produce an `id_redirect` mapping plus auSTRING
HIGH…action_engine/knowledge_extraction/chunk_extraction.py81Process a dialogue by generating chunks and adding them to the DialogData object. Args: dialogue: TSTRING
HIGH…action_engine/knowledge_extraction/chunk_extraction.py147Save the chunking results to a file and return the output path. Args: chunks: List of Chunk objectsSTRING
HIGH…ion_engine/knowledge_extraction/ontology_extraction.py69Extract ontology classes from a scenario description. This is the main extraction method that orchestraSTRING
HIGH…ion_engine/knowledge_extraction/ontology_extraction.py269Call LLM to extract ontology classes from scenario. This method renders the extraction prompt using theSTRING
HIGH…e_services/forgetting_engine/access_history_manager.py81 记录节点访问并原子性更新所有相关字段 Args: node_id: 节点ID node_label: 节点标签(Statement, ExtSTRING
HIGH…e_services/forgetting_engine/access_history_manager.py509 原子性更新节点(使用 APOC 原子操作) 使用 apoc.atomic.add 和 apoc.atomic.insert 保证并发安全, 无需 version 字段和乐观STRING
HIGH…age_services/forgetting_engine/forgetting_scheduler.py77 运行一次完整的遗忘周期 Args: end_user_id: 组 ID(可选,用于过滤特定组的节点) max_merge_STRING
HIGH…rage_services/forgetting_engine/forgetting_strategy.py184 将 Statement 和 Entity 节点融合为 MemorySummary 节点 融合过程: 1. 生成摘要内容(使用 LLM 或简单拼接) 2. 创STRING
HIGH…rage_services/forgetting_engine/forgetting_strategy.py568 使用 LLM 生成高质量摘要 Args: statement_text: Statement 文本内容 entity_name: EntitSTRING
HIGH…/storage_services/forgetting_engine/actr_calculator.py73 Calculate memory activation value using the unified Memory Activation formula. This method comSTRING
HIGH…/storage_services/forgetting_engine/memory_strength.py51 Calculate the base-level activation B(i) for a memory item. Args: access_times: List of daSTRING
HIGH…ory/storage_services/forgetting_engine/config_utils.py25 计算遗忘速率 公式:forgetting_rate = lambda_time / lambda_mem 这个计算将两个独立的 lambda 参数组合成一个统一的遗忘速率参数, 用于 ASTRING
HIGH…ory/storage_services/forgetting_engine/config_utils.py67 从数据库加载 ACT-R 配置参数 从 PostgreSQL 的 memory_config 表读取配置参数, 并计算派生参数(如 forgetting_rate)。 Args: STRING
HIGH…ory/storage_services/forgetting_engine/config_utils.py158 从数据库配置创建 ACTRCalculator 实例 这是创建 ACTRCalculator 的推荐方式,确保使用数据库中的配置参数。 Args: db: 数据库会话 STRING
HIGH…/core/memory/ontology_services/ontology_type_loader.py33从数据库加载场景的本体类型 统一的本体类型加载逻辑,用于替代各处重复的加载代码。 Args: scene_id: 场景ID,如果为 None 则返回 None workspSTRING
HIGHapi/app/core/memory/analytics/hot_memory_tags.py26 使用LLM筛选标签列表,仅保留具有代表性的核心名词。 Args: tags: 原始标签列表 end_user_id: 用户组ID,用于获取配置 ReturSTRING
HIGH…ore/memory/analytics/implicit_memory/habit_detector.py54Detect behavioral habits from user summaries. Args: user_id: Target user ID useSTRING
HIGH…pp/core/memory/analytics/implicit_memory/llm_client.py72Get LLM client instance. Args: model_id: LLM model ID to use, defaults to default_model_id STRING
HIGH…pp/core/memory/analytics/implicit_memory/llm_client.py125Analyze user preferences from memory summaries. Args: user_summaries: List of user memory sSTRING
HIGH…pp/core/memory/analytics/implicit_memory/llm_client.py176Analyze user personality dimensions from memory summaries. Args: user_summaries: List of usSTRING
191 more matches not shown…
Hyper-Verbose Identifiers1256 hits · 1154 pts
SeverityFileLineSnippetContext
LOWsandbox/app/dependencies.py37async def install_python_dependencies():CODE
LOWsandbox/app/dependencies.py137async def update_dependencies_periodically():CODE
LOWsandbox/app/core/runners/nodejs/env.py80async def prepare_nodejs_dependencies_env():CODE
LOWsandbox/app/core/runners/python/env.py79async def prepare_python_dependencies_env():CODE
LOWsandbox/app/services/python_service.py70async def update_python_dependencies():CODE
LOWapi/app/tasks.py4005def scan_workflow_schedule_triggers():CODE
LOWapi/app/tasks.py162def _upload_kb_file_content_sync(kb_id: uuid.UUID, file_id: uuid.UUID, file_ext: str, content: bytes) -> str:CODE
LOWapi/app/tasks.py229def _get_or_create_redis_pool() -> redis.ConnectionPool | None:CODE
LOWapi/app/tasks.py319def _shutdown_loop_gracefully(loop: asyncio.AbstractEventLoop):CODE
LOWapi/app/tasks.py867 def _mark_graphrag_dispatched(doc):CODE
LOWapi/app/tasks.py982def build_graphrag_for_document(document_id: str, knowledge_id: str):CODE
LOWapi/app/tasks.py1922def _should_skip_reflection_by_inactivity(db, end_user_id: str, inactive_hours: int | None = None) -> bool:CODE
LOWapi/app/tasks.py2514def write_all_workspaces_memory_task(self) -> Dict[str, Any]:CODE
LOWapi/app/tasks.py2730def scan_refresh_insight_summary_cache(self) -> Dict[str, Any]:CODE
LOWapi/app/tasks.py2829def do_refresh_insight_summary_cache(CODE
LOWapi/app/tasks.py2909def run_forgetting_cycle_task(self, config_id: Optional[uuid.UUID] = None) -> Dict[str, Any]:CODE
LOWapi/app/tasks.py2992def update_implicit_emotions_storage(self) -> Dict[str, Any]:CODE
LOWapi/app/tasks.py3281def init_implicit_emotions_for_users(self, end_user_ids: List[str]) -> Dict[str, Any]:CODE
LOWapi/app/tasks.py3386def init_interest_distribution_for_users(self, end_user_ids: List[str]) -> Dict[str, Any]:CODE
LOWapi/app/tasks.py3476def refresh_hot_memory_tags_cache(self) -> Dict[str, Any]:CODE
LOWapi/app/tasks.py3579def run_incremental_clustering(CODE
LOWapi/app/tasks.py3680def init_community_clustering_for_users(self, end_user_ids: List[str], workspace_id: Optional[str] = None) -> Dict[CODE
LOWapi/app/tasks.py4052def run_workflow_schedule_trigger(app_id: str, release_id: str, trigger_id: str, scheduled_at: str | None = None):CODE
LOWapi/app/query_ontology_matched_entities.py39async def get_entities_by_end_user_id(connector: Neo4jConnector, end_user_id: str) -> List[Dict[str, Any]]:CODE
LOWapi/app/query_ontology_matched_entities.py59def get_ontology_types_from_scene(db, scene_id: UUID) -> Set[str]:STRING
LOWapi/app/query_ontology_matched_entities.py66def get_ontology_types_from_config(db, config_id: UUID) -> Optional[Set[str]]:CODE
LOWapi/app/query_ontology_matched_entities.py92def get_general_ontology_types() -> Set[str]:CODE
LOWapi/app/query_ontology_matched_entities.py105async def query_ontology_matched_entities(end_user_id: str, config_id: Optional[str] = None):CODE
LOWapi/app/main.py177async def validation_exception_handler(request: Request, exc: ValidationException):CODE
LOWapi/app/main.py250async def pydantic_validation_exception_handler(request: Request, exc: PydanticValidationError):CODE
LOWapi/app/main.py328async def not_found_exception_handler(request: Request, exc: ResourceNotFoundException):CODE
LOWapi/app/main.py353async def permission_denied_handler(request: Request, exc: PermissionDeniedException):CODE
LOWapi/app/main.py379async def authentication_exception_handler(request: Request, exc: AuthenticationException):CODE
LOWapi/app/main.py404async def authorization_exception_handler(request: Request, exc: AuthorizationException):CODE
LOWapi/app/main.py429async def file_upload_exception_handler(request: Request, exc: FileUploadException):CODE
LOWapi/app/main.py455async def rate_limit_exception_handler(request: Request, exc: RateLimitException):CODE
LOWapi/app/main.py490async def business_exception_handler(request: Request, exc: BusinessException):CODE
LOWapi/app/main.py579async def unhandled_exception_handler(request: Request, exc: Exception):CODE
LOWapi/app/dependencies.py284# async def require_workspace_access_for_app_create(COMMENT
LOWapi/app/dependencies.py296def _check_workspace_access_sync(db: Session, user: User, workspace_id: uuid.UUID) -> Workspace:CODE
LOWapi/app/dependencies.py417def cur_workspace_access_guard():CODE
LOWapi/app/dependencies.py459def cur_workspace_access_guard_self_db():CODE
LOWapi/app/core/transaction_monitor.py137 def _check_transaction_duration(CODE
LOWapi/app/core/api_key_utils.py69def get_current_user_from_api_key(db: _Session, api_key_auth):CODE
LOWapi/app/core/api_key_utils.py92def validate_end_user_in_workspace(CODE
LOWapi/app/core/quota_manager.py33def _get_workspace_id_from_kwargs(kwargs: dict):CODE
LOWapi/app/core/quota_manager.py56def _get_tenant_id_from_kwargs(db: Session, kwargs: dict):CODE
LOWapi/app/core/quota_manager.py149def get_end_user_memory_limit(db: Session, tenant_id: UUID) -> Optional[int]:CODE
LOWapi/app/core/quota_manager.py190 def sum_knowledge_capacity_gb(self, tenant_id: UUID, workspace_id: Optional[UUID] = None) -> float:CODE
LOWapi/app/core/quota_manager.py411def check_knowledge_capacity_quota(func: Callable) -> Callable:CODE
LOWapi/app/core/quota_manager.py446def check_memory_engine_quota(func: Callable) -> Callable:CODE
LOWapi/app/core/quota_manager.py520def check_ontology_project_quota(func: Callable) -> Callable:CODE
LOWapi/app/core/quota_manager.py576def check_model_activation_quota(func: Callable) -> Callable:CODE
LOWapi/app/core/quota_manager.py716 def _build_per_workspace_detail(count_func, per_unit_limit):CODE
LOWapi/app/core/uow.py207 def _check_transaction_duration(self, duration: float):CODE
LOWapi/app/core/uow.py248 def create_user_and_workspace(uow):STRING
LOWapi/app/core/api_key_auth.py144def extract_api_key_from_request(request: Request) -> Optional[str]:CODE
LOWapi/app/core/api_key_auth.py308async def _log_api_key_usage_self_db(CODE
LOWapi/app/core/rag_utils/chunk_insight.py153async def generate_chunk_insight_sections(CODE
LOWapi/app/core/rag_utils/chunk_tags.py120async def extract_chunk_tags_with_frequency(chunks: List[str], max_tags: int = 10) -> List[Tuple[str, int]]:CODE
1196 more matches not shown…
Decorative Section Separators253 hits · 848 pts
SeverityFileLineSnippetContext
MEDIUMweb/src/components/D3Graph/utils.ts4// ─── Colors ───────────────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils.ts17// ─── Arrow markers ────────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils.ts34// ─── Zoom ─────────────────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils.ts46// ─── Node drag ────────────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils.ts57// ─── Cluster force ────────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils.ts112// ─── Group centers ────────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils.ts129// ─── Community graph data transform ─────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils.ts187// ─── Hull helpers ─────────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils.ts266// ─── Hull render ──────────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils.ts324// ─── Community graph init ─────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils.ts478// ─── Legend ───────────────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/types.ts4// ─── Raw input types (mirror of API response, no external dependency) ─────────COMMENT
MEDIUMweb/src/components/D3Graph/types.ts45// ─── D3 graph types ───────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/CommunityGraph.tsx14// ─── Component ────────────────────────────────────────────────────────────────COMMENT
MEDIUM…views/UserMemoryDetail/components/CommunityNetwork.tsx11// ─── Tooltip ──────────────────────────────────────────────────────────────────COMMENT
MEDIUM…views/UserMemoryDetail/components/CommunityNetwork.tsx41// ─── Component ────────────────────────────────────────────────────────────────COMMENT
MEDIUMsandbox/app/middleware/concurrency.py23 # ------------------------------------------------------------------COMMENT
MEDIUMsandbox/app/middleware/concurrency.py25 # ------------------------------------------------------------------COMMENT
MEDIUMsandbox/app/middleware/concurrency.py64 # ------------------------------------------------------------------COMMENT
MEDIUMsandbox/app/middleware/concurrency.py66 # ------------------------------------------------------------------COMMENT
MEDIUMsandbox/app/middleware/concurrency.py85 # ------------------------------------------------------------------COMMENT
MEDIUMsandbox/app/middleware/concurrency.py87 # ------------------------------------------------------------------COMMENT
MEDIUMapi/app/tasks.py2672# ============================================================COMMENT
MEDIUMapi/app/tasks.py2674# ============================================================COMMENT
MEDIUMapi/app/tasks.py2979# =============================================================================COMMENT
MEDIUMapi/app/tasks.py2981# =============================================================================COMMENT
MEDIUMapi/app/tasks.py3566# =============================================================================COMMENT
MEDIUMapi/app/tasks.py3568# =============================================================================COMMENT
MEDIUMapi/app/tasks.py3828# ─── User Metadata Extraction Task ───────────────────────────────────────────COMMENT
MEDIUMapi/app/tasks.py3830# ──────────────────────────────────────────────COMMENT
MEDIUMapi/app/tasks.py3832# ──────────────────────────────────────────────COMMENT
MEDIUMapi/app/tasks.py66# ── 预编译文件类型正则 & 常量 ──────────────────────────────────COMMENT
MEDIUMapi/app/tasks.py3268# =============================================================================COMMENT
MEDIUMapi/app/tasks.py3375# =============================================================================COMMENT
MEDIUMapi/app/dependencies.py292# ----------------------COMMENT
MEDIUMapi/app/dependencies.py294# ----------------------COMMENT
MEDIUMapi/app/dependencies.py233# ----------------------COMMENT
MEDIUMapi/app/dependencies.py235# ----------------------COMMENT
MEDIUMapi/app/core/config.py12 # ========================================================================COMMENT
MEDIUMapi/app/core/config.py14 # ========================================================================COMMENT
MEDIUMapi/app/core/config.py160 # ========================================================================COMMENT
MEDIUMapi/app/core/config.py162 # ========================================================================COMMENT
MEDIUMapi/app/core/config.py190 # ========================================================================COMMENT
MEDIUMapi/app/core/config.py192 # ========================================================================COMMENT
MEDIUMapi/app/core/config.py347 # ========================================================================COMMENT
MEDIUMapi/app/core/config.py349 # ========================================================================COMMENT
MEDIUMapi/app/core/config.py369 # ========================================================================COMMENT
MEDIUMapi/app/core/config.py371 # ========================================================================COMMENT
MEDIUMapi/app/core/logging_config.py388 # =====================================STRING
MEDIUMapi/app/core/quota_manager.py329# ─── 具名装饰器 ────────────────────────────────────────────────────────────COMMENT
MEDIUMapi/app/core/quota_manager.py679# ─── 配额使用统计 ────────────────────────────────────────────────────────────COMMENT
MEDIUMapi/app/core/rag_utils/chunk_insight.py29# ── LLM client helper ────────────────────────────────────────────────────────COMMENT
MEDIUMapi/app/core/rag_utils/chunk_insight.py50# ── Domain analysis helpers (kept for building prompt inputs) ─────────────────COMMENT
MEDIUMapi/app/core/rag_utils/chunk_insight.py103# ── Section parser ────────────────────────────────────────────────────────────COMMENT
MEDIUMapi/app/core/rag_utils/chunk_insight.py130# ── Public API ────────────────────────────────────────────────────────────────COMMENT
MEDIUMapi/app/core/rag_utils/chunk_summary.py20# ── Schema ──────────────────────────────────────────────────────────────────COMMENT
MEDIUMapi/app/core/rag_utils/chunk_summary.py41# ── LLM client helper ────────────────────────────────────────────────────────COMMENT
MEDIUMapi/app/core/rag_utils/chunk_summary.py62# ── Core function ─────────────────────────────────────────────────────────────COMMENT
MEDIUMapi/app/core/memory/memory_service.py76 # ──────────────────────────────────────────────COMMENT
MEDIUMapi/app/core/memory/memory_service.py78 # ──────────────────────────────────────────────COMMENT
193 more matches not shown…
Unused Imports896 hits · 798 pts
SeverityFileLineSnippetContext
LOWsandbox/main.py9CODE
LOWapi/app/db.py1CODE
LOWapi/app/celery_app.py147CODE
LOWapi/app/celery_worker.py6CODE
LOWapi/app/celery_worker.py8CODE
LOWapi/app/celery_worker.py17CODE
LOWapi/app/celery_worker.py21CODE
LOWapi/app/celery_worker.py21CODE
LOWapi/app/celery_worker.py21CODE
LOWapi/app/main.py10CODE
LOWapi/app/dependencies.py2CODE
LOWapi/app/dependencies.py15CODE
LOWapi/app/dependencies.py427CODE
LOWapi/app/dependencies.py473CODE
LOWapi/app/core/transaction_monitor.py10CODE
LOWapi/app/core/logging_config.py3CODE
LOWapi/app/core/quota_stub.py8CODE
LOWapi/app/core/quota_stub.py8CODE
LOWapi/app/core/quota_stub.py8CODE
LOWapi/app/core/quota_stub.py8CODE
LOWapi/app/core/quota_stub.py8CODE
LOWapi/app/core/quota_stub.py8CODE
LOWapi/app/core/quota_stub.py8CODE
LOWapi/app/core/quota_stub.py8CODE
LOWapi/app/core/quota_stub.py8CODE
LOWapi/app/core/quota_stub.py8CODE
LOWapi/app/core/quota_stub.py8CODE
LOWapi/app/core/quota_stub.py8CODE
LOWapi/app/core/quota_stub.py8CODE
LOWapi/app/core/sensitive_filter.py6CODE
LOWapi/app/core/uow.py17CODE
LOWapi/app/core/rag_utils/__init__.py5CODE
LOWapi/app/core/rag_utils/__init__.py6CODE
LOWapi/app/core/rag_utils/__init__.py6CODE
LOWapi/app/core/rag_utils/__init__.py7CODE
LOWapi/app/core/rag_utils/__init__.py7CODE
LOWapi/app/core/tools/__init__.py3CODE
LOWapi/app/core/tools/__init__.py3CODE
LOWapi/app/core/tools/__init__.py3CODE
LOWapi/app/core/tools/__init__.py4CODE
LOWapi/app/core/tools/__init__.py5CODE
LOWapi/app/core/tools/mcp/client.py4CODE
LOWapi/app/core/tools/mcp/client.py162CODE
LOWapi/app/core/tools/mcp/service_manager.py3CODE
LOWapi/app/core/tools/mcp/service_manager.py4CODE
LOWapi/app/core/tools/mcp/__init__.py4CODE
LOWapi/app/core/tools/mcp/__init__.py4CODE
LOWapi/app/core/tools/mcp/__init__.py4CODE
LOWapi/app/core/tools/mcp/__init__.py5CODE
LOWapi/app/core/tools/mcp/__init__.py5CODE
LOWapi/app/core/tools/mcp/__init__.py6CODE
LOWapi/app/core/tools/workflow/__init__.py1CODE
LOWapi/app/core/tools/custom/__init__.py3CODE
LOWapi/app/core/tools/custom/__init__.py4CODE
LOWapi/app/core/tools/custom/__init__.py5CODE
LOWapi/app/core/tools/builtin/__init__.py3CODE
LOWapi/app/core/tools/builtin/__init__.py4CODE
LOWapi/app/core/tools/builtin/__init__.py5CODE
LOWapi/app/core/tools/builtin/__init__.py6CODE
LOWapi/app/core/tools/builtin/__init__.py7CODE
836 more matches not shown…
Deep Nesting517 hits · 452 pts
SeverityFileLineSnippetContext
LOWsandbox/app/middleware/concurrency.py42CODE
LOWsandbox/app/middleware/concurrency.py67CODE
LOWsandbox/app/core/runners/nodejs/env.py37CODE
LOWsandbox/app/core/runners/nodejs/nodejs_runner.py48CODE
LOWsandbox/app/core/runners/python/python_runner.py64CODE
LOWsandbox/app/core/runners/python/env.py36CODE
LOWapi/app/aioRedis.py160CODE
LOWapi/app/tasks.py389CODE
LOWapi/app/tasks.py1067CODE
LOWapi/app/tasks.py1251CODE
LOWapi/app/tasks.py1729CODE
LOWapi/app/tasks.py2013CODE
LOWapi/app/tasks.py2222CODE
LOWapi/app/tasks.py2514CODE
LOWapi/app/tasks.py2730CODE
LOWapi/app/tasks.py2829CODE
LOWapi/app/tasks.py2992CODE
LOWapi/app/tasks.py3281CODE
LOWapi/app/tasks.py3680CODE
LOWapi/app/tasks.py3845CODE
LOWapi/app/tasks.py2527CODE
LOWapi/app/tasks.py3012CODE
LOWapi/app/tasks.py3295CODE
LOWapi/app/tasks.py3696CODE
LOWapi/app/celery_task_scheduler.py160CODE
LOWapi/app/celery_task_scheduler.py400CODE
LOWapi/app/query_ontology_matched_entities.py105CODE
LOWapi/app/main.py250CODE
LOWapi/app/dependencies.py564CODE
LOWapi/app/core/sensitive_filter.py70CODE
LOWapi/app/core/quota_manager.py56CODE
LOWapi/app/core/api_key_auth.py26CODE
LOWapi/app/core/api_key_auth.py183CODE
LOWapi/app/core/api_key_auth.py48CODE
LOWapi/app/core/api_key_auth.py206CODE
LOWapi/app/core/api_key_auth.py50CODE
LOWapi/app/core/api_key_auth.py208CODE
LOWapi/app/core/rag_utils/chunk_insight.py31CODE
LOWapi/app/core/rag_utils/chunk_summary.py43CODE
LOWapi/app/core/rag_utils/chunk_summary.py64CODE
LOWapi/app/core/rag_utils/chunk_tags.py24CODE
LOWapi/app/core/tools/langchain_adapter.py92CODE
LOWapi/app/core/tools/mcp/client.py143CODE
LOWapi/app/core/tools/mcp/client.py249CODE
LOWapi/app/core/tools/workflow/base.py60CODE
LOWapi/app/core/tools/workflow/base.py102CODE
LOWapi/app/core/tools/custom/schema_parser.py93CODE
LOWapi/app/core/tools/custom/schema_parser.py342CODE
LOWapi/app/core/tools/custom/schema_parser.py407CODE
LOWapi/app/core/tools/custom/auth_manager.py26CODE
LOWapi/app/core/tools/custom/auth_manager.py102CODE
LOWapi/app/core/tools/custom/auth_manager.py141CODE
LOWapi/app/core/tools/custom/auth_manager.py204CODE
LOWapi/app/core/tools/custom/auth_manager.py234CODE
LOWapi/app/core/tools/custom/auth_manager.py392CODE
LOWapi/app/core/tools/custom/auth_manager.py507CODE
LOWapi/app/core/tools/custom/base.py151CODE
LOWapi/app/core/tools/custom/base.py272CODE
LOWapi/app/core/tools/builtin/json_tool.py95CODE
LOWapi/app/core/tools/builtin/json_tool.py264CODE
457 more matches not shown…
Modern Structural Boilerplate238 hits · 236 pts
SeverityFileLineSnippetContext
LOWapi/app/aioRedis.py14logger = logging.getLogger(__name__)CODE
LOWapi/app/celery_worker.py77__all__ = ['celery_app']CODE
LOWapi/app/core/quota_stub.py24__all__ = [CODE
LOWapi/app/core/rag_utils/__init__.py9__all__ = [CODE
LOWapi/app/core/tools/__init__.py23__all__ = [CODE
LOWapi/app/core/tools/mcp/__init__.py8__all__ = [CODE
LOWapi/app/core/tools/workflow/__init__.py3__all__ = ["WorkflowAsTool"]CODE
LOWapi/app/core/tools/custom/__init__.py7__all__ = [CODE
LOWapi/app/core/tools/builtin/__init__.py10__all__ = [CODE
LOWapi/app/core/memory/memory_service.py27logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/llm_tools/openai_embedder.py19logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/llm_tools/__init__.py13__all__ = [CODE
LOWapi/app/core/memory/llm_tools/embedder_client.py23logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/llm_tools/llm_client.py24logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/llm_tools/chunker_client.py31logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/llm_tools/openai_client.py20logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/pipelines/dispatcher.py28logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/pipelines/pruning_pipeline.py28logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/pipelines/write_pipeline.py45logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/pipelines/write_pipeline.py1054 async def _update_stats_cache(self, result: ExtractionResult) -> None:CODE
LOWapi/app/core/memory/pipelines/reflection_pipeline.py24logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/pipelines/__init__.py38__all__ = [CODE
LOWapi/app/core/memory/pipelines/memory_read.py20logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/pipelines/pilot_write_pipeline.py33logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/utils/__init__.py55__all__ = [CODE
LOWapi/app/core/memory/utils/alias_utils.py11logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/utils/visualization/__init__.py18__all__ = [CODE
LOWapi/app/core/memory/utils/llm/__init__.py14__all__ = [CODE
LOWapi/app/core/memory/utils/config/__init__.py19__all__ = [CODE
LOWapi/app/core/memory/utils/config/get_data.py20logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/utils/paths/__init__.py13__all__ = [CODE
LOWapi/app/core/memory/utils/embedder/__init__.py8__all__ = [CODE
LOWapi/app/core/memory/utils/ontology/__init__.py12__all__ = ["OntologyParser", "MultiOntologyParser"]CODE
LOWapi/app/core/memory/utils/ontology/ontology_parser.py40logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/utils/prompt/__init__.py22__all__ = [CODE
LOWapi/app/core/memory/utils/log/__init__.py16__all__ = [CODE
LOWapi/app/core/memory/utils/log/logging_utils.py33__all__ = [CODE
LOWapi/app/core/memory/utils/data/__init__.py27__all__ = [CODE
LOW…app/core/memory/utils/validation/ontology_validator.py17logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/utils/validation/__init__.py10__all__ = ['OntologyValidator', 'OWLValidator']CODE
LOWapi/app/core/memory/utils/validation/owl_validator.py24logger = logging.getLogger(__name__)CODE
LOW…app/core/memory/utils/debug/write_snapshot_recorder.py21logger = logging.getLogger(__name__)CODE
LOW…ore/memory/utils/debug/reflection_snapshot_recorder.py21logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/utils/debug/pipeline_snapshot.py33logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/models/__init__.py96__all__ = [CODE
LOWapi/app/core/memory/models/ontology_general_models.py20logger = logging.getLogger(__name__)CODE
LOWapi/app/core/memory/models/metadata_models.py22logger = logging.getLogger(__name__)CODE
LOW…/memory/storage_services/clustering_engine/__init__.py3__all__ = ["LabelPropagationEngine"]CODE
LOW…torage_services/clustering_engine/label_propagation.py20logger = logging.getLogger(__name__)CODE
LOW…/storage_services/extraction_engine/sidecar_factory.py14logger = logging.getLogger(__name__)CODE
LOW…/extraction_engine/extraction_pipeline_orchestrator.py44logger = logging.getLogger(__name__)CODE
LOW…/extraction_engine/deduplication/deduped_and_disamb.py22logger = logging.getLogger(__name__)CODE
LOW…e_services/extraction_engine/deduplication/__init__.py21__all__ = [CODE
LOW…es/extraction_engine/deduplication/entity_dedup_llm.py22logger = logging.getLogger(__name__)CODE
LOW…on_engine/knowledge_extraction/statement_extraction.py18logger = logging.getLogger(__name__)CODE
LOW…on_engine/knowledge_extraction/embedding_generation.py11logger = logging.getLogger(__name__)CODE
LOW…ion_engine/knowledge_extraction/ontology_extraction.py26logger = logging.getLogger(__name__)CODE
LOW…rage_services/extraction_engine/steps/metadata_step.py18logger = logging.getLogger(__name__)CODE
LOW…orage_services/extraction_engine/steps/triplet_step.py17logger = logging.getLogger(__name__)CODE
LOW…storage_services/extraction_engine/steps/dedup_step.py31logger = logging.getLogger(__name__)CODE
178 more matches not shown…
Cross-File Repetition27 hits · 135 pts
SeverityFileLineSnippetContext
HIGHapi/app/core/rag_utils/chunk_insight.py0get llm client, preferring user-connected config with fallback to default.STRING
HIGHapi/app/core/rag_utils/chunk_summary.py0get llm client, preferring user-connected config with fallback to default.STRING
HIGHapi/app/core/rag_utils/chunk_tags.py0get llm client, preferring user-connected config with fallback to default.STRING
HIGH…ore/memory/analytics/implicit_memory/habit_detector.py0initialize the habit analyzer. args: db: database session llm_model_id: optional llm model id to use for analysis tenantSTRING
HIGH…alytics/implicit_memory/analyzers/interest_analyzer.py0initialize the habit analyzer. args: db: database session llm_model_id: optional llm model id to use for analysis tenantSTRING
HIGH…ytics/implicit_memory/analyzers/preference_analyzer.py0initialize the habit analyzer. args: db: database session llm_model_id: optional llm model id to use for analysis tenantSTRING
HIGH…lytics/implicit_memory/analyzers/dimension_analyzer.py0initialize the habit analyzer. args: db: database session llm_model_id: optional llm model id to use for analysis tenantSTRING
HIGH…/analytics/implicit_memory/analyzers/habit_analyzer.py0initialize the habit analyzer. args: db: database session llm_model_id: optional llm model id to use for analysis tenantSTRING
HIGHapi/app/core/rag/deepdoc/vision/recognizer.py0if you have trouble downloading huggingface models, -_^ this might help!! for linux: export hf_endpoint=https://hf-mirroSTRING
HIGHapi/app/core/rag/deepdoc/vision/ocr.py0if you have trouble downloading huggingface models, -_^ this might help!! for linux: export hf_endpoint=https://hf-mirroSTRING
HIGHapi/app/core/rag/deepdoc/parser/pdf_parser.py0if you have trouble downloading huggingface models, -_^ this might help!! for linux: export hf_endpoint=https://hf-mirroSTRING
HIGHapi/app/core/rag/graphrag/general/graph_extractor.py0reference: - [graphrag](https://github.com/microsoft/graphrag)STRING
HIGHapi/app/core/rag/graphrag/general/leiden.py0reference: - [graphrag](https://github.com/microsoft/graphrag)STRING
HIGH…re/rag/graphrag/general/community_reports_extractor.py0reference: - [graphrag](https://github.com/microsoft/graphrag)STRING
HIGHapi/app/core/rag/graphrag/general/entity_embedding.py0reference: - [graphrag](https://github.com/microsoft/graphrag)STRING
HIGHapi/app/core/rag/graphrag/light/graph_extractor.py0reference: - [graphrag](https://github.com/microsoft/graphrag)STRING
HIGHapi/app/core/storage/local.py0download a file from the storage backend. args: file_key: unique identifier for the file in the storage system. returns:STRING
HIGHapi/app/core/storage/oss.py0download a file from the storage backend. args: file_key: unique identifier for the file in the storage system. returns:STRING
HIGHapi/app/core/storage/s3.py0download a file from the storage backend. args: file_key: unique identifier for the file in the storage system. returns:STRING
HIGHapi/app/core/storage/base.py0download a file from the storage backend. args: file_key: unique identifier for the file in the storage system. returns:STRING
HIGHapi/app/core/storage/local.py0check if a file exists in the storage backend. args: file_key: unique identifier for the file in the storage system. retSTRING
HIGHapi/app/core/storage/oss.py0check if a file exists in the storage backend. args: file_key: unique identifier for the file in the storage system. retSTRING
HIGHapi/app/core/storage/s3.py0check if a file exists in the storage backend. args: file_key: unique identifier for the file in the storage system. retSTRING
HIGHapi/app/core/storage/base.py0check if a file exists in the storage backend. args: file_key: unique identifier for the file in the storage system. retSTRING
HIGHapi/app/controllers/document_controller.py0paged query file list - support filtering by kb_id and parent_id - support keyword search for file names - support dynamSTRING
HIGH…app/controllers/service/rag_api_document_controller.py0paged query file list - support filtering by kb_id and parent_id - support keyword search for file names - support dynamSTRING
HIGHapi/app/controllers/service/rag_api_file_controller.py0paged query file list - support filtering by kb_id and parent_id - support keyword search for file names - support dynamSTRING
Over-Commented Block133 hits · 114 pts
SeverityFileLineSnippetContext
LOWweb/src/utils/timezones.ts41 'America/New_York', // New York, USACOMMENT
LOWweb/src/utils/timezones.ts61 // 'Asia/Istanbul', // Istanbul, TurkeyCOMMENT
LOWweb/src/utils/timezones.ts81 // 'America/Denver', // Denver, USACOMMENT
LOWweb/src/utils/timezones.ts121 'Asia/Kolkata': hi_IN, // Kolkata, India - HindiCOMMENT
LOWweb/src/utils/timezones.ts141 COMMENT
LOWweb/src/utils/timezones.ts161 // 'America/Toronto': 'en_CA', // Toronto, Canada - English (Canada)COMMENT
LOWweb/src/utils/timezones.ts181 // 'Africa/Cairo': 'ar_EG', // Cairo, Egypt - Arabic (Egypt)COMMENT
LOWweb/src/views/MemoryExtractionEngine/constant.ts161 },COMMENT
LOWweb/src/views/MemoryExtractionEngine/constant.ts181 // { label: 'threeHours', value: '3' },COMMENT
LOWweb/src/views/MemoryExtractionEngine/constant.ts201 // {COMMENT
LOW…/views/KnowledgeBase/components/CreateDatasetModal.tsx81 // // 调用父组件传递的回调函数,传递选中的数据COMMENT
LOW…/src/views/KnowledgeBase/[knowledgeBaseId]/Private.tsx341 {COMMENT
LOW…/src/views/KnowledgeBase/[knowledgeBaseId]/Private.tsx361 // onClick: () => {COMMENT
LOW…/src/views/KnowledgeBase/[knowledgeBaseId]/Private.tsx381 // label: t('knowledgeBase.importTemplate'),COMMENT
LOWweb/src/views/Workflow/constant.ts41export const cannotRunNodes = [COMMENT
LOWweb/src/views/Workflow/constant.ts241 enabled: {COMMENT
LOW…ents/Properties/SubmitTypeList/SubmitTypeEditModal.tsx21 },COMMENT
LOWsandbox/app/__init__.py1# -*- coding: UTF-8 -*-COMMENT
LOWapi/alembic.ini1# A generic, single database configuration.COMMENT
LOWapi/alembic.ini21# string value is passed to ZoneInfo()COMMENT
LOWapi/alembic.ini41# The path separator used here should be the separator specified by "version_path_separator" below.COMMENT
LOWapi/alembic.ini61# output_encoding = utf-8COMMENT
LOWapi/app/tasks.py2361 result["elapsed_time"] = time.time() - start_timeCOMMENT
LOWapi/app/tasks.py2381# "apply_id": "健康检查",COMMENT
LOWapi/app/dependencies.py241# ) -> Workspace:COMMENT
LOWapi/app/dependencies.py261# auth_logger.debug(f"超管同租户访问放行: user={current_user.id}, workspace={workspace_id}")COMMENT
LOWapi/app/dependencies.py281# # 针对创建应用的请求体(包含 workspace_id)提供便捷校验COMMENT
LOWapi/app/core/__init__.py1# -*- coding: UTF-8 -*-COMMENT
LOW…re/memory/utils/visualization/forgetting_visualizer.py361 config = ForgettingEngineConfig(offset=0.1, lambda_time=0.5, lambda_mem=0.5)COMMENT
LOWapi/app/core/memory/utils/prompt/prompt_utils.py181 json_schema=json_schema,COMMENT
LOWapi/app/core/memory/models/variate_config.py161 # ),COMMENT
LOW…/extraction_engine/deduplication/deduped_and_disamb.py141 # TODO: fact_summary 功能暂时禁用,待后续开发完善后启用COMMENT
LOW…/extraction_engine/deduplication/deduped_and_disamb.py161 # src_a = _extract_sources(fact_a)COMMENT
LOW…vices/reflection_engine/deterministic/cypher_merger.py41# async def fetch_degrees(COMMENT
LOW…vices/reflection_engine/deterministic/cypher_merger.py61# async def fetch_degrees_batch(COMMENT
LOWapi/app/core/memory/src/search.py461) -> Dict[str, List[Dict[str, Any]]]:COMMENT
LOWapi/app/core/memory/src/search.py481 # base = float(it.get("combined_score", it.get("score", 0.0)) or 0.0)COMMENT
LOWapi/app/core/memory/src/search.py501# """COMMENT
LOWapi/app/core/memory/src/search.py521COMMENT
LOWapi/app/core/memory/src/search.py541# # Get model name for metadataCOMMENT
LOWapi/app/core/memory/src/search.py561COMMENT
LOWapi/app/core/memory/src/search.py581# item_text = extract_text(item)COMMENT
LOWapi/app/core/memory/src/search.py601# - 0.0 means completely irrelevantCOMMENT
LOWapi/app/core/memory/src/search.py621# # Clamp to [0.0, 1.0]COMMENT
LOWapi/app/core/memory/src/search.py641# item_copy["final_score"] = final_scoreCOMMENT
LOWapi/app/core/memory/src/search.py661# scored_items = []COMMENT
LOWapi/app/core/memory/src/search.py861COMMENT
LOWapi/app/core/models/factory.py1# from typing import OptionalCOMMENT
LOWapi/app/core/rag/llm/cv_model.py441if __name__ == "__main__":COMMENT
LOWapi/app/core/rag/llm/cv_model.py461 # image_path = "/Users/sbtjfdn/Downloads/记忆科学/files/aippt.cn.png"COMMENT
LOWapi/app/core/rag/common/constants.py141# ENV_TRINO_USE_TLS = "TRINO_USE_TLS"COMMENT
LOWapi/app/core/rag/common/constants.py161# ENV_MINERU_OUTPUT_DIR = "MINERU_OUTPUT_DIR"COMMENT
LOWapi/app/core/workflow/nodes/base_config.py121 #COMMENT
LOWapi/app/core/workflow/nodes/base_node.py661 "token_usage": None,COMMENT
LOWapi/app/core/workflow/nodes/start/config.py21 )COMMENT
LOWapi/app/core/workflow/nodes/start/config.py41 # VariableDefinition(COMMENT
LOWapi/app/core/workflow/utils/__init__.py1# -*- coding: UTF-8 -*-COMMENT
LOWapi/app/core/workflow/adapters/dify/__init__.py1# -*- coding: UTF-8 -*-COMMENT
LOWapi/app/core/workflow/adapters/memory_bear/__init__.py1# -*- coding: UTF-8 -*-COMMENT
LOWapi/app/core/workflow/engine/__init__.py1# -*- coding: UTF-8 -*-COMMENT
73 more matches not shown…
Verbosity Indicators59 hits · 79 pts
SeverityFileLineSnippetContext
LOW…plicationManagement/components/UploadWorkflowModal.tsx37 'upload', // Step 1: File uploadCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx38 'complex', // Step 2: Error/warning displayCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx39 'sureInfo', // Step 3: Information confirmationCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx40 'completed' // Step 4: Success messageCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx95 case 0: // Step 1: Upload fileCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx130 case 1: // Step 2: Error/warning displayCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx144 case 2: // Step 3: Confirm informationCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx215 case 0: // Step 1: UploadCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx229 case 3: // Step 4: CompletedCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx40 'upload', // Step 1: File uploadCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx41 'complex', // Step 2: Error/warning displayCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx42 'completed' // Step 4: Success messageCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx96 case 0: // Step 1: Upload fileCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx164 case 0: // Step 1: UploadCODE
LOW…src/views/ApplicationConfig/components/Skill/index.tsx25 'receiveTask', // Step 1: Receive taskCODE
LOW…src/views/ApplicationConfig/components/Skill/index.tsx26 'analyTask', // Step 2: Analyze task intentCODE
LOW…src/views/ApplicationConfig/components/Skill/index.tsx27 'dynamicMatchSkill', // Step 3: Dynamically match appropriate skillCODE
LOW…src/views/ApplicationConfig/components/Skill/index.tsx28 'executeTask' // Step 4: Execute the taskCODE
LOWapi/app/core/memory/pipelines/dispatcher.py508 # Step 2: 解析 memory_config_id(走 workspace 默认配置,与滑动窗口路径一致)COMMENT
LOWapi/app/core/memory/pipelines/dispatcher.py515 # Step 3: 逐条处理COMMENT
LOWapi/app/core/memory/pipelines/dispatcher.py466 # Step 1: 查询对话信息 + 未写入消息COMMENT
LOWapi/app/core/memory/pipelines/dispatcher.py537 # Step 4: 清理 pending_conversations SetCOMMENT
LOWapi/app/core/memory/pipelines/pruning_pipeline.py108 # Step 1: 查询 Redis 缓存COMMENT
LOWapi/app/core/memory/pipelines/pruning_pipeline.py136 # Step 2: 缓存未命中,调用 LLM 剪枝COMMENT
LOWapi/app/core/memory/pipelines/pruning_pipeline.py146 # Step 3: 写入 Redis 缓存(TTL=86400s)COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py455 # Step 6: 摘要 - 生成情景记忆摘要COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py459 # Step 5: 聚类 - 增量更新社区(Celery 异步任务,无需持锁)COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py480 # Step 1: 预处理COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py509 # Step 2: 萃取COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py618 # Step 3: 存储COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py675 # Step 4: 聚类COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py723 # Step 5: 摘要COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py344 # Step 1: 剪枝 - 构建 Pruned_ContextCOMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py393 # Step 2: 预处理 - 消息分块COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py434 # Step 3: 萃取 - 知识提取COMMENT
LOW…ion_engine/knowledge_extraction/ontology_extraction.py125 # Step 1: Call LLM for extraction with timeoutCOMMENT
LOW…ion_engine/knowledge_extraction/ontology_extraction.py170 # Step 2: First-layer validation (string validation and cleaning)COMMENT
LOW…ion_engine/knowledge_extraction/ontology_extraction.py192 # Step 3: Second-layer validation (OWL semantic validation)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1098 # Step 1: 候选召回(均摊耗时)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1104 # Step 2: 综合打分(均摊耗时)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1110 # Step 3: LLM 调用(均摊耗时)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1117 # Step 4: 策略决策(选择 keeper)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1147 # Step 5: 写入COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1501 # Step 1: 获取上下文COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1511 # Step 2: LLM 消解 + 提取COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1177 # Step 6: 写 ReflectionLogCOMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1527 # Step 3: 校验COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1560 # Step 4: 写入 Neo4jCOMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1703 # Step 5: 写反思日志(仅 resolved=true 时)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1799 # Step 1: 碎片拆分 + 备份 timelineCOMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1816 # Step 2: LLM 合并 + (企业版)事件提取 + 更名判断COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1862 # Step 3: 兜底校验 summaryCOMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1873 # Step 4: 应用事件操作(企业版能力;社区版跳过,不记 tracker/快照)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1895 # Step 5: 写入 Neo4j(summary + timeline + event_timeline + 清空 description)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1907 # Step 6: 更名判断COMMENT
LOWapi/app/repositories/neo4j/community_repository.py409 # Step 1: 删除该用户下所有无成员边的空社区(始终全量)COMMENT
LOWapi/app/services/memory_config_service.py468 # Step 2: Validate embedding model with workspace fallbackCOMMENT
LOWapi/app/services/memory_config_service.py479 # Step 3: Resolve LLM model with workspace fallbackCOMMENT
LOWapi/app/services/memory_config_service.py490 # Step 4: Resolve optional rerank model with workspace fallbackCOMMENT
Structural Annotation Overuse59 hits · 79 pts
SeverityFileLineSnippetContext
LOW…plicationManagement/components/UploadWorkflowModal.tsx37 'upload', // Step 1: File uploadCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx38 'complex', // Step 2: Error/warning displayCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx39 'sureInfo', // Step 3: Information confirmationCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx40 'completed' // Step 4: Success messageCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx95 case 0: // Step 1: Upload fileCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx130 case 1: // Step 2: Error/warning displayCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx144 case 2: // Step 3: Confirm informationCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx215 case 0: // Step 1: UploadCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx229 case 3: // Step 4: CompletedCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx40 'upload', // Step 1: File uploadCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx41 'complex', // Step 2: Error/warning displayCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx42 'completed' // Step 4: Success messageCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx96 case 0: // Step 1: Upload fileCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx164 case 0: // Step 1: UploadCODE
LOW…src/views/ApplicationConfig/components/Skill/index.tsx25 'receiveTask', // Step 1: Receive taskCODE
LOW…src/views/ApplicationConfig/components/Skill/index.tsx26 'analyTask', // Step 2: Analyze task intentCODE
LOW…src/views/ApplicationConfig/components/Skill/index.tsx27 'dynamicMatchSkill', // Step 3: Dynamically match appropriate skillCODE
LOW…src/views/ApplicationConfig/components/Skill/index.tsx28 'executeTask' // Step 4: Execute the taskCODE
LOWapi/app/core/memory/pipelines/dispatcher.py508 # Step 2: 解析 memory_config_id(走 workspace 默认配置,与滑动窗口路径一致)COMMENT
LOWapi/app/core/memory/pipelines/dispatcher.py515 # Step 3: 逐条处理COMMENT
LOWapi/app/core/memory/pipelines/dispatcher.py466 # Step 1: 查询对话信息 + 未写入消息COMMENT
LOWapi/app/core/memory/pipelines/dispatcher.py537 # Step 4: 清理 pending_conversations SetCOMMENT
LOWapi/app/core/memory/pipelines/pruning_pipeline.py108 # Step 1: 查询 Redis 缓存COMMENT
LOWapi/app/core/memory/pipelines/pruning_pipeline.py136 # Step 2: 缓存未命中,调用 LLM 剪枝COMMENT
LOWapi/app/core/memory/pipelines/pruning_pipeline.py146 # Step 3: 写入 Redis 缓存(TTL=86400s)COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py455 # Step 6: 摘要 - 生成情景记忆摘要COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py459 # Step 5: 聚类 - 增量更新社区(Celery 异步任务,无需持锁)COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py480 # Step 1: 预处理COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py509 # Step 2: 萃取COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py618 # Step 3: 存储COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py675 # Step 4: 聚类COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py723 # Step 5: 摘要COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py344 # Step 1: 剪枝 - 构建 Pruned_ContextCOMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py393 # Step 2: 预处理 - 消息分块COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py434 # Step 3: 萃取 - 知识提取COMMENT
LOW…ion_engine/knowledge_extraction/ontology_extraction.py125 # Step 1: Call LLM for extraction with timeoutCOMMENT
LOW…ion_engine/knowledge_extraction/ontology_extraction.py170 # Step 2: First-layer validation (string validation and cleaning)COMMENT
LOW…ion_engine/knowledge_extraction/ontology_extraction.py192 # Step 3: Second-layer validation (OWL semantic validation)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1098 # Step 1: 候选召回(均摊耗时)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1104 # Step 2: 综合打分(均摊耗时)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1110 # Step 3: LLM 调用(均摊耗时)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1117 # Step 4: 策略决策(选择 keeper)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1147 # Step 5: 写入COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1501 # Step 1: 获取上下文COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1511 # Step 2: LLM 消解 + 提取COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1177 # Step 6: 写 ReflectionLogCOMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1527 # Step 3: 校验COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1560 # Step 4: 写入 Neo4jCOMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1703 # Step 5: 写反思日志(仅 resolved=true 时)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1799 # Step 1: 碎片拆分 + 备份 timelineCOMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1816 # Step 2: LLM 合并 + (企业版)事件提取 + 更名判断COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1862 # Step 3: 兜底校验 summaryCOMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1873 # Step 4: 应用事件操作(企业版能力;社区版跳过,不记 tracker/快照)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1895 # Step 5: 写入 Neo4j(summary + timeline + event_timeline + 清空 description)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1907 # Step 6: 更名判断COMMENT
LOWapi/app/repositories/neo4j/community_repository.py409 # Step 1: 删除该用户下所有无成员边的空社区(始终全量)COMMENT
LOWapi/app/services/memory_config_service.py468 # Step 2: Validate embedding model with workspace fallbackCOMMENT
LOWapi/app/services/memory_config_service.py479 # Step 3: Resolve LLM model with workspace fallbackCOMMENT
LOWapi/app/services/memory_config_service.py490 # Step 4: Resolve optional rerank model with workspace fallbackCOMMENT
Redundant / Tautological Comments48 hits · 74 pts
SeverityFileLineSnippetContext
LOWsandbox/app/dependencies.py42 # Check if requirements file existsCOMMENT
LOWsandbox/app/core/runners/nodejs/nodejs_runner.py71 # Check if preload is allowedCOMMENT
LOWsandbox/app/core/runners/python/python_runner.py87 # Check if preload is allowedCOMMENT
LOWsandbox/script/env.sh3# Check if the correct number of arguments are providedCOMMENT
LOWsandbox/script/env.sh30# Check if src is a file or directoryCOMMENT
LOWapi/app/dependencies.py319 # Check if user is a memberCOMMENT
LOW…app/core/memory/utils/validation/ontology_validator.py77 # Check if emptyCOMMENT
LOW…app/core/memory/utils/validation/ontology_validator.py85 # Check if it's an OWL reserved wordCOMMENT
LOW…app/core/memory/utils/validation/ontology_validator.py91 # Check if starts with uppercase letter (only for ASCII letters)COMMENT
LOWapi/app/core/memory/utils/validation/owl_validator.py142 # Check if parent existsCOMMENT
LOWapi/app/core/memory/agent/logger_file/log_streamer.py105 # Check if file existsCOMMENT
LOWapi/app/core/memory/agent/logger_file/log_streamer.py204 # Check if file existsCOMMENT
LOWapi/app/core/memory/agent/logger_file/log_streamer.py218 # Open file and seek to end to start streaming new contentCOMMENT
LOWapi/app/core/memory/agent/logger_file/log_streamer.py227 # Check if file has new contentCOMMENT
LOW…ion_engine/knowledge_extraction/ontology_extraction.py185 # Check if we have enough classes after first-layer validationCOMMENT
LOWapi/app/core/memory/src/search.py171 # Check if we've seen this ID or content beforeCOMMENT
LOWapi/app/core/memory/src/search.py522# # Check if reranking is enabledCOMMENT
LOWapi/app/core/models/llm.py236 # Check if there's a fallback methodCOMMENT
LOWapi/app/core/rag/graphrag/general/index.py457 # Check if task has been canceled before resolutionCOMMENT
LOWapi/app/core/rag/crawler/content_extractor.py87 # Check if content is staticCOMMENT
LOWapi/app/core/rag/crawler/url_normalizer.py120 # Check if domains matchCOMMENT
LOWapi/app/core/rag/crawler/url_normalizer.py155 # Check if href starts with http/https (absolute URL)COMMENT
LOWapi/app/core/rag/crawler/web_crawler.py143 # Check if static contentCOMMENT
LOWapi/app/core/workflow/nodes/base_node.py492 # Check if it's a completion markerCOMMENT
LOWapi/app/core/workflow/nodes/base_node.py635 # # Check if the node has an error edge definedCOMMENT
LOW…/app/core/workflow/engine/stream_output_coordinator.py423 # Check if this variable's scope was already fully streamed via node_chunk events.COMMENT
LOWapi/app/core/validators/file_validator.py223 # Check if the detected type matches the extensionCOMMENT
LOWapi/app/repositories/memory_config_repository.py552 # Check if config exists but workspace is missingSTRING
LOWapi/app/controllers/mcp_market_controller.py192 # Check if the mcp market name already existsCOMMENT
LOWapi/app/controllers/file_storage_controller.py201 # Read file contentsCOMMENT
LOWapi/app/controllers/i18n_controller.py116 # Check if locale existsCOMMENT
LOWapi/app/controllers/i18n_controller.py176 # Check if language already existsCOMMENT
LOWapi/app/controllers/i18n_controller.py228 # Check if language existsCOMMENT
LOWapi/app/controllers/i18n_controller.py316 # Check if locale existsCOMMENT
LOWapi/app/controllers/i18n_controller.py355 # Check if locale existsCOMMENT
LOWapi/app/controllers/i18n_controller.py417 # Check if locale existsCOMMENT
LOWapi/app/controllers/knowledge_controller.py587 # Check if the knowledge base name already existsCOMMENT
LOWapi/app/controllers/upload_controller.py242 # Check if physical file existsCOMMENT
LOWapi/app/services/prompt_optimizer_service.py253 # Check if end tag already in bufferCOMMENT
LOWapi/app/services/workflow_tool_publish_service.py185 # Check if already publishedCOMMENT
LOWapi/app/services/memory_agent_service.py51 # Check if AI message contains tool callsCOMMENT
LOWapi/app/services/memory_agent_service.py67 # Check if tool messageCOMMENT
LOWapi/app/services/memory_agent_service.py113 # Check if pool usage is too highCOMMENT
LOWapi/app/services/memory_agent_service.py183 # Check if file exists before starting streamCOMMENT
LOWapi/app/services/memory_agent_service.py666 # Check if file exists before starting streamCOMMENT
LOWapi/app/services/memory_config_service.py983 # Check if this is the default config - default configs cannot be deletedCOMMENT
LOWapi/app/services/memory_config_service.py1132 # Check if it's a numeric string (legacy int format)COMMENT
LOWapi/app/services/user_memory_service.py209 # Check if time distribution is too concentrated (likely batch imported data)STRING
Modern AI Meta-Vocabulary16 hits · 51 pts
SeverityFileLineSnippetContext
MEDIUMapi/app/tasks.py1778 # RAG 存储类型走独立路径COMMENT
MEDIUMapi/app/core/error_codes.py85 # RAG/知识(9xxx)COMMENT
MEDIUMapi/app/core/rag_utils/README.md1# RAG Chunk 分析工具COMMENT
MEDIUMapi/app/core/memory/pipelines/dispatcher.py211# RAG 写入COMMENT
MEDIUMapi/app/core/rag/llm/embedding_model.py54 # between cl100k_base (used by truncate) and the actual embedding modelCOMMENT
MEDIUMapi/app/models/end_user_model.py81 # RAG存储模式专用字段 - RAG Storage Mode FieldsCOMMENT
MEDIUMapi/app/controllers/memory_controller.py85 # ── RAG 路径:保持不变,直接拼接文本写向量库 ──COMMENT
MEDIUMapi/app/controllers/multi_agent_controller.py26# "/{app_id}/multi-agent",COMMENT
MEDIUMapi/app/controllers/multi_agent_controller.py118# "/{app_id}/multi-agent",COMMENT
MEDIUMapi/app/controllers/multi_agent_controller.py135# "/{app_id}/multi-agent/run",COMMENT
MEDIUMapi/app/controllers/multi_agent_controller.py163# "/{app_id}/multi-agent/test-routing",COMMENT
MEDIUMapi/app/controllers/multi_agent_controller.py283# "/{app_id}/multi-agent/test-master-agent",COMMENT
MEDIUMapi/app/controllers/multi_agent_controller.py437# "/{app_id}/multi-agent/batch-test-routing",COMMENT
MEDIUMapi/app/controllers/memory_dashboard_controller.py401# ======== RAG 数据统计 ========COMMENT
MEDIUMapi/app/services/memory_dashboard_service.py424# ======== RAG 相关服务 ========COMMENT
MEDIUMapi/app/services/memory_config_service.py468 # Step 2: Validate embedding model with workspace fallbackCOMMENT
AI Structural Patterns62 hits · 50 pts
SeverityFileLineSnippetContext
LOWapi/app/tasks.py1729CODE
LOWapi/app/core/memory/memory_service.py236CODE
LOWapi/app/core/memory/pipelines/write_pipeline.py230CODE
LOWapi/app/core/memory/agent/utils/get_dialogs.py7CODE
LOW…ion_engine/knowledge_extraction/ontology_extraction.py56CODE
LOW…y/storage_services/reflection_engine/self_reflexion.py161CODE
LOWapi/app/core/agent/langchain_agent.py218CODE
LOWapi/app/core/models/generation.py45CODE
LOWapi/app/core/models/generation.py163CODE
LOWapi/app/core/rag/deepdoc/parser/mineru_parser.py440CODE
LOWapi/app/core/rag/graphrag/utils.py423CODE
LOWapi/app/core/rag/graphrag/general/graph_extractor.py51CODE
LOWapi/app/core/rag/nlp/search.py696CODE
LOWapi/app/core/workflow/nodes/parameter_extractor/node.py249CODE
LOWapi/app/core/workflow/adapters/dify/converter.py1172CODE
LOWapi/app/controllers/api_key_controller.py287CODE
LOWapi/app/controllers/model_controller.py44CODE
LOWapi/app/controllers/model_controller.py112CODE
LOWapi/app/controllers/memory_reflection_controller.py136CODE
LOWapi/app/controllers/app_controller.py56CODE
LOWapi/app/controllers/document_controller.py54CODE
LOWapi/app/controllers/knowledge_controller.py279CODE
LOW…app/controllers/service/rag_api_document_controller.py25CODE
LOW…pp/controllers/service/rag_api_knowledge_controller.py65CODE
LOWapi/app/services/prompt_optimizer_service.py563CODE
LOWapi/app/services/app_chat_service.py168CODE
LOWapi/app/services/app_chat_service.py607CODE
LOWapi/app/services/app_chat_service.py1310CODE
LOWapi/app/services/app_chat_service.py1345CODE
LOWapi/app/services/memory_reflection_service.py572CODE
LOWapi/app/services/multi_agent_orchestrator.py110CODE
LOWapi/app/services/multi_agent_orchestrator.py1374CODE
LOWapi/app/services/workspace_service.py230CODE
LOWapi/app/services/draft_run_service.py348CODE
LOWapi/app/services/draft_run_service.py707CODE
LOWapi/app/services/draft_run_service.py1139CODE
LOWapi/app/services/draft_run_service.py1976CODE
LOWapi/app/services/draft_run_service.py2598CODE
LOWapi/app/services/draft_run_service.py2825CODE
LOWapi/app/services/generation_service.py77CODE
LOWapi/app/services/generation_service.py132CODE
LOWapi/app/services/generation_service.py177CODE
LOWapi/app/services/app_service.py2682CODE
LOWapi/app/services/app_service.py1180CODE
LOWapi/app/services/workflow_service.py567CODE
LOWapi/app/services/workflow_service.py713CODE
LOWapi/app/services/workflow_service.py4731CODE
LOWapi/app/services/workflow_service.py5223CODE
LOWapi/app/services/memory_storage_service.py497CODE
LOWapi/app/services/memory_storage_service.py506CODE
LOWapi/app/services/memory_storage_service.py515CODE
LOWapi/app/services/memory_storage_service.py524CODE
LOWapi/app/services/memory_storage_service.py559CODE
LOWapi/app/services/memory_storage_service.py567CODE
LOWapi/app/services/memory_storage_service.py575CODE
LOWapi/app/services/memory_storage_service.py741CODE
LOWapi/app/services/memory_storage_service.py74CODE
LOWapi/app/services/shared_chat_service.py155CODE
LOWapi/app/services/shared_chat_service.py363CODE
LOWapi/app/services/shared_chat_service.py635CODE
2 more matches not shown…
Self-Referential Comments15 hits · 45 pts
SeverityFileLineSnippetContext
MEDIUMsandbox/script/env.sh45 # Create the same directory structure in the destinationCOMMENT
MEDIUMapi/app/core/memory/utils/validation/owl_validator.py86 # Create a new world (isolated ontology environment)COMMENT
MEDIUM…alytics/implicit_memory/analyzers/interest_analyzer.py41 # Define the four interest categories we analyzeCOMMENT
MEDIUM…lytics/implicit_memory/analyzers/dimension_analyzer.py42 # Define the four dimensions we analyzeCOMMENT
MEDIUMapi/app/core/rag/crawler/robots_parser.py67 # Create a permissive parserCOMMENT
MEDIUMapi/app/core/workflow/executor.py202 # Initialize the variable pool and system variablesCOMMENT
MEDIUMapi/app/core/workflow/nodes/assigner/node.py52 # Initialize a variable pool for accessing conversation, node, and system variablesCOMMENT
MEDIUMapi/app/services/file_storage_service.py358# Create a default instance for convenienceCOMMENT
MEDIUMapi/app/services/workspace_service.py528 # Create the workspace without adding any membersCOMMENT
MEDIUMapi/app/services/workspace_service.py571 # Create the workspace without adding any membersCOMMENT
MEDIUMapi/app/services/memory_konwledges_server.py324 # Create a documentCOMMENT
MEDIUMapi/app/services/user_service.py48 # Create a default tenant for the superuserCOMMENT
MEDIUMapi/app/services/upload_service.py163 # Create a temporary UoW wrapper for the existing sessionCOMMENT
MEDIUMapi/tests/workflow/nodes/base.py51 # Initialize system variables (sys namespace)COMMENT
MEDIUMapi/tests/workflow/nodes/base.py56 # Initialize system variables (sys namespace)COMMENT
Cross-Language Confusion8 hits · 35 pts
SeverityFileLineSnippetContext
HIGHapi/app/core/workflow/nodes/llm/node.py247 # Optional (required=False) scalar fields allow null; required fields do notCOMMENT
HIGHapi/app/core/workflow/nodes/llm/node.py331 (recursively, each child defaults to null) so the full schemaSTRING
HIGHapi/app/core/workflow/nodes/agent/node.py53 {"tool_id": "uuid", "tool_type": "builtin", "operation": null, "enabled": true}STRING
HIGHapi/app/repositories/neo4j/cypher_queries.py2272 e.activation_value = null,CODE
HIGHapi/app/repositories/neo4j/cypher_queries.py2275 e.last_access_time = null,CODE
HIGHapi/app/controllers/memory_dashboard_controller.py569 } | null,STRING
HIGHapi/app/services/workflow_service.py5958 # 成为孤儿(parent=null)。否则 switch-version/branch 重建分支链COMMENT
HIGHapi/app/services/workflow_service.py3763 第二轮 user 不会成为孤儿(parent=null)。第一轮无已落库 assistant 时返回 None。STRING
Synthetic Comment Markers3 hits · 20 pts
SeverityFileLineSnippetContext
HIGHweb/src/i18n/en.ts3476 portraitSubTitle: 'Personalized insights generated by AI based on your preference tags',CODE
HIGHapi/app/core/memory/models/graph_models.py246 # Core fields (ordered as requested)COMMENT
HIGHapi/app/core/memory/models/graph_models.py257 # Emotion fields (ordered as requested, emotion_intensity first for display)COMMENT
Dead Code7 hits · 14 pts
SeverityFileLineSnippetContext
MEDIUMapi/app/core/rag/deepdoc/parser/pdf_parser.py550CODE
MEDIUMapi/app/core/rag/deepdoc/parser/pdf_parser.py566CODE
MEDIUMapi/app/core/rag/deepdoc/parser/pdf_parser.py567CODE
MEDIUMapi/app/core/rag/deepdoc/parser/pdf_parser.py568CODE
MEDIUMapi/app/core/rag/deepdoc/parser/pdf_parser.py625CODE
MEDIUMapi/app/core/rag/deepdoc/parser/pdf_parser.py626CODE
MEDIUMapi/app/core/rag/deepdoc/parser/pdf_parser.py647CODE
AI Slop Vocabulary4 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMapi/app/core/memory/agent/logger_file/log_streamer.py35 # This pattern is comprehensive to handle various log formatsCOMMENT
MEDIUMapi/app/core/memory/models/base_response.py15 """Base class for LLM response models with robust validation.STRING
MEDIUMapi/app/core/rag/graphrag/light/graph_prompt.py140PROMPTS["summarize_entity_descriptions"] = """You are a helpful assistant responsible for generating a comprehensive sumCODE
MEDIUMapi/app/controllers/memory_short_term_controller.py109 # Compile comprehensive memory statistics responseCOMMENT
Fake / Example Data4 hits · 5 pts
SeverityFileLineSnippetContext
LOWapi/app/core/config.py165 FIRST_SUPERUSER_EMAIL: str = os.getenv("FIRST_SUPERUSER_EMAIL", "admin@example.com")CODE
LOWapi/app/core/memory/src/search.py476 # model_name = rc.get("model", "placeholder")COMMENT
LOWapi/app/core/rag/prompts/structured_output_prompt.md14 {"name": "John Doe", "age": 30}CODE
LOWapi/app/schemas/order_schema.py25 "customer_name": "John Doe",CODE
Magic Placeholder Names1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHapi/app/services/dynamic_handoff_tools.py309 api_key="your-api-key",CODE
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOW…re/memory/utils/visualization/forgetting_visualizer.py353 # Example usageCOMMENT
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWapi/app/core/workflow/nodes/cycle_graph/iteration.py143 async def run_task(self, item, idx):CODE