Update docs

This commit is contained in:
Tat Dat Duong
2025-03-11 16:18:58 +01:00
parent 5d76b1d624
commit c55f1f12bf
@@ -132,6 +132,8 @@ export default function Page() {
}
```
Behind the scenes, `LoadExternalComponent` will fetch the JS and CSS for the UI components from LangGraph Platform and render them in a shadow DOM, thus ensuring style isolation from the rest of your application.
## Configuration options
### Show loading UI when components are loading
@@ -230,6 +232,21 @@ const { thread, submit } = useStream({
});
```
### Remove UI messages from state
Similar to how messages can be removed from the state by appending a RemoveMessage you can remove an UI message from the state by calling `ui.delete` with the ID of the UI message.
```typescript
// pushed message
const message = ui.push({ name: "weather", props: { city: "London" } });
// remove said message
ui.delete(message.id);
// return new state to persist changes
return { ui: ui.items };
```
## Learn more
- [JS/TS SDK Reference](../reference/sdk/js_ts_sdk_ref.md)