mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Make "Added File:" match stricter
This commit is contained in:
2 files changed
+10
-16
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user