refactor: extract hardcoded values to config (section 5.3)
- Add AGENT_USERNAMES and GITEA_ORG_FILTER settings to gitea/config.py - Update core/dispatcher.py to use AGENT_USERNAMES from config - Update gitea/client.py to use GITEA_ORG_FILTER in list_all_user_repos() and list_unread_notifications()
This commit is contained in:
+4
-3
@@ -13,6 +13,8 @@ class AgentSettings(BaseSettings):
|
||||
gitea_repos_root: str = ""
|
||||
agent_model_id: str = "qwen/qwen3.6-35b-a3b"
|
||||
agent_max_retries: int = 2
|
||||
agent_usernames: list[str] = ["agent-bot"]
|
||||
gitea_org_filter: str = "meeks"
|
||||
searxng_url: str = ""
|
||||
searxng_username: str = ""
|
||||
searxng_password: str = ""
|
||||
@@ -31,9 +33,8 @@ GITEA_TOKEN: str = _agent_settings.gitea_token
|
||||
GITEA_REPOS_ROOT: str = _agent_settings.gitea_repos_root
|
||||
AGENT_MODEL_ID: str = _agent_settings.agent_model_id
|
||||
AGENT_MAX_RETRIES: int = _agent_settings.agent_max_retries
|
||||
AGENT_USERNAMES: list[str] = _agent_settings.agent_usernames
|
||||
GITEA_ORG_FILTER: str = _agent_settings.gitea_org_filter
|
||||
SEARXNG_URL: str = _agent_settings.searxng_url
|
||||
SEARXNG_USERNAME: str = _agent_settings.searxng_username
|
||||
SEARXNG_PASSWORD: str = _agent_settings.searxng_password
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user