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

Metadata containing preview and current url #84

Merged
merged 3 commits into from
Dec 8, 2023
Merged

Conversation

justinorringer
Copy link
Contributor

Sending this to the backend on message.

I need to figure out how apps determine if they are preview or not/how unleash works. Otherwise it works manually setting it to preview: true

@josejulio
Copy link
Member

Something like this should help: https://github.com/RedHatInsights/landing-page-frontend/blob/master/src/components/app-content-renderer/virtual-assistant.tsx#L12-L16

You can only use the hook (the functions that start with use) within other hook or a component. So you should add this in the useAstro function

@josejulio
Copy link
Member

That said, we could build console urls right in the frontend. We know the base url (because we are running there), we know if we are in preview or not and we could get from the server the path.

@justinorringer
Copy link
Contributor Author

That said, we could build console urls right in the frontend. We know the base url (because we are running there), we know if we are in preview or not and we could get from the server the path.

Done! I modified the href in the ReactMarkdown component.

I'm probably passing around the isBeta() flag a bit much though. I didnt know how it would work in useAstro when I needed it in the AssistantMessageEntry file. let me know if ya see a better way :)

@josejulio josejulio merged commit b174df3 into main Dec 8, 2023
1 check passed
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