From 17cd86c18858c7a81e8529fa528275ab0d5273f8 Mon Sep 17 00:00:00 2001 From: Edward Ly Date: Fri, 11 Jul 2025 09:09:21 -0700 Subject: [PATCH 1/4] fix(developer): add isContextChatAvailable method to Context Chat OCP API Signed-off-by: Edward Ly --- developer_manual/digging_deeper/context_chat.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/developer_manual/digging_deeper/context_chat.rst b/developer_manual/digging_deeper/context_chat.rst index 242168f25f0..84a7c03ff18 100644 --- a/developer_manual/digging_deeper/context_chat.rst +++ b/developer_manual/digging_deeper/context_chat.rst @@ -71,6 +71,7 @@ To add content and register your provider implementation you will need to use th The ``IContentManager`` class has the following methods: + * ``isContextChatAvailable()``: Returns ``true`` if the Context Chat app is enabled, ``false`` otherwise. * ``registerContentProvider(string $providerClass)`` * ``submitContent(string $appId, array $items)``: Providers can use this to submit content for indexing in Context Chat. * ``updateAccess(string $appId, string $providerId, string $itemId, string $op, array $userIds)``: Update the access rights for a content item. Use ``\OCP\ContextChat\Type\UpdateAccessOp`` constants for the ``$op`` value. From 2af040cd7fe6c93673df7790d5a0576605e6ec78 Mon Sep 17 00:00:00 2001 From: Edward Ly Date: Fri, 11 Jul 2025 09:16:53 -0700 Subject: [PATCH 2/4] fix(developer): add missing description for registerContentProvider method Signed-off-by: Edward Ly --- developer_manual/digging_deeper/context_chat.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer_manual/digging_deeper/context_chat.rst b/developer_manual/digging_deeper/context_chat.rst index 84a7c03ff18..80cefa7f3c2 100644 --- a/developer_manual/digging_deeper/context_chat.rst +++ b/developer_manual/digging_deeper/context_chat.rst @@ -72,7 +72,7 @@ To add content and register your provider implementation you will need to use th The ``IContentManager`` class has the following methods: * ``isContextChatAvailable()``: Returns ``true`` if the Context Chat app is enabled, ``false`` otherwise. - * ``registerContentProvider(string $providerClass)`` + * ``registerContentProvider(string $providerClass)``: Register a new content provider. * ``submitContent(string $appId, array $items)``: Providers can use this to submit content for indexing in Context Chat. * ``updateAccess(string $appId, string $providerId, string $itemId, string $op, array $userIds)``: Update the access rights for a content item. Use ``\OCP\ContextChat\Type\UpdateAccessOp`` constants for the ``$op`` value. * ``updateAccessProvider(string $appId, string $providerId, string $op, array $userIds)``: Update the access rights for all content items from a provider. Use ``\OCP\ContextChat\Type\UpdateAccessOp`` constants for the ``$op`` value. From 3aeb7ed4d18f3b5e1a7bbfa534fdd5f38d5f2d21 Mon Sep 17 00:00:00 2001 From: Edward Ly Date: Fri, 11 Jul 2025 10:01:57 -0700 Subject: [PATCH 3/4] fix(developer): mention that context_chat should be enabled before submitting content Signed-off-by: Edward Ly --- developer_manual/digging_deeper/context_chat.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/developer_manual/digging_deeper/context_chat.rst b/developer_manual/digging_deeper/context_chat.rst index 80cefa7f3c2..e2574a208a6 100644 --- a/developer_manual/digging_deeper/context_chat.rst +++ b/developer_manual/digging_deeper/context_chat.rst @@ -116,7 +116,10 @@ if you want to trigger an initial import of content items. Submitting ContentItem data ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -To submit content, wrap it in an ``\OCP\ContextChat\ContentItem`` object: +Before submitting, you should check that the Context Chat app is enabled first +by calling the ``isContextChatAvailable()`` method. + +Then, to submit content, wrap it in a list of ``\OCP\ContextChat\ContentItem`` objects: .. code-block:: php From e37ddb4fc5768bca028301b18e2f6a8bd4290e57 Mon Sep 17 00:00:00 2001 From: Edward Ly Date: Fri, 11 Jul 2025 10:26:46 -0700 Subject: [PATCH 4/4] feat(developer): add ContextChat OCP API to upgrade guide Signed-off-by: Edward Ly --- .../app_upgrade_guide/upgrade_to_32.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_32.rst b/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_32.rst index 0c6dcac1242..5dfdba5b1c9 100644 --- a/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_32.rst +++ b/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_32.rst @@ -36,6 +36,7 @@ Back-end changes Added APIs ^^^^^^^^^^ +- New ``OCP\ContextChat`` API. See :ref:`context_chat` for details. - New task processing task type ``OCP\TaskProcessing\TextToSpeech`` to convert text to speech. - New interface ``\OCP\Share\IShareProviderSupportsAllSharesInFolder`` extending ``\OCP\Share\IShareProvider`` to add the method ``\OCP\Share\IShareProviderSupportsAllSharesInFolder::getAllSharesInFolder`` used for querying all shares in a folder without filtering by user. - New method ``\OCP\IUser::canChangeEmail`` allowing to check if the user backend allows the user to change their email address.