Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/public/ContextChat/ContentItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@

namespace OCP\ContextChat;

use OCP\AppFramework\Attribute\Implementable;

/**
* @since 32.0.0
*/
#[Implementable(since: '32.0.0')]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be Consumable?

class ContentItem {
/**
* @param string $itemId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@

namespace OCP\ContextChat\Events;

use OCP\AppFramework\Attribute\Listenable;
use OCP\ContextChat\IContentManager;
use OCP\ContextChat\IContentProvider;
use OCP\EventDispatcher\Event;

/**
* @since 32.0.0
*/
#[Listenable(since: '32.0.0')]
class ContentProviderRegisterEvent extends Event {
/**
* @since 32.0.0
Expand Down
3 changes: 3 additions & 0 deletions lib/public/ContextChat/IContentManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@

namespace OCP\ContextChat;

use OCP\AppFramework\Attribute\Consumable;

/**
* @since 32.0.0
*/
#[Consumable(since: '32.0.0')]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be Implementable?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was looking at these docs, how they envision the usage of these attributes: https://docs.nextcloud.com/server/latest/developer_manual/digging_deeper/api.html
Consumable seems to be meant for direct use via dependency injection, while Implementable should be implemented.

or did you mean that IContentManager can be implemented by apps other than context_chat?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, I initially thought all interfaces had to be Implementable or something like that, ignore me then

interface IContentManager {
/**
* Checks if the context chat app is enabled or not
Expand Down
3 changes: 3 additions & 0 deletions lib/public/ContextChat/IContentProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@

namespace OCP\ContextChat;

use OCP\AppFramework\Attribute\Implementable;

/**
* This interface defines methods to implement a content provider
* @since 32.0.0
*/
#[Implementable(since: '32.0.0')]
interface IContentProvider {
/**
* The ID of the provider
Expand Down
3 changes: 3 additions & 0 deletions lib/public/ContextChat/IContentProviderWithSearchTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@

namespace OCP\ContextChat;

use OCP\AppFramework\Attribute\Implementable;

/**
* This interface defines methods to implement a Context Chat content provider
* with a search task and data description.
* @since 35.0.0
*/
#[Implementable(since: '35.0.0')]
interface IContentProviderWithSearchTask extends IContentProvider {
/**
* A short description about the kind of data provided by this provider.
Expand Down
Loading