Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(raven): Add context providers for message variants/roles #5514

Merged
merged 5 commits into from
Aug 6, 2024

Conversation

esauerbo
Copy link
Contributor

@esauerbo esauerbo commented Aug 2, 2024

Description of changes

  • Add MessageVariantContext and RoleContext
  • Generate classnames for diff variants/roles following BEM syntax

Issue #, if available

Description of how you validated changes

Checklist

  • Have read the Pull Request Guidelines
  • PR description included
  • yarn test passes and tests are updated/added
  • PR title and commit messages follow conventional commit syntax
  • If this change should result in a version bump, changeset added (This can be done after creating the PR.) This does not apply to changes made to docs, e2e, examples, or other private packages.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@esauerbo esauerbo requested a review from a team as a code owner August 2, 2024 09:15
Copy link

changeset-bot bot commented Aug 2, 2024

⚠️ No Changeset found

Latest commit: 8e806c0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

thaddmt
thaddmt previously approved these changes Aug 5, 2024
thaddmt
thaddmt previously approved these changes Aug 6, 2024
dbanksdesign
dbanksdesign previously approved these changes Aug 6, 2024
@esauerbo esauerbo merged commit ac26e39 into feat-ai/main Aug 6, 2024
32 checks passed
@esauerbo esauerbo deleted the ai-messages-variations branch August 6, 2024 21:28
thaddmt added a commit that referenced this pull request Sep 9, 2024
* chore: initial commit setting up new ai package (#5338)

* chore: setup ci / tagged release

* chore(ai): initial scaffolding (#5340)

* chore(ai): initial scaffolding

* fix examples for now

* mark ai package private

* chore: add base elements definitions (#5392)

* chore: update github workflows (#5395)

* chore: make skeleton of ConversationView using useElements (#5348)

* chore: make skeleton of ConversationView using useElements

* add paragraph as base element

* add basic elements

* chore: create ConversationView with new base elements

* added css

* fix style, add unit tests

* update title to hardcoded for now

* chore(raven): Add MessagesControl and provider/context (#5412)

* chore: added suggested prompts control (#5403)

* chore: added suggested prompts control

* updated with inputcontext

* fix stuff

* chore: update types for createAIConversation inputs, added an AutoHid… (#5420)

* chore: update types for createAIConversation inputs, added an AutoHidablePrompt

* chore: add missing exports

* Remove circular dep (#5422)

* chore: move ai conversation styles to subpackage (#5424)

* chore: setup tagged publish (#5425)

* chore: setup tagged publish

* update unit test build steps

* comment out example for now so tests pass and publish can happen

* add react-ai to e2e build

* add example app back

* chore(raven): Add Input control (#5415)

* chore(raven): Add ability to pass in custom renderMessage function (#5434)

* chore(raven): Add aria attributes to messages subcomponents (#5430)

* chore(raven): Add default icons (#5457)

* chore(ai): setup for response ui components (#5506)

* chore(raven): add AttachmentListControl  (#5468)

* chore(raven): Add context providers for message variants/roles  (#5514)

* chore: allow base64 conversion to happen in browser (#5554)

* chore(ai): useAIConversation, scaffolding for useAIGeneration (#5465)

* chore: initial scaffolding for createAIHooks

* chore(ai): scaffolding for createAIHooks

* update snapshot

* fix yarn lock

* add unit test stubs for conversation

* useAIConversation updates

* comment out example app used for testing

* chore(ai): add keyboard navigation for conversation (#5538)

* chore(ai): add keyboard navigation for conversation

* add action button support back in

* fix unused assignment

* fix unit test

* address comments

* chore(raven): Refactor messages to accept an array of Content  (#5515)

* Add context for variations and roles and use in classnames

* Add conditional rendering for avatar/actions and autoscroll

* Refactor messages to use content list

* update test

* Move role context

* Comment out growing messages list in example

* Cleanup

* chore: update AIConversation to work with useAIConversation hook (#5571)

* chore: update AIConversation to work with useAIConversation hook

* fix build

* comment out example

* address comments

* move to constants file

* address feedback

* fix(ai): move away from using v6 client (#5603)

* chore: fix ai deps after merge (#5633)

* chore(ai): remove chain of thought prop (#5613)

* feat(scrollview): add autoScroll prop (#5640)

* feat(primitives): add avatar primitive (#5632)

* feat(textarea): add autoresizing to textarea (#5625)

* chore(ai): render custom response components (#5578)

* chore(ai): render custom response components

* fixes to get it working e2e

* add required components array

* fix(ai): fix enter key functionality, showing messages with new lines… (#5581)

* fix(ai): fix enter key functionality, showing messages with new lines, etc

* address feedback

* add unit tests

* move to custom hook

* chore(ai): add aria live region to messages container (#5628)

* chore(ai): useAIGeneration hook (#5611)

* chore(ai): initial commit for ai generation

* working with schema passed in

* more testing

* add ians change for route based typing

* stuff works now

* unit tests

* remove unused vars

* fix build

* remove unused

* fix(ai): fix build (#5657)

* fix(ai): fix excessive type depth error (#5659)

* chore(ai): rename narrowed down v6 client type (#5666)

* chore(ai): switch to grabbed types from client instead of importing from dist (#5682)

* Add AIConversation component (#5665)

* fix(ai): fix attaching images to messages (#5707)

* chore(ai): setup ai gen2 backend (#5716)

* chore(ai): setup ai gen2 backend

* add ai workspace

* switch to us-west-2 since bedrock doesn't support us-east-2

* add amplify cli explicitly so it doesnt't conflict with gen2 cli

* chore(ai): add loading context, disallow sending messages while loadi… (#5724)

* chore(ai): add loading context, disallow sending messages while loading, updated unit tests

* update example app

* fix comment

* chore(ai): fix ai conversation control types (#5741)

* chore(ai): fix ai conversation control types

* fix errant generic

* chore(ai): audit exports, add default controls to exports, remove todo, fix env import (#5745)

* chore(ai): audit exports, add default controls to exports, remove todo, fix env import

* add experimental tag to new apis

* rename inputContext, remove unneeded forward ref

* changing back to empty

* fix: fix merge issues with package.json

* fix(ai): fix return type for useAIGeneration (#5764)

* fix(ai): fix return type for useAIGeneration

* add comment about eslint disables

* add graphqlerrors to return type

* fix unit test

* chore(ai): prep release (#5749)

* chore(ai): prep release

* chore: update to use released packages

* fix deps

* fix unit tests

* update deps, fix aimodel

* rename JSONType

* fix build

* remove ai workflows, fix ai package deps

* update yarn.lock, remove unused var

* fix(ai): update yarn.lock again

* chore(ai): address feedback, clean up unneeded stuff

* chore(ai): ensure classnames for controls are overridable

* chore(ai): fix unti test lint

---------

Co-authored-by: Emma Sauerborn <70536670+esauerbo@users.noreply.github.com>
Co-authored-by: Danny Banks <djb@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants