feat(agent): add voice input and photo attachments to assistant

Wire mic through Whisper-compatible transcriptions on LLM_BASE_URL.

Photos upload to MinIO and reach the vision model as base64 image_url parts.
This commit is contained in:
ginnoir
2026-07-05 02:01:48 -05:00
parent 876a283d47
commit c8db5475d3
20 changed files with 636 additions and 65 deletions
+28
View File
@@ -0,0 +1,28 @@
import assert from "node:assert/strict";
import { describe, it } from "node:test";
import { clientChatInputSchema } from "../../src/modules/agent/messages";
describe("clientChatInputSchema", () => {
it("accepts messages with image attachments", () => {
const parsed = clientChatInputSchema.safeParse({
stream: true,
messages: [
{
role: "user",
content: "Add this appointment to the calendar",
attachments: [{ type: "image", url: "/api/uploads/assistant/house-1/photo.jpg" }],
},
],
});
assert.equal(parsed.success, true);
});
it("rejects empty message content", () => {
const parsed = clientChatInputSchema.safeParse({
messages: [{ role: "user", content: " " }],
});
assert.equal(parsed.success, false);
});
});