started manual refactor
This commit is contained in:
@@ -2,7 +2,9 @@ from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from personal_mcp.skills.document_loader import DocsRegistry, PromptRecord, SkillRecord
|
||||
from personal_mcp.skills.document_loader import DocsRegistry
|
||||
from personal_mcp.skills.document_loader import PromptRecord
|
||||
from personal_mcp.skills.document_loader import SkillRecord
|
||||
|
||||
DEFAULT_LIMIT = 20
|
||||
MAX_LIMIT = 100
|
||||
@@ -79,10 +81,7 @@ def _skill_matches(
|
||||
if tag and tag not in skill.tags:
|
||||
return False
|
||||
|
||||
if capability and capability not in skill.capabilities:
|
||||
return False
|
||||
|
||||
return True
|
||||
return not (capability and capability not in skill.capabilities)
|
||||
|
||||
|
||||
def _prompt_matches(
|
||||
@@ -107,10 +106,7 @@ def _prompt_matches(
|
||||
if any(term not in haystack for term in terms):
|
||||
return False
|
||||
|
||||
if tag and tag not in prompt.tags:
|
||||
return False
|
||||
|
||||
return True
|
||||
return not (tag and tag not in prompt.tags)
|
||||
|
||||
|
||||
def build_skills_index_payload(
|
||||
|
||||
Reference in New Issue
Block a user