Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9005f4d
[AI Chat] Initial Commit
glebfox Sep 14, 2026
59798cc
[AI Chat] Init Project
glebfox Sep 14, 2026
34b4ca0
[AI Chat] Init Project
glebfox Sep 14, 2026
ff5c7a0
Add AI Chat Components documentation design plan
glebfox Sep 14, 2026
79b4fc4
Exclude client-side JS APIs from AI Chat docs plan
glebfox Sep 14, 2026
c70563a
Exclude inter-component seam API from AI Chat docs plan
glebfox Sep 14, 2026
37b532a
Document the aiCodeBlock component
glebfox Sep 14, 2026
5777f3b
Document the aiMessageInput component
glebfox Sep 14, 2026
cdd4ac5
Correct attachment attribute defaults on the aiMessageInput page
glebfox Sep 14, 2026
dd3d06e
Keep the message list driving API in the AI Chat docs plan
glebfox Sep 14, 2026
84980ae
Document the aiMessageList component
glebfox Sep 14, 2026
ceb0112
Settle the provider and drop example tests in the AI Chat docs plan
glebfox Sep 15, 2026
5b8ec35
Remove tests from the AI Chat example project
glebfox Sep 15, 2026
490d673
Model message attachments with an element collection
glebfox Sep 15, 2026
5a3b9e0
Document the aiChat component and getting started
glebfox Sep 15, 2026
7771894
Cross-link the AI add-ons and add a lead image
glebfox Sep 15, 2026
aa690ec
Correct and extend the attachment traps in the docs plan
glebfox Sep 15, 2026
1822daf
Document attachments, localization and styling
glebfox Sep 15, 2026
6b57440
Add handover notes to the AI Chat docs plan
glebfox Sep 15, 2026
77364ca
Note the multimodal model requirement in the example
glebfox Sep 15, 2026
a807764
Document transcript scrolling and the shadow parts
glebfox Sep 15, 2026
6432c39
Document the system prompt and its forwarding
glebfox Sep 15, 2026
637cdf0
[AI Chat] fixes
glebfox Sep 15, 2026
27b51d6
Apply review feedback across the AI Chat pages
glebfox Sep 15, 2026
e4c6de8
Declare indent=0 on every snippet
glebfox Sep 15, 2026
2e9e69b
Use component names, callouts and a kebab-case descriptor
glebfox Sep 15, 2026
405a5eb
Move styling into the component pages
glebfox Sep 15, 2026
180f3a6
Complete the reference tables and document the screenshot script
glebfox Sep 15, 2026
14c0c92
Drop the shadow part lists from the styling sections
glebfox Sep 17, 2026
7f5d851
Use one neutral lead-in for the style property tables
glebfox Sep 17, 2026
e29b8ef
Edit the AI Chat pages for plainer prose
knstvk Sep 17, 2026
07b151d
Update the AI Chat pointer in the AI Tools overview to the current co…
knstvk Sep 17, 2026
109311f
[AI Chat] review fixes
glebfox Sep 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ git config core.hooksPath .githooks
Optimize PNG screenshots with `pngquant --quality=65-85 --strip --force --ext .png <file>`.
See `CONTRIBUTING.md` for the full table. Bypass (rarely) with `git commit --no-verify`.

Screenshots are captured at **2x** and declared at half their pixel width (`image::foo.png[width="413"]` for an 826px-wide file), so they stay sharp on high-DPI displays. `tools/screenshot-2x.mjs` does this: it drives Playwright directly with `deviceScaleFactor: 2` and captures a single element, which the Playwright MCP tool cannot do — its resize action takes a width and a height only, so every capture it makes is 1x. Run it with `--url`, `--selector` and `--out`; it prints the resulting pixel size and the width to declare. See the comment at the top of the file for the rest of its options.

## Conventions

- In multi-locale examples use German (`de`) as the secondary locale.
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ext.jmixCompositeProjectRoot = true

def projectNames = [
'ai-chat-ex1',
'audit-ex1',
'authserver-ex1',
'bpm-ex1',
Expand Down
1 change: 1 addition & 0 deletions content/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ include::bpm:partial$nav.adoc[]
* xref:ROOT:add-ons.adoc[]
+
--
include::ai-chat:partial$nav.adoc[]
include::ai-tools:partial$nav.adoc[]
include::appsettings:partial$nav.adoc[]
include::audit:partial$nav.adoc[]
Expand Down
35 changes: 35 additions & 0 deletions content/modules/ai-chat/examples/ai-chat-ex1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.jmix

.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**
!**/src/test/**

# Remove this line if you want to follow recommendations in src/main/bundles/README.md
src/main/bundles/

### IntelliJ IDEA ###
.idea/*
!.idea/encodings.xml
*.iws
*.iml
*.ipr
out/
/target/

### VS Code ###
.vscode/

# The following files are generated/updated by vaadin-gradle-plugin
node_modules/
src/main/frontend/generated/
pnpmfile.js
vite.generated.ts
webpack.generated.js

.DS_Store

.agents/
.claude/
.skills/

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions content/modules/ai-chat/examples/ai-chat-ex1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Ai Chat Ex1

This is a web application based on the [Jmix](https://www.jmix.io) framework.

## Getting Started

The newly created project requires Java 21 and uses the embedded HSQL database.

Use the following resources to learn more about Jmix:
* [Jmix Documentation](https://docs.jmix.io)
* [Online Demo Applications](https://www.jmix.io/live-demo)
* [Jmix AI Assistant](https://ai-assistant.jmix.io) (also available in the **Jmix AI** tool window of IntelliJ IDEA)

## Development

- [Setup](https://docs.jmix.io/jmix/setup.html) your development environment.
- [Open](https://docs.jmix.io/jmix/studio/project.html#opening-existing-project) the project in the IDE.
- If you want to use AI agents to develop the application, check out the [Jmix AI Agent Guidelines](https://github.com/jmix-framework/jmix-agent-guidelines) repository.

## Running

To start the application, use the **Ai Chat Ex1 Jmix Application** run configuration in your IDE, or run the following command in the project root directory:

```bash
./gradlew bootRun
```

The application will be available at <http://localhost:8080>.

The default user credentials are:
* Login: `admin`
* Password: `admin`

**WARNING**: Change admin password and remove `ui.login.defaultUsername` and `ui.login.defaultPassword` application properties when deploying the application to production.

## The language model

The chat views talk to a local [Ollama](https://ollama.com) server. Nothing is contacted at startup, so the application runs without it — a chat reports the failure on the first message instead.

Attachments need a model that accepts them. The default `qwen3:8b` handles text only and refuses any attached file — a plain text file as readily as an image — so the Attachments view reports an error until you point the application at a [multimodal model](https://ollama.com/search?c=vision):

```bash
OLLAMA_CHAT_MODEL=<model> ./gradlew bootRun
```
83 changes: 83 additions & 0 deletions content/modules/ai-chat/examples/ai-chat-ex1/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
plugins {
id 'io.jmix' version '3.1.0-M1'
id 'java'
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.4.1'
}

apply plugin: 'org.springframework.boot'
apply plugin: 'com.vaadin'

jmix {
bomVersion = '3.1.999-SNAPSHOT'
}

group = 'com.company'
version = '0.0.1-SNAPSHOT'

repositories {
mavenCentral()
mavenLocal()
maven {
url = 'https://nexus.jmix.io/repository/public'
}
maven {
url = 'https://nexus.jmix.io/repository/premium'
credentials {
username = rootProject['premiumRepoUser']
password = rootProject['premiumRepoPass']
}
}
}

dependencies {
implementation 'io.jmix.core:jmix-core-starter'
implementation 'io.jmix.data:jmix-eclipselink-starter'
implementation 'io.jmix.security:jmix-security-starter'
implementation 'io.jmix.security:jmix-security-flowui-starter'
implementation 'io.jmix.security:jmix-security-data-starter'
implementation 'io.jmix.localfs:jmix-localfs-starter'
implementation 'io.jmix.flowui:jmix-flowui-starter'
implementation 'io.jmix.flowui:jmix-flowui-data-starter'
implementation 'io.jmix.flowui:jmix-flowui-themes'
implementation 'io.jmix.datatools:jmix-datatools-starter'
implementation 'io.jmix.datatools:jmix-datatools-flowui-starter'

// tag::dependencies[]
implementation 'io.jmix.aichat:jmix-aichat-flowui-starter'
// end::dependencies[]

// tag::provider-dependencies[]
implementation 'org.springframework.ai:spring-ai-starter-model-ollama'
// end::provider-dependencies[]

implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'com.vaadin:vaadin-dev'

runtimeOnly 'org.hsqldb:hsqldb'

testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation 'io.jmix.flowui:jmix-flowui-test-assist'
}

configurations.implementation {
exclude group: 'com.vaadin', module: 'hilla'
exclude group: 'com.vaadin', module: 'hilla-dev'
exclude group: 'com.vaadin', module: 'copilot'
}

test {
useJUnitPlatform()
}

idea {
module {
excludeDirs.addAll(files '.jmix', 'node_modules', 'src/main/frontend/generated/', 'src/main/bundles')
}
}

vaadin {
optimizeBundle = false
productionMode = false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hilla.active=false
org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading