|
|
@@ -694,7 +694,7 @@ export function Prompt(props: PromptProps) {
|
|
|
async function pasteImage(file: { filename?: string; content: string; mime: string }) {
|
|
|
const currentOffset = input.visualCursor.offset
|
|
|
const extmarkStart = currentOffset
|
|
|
- const count = store.prompt.parts.filter((x) => x.type === "file").length
|
|
|
+ const count = store.prompt.parts.filter((x) => x.type === "file" && x.mime.startsWith("image/")).length
|
|
|
const virtualText = `[Image ${count + 1}]`
|
|
|
const extmarkEnd = extmarkStart + virtualText.length
|
|
|
const textToInsert = virtualText + " "
|