Skip to content

Conversation

adar2378
Copy link
Contributor

@adar2378 adar2378 commented Aug 8, 2025

Why:

  • Standardize Markdown customization via shared typedef
  • Allow consumers to fully override Markdown rendering consistently

Affects:

  • packages/flutter_chat_core
  • packages/flyer_chat_text_message
  • packages/flyer_chat_text_stream_message

BREAKING CHANGE: none

…troduce GptMarkdownBuilder and wire into message widgets

- core (flutter_chat_core):
  - add typedef `GptMarkdownBuilder` in [src/utils/typedefs.dart](cci:7://file:///Users/saifulislam/Development/fleek/flutter_chat_ui/packages/flutter_chat_ui/lib/src/utils/typedefs.dart:0:0-0:0)

- flyer_chat_text_message:
  - add optional `gptMarkdownBuilder` field/param
  - use builder to render Markdown when provided; fallback to `GptMarkdownTheme` + [GptMarkdown](cci:1://file:///Users/saifulislam/Development/fleek/flutter_chat_ui/packages/flyer_chat_text_stream_message/lib/src/flyer_chat_text_stream_message.dart:19:6-23:7)

- flyer_chat_text_stream_message:
  - add optional `gptMarkdownBuilder` field/param
  - use builder in completed state and in `instantMarkdown` mode; fallback to [GptMarkdown](cci:1://file:///Users/saifulislam/Development/fleek/flutter_chat_ui/packages/flyer_chat_text_stream_message/lib/src/flyer_chat_text_stream_message.dart:19:6-23:7)

Why:
- Standardize Markdown customization via shared typedef
- Allow consumers to fully override Markdown rendering consistently

Affects:
- packages/flutter_chat_core
- packages/flyer_chat_text_message
- packages/flyer_chat_text_stream_message

BREAKING CHANGE: none
@adar2378
Copy link
Contributor Author

adar2378 commented Aug 8, 2025

I have not run melos version, it has to be run before publishing the packages I think

@demchenkoalex
Copy link
Member

demchenkoalex commented Aug 24, 2025

hmm I am not sure I should merge this - how is it better from just copying message code you're interested in, and changing markdown rendering to what works for you? then using builders class to render your message instead of provided one? this was the idea behind flyer_chat_xxx_message that it is an opinionated message class, fully optional to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants