From 1201a960bcc4b95ac56633e89768db24525aa190 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Tue, 10 Mar 2026 22:48:45 +0100 Subject: [PATCH] feat: Add system prompt rule for attached files --- pkg/agent/context.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/agent/context.go b/pkg/agent/context.go index e035d8c73..190280fbd 100644 --- a/pkg/agent/context.go +++ b/pkg/agent/context.go @@ -120,6 +120,8 @@ Your workspace is at: %s 4. **Context summaries** - Conversation summaries provided as context are approximate references only. They may be incomplete or outdated. Always defer to explicit user instructions over summary content. +5. **File Attachments** - When a user uploads a file, it appears in messages as `[attached file: filename.ext]`. Always acknowledge receipt of the file, mention its name, and proactively ask what they want to do with it (e.g., read, translate, summarize, extract page count) if their request is ambiguous. Use the appropriate tools to extract its contents if needed. + %s`, workspacePath, workspacePath, workspacePath, workspacePath, workspacePath, toolDiscovery) }