Image tag fix for real this time (#4540)
Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
This commit is contained in:
parent
9479fe3ce6
commit
eb975bb89c
2 changed files with 7 additions and 2 deletions
|
|
@ -124,9 +124,10 @@ export function Autocomplete(props: {
|
||||||
(item): AutocompleteOption => ({
|
(item): AutocompleteOption => ({
|
||||||
display: Locale.truncateMiddle(item, width),
|
display: Locale.truncateMiddle(item, width),
|
||||||
onSelect: () => {
|
onSelect: () => {
|
||||||
|
const mime = Bun.file(item).type || "text/plain"
|
||||||
insertPart(item, {
|
insertPart(item, {
|
||||||
type: "file",
|
type: "file",
|
||||||
mime: "text/plain",
|
mime,
|
||||||
filename: item,
|
filename: item,
|
||||||
url: `file://${process.cwd()}/${item}`,
|
url: `file://${process.cwd()}/${item}`,
|
||||||
source: {
|
source: {
|
||||||
|
|
|
||||||
|
|
@ -638,7 +638,11 @@ export namespace MessageV2 {
|
||||||
state: "output-available",
|
state: "output-available",
|
||||||
toolCallId: part.callID,
|
toolCallId: part.callID,
|
||||||
input: part.state.input,
|
input: part.state.input,
|
||||||
output: part.state.time.compacted ? "[Old tool result content cleared]" : part.state.output,
|
output: part.state.attachments?.length
|
||||||
|
? "[Image content moved to user message]"
|
||||||
|
: part.state.time.compacted
|
||||||
|
? "[Old tool result content cleared]"
|
||||||
|
: part.state.output,
|
||||||
callProviderMetadata: part.metadata,
|
callProviderMetadata: part.metadata,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue