refs #740: enforce carrier VPD by MCP user
This commit is contained in:
@@ -2864,10 +2864,10 @@ def _clean_agent_tool_query(value: object, fallback: str) -> str:
|
||||
|
||||
|
||||
def _camel_case_key(value: object) -> str:
|
||||
text = str(value or "")
|
||||
if "_" not in text:
|
||||
text = str(value or "").strip()
|
||||
if not re.search(r"[\s_-]", text):
|
||||
return text[:1].lower() + text[1:]
|
||||
parts = [part for part in text.casefold().split("_") if part]
|
||||
parts = [part for part in re.split(r"[\s_-]+", text.casefold()) if part]
|
||||
return (
|
||||
parts[0] + "".join(part[:1].upper() + part[1:] for part in parts[1:])
|
||||
if parts
|
||||
@@ -2897,11 +2897,11 @@ def _clean_presentation_title(value: Any) -> str:
|
||||
def _fallback_presentation_data_query(question: str) -> str:
|
||||
text = " ".join(str(question or "").split()).strip()
|
||||
text = re.sub(
|
||||
r"\s*(?:그리고\s*)?(?:이걸|이를|그\s*결과를|결과를)\s*"
|
||||
r"\s*(?:그리고\s*)?(?:(?:이걸|이를|그\s*결과를|결과를)\s*)?"
|
||||
r"(?:HMM\s*)?(?:HTML|리포트|보고서|대시보드|차트)\s*"
|
||||
r"(?:형식)?(?:으로|로)?\s*(?:만들어|생성해|작성해|보여)\s*"
|
||||
r"(?:줘|주세요)?\s*[.!?]?\s*$",
|
||||
"",
|
||||
" 보여줘",
|
||||
text,
|
||||
flags=re.IGNORECASE,
|
||||
)
|
||||
@@ -2912,7 +2912,7 @@ def _fallback_presentation_data_query(question: str) -> str:
|
||||
)
|
||||
text = re.sub(
|
||||
r"(?:HMM\s*)?(?:리포트|보고서|대시보드|차트)\s*"
|
||||
r"(?:형식)?(?:으로|로)?\s*(?:만들어|생성해|작성해)\s*"
|
||||
r"(?:형식)?(?:으로|로)?\s*(?:만들어|생성해|작성해|보여)\s*"
|
||||
r"(?:줘|주세요)?",
|
||||
"보여줘",
|
||||
text,
|
||||
|
||||
Reference in New Issue
Block a user