Remix.run Logo
rTX5CMRXIfFG 6 hours ago

Show your code, or show you the door. There are so many native Mac and iOS apps out there right now perfectly capable of rendering Markdown and streaming text. You just gotta wonder what is this guy’s excuse.

replygirl 6 hours ago | parent | next [-]

OP says "you want to select a whole Markdown document built from SwiftUI primitives", but who wants that? what sort of product thinking tells us we want that? that sounds like a document editor, which has been hard to build for decades and sounds out of scope for an llm chat ui. everyone has landed on only supporting selection within each contiguous block, with a copy button for the entire message

jeroenhd 5 hours ago | parent | next [-]

LLMs are often used to generate Markdown because they're quite good at it and unlike HTML it's very forgiving.

Rendering text into things like chat bubbles or even just generic output panes as it comes in is a massive pain. Every new word requires redoing layout, detecting LTR versus RTL flows and overrides, figuring out word breaks and line breaks, possibly combined with resizing the containing UI element (which involves measuring the render space, which is often implemented by rendering to a dummy canvas and finding out the limits).

Document editors have it relatively easy because humans type at a relatively low speed and pasting is a single operation (although pasting large amounts of text does hit the render performance of the UI). They're also often provide relatively limited features on phones.

If you want to render something like ChatGPT with similar features in native UI, youre going to need to find a fully-fledged document component or build one yourself. And, as it turns out, we have document components that work quite well: web engines.

If you embed a webview rendering just HTML and CSS, you get better performance, features, and accessibility than any home-grown renderer will provide. And with every major OS coming with a browser built in, it won't even bloat your app.

longnguyen an hour ago | parent | prev | next [-]

I build an AI chat app for a living (20k+ customers) and I can tell you, everyone has been asking for that.

Klonoar 5 hours ago | parent | prev [-]

sounds out of scope for an llm chat ui

What? No. This is like building a Slack clone without the ability to copy a stream of messages. It is entirely reasonable to want to do this.

StilesCrisis 5 hours ago | parent [-]

Slack also basically fails at this. You end up getting a jumble of timestamps, names and messages.

Klonoar 4 hours ago | parent [-]

Yeah... people expect that when they copy chat messages. It's correct behavior.

StilesCrisis 12 minutes ago | parent [-]

I don't mind the timestamps and names existing, but they're formatted all wrong.

rafaelmn 6 hours ago | parent | prev [-]

Without web view ? Share the code ?

6 hours ago | parent [-]
[deleted]