Add LLM digest setup and share timestamp context
This commit is contained in:
@@ -10,10 +10,14 @@ void main() {
|
||||
"suggestions": [
|
||||
{
|
||||
"personToken": "person_001",
|
||||
"kind": "giftIdea",
|
||||
"kind": "eventIdea",
|
||||
"title": "Coffee tasting set",
|
||||
"details": "Pick a small local sampler.",
|
||||
"suggestedTiming": "2026-05-20T18:00:00Z",
|
||||
"eventEndsAt": "2026-05-20T20:00:00Z",
|
||||
"eventLocation": "Local roaster hall",
|
||||
"eventUrl": "https://example.com/events/coffee",
|
||||
"sourceUrls": ["https://example.com/events/coffee"],
|
||||
"confidence": 0.82,
|
||||
"reason": "Matches known interests."
|
||||
}
|
||||
@@ -28,8 +32,13 @@ void main() {
|
||||
expect(result.success, isTrue);
|
||||
expect(result.drafts, hasLength(1));
|
||||
expect(result.drafts.single.personId, 'p-1');
|
||||
expect(result.drafts.single.kind, AiSuggestionKind.giftIdea);
|
||||
expect(result.drafts.single.kind, AiSuggestionKind.eventIdea);
|
||||
expect(result.drafts.single.status, AiSuggestionStatus.pending);
|
||||
expect(result.drafts.single.eventLocation, 'Local roaster hall');
|
||||
expect(result.drafts.single.eventUrl, 'https://example.com/events/coffee');
|
||||
expect(result.drafts.single.sourceUrls, <String>[
|
||||
'https://example.com/events/coffee',
|
||||
]);
|
||||
});
|
||||
|
||||
test('rejects unknown person tokens and malformed items', () {
|
||||
|
||||
Reference in New Issue
Block a user