Skip to content

Commit 2315e52

Browse files
committed
Reorganize and expand hallucinations documentation
Moved sections to group related entries, merged duplicate Event<T,E>.Data entry with new .Args variant, added new Secret IsRequired/IsOptional and Skeleton.List entries with additional Found In references.
1 parent e8d803c commit 2315e52

File tree

1 file changed

+120
-113
lines changed

1 file changed

+120
-113
lines changed

src/Ivy.Docs.Shared/Docs/05_Other/Hallucinations.md

Lines changed: 120 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,38 @@ The `Button` onClick parameter is `Func<Event<Button>, ValueTask>?`. The callbac
9595
bedc0ee6-b915-45b0-ab3a-433e2ac5ff4a
9696
80f19121-bcf0-4899-abe2-9f1c439f4101
9797

98+
## Details() — empty constructor instead of passing items
99+
100+
**Hallucinated API:**
101+
102+
```csharp
103+
new Details()
104+
| new Detail("Country Code", result.CountryCode, false)
105+
| new Detail("VAT Number", result.VatNumber, false)
106+
```
107+
108+
**Error:** `CS7036: There is no argument given that corresponds to the required parameter 'items' of 'Details.Details(IEnumerable<Detail>)'`
109+
110+
**Correct API:**
111+
112+
```csharp
113+
new Details(new[] {
114+
new Detail("Country Code", result.CountryCode, false),
115+
new Detail("VAT Number", result.VatNumber, false)
116+
})
117+
// or use the builder pattern:
118+
result.ToDetails()
119+
```
120+
121+
`Details` requires an `IEnumerable<Detail>` in its constructor. There is no parameterless public constructor, and the pipe operator `|` does not work on `Details` to add children. Use the collection constructor or the `.ToDetails()` builder pattern on a model.
122+
123+
**Found In:**
124+
857de09c-ab87-49a5-aac4-394f7d0aa207
125+
b6beb60d-478d-409e-b10d-7913ae911e85
126+
fd5baba6-72aa-4d28-ac10-72e1be86e494
127+
9e1cba6f-bd19-472e-83a3-8db63b4860f6
128+
e8232f03-12c3-4c9c-bf1b-42bed9f6d44c
129+
98130
## Callout constructor — wrong constructor + invented enum / wrong argument order
99131

100132
**Hallucinated API:**
@@ -217,37 +249,6 @@ f20dced8-1689-4289-a2d8-ee67136eb6ce
217249
5ba11e91-7b05-49e1-8a0f-5ea01235b192
218250
f07bc643-b0d7-4a23-a4c8-f4e488285e98
219251

220-
## Details() — empty constructor instead of passing items
221-
222-
**Hallucinated API:**
223-
224-
```csharp
225-
new Details()
226-
| new Detail("Country Code", result.CountryCode, false)
227-
| new Detail("VAT Number", result.VatNumber, false)
228-
```
229-
230-
**Error:** `CS7036: There is no argument given that corresponds to the required parameter 'items' of 'Details.Details(IEnumerable<Detail>)'`
231-
232-
**Correct API:**
233-
234-
```csharp
235-
new Details(new[] {
236-
new Detail("Country Code", result.CountryCode, false),
237-
new Detail("VAT Number", result.VatNumber, false)
238-
})
239-
// or use the builder pattern:
240-
result.ToDetails()
241-
```
242-
243-
`Details` requires an `IEnumerable<Detail>` in its constructor. There is no parameterless public constructor, and the pipe operator `|` does not work on `Details` to add children. Use the collection constructor or the `.ToDetails()` builder pattern on a model.
244-
245-
**Found In:**
246-
857de09c-ab87-49a5-aac4-394f7d0aa207
247-
b6beb60d-478d-409e-b10d-7913ae911e85
248-
fd5baba6-72aa-4d28-ac10-72e1be86e494
249-
9e1cba6f-bd19-472e-83a3-8db63b4860f6
250-
251252
## ChatMessage — ambiguous reference between Microsoft.Extensions.AI and Ivy
252253

253254
**Hallucinated API:**
@@ -499,6 +500,37 @@ Source: `D:\Repos\_Ivy\Ivy-Framework\src\Ivy\Hooks\UseQuery.cs`
499500
ab7c7708-b26c-49fa-83a4-176df47c5866
500501
fd4594df-0402-4f11-ad46-22165d480649
501502

503+
## Secret(IsRequired/IsOptional) — non-existent named parameters
504+
505+
**Hallucinated API:**
506+
507+
```csharp
508+
// Variant 1: IsRequired (inverted logic)
509+
new Secret("ApiKey", IsRequired: true)
510+
new Secret("Model", IsRequired: false)
511+
512+
// Variant 2: IsOptional (prefixed version of Optional)
513+
new Secret("Model", IsOptional: true)
514+
```
515+
516+
**Error:** `CS1739: The best overload for 'Secret' does not have a parameter named 'IsRequired'` or `'IsOptional'`
517+
518+
**Correct API:**
519+
520+
```csharp
521+
// Secret is a record: Secret(string Key, string? Preset = null, bool Optional = false)
522+
new Secret("ApiKey") // required by default (Optional = false)
523+
new Secret("Model", Optional: true) // optional secret
524+
new Secret("Endpoint", Preset: "https://api.openai.com/v1", Optional: true)
525+
```
526+
527+
The `Secret` record has no `IsRequired` or `IsOptional` parameter. By default, secrets are required (`Optional = false`). To make a secret optional, use `Optional: true`. The agent invents prefixed variants (`IsRequired`, `IsOptional`) instead of using the actual `Optional` parameter.
528+
529+
**Found In:**
530+
07a0cf7f-d297-4dd2-8fc4-883bb52aa305
531+
ac1aa99e-739d-4382-86df-7a92b0a25cc7
532+
bcae7857-4504-4b58-94a7-d733142440f7
533+
502534
## Button.WithIcon() — non-existent fluent method
503535

504536
**Hallucinated API:**
@@ -837,36 +869,6 @@ new Box(content).Background(Colors.Green)
837869
5c9cfb70-c9f5-4642-8de6-480be8f5ee85
838870
332383ac-d463-4640-abe6-ee0208735329
839871

840-
## Secret(IsRequired/IsOptional) — non-existent named parameters
841-
842-
**Hallucinated API:**
843-
844-
```csharp
845-
// Variant 1: IsRequired (inverted logic)
846-
new Secret("ApiKey", IsRequired: true)
847-
new Secret("Model", IsRequired: false)
848-
849-
// Variant 2: IsOptional (prefixed version of Optional)
850-
new Secret("Model", IsOptional: true)
851-
```
852-
853-
**Error:** `CS1739: The best overload for 'Secret' does not have a parameter named 'IsRequired'` or `'IsOptional'`
854-
855-
**Correct API:**
856-
857-
```csharp
858-
// Secret is a record: Secret(string Key, string? Preset = null, bool Optional = false)
859-
new Secret("ApiKey") // required by default (Optional = false)
860-
new Secret("Model", Optional: true) // optional secret
861-
new Secret("Endpoint", Preset: "https://api.openai.com/v1", Optional: true)
862-
```
863-
864-
The `Secret` record has no `IsRequired` or `IsOptional` parameter. By default, secrets are required (`Optional = false`). To make a secret optional, use `Optional: true`. The agent invents prefixed variants (`IsRequired`, `IsOptional`) instead of using the actual `Optional` parameter.
865-
866-
**Found In:**
867-
07a0cf7f-d297-4dd2-8fc4-883bb52aa305
868-
ac1aa99e-739d-4382-86df-7a92b0a25cc7
869-
870872
## using Ivy.Apps / using Ivy.Shared / using Ivy.Views.Charts — non-existent namespaces
871873

872874
**Hallucinated API:**
@@ -962,6 +964,63 @@ The agent assumed `.Icon()` was a chainable method on `TextBuilder`, but `Icon()
962964
c1f8feae-b342-4bf1-a18c-9b88ee8d6d17
963965
fd4594df-0402-4f11-ad46-22165d480649
964966

967+
## Event<T,E>.Data / Event<T,E>.Args — non-existent properties
968+
969+
**Hallucinated API:**
970+
971+
```csharp
972+
args.Data.Id
973+
args.Data.Tag
974+
// Also seen as:
975+
args.Args.Id
976+
args.Args.Tag
977+
```
978+
979+
**Error:** `'Event<DataTable, RowActionClickEventArgs>' does not contain a definition for 'Data'` / `'Args'`
980+
981+
**Correct API:**
982+
983+
```csharp
984+
args.Value.Id
985+
args.Value.Tag
986+
```
987+
988+
`Event<TSender, TValue>` uses `.Value` to access the event args, not `.Data` or `.Args`. The agent likely confused this with other event patterns from different frameworks (e.g., WPF `DataContext`, JavaScript `event.data`, or `EventArgs` naming conventions).
989+
990+
**Found In:**
991+
f20dced8-1689-4289-a2d8-ee67136eb6ce
992+
e8232f03-12c3-4c9c-bf1b-42bed9f6d44c
993+
994+
## Skeleton.List() — non-existent static method
995+
996+
**Hallucinated API:**
997+
998+
```csharp
999+
Skeleton.List(1)
1000+
```
1001+
1002+
**Error:** `No overload for method 'List' takes 1 arguments` (or similar — `List` does not exist on `Skeleton`)
1003+
1004+
**Correct API:**
1005+
1006+
```csharp
1007+
// Available Skeleton static factory methods:
1008+
Skeleton.Card()
1009+
Skeleton.Text(lines: 3)
1010+
Skeleton.DataTable(rows: 5)
1011+
Skeleton.Feed(items: 3)
1012+
Skeleton.Form()
1013+
1014+
// Or use a plain Skeleton instance:
1015+
new Skeleton()
1016+
```
1017+
1018+
`Skeleton` has no `List()` method. For a list-like loading placeholder, use `Skeleton.Feed(items)` which renders a vertical feed of skeleton items.
1019+
1020+
**Found In:**
1021+
9ed7f8e7-aa7c-4c8b-b6a0-8c5b389f1dc2
1022+
e8232f03-12c3-4c9c-bf1b-42bed9f6d44c
1023+
9651024
## FileInput.MaxFiles(n) on single-file state — runtime error
9661025

9671026
**Hallucinated API:**
@@ -1148,29 +1207,6 @@ The enum is `SelectInputVariant` (singular), not `SelectInputVariants` (plural).
11481207
**Found In:**
11491208
a55e08b9-f212-49ef-97b9-d352b7b4beb8
11501209

1151-
## Event<T,E>.Data — non-existent property
1152-
1153-
**Hallucinated API:**
1154-
1155-
```csharp
1156-
args.Data.Id
1157-
args.Data.Tag
1158-
```
1159-
1160-
**Error:** `'Event<DataTable, RowActionClickEventArgs>' does not contain a definition for 'Data'`
1161-
1162-
**Correct API:**
1163-
1164-
```csharp
1165-
args.Value.Id
1166-
args.Value.Tag
1167-
```
1168-
1169-
`Event<TSender, TValue>` uses `.Value` to access the event args, not `.Data`. The agent likely confused this with other event patterns from different frameworks (e.g., WPF `DataContext`, JavaScript `event.data`).
1170-
1171-
**Found In:**
1172-
f20dced8-1689-4289-a2d8-ee67136eb6ce
1173-
11741210
## UseState\<T?\>(null) — ambiguous overload call
11751211

11761212
**Hallucinated API:**
@@ -2777,35 +2813,6 @@ currencySelect.ToSelectInput(new[] {
27772813
**Found In:**
27782814
84cbe3b9-5764-4352-99d3-dd685c397a68
27792815

2780-
## Skeleton.List() — non-existent static method
2781-
2782-
**Hallucinated API:**
2783-
2784-
```csharp
2785-
Skeleton.List(1)
2786-
```
2787-
2788-
**Error:** `No overload for method 'List' takes 1 arguments` (or similar — `List` does not exist on `Skeleton`)
2789-
2790-
**Correct API:**
2791-
2792-
```csharp
2793-
// Available Skeleton static factory methods:
2794-
Skeleton.Card()
2795-
Skeleton.Text(lines: 3)
2796-
Skeleton.DataTable(rows: 5)
2797-
Skeleton.Feed(items: 3)
2798-
Skeleton.Form()
2799-
2800-
// Or use a plain Skeleton instance:
2801-
new Skeleton()
2802-
```
2803-
2804-
`Skeleton` has no `List()` method. For a list-like loading placeholder, use `Skeleton.Feed(items)` which renders a vertical feed of skeleton items.
2805-
2806-
**Found In:**
2807-
9ed7f8e7-aa7c-4c8b-b6a0-8c5b389f1dc2
2808-
28092816
## QueryOptions.InitialValue — non-existent property
28102817

28112818
**Hallucinated API:**

0 commit comments

Comments
 (0)