feat: Vision-Support für Gemma-4, Bilderkennung im Web UI

- Modell gewechselt zu aratan/gemma-4-E4B-q8-it-heretic:latest
- Multimodale Anfragen (Text + Bild) über Ollama API
- Bild-Upload im Chat-Interface mit Vorschau
- Automatisches Image-Resizing und JPEG-Kompression
- Vision-Regeln im Persona-Prompt integriert
- Memory-System erweitert für Bildhinweise
- Frontend: Bildvorschau, Upload-Button, responsive Styling
- README aktualisiert
This commit is contained in:
Arch Agent
2026-05-04 13:44:00 +02:00
parent 27dcaf6552
commit f4b79a1004
8 changed files with 461 additions and 194 deletions
+110 -7
View File
@@ -64,6 +64,12 @@ header h1 {
margin-top: 10px;
}
#vision-badge {
color: #7ee787;
font-weight: 600;
margin-left: 10px;
}
.memory-status {
font-size: 0.8rem;
color: var(--accent-soft);
@@ -129,6 +135,22 @@ header h1 {
font-style: italic;
}
/* Images inside messages */
.message-image {
max-width: 240px;
max-height: 180px;
border-radius: 12px;
margin-bottom: 8px;
display: block;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
cursor: pointer;
transition: transform 0.2s;
}
.message-image:hover {
transform: scale(1.03);
}
/* Input Area */
.input-area {
position: sticky;
@@ -151,9 +173,52 @@ header h1 {
50% { opacity: 1; }
}
/* Image Preview above input */
.image-preview-container {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 10px;
padding: 8px;
background: var(--bg-secondary);
border: 1px solid var(--bg-tertiary);
border-radius: 12px;
width: fit-content;
max-width: 100%;
}
.image-preview {
max-height: 80px;
max-width: 120px;
border-radius: 8px;
object-fit: cover;
}
.remove-image-btn {
background: var(--accent);
color: white;
border: none;
border-radius: 50%;
width: 24px;
height: 24px;
font-size: 16px;
line-height: 24px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s;
}
.remove-image-btn:hover {
background: #ff5a75;
}
/* Input Row */
.input-row {
display: flex;
gap: 10px;
align-items: flex-start;
}
textarea {
@@ -176,6 +241,32 @@ textarea:focus {
border-color: var(--accent);
}
.upload-btn {
background: var(--bg-tertiary);
color: var(--text-primary);
border: none;
border-radius: 25px;
padding: 15px 18px;
font-size: 1.1rem;
cursor: pointer;
transition: all 0.3s;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
}
.upload-btn:hover:not(:disabled) {
background: var(--accent);
transform: scale(1.05);
}
.upload-btn:disabled {
background: var(--bg-tertiary);
opacity: 0.5;
cursor: not-allowed;
}
.send-btn {
background: var(--accent);
color: white;
@@ -304,21 +395,33 @@ textarea:focus {
.container {
padding: 10px;
}
header h1 {
font-size: 1.8rem;
}
.message {
max-width: 90%;
padding: 12px 15px;
}
.message-image {
max-width: 180px;
max-height: 140px;
}
.input-row {
flex-direction: column;
flex-wrap: wrap;
}
.send-btn {
.upload-btn, .send-btn {
height: 44px;
padding: 10px 18px;
}
textarea {
width: 100%;
order: -1;
margin-bottom: 8px;
}
}
}