-
Notifications
You must be signed in to change notification settings - Fork 3k
DevUI HQL console redesign + Hibernate Assistant functionality #49165
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
Conversation
/cc @gsmet (hibernate-orm) |
This comment has been minimized.
This comment has been minimized.
🎊 PR Preview b44215d has been successfully built and deployed to https://quarkus-pr-main-49165-preview.surge.sh/version/main/guides/
|
This is very cool !!! I love it ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this, I also like the new layout. Just one minor thing, when you create pages that is a mix of assistant and non assistant, you don't need to create an assistant Page, your JsonRPC services will use the assistant (as you do already) and in your existing web component page you can use the assistant state to see if there is an configured assistant available, and use that to decide how / what to show on your page.
...oyment/src/main/java/io/quarkus/hibernate/orm/deployment/dev/HibernateOrmDevUIProcessor.java
Outdated
Show resolved
Hide resolved
extensions/hibernate-orm/deployment/src/main/resources/dev-ui/hibernate-orm-hql-console.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have one small question: do we persist the history of all these nice features?
Because I could see the value of being able to restart the app later and have the history around.
Maybe even the ability to export the history of the interactions for a coworker. Or save a specific session?
Not sure it's something I would handle feature by feature but I was wondering if it was something you had in mind @phillip-kruger?
Now, what I'm unsure of is that I suppose you push all the chat as a context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spotted something that is IMO blocking.
Now we could merge this if I'm sure we fix the issue by Aug 12th.
<dependency> | ||
<groupId>org.hibernate.tool</groupId> | ||
<artifactId>hibernate-tools-language</artifactId> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noooooooooooooooooooooooo :).
We definitely don't want this dependency at runtime.
Maybe it's time to split this into a runtime-dev module? /cc @phillip-kruger
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I remember there was an issue with the hibernate extension with this.
@aloubyansky might know the details. Another option could be to use BuildTimeActions ? Is there a reason why this can not happen in the deployment class path ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would marking the dependency as optional
be a valid temporary workaround, while we figure out how to split the dev components to their own module? We already depend on e.g. quarkus-devui
optionally in the runtime module, so that seems like it could be fine for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you make it optional, it won't be there.
IF we can't make these parts a runtime-dev module (I would need to discuss with @aloubyansky), maybe we could have the dependency as optional in the runtime module and have a runtime-dev empty module with just this dependency? But I have no idea what the initial problem was so...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, the hibernate-orm extension was excluded from the initial runtime-dev
introducing change due our Gradle plugin not being able to properly handle dependency exclusions. Our CI should catch that if it breaks.
The good news is we may be able to lift this limitation soon, I have a branch that should fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, that doesn't seem to be complete. But it was supposed to be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, there were more main...aloubyansky:quarkus:dev-only-deps-hibernate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't merge those because they were breaking Gradle IT. We may just try rebasing them now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I've created #49399 on top of those commits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we have a runtime-dev
module I moved new the dependency there
d734501
to
b8d92f4
Compare
Not at the moment, no. Though Hibernate could always help with persistence related aspects :)
Not at the moment, no. Each message is a separate interaction with the DB and/or the Assistant. If we wanted, we could technically preserve the whole chat in-memory, pass it as a single I wanted to mention this to @phillip-kruger, as it would be very nice to have something like langchain4j's ChatMemory that can be paired with the |
Yes that is a feature we need to add the Chappie or the Chappie extension. I'll have a look a.s.a.p |
This comment has been minimized.
This comment has been minimized.
b8d92f4
to
9508915
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved from a Dev UI and Assistant p.o.v. Please wait for others approval before merging.
@gsmet - noteworthy label ? |
extensions/hibernate-orm/deployment/src/main/resources/dev-ui/hibernate-orm-hql-console.js
Outdated
Show resolved
Hide resolved
9508915
to
0888714
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, all good from the UI and assistant p.o.w, please get a approve from others too before merging
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Looks awesome!
I unfortunately could test myself because of trouble configuring Chappie, but I left a comment for Philip about that. I'll try again another time :)
More info below.
extensions/hibernate-orm/deployment/src/main/resources/dev-ui/hibernate-orm-hql-console.js
Outdated
Show resolved
Hide resolved
if (a == null || !a.isAvailable()) { | ||
return errorDataSet( | ||
"The assistant is not available, please check the Quarkus assistant extension is correctly configured."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@phillip-kruger any way we could provide more info? I tried using this with ollama, and as someone completely unfamiliar, this was... difficult. I had zero information, and was unable to determine at which level my configuration was incorrect. Was the host not resolvable? The port not responding? The REST API returning an error? No feedback, so no idea.
It's beyond the scope of this PR, but I would suggest:
- A connection check in the "Configuration" page in the dev UI, with an error message if the assistant cannot be reached, ideally with specific info (exception or error response).
- A way for extensions to provide the same info when
isAvailable()
returnsfalse
(like here). Maybe acheckAvailable()
that would throw an exception with more details?
extensions/hibernate-orm/deployment/src/main/resources/dev-ui/hibernate-orm-hql-console.js
Show resolved
Hide resolved
extensions/hibernate-orm/deployment/src/main/resources/dev-ui/hibernate-orm-hql-console.js
Show resolved
Hide resolved
Oh, and about approvals: I'm fine with merging once we solve the runtime dependency issue (in any way you like): #49165 (comment) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@mbellade I let you rebase this one and ping me loudly when done. Thanks! |
5c095f4
to
0ee2d35
Compare
@gsmet done! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
0ee2d35
to
8da83eb
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
8da83eb
to
5237c4a
Compare
I just pushed a rebase to use the final versions. |
Status for workflow
|
Status for workflow
|
Thanks a lot! |
DevUI HQL console redesign + Hibernate Assistant functionality
Fixes #49144
This PR provides a re-design of the Hibernate ORM query console (Dev UI interface that allows querying the underlying datasources through Hibernate's query language), taking advantage of the functionality introduced in the new hibernate-tools-language module.
The changes are:
Assistant
interface, like LLM-assisted query execution and also data interpretation via the interactive modeHere's a small demo of the new interface:
Screen.Recording.2025-07-30.at.11.43.36.mp4