fix(codex): accept prepared chat attachments with model overrides

This commit is contained in:
2026-10-20 18:06:11 +01:00
parent 83fef10331
commit 68761652cf
8 changed files with 383 additions and 16 deletions
+1 -1
View File
@@ -177,7 +177,7 @@ func prepareChatAttachments(sessionID string, attachments []protocol.ChatAttachm
return nil, nil, fmt.Errorf("close attachment %q: %w", name, err)
}
uri := (&url.URL{Scheme: "file", Path: path}).String()
files = append(files, opencode.PromptFile{URI: uri, Name: name})
files = append(files, opencode.NewPreparedPromptFile(uri, name))
parts = append(parts, protocol.ChatPart{Type: protocol.ChatPartFile, Name: name, Mime: mime, URI: uri})
}
return files, parts, nil