MCPcopy Index your code
hub / github.com/FSoft-AI4Code/CodeWiki / is_configured

Method is_configured

codewiki/cli/config_manager.py:275–295  ·  view source on GitHub ↗

Check if configuration is complete and valid. Subscription-mode providers (claude-code, codex) do not require an API key — they authenticate via the underlying CLI's OAuth. Returns: True if configured, False otherwise

(self)

Source from the content-addressed store, hash-verified

273 return self._config
274
275 def is_configured(self) -> bool:
276 """
277 Check if configuration is complete and valid.
278
279 Subscription-mode providers (claude-code, codex) do not require an
280 API key — they authenticate via the underlying CLI's OAuth.
281
282 Returns:
283 True if configured, False otherwise
284 """
285 if self._config is None:
286 return False
287
288 from codewiki.src.be.backend import is_caw_provider
289 if not is_caw_provider(self._config.provider):
290 # Check if API key is set
291 if self.get_api_key() is None:
292 return False
293
294 # Check if config is complete
295 return self._config.is_complete()
296
297 def delete_api_key(self):
298 """Delete API key from keyring and fallback file."""

Callers 1

generate_commandFunction · 0.95

Calls 3

get_api_keyMethod · 0.95
is_caw_providerFunction · 0.90
is_completeMethod · 0.80

Tested by

no test coverage detected