Skip to content

feat: add Context Chat OCP API - #53859

Merged
edward-ly merged 6 commits into
masterfrom
feat/context-chat-ocp
Jul 15, 2025
Merged

feat: add Context Chat OCP API#53859
edward-ly merged 6 commits into
masterfrom
feat/context-chat-ocp

Conversation

@edward-ly

@edward-lyedward-ly commented Jul 8, 2025

Copy link
Copy Markdown
Contributor

Checklist

@edward-lyedward-ly added this to the Nextcloud 32 milestone Jul 8, 2025
@edward-lyedward-ly added enhancement 3. to review Waiting for reviews php Pull requests that update Php code pending documentation This pull request needs an associated documentation update labels Jul 8, 2025
@edward-ly
edward-lyforce-pushed the feat/context-chat-ocp branch from 4dc4697 to 1290be2CompareJuly 8, 2025 00:27
@marcelklehr

Copy link
Copy Markdown
Member

Looks good! You can suppress psalm errors for the OCA\ContextChat classes by adding them to the psalm.xml suppress handler.

@edward-ly
edward-ly marked this pull request as ready for review July 8, 2025 15:11
@edward-ly
edward-ly requested a review from a team as a code ownerJuly 8, 2025 15:11
@edward-ly
edward-ly requested review from icewind1991, sorbaugh and yemkareems and removed request for a teamJuly 8, 2025 15:11
Comment threadlib/private/Server.php Outdated
@edward-ly
edward-lyforce-pushed the feat/context-chat-ocp branch 2 times, most recently from 0291146 to ccbf226CompareJuly 9, 2025 20:52

@julien-ncjulien-nc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It would be nice to have a isContextChatAvailable method in the content manager so providers could even avoid calling submitContent if it's not available.

There could be a new section in the docs (after "Submitting ContentItem data") about this new method.

@marcelklehr

Copy link
Copy Markdown
Member

Ah, yes. Good point. OCA\ContextChat\Public\ContentManager would also have to implement this, then, which is a bit useless, but we can just return true there.

Comment threadlib/private/ContextChat/ContentManager.php Outdated
@marcelklehr
marcelklehrforce-pushed the feat/context-chat-ocp branch from 87d4253 to 70204eaCompareJuly 14, 2025 07:50
Comment threadlib/public/ContextChat/ContentItem.php
@marcelklehrmarcelklehr removed the pending documentation This pull request needs an associated documentation update label Jul 14, 2025
Comment threadlib/public/ContextChat/Type/UpdateAccessOp.php

@ChristophWurstChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some comments

Comment threadlib/public/ContextChat/IContentManager.php
Comment threadlib/public/ContextChat/ContentItem.php
Comment threadlib/public/ContextChat/ContentItem.php
Comment threadlib/public/ContextChat/IContentManager.php
Comment threadlib/private/ContextChat/ContentManager.php
Comment threadlib/private/ContextChat/ContentManager.php
Comment threadlib/private/Server.php
@edward-ly
edward-lyforce-pushed the feat/context-chat-ocp branch 2 times, most recently from c6efa0a to fe7561dCompareJuly 15, 2025 14:34
@nickvergessen
nickvergessen dismissed their stale reviewJuly 15, 2025 14:35

Seems to work

@edward-ly
edward-ly enabled auto-merge July 15, 2025 14:37
Signed-off-by: Edward Ly <contact@edward.ly>
Signed-off-by: Edward Ly <contact@edward.ly>
…ContentManager
Signed-off-by: Edward Ly <contact@edward.ly>
Signed-off-by: Edward Ly <contact@edward.ly>
Signed-off-by: Edward Ly <contact@edward.ly>
Signed-off-by: Edward Ly <contact@edward.ly>
@edward-ly
edward-lyforce-pushed the feat/context-chat-ocp branch from fe7561d to aafcbccCompareJuly 15, 2025 15:20
@edward-ly
edward-ly merged commit 8210e12 into masterJul 15, 2025
222 of 228 checks passed
@edward-ly
edward-ly deleted the feat/context-chat-ocp branch July 15, 2025 15:57
@marcelklehr

Copy link
Copy Markdown
Member

Awesome! Great work @edward-ly

@skjnldsvskjnldsv mentioned this pull request Aug 19, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsenhancementphpPull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement an OCP API for Context Chat

8 participants

@edward-ly@marcelklehr@nickvergessen@ChristophWurst@susnux@julien-nc@kyteinsky@skjnldsv