Skip to content

feat: support multimodal chat#602

Open
lukasdotcom wants to merge 9 commits into
mainfrom
multimodal-chat
Open

feat: support multimodal chat#602
lukasdotcom wants to merge 9 commits into
mainfrom
multimodal-chat

Conversation

@lukasdotcom

@lukasdotcom lukasdotcom commented Jul 9, 2026

Copy link
Copy Markdown
Member

Adds support for multimodal chat. Note this does not support ContextAgent right now, so should probably wait to merge it until that is done.
image

Needs these prs:

For context agent you can use this pr:

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@julien-nc julien-nc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • It works very well 👍
  • The message attachments could be in a horizontal layout, right now they take a lot of space
Image
  • When there are multiple attachments, the viewer does not open when clicking one attachment. It works when there is only one attachment.

I'll make code reviews next week.

@lukasdotcom

Copy link
Copy Markdown
Member Author
  • It works very well 👍

    • The message attachments could be in a horizontal layout, right now they take a lot of space
Image
* When there are multiple attachments, the viewer does not open when clicking one attachment. It works when there is only one attachment.

I'll make code reviews next week.

The viewer didn't open for input attachments only output attachments. I've switched it to now work for all of them and also made the attachments work horizontally
image

Comment thread lib/Service/ChatService.php Outdated
Comment thread src/components/ChattyLLM/Message.vue Outdated
lukasdotcom and others added 9 commits July 21, 2026 08:22
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>

@kyteinsky kyteinsky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multimodal, let's gooo!

a few nits that could be ironed out:

nit: creating a new chat with the attachments selected does not clear them up, not sure if it's intentional (since they are already uploaded so would save that for the new chat) but was something unexpected.
maybe a "Clear All" button for the attachments can act as a middle ground keeping the above behaviour.

nit: maybe the filename could be truncated here, or hidden even and can be seen when hovered

Image

Comment on lines +168 to +177
picker: (callback) => getFilePickerBuilder(t('assistant', 'Choose a file'))
.setMultiSelect(true)
.allowDirectories(false)
.addButton({
id: 'choose-input-file',
label: t('assistant', 'Choose'),
variant: 'primary',
callback: callback(),
})
.build(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: not sure if it's possible to limit the mimetypes here since it cannot be judged for every provider, but we may still limit it to images, videos, audio, and text (including office and pdf) files so files like .zip are not shown as selectable, but as said it may be too much work for little gain since it would fail eventually anyway.

uploadFiles(files) {
if (!files || files.length === 0) {
return Promise.resolve()
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the this.attachedFileIds.length > MAX_ATTACHED_FILES check may be better here (or in pickerSubmitted) so we don't upload the files at all if the limit exceeds, and a warning/error message can be sent to the user stating what failed instead of just disabling the send button.
a file size limit for all files might also make sense, although generous, it will prevent upload of very large files weighing 2 GB for example.

Comment on lines +202 to +208
onPaste(e) {
if (!this.multimodalChatAvailable || e.clipboardData.files.length === 0) {
return
}
e.preventDefault()
this.uploadFiles(e.clipboardData.files)
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noice!

Comment on lines +467 to +470
$content[] = [
'type' => 'text',
'text' => $message->getContent(),
];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'role' => 'user' maybe since this is the user message

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.

3 participants