Skip to content

Ai generated events#26

Open
alinporumb wants to merge 6 commits into
mainfrom
ai-generated-events
Open

Ai generated events#26
alinporumb wants to merge 6 commits into
mainfrom
ai-generated-events

Conversation

@alinporumb

Copy link
Copy Markdown
Contributor

No description provided.

@alinporumb alinporumb requested a review from alexpausan July 10, 2024 08:45

@alexpausan alexpausan left a comment

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.

A few small things, other than that seem good to go

Comment thread .env.example
PLASMO_PUBLIC_LIVEKIT_API_KEY=
PLASMO_PUBLIC_LIVEKIT_SECRET=

PLASMO_PUBLIC_API_URL= No newline at end of file

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.

This is still used, so I guess it should be there, right?

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.

yes. it is used by sendMessageToBg on flow save

}

let listenersAdded = false
if (!listenersAdded) {

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.

This is a global listener, being called when the extension loads. Do we need to do that? Or will it work only when recording is in progress or something similar?

For simple scripts, a global listener could do it, this being in the react context I would add it in the component lifecycle somewhere, to don't have a global db listener (if I can call it this way).

timeoutMs: 1000,
function getElementSelector(el) {
let selector = el.tagName.toLowerCase()
const whitelist = ['name', 'data-*', 'role', 'title', 'alt', 'href', 'type']

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.

src could be here or we can skip it for now?

const whitelist = ['name', 'data-*', 'role', 'title', 'alt', 'href', 'type']
let hasValidAttr = false

whitelist.forEach((attr) => {

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.

I would not use "whitelist/blacklist" as it can have negative connotations, and use Allowlist/Denylist (select/exclude list) ... etc :D

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.

:) ok

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.

2 participants