删除配置
(self, key: str)
| 1158 | return self._config_cache.copy() |
| 1159 | |
| 1160 | async def delete_config(self, key: str) -> bool: |
| 1161 | """删除配置""" |
| 1162 | self._ensure_initialized() |
| 1163 | |
| 1164 | try: |
| 1165 | async with aiosqlite.connect(self._db_path) as db: |
| 1166 | await db.execute("DELETE FROM config WHERE key = ?", (key,)) |
| 1167 | await db.commit() |
| 1168 | |
| 1169 | # 从内存缓存移除 |
| 1170 | self._config_cache.pop(key, None) |
| 1171 | return True |
| 1172 | |
| 1173 | except Exception as e: |
| 1174 | log.error(f"Error deleting config {key}: {e}") |
| 1175 | return False |
| 1176 | |
| 1177 | async def get_credential_errors(self, filename: str, mode: str = "geminicli") -> Dict[str, Any]: |
| 1178 | """ |
nothing calls this directly
no test coverage detected