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: reading and writing prompts using settings api #204

Merged
merged 21 commits into from Mar 8, 2024
Merged

Conversation

vtsaplin
Copy link
Collaborator

@vtsaplin vtsaplin commented Feb 8, 2024

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@vtsaplin vtsaplin changed the title feat: reading and writing settings feat: reading and writing prompts using settings api Feb 15, 2024
@vtsaplin vtsaplin marked this pull request as ready for review March 7, 2024 15:49
Copy link
Member

@basecode basecode left a comment

Choose a reason for hiding this comment

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

LGTM

  • Please add test cases for functions with signification business logic.
  • Please make use of logging to EIM for signifcation CRUD handlers. Examples:
    • log('promptTemplate:save, {name, queryId, shared: true/false, description: true/false}');
    • log('promptTemplate:delete, {name, queryId, shared: true/false}');
    • log('prompt:generate', {adobeTarget=true/false, csv=true/false});

web-src/src/components/AudienceSelector.js Show resolved Hide resolved
web-src/src/components/PromptInputView.js Outdated Show resolved Hide resolved
web-src/src/components/PromptTemplateCard.js Outdated Show resolved Hide resolved
web-src/src/components/PromptTemplateCard.js Outdated Show resolved Hide resolved
web-src/src/components/PromptTemplatesView.js Outdated Show resolved Hide resolved
@vtsaplin vtsaplin requested a review from basecode March 8, 2024 14:12
app.config.yaml Show resolved Hide resolved
key: 'promptTemplatesState',
get: async ({ get }) => {
const bundledPromptTemplates = get(bundledPromptTemplatesState);
const customPromptTemplates = await get(customPromptTemplatesState);
Copy link
Member

Choose a reason for hiding this comment

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

Is await necessary here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it is required. customPromptTemplatesState is async

app.config.yaml Show resolved Hide resolved
@basecode
Copy link
Member

basecode commented Mar 8, 2024

🥳

@vtsaplin vtsaplin merged commit f9e6d37 into main Mar 8, 2024
3 checks passed
@vtsaplin vtsaplin deleted the settings branch March 8, 2024 19:16
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.

None yet

4 participants