Make "Added File:" match stricter

This commit is contained in:
Alex Gleason committed 2025-12-20 20:43:53 -06:00
1 parent 8fc7c0bb60
commit 88c6b80484
2 files changed
+10 -16

No files matched your search

+1 -1
View File
@@ -340,7 +340,7 @@ export class SessionManager {
const stripImageUrls = (msgs: OpenAI.Chat.Completions.ChatCompletionMessageParam[]): OpenAI.Chat.Completions.ChatCompletionMessageParam[] => {
return msgs.map(msg => {
if (msg.role === 'user' && typeof msg.content !== 'string' && Array.isArray(msg.content)) {
// Keep only text parts (this includes "Added file: /tmp/..." paths)
// Keep only text parts (this includes "Added file: <filename>" paths)
const textParts = msg.content.filter(part => part.type === 'text');
// If we had images, convert to string content (or empty if no text)