Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions examples/travel_app/lib/src/widgets/conversation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Conversation extends StatelessWidget {
case UserMessage():
return userPromptBuilder != null
? userPromptBuilder!(context, message)
: ChatMessageWidget(
: ChatMessageView(
text: message.parts
.whereType<TextPart>()
.map((part) => part.text)
Expand All @@ -63,7 +63,7 @@ class Conversation extends StatelessWidget {
if (text.trim().isEmpty) {
return const SizedBox.shrink();
}
return ChatMessageWidget(
return ChatMessageView(
text: text,
icon: Icons.smart_toy_outlined,
alignment: MainAxisAlignment.start,
Expand All @@ -78,13 +78,13 @@ class Conversation extends StatelessWidget {
),
);
case InternalMessage():
return InternalMessageWidget(content: message.text);
return InternalMessageView(content: message.text);
case UserUiInteractionMessage():
return userUiInteractionBuilder != null
? userUiInteractionBuilder!(context, message)
: const SizedBox.shrink();
case ToolResponseMessage():
return InternalMessageWidget(content: message.results.toString());
return InternalMessageView(content: message.results.toString());
}
},
);
Expand Down
3 changes: 2 additions & 1 deletion packages/genui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# `genui` Changelog

## 0.6.2 (in progress)
## 0.7.0 (in progress)

- **Fix**: Improved error handling for catalog example loading to include context about the invalid item (#653).
- **BREAKING**: Renamed `ChatMessageWidget` to `ChatMessageView` and `InternalMessageWidget` to `InternalMessageView` (#661).

## 0.6.1

Expand Down
2 changes: 1 addition & 1 deletion packages/genui/lib/genui.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export 'src/core/genui_surface.dart';
export 'src/core/prompt_fragments.dart';
export 'src/core/ui_tools.dart';
export 'src/core/widget_utilities.dart';
export 'src/core/widgets/chat_primitives.dart';
export 'src/development_utilities/catalog_view.dart';
export 'src/facade/direct_call_integration/model.dart';
export 'src/facade/direct_call_integration/utils.dart';
export 'src/facade/gen_ui_conversation.dart';
export 'src/facade/widgets/chat_primitives.dart';
Comment on lines 19 to +23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While the code changes are correct, the pull request description is empty. The repository's style guide requires that pull request descriptions include the Pre-Review Checklist from the template. Please update the PR description to adhere to the contribution guidelines.

References
  1. PR descriptions should include the Pre-Review Checklist from the PR template, with all of the steps completed. (link)

export 'src/model/a2ui_client_capabilities.dart';
export 'src/model/a2ui_message.dart';
export 'src/model/a2ui_schemas.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import 'package:flutter/material.dart';

/// A widget to display an internal message in the chat.
class InternalMessageWidget extends StatelessWidget {
/// Creates a new [InternalMessageWidget].
const InternalMessageWidget({super.key, required this.content});
class InternalMessageView extends StatelessWidget {
/// Creates a new [InternalMessageView].
const InternalMessageView({super.key, required this.content});

/// The content of the message.
final String content;
Expand All @@ -27,9 +27,9 @@ class InternalMessageWidget extends StatelessWidget {
}

/// A widget to display a chat message.
class ChatMessageWidget extends StatelessWidget {
/// Creates a new [ChatMessageWidget].
const ChatMessageWidget({
class ChatMessageView extends StatelessWidget {
/// Creates a new [ChatMessageView].
const ChatMessageView({
super.key,
required this.text,
required this.icon,
Expand Down
Loading