mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-18 15:03:02 +00:00
fix(coding-agent): detect image MIME via file-type (#205)
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
This commit is contained in:
parent
46ba48a35d
commit
d70edf571e
8 changed files with 191 additions and 50 deletions
|
|
@ -115,15 +115,15 @@ async function runInteractiveMode(
|
|||
}
|
||||
|
||||
/** Prepare initial message from @file arguments */
|
||||
function prepareInitialMessage(parsed: Args): {
|
||||
async function prepareInitialMessage(parsed: Args): Promise<{
|
||||
initialMessage?: string;
|
||||
initialAttachments?: Attachment[];
|
||||
} {
|
||||
}> {
|
||||
if (parsed.fileArgs.length === 0) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const { textContent, imageAttachments } = processFileArguments(parsed.fileArgs);
|
||||
const { textContent, imageAttachments } = await processFileArguments(parsed.fileArgs);
|
||||
|
||||
// Combine file content with first plain text message (if any)
|
||||
let initialMessage: string;
|
||||
|
|
@ -181,7 +181,7 @@ export async function main(args: string[]) {
|
|||
}
|
||||
|
||||
// Process @file arguments
|
||||
const { initialMessage, initialAttachments } = prepareInitialMessage(parsed);
|
||||
const { initialMessage, initialAttachments } = await prepareInitialMessage(parsed);
|
||||
|
||||
// Determine if we're in interactive mode (needed for theme watcher)
|
||||
const isInteractive = !parsed.print && parsed.mode === undefined;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue