🐛 Fix some issues in AI agent

This commit is contained in:
2025-10-26 12:24:41 +08:00
parent 92cd6b5f7e
commit 4347281fcd
3 changed files with 54 additions and 16 deletions

View File

@@ -98,7 +98,7 @@ public class ThoughtProvider
string? afterIso = null,
string? beforeIso = null,
bool includeReplies = false,
int? pinned = null,
string? pinned = null,
bool onlyMedia = false,
bool shuffle = false
) =>
@@ -112,7 +112,7 @@ public class ThoughtProvider
OrderBy = orderBy,
Query = query,
IncludeReplies = includeReplies,
Pinned = pinned.HasValue ? (PostPinMode)pinned : default,
Pinned = !string.IsNullOrEmpty(pinned) && int.TryParse(pinned, out int p) ? (PostPinMode)p : default,
OnlyMedia = onlyMedia,
Shuffle = shuffle
};
@@ -167,4 +167,4 @@ public class ThoughtProvider
throw new InvalidOperationException("Unknown provider: " + ModelProviderType);
}
}
}
}