mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 08:00:59 +00:00
mom: fix attachment downloads - pass store to SlackBot, process files, use absolute paths
This commit is contained in:
parent
d277d739b3
commit
e3576fe016
4 changed files with 246 additions and 107 deletions
|
|
@ -576,9 +576,9 @@ function createRunner(sandboxConfig: SandboxConfig, channelId: string, channelDi
|
|||
// Format: "[username]: message" so LLM knows who's talking
|
||||
let userMessage = `[${ctx.message.userName || "unknown"}]: ${ctx.message.text}`;
|
||||
|
||||
// Add attachment paths if any
|
||||
// Add attachment paths if any (convert to absolute paths in execution environment)
|
||||
if (ctx.message.attachments && ctx.message.attachments.length > 0) {
|
||||
const attachmentPaths = ctx.message.attachments.map((a) => a.local).join("\n");
|
||||
const attachmentPaths = ctx.message.attachments.map((a) => `${workspacePath}/${a.local}`).join("\n");
|
||||
userMessage += `\n\nAttachments:\n${attachmentPaths}`;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue