mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 05:04:44 +00:00
Add defaultConvertToLlm to web-ui, simplify example
- web-ui exports: defaultConvertToLlm, convertAttachments, isUserMessageWithAttachments, isArtifactMessage - defaultConvertToLlm handles UserMessageWithAttachments and filters ArtifactMessage - Example's customMessageTransformer now extends defaultConvertToLlm - Removes duplicated attachment conversion logic from example
This commit is contained in:
parent
7a39f9eb11
commit
13a1991ec2
6 changed files with 127 additions and 76 deletions
|
|
@ -50,7 +50,7 @@ export class MessageList extends LitElement {
|
|||
}
|
||||
|
||||
// Fall back to built-in renderers
|
||||
if (msg.role === "user") {
|
||||
if (msg.role === "user" || msg.role === "user-with-attachments") {
|
||||
items.push({
|
||||
key: `msg:${index}`,
|
||||
template: html`<user-message .message=${msg}></user-message>`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue