feat(ContextChat): add isContextChatAvailable method to OCP API

Signed-off-by: Edward Ly <contact@edward.ly>
This commit is contained in:
Edward Ly
2025-07-11 08:26:00 -07:00
parent 86533681e8
commit 48406c31f9
2 changed files with 12 additions and 0 deletions

View File

@ -16,6 +16,10 @@ class ContentManager implements IContentManager {
) {
}
public function isContextChatAvailable(): bool {
return $this->contentManager !== null;
}
public function registerContentProvider(string $appId, string $providerId, string $providerClass): void {
$this->contentManager?->registerContentProvider($appId, $providerId, $providerClass);
}

View File

@ -11,6 +11,14 @@ namespace OCP\ContextChat;
* @since 32.0.0
*/
interface IContentManager {
/**
* Checks if the context chat app is enabled or not
*
* @return bool
* @since 32.0.0
*/
public function isContextChatAvailable(): bool;
/**
* @param string $appId
* @param string $providerId