Skip to content

Commit 84dbd72

Browse files
committed
Fix day count schema: allow 2-7 days instead of hardcoded 3
The [Length(3,3)] attribute on Itinerary.Days forced exactly 3 days regardless of user selection (2-7). Changed to [Length(1,7)] to match the UI range.
1 parent fc14f63 commit 84dbd72

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

10.0/AI/LocalChatClientWithAgents/src/Models/Itinerary.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ public record Itinerary
1717
[Description("An explanation of how the itinerary meets the person's special requests.")]
1818
public required string Rationale { get; init; }
1919

20-
[Description("A list of day-by-day plans.")]
21-
[Length(3, 3)]
20+
[Description("A list of day-by-day plans matching the requested number of days.")]
21+
[Length(2, 7)]
2222
public required List<DayPlan> Days { get; init; }
2323

2424
public static Itinerary GetExampleTripToJapan() =>

10.0/AI/LocalChatClientWithAgents/src/ViewModels/TripPlanningViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public partial class TripPlanningViewModel(TaggingService taggingService) : Obse
3535
void DecrementDays() => DayCount--;
3636

3737
bool CanIncrementDays() => DayCount < 7;
38-
bool CanDecrementDays() => DayCount > 1;
38+
bool CanDecrementDays() => DayCount > 2;
3939

4040
public async Task InitializeAsync()
4141
{

0 commit comments

Comments
 (0)