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

feat(ui5-ai-prompt-input): initial (experimental) implementation #9078

Merged
merged 7 commits into from
Jun 12, 2024

Conversation

MapTo0
Copy link
Member

@MapTo0 MapTo0 commented May 29, 2024

No description provided.

@elenastoyanovaa elenastoyanovaa changed the title feat: ai-prompt-input (experimental) implementation feat: ui5-ai-prompt-input (experimental) implementation May 29, 2024
packages/ai/src/PromptInput.ts Outdated Show resolved Hide resolved
packages/ai/src/PromptInput.ts Outdated Show resolved Hide resolved
packages/ai/src/PromptInput.ts Outdated Show resolved Hide resolved
packages/ai/src/PromptInput.ts Show resolved Hide resolved
@nnaydenow nnaydenow changed the title feat: ui5-ai-prompt-input (experimental) implementation feat(ui5-ai-prompt-input): initial (experimental) implementation May 29, 2024
@ilhan007
Copy link
Member

The API looks reasonable +1 from my side

  • the import of the icon that Nayden mentioned should be added indeed
  • the import type { InputEventDetail } is also good to do now
  • others are nice to have improvements

* @since 2.0.0-rc.1
* @public
*/
@event("submit")
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand the reasoning behind having both submit and change. Submit is fired on click/enter, while change is fired on enter/focusout. What am i supposed to bind as an app developer? I would prefer to have only input/change events.

Copy link
Member Author

Choose a reason for hiding this comment

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

as discussed we have 2 use cases:

  • change event to be used for validation (onfocusout)
  • submit event to be used for submitting the value to the backend

therefore I am leaving both events as implemented before

packages/ai/src/PromptInput.ts Outdated Show resolved Hide resolved
* The PromptInput is an AI component.
* The `ui5-ai-prompt-input` component allows the user to write custom instructions in natural language, so that AI is guided to generate content tailored to user needs.
*
* **Note:** The web component is in an experimental state
Copy link
Member

Choose a reason for hiding this comment

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

I think we can add this note as an :::info label in the mdx file of the PromptInput to be consistent with the other components.

Copy link
Contributor

Choose a reason for hiding this comment

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

We are working on #9167 where @experimental will be enabled to be used in class description and this note will be automatically generated

@MapTo0 MapTo0 dismissed stale reviews from vladitasev and nnaydenow June 12, 2024 10:33

discussed in person that the current behaviour is OK

@MapTo0 MapTo0 merged commit 9dcdfdb into main Jun 12, 2024
10 checks passed
@MapTo0 MapTo0 deleted the prompt-input branch June 12, 2024 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants