feat: 添加个性化配置字段 - AGENTS.md自动注入和根目录文件创建开关
This commit is contained in:
parent
2397e6ec1c
commit
aeb3fb1285
@ -72,6 +72,8 @@ DEFAULT_PERSONALIZATION_CONFIG: Dict[str, Any] = {
|
|||||||
"silent_tool_disable": False, # 禁用工具时不向模型插入提示
|
"silent_tool_disable": False, # 禁用工具时不向模型插入提示
|
||||||
"enhanced_tool_display": True, # 增强工具显示
|
"enhanced_tool_display": True, # 增强工具显示
|
||||||
"versioning_restore_mode": "overwrite", # 版本回溯模式固定为 overwrite
|
"versioning_restore_mode": "overwrite", # 版本回溯模式固定为 overwrite
|
||||||
|
"agents_md_auto_inject": False, # AGENTS.md 自动注入开关
|
||||||
|
"allow_root_file_creation": False, # 允许在根目录创建文件开关
|
||||||
}
|
}
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
@ -343,6 +345,18 @@ def sanitize_personalization_payload(
|
|||||||
else:
|
else:
|
||||||
base["use_custom_names"] = bool(base.get("use_custom_names"))
|
base["use_custom_names"] = bool(base.get("use_custom_names"))
|
||||||
|
|
||||||
|
# AGENTS.md 自动注入开关
|
||||||
|
if "agents_md_auto_inject" in data:
|
||||||
|
base["agents_md_auto_inject"] = bool(data.get("agents_md_auto_inject"))
|
||||||
|
else:
|
||||||
|
base["agents_md_auto_inject"] = bool(base.get("agents_md_auto_inject", False))
|
||||||
|
|
||||||
|
# 允许根目录创建文件开关
|
||||||
|
if "allow_root_file_creation" in data:
|
||||||
|
base["allow_root_file_creation"] = bool(data.get("allow_root_file_creation"))
|
||||||
|
else:
|
||||||
|
base["allow_root_file_creation"] = bool(base.get("allow_root_file_creation", False))
|
||||||
|
|
||||||
return base
|
return base
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user