{
+ updateInstance({
+ instanceId: playgroundInstanceId,
+ patch: {
+ template: {
+ __type: "chat",
+ messages: template.messages.map((msg) =>
+ msg.id === message.id ? { ...msg, role } : msg
+ ),
+ },
+ },
+ });
+ }}
+ />
+ }
+ extra={
+
+ {message.content != null && (
+
+ )}
+ } />}
+ variant="default"
+ size="compact"
+ onClick={() => {
+ updateInstance({
+ instanceId: playgroundInstanceId,
+ patch: {
+ template: {
+ __type: "chat",
+ messages: template.messages.filter(
+ (msg) => msg.id !== message.id
+ ),
+ },
+ },
+ });
+ }}
+ />
+
+
+ }
+ >
+
+ {
+ updateInstance({
+ instanceId: playgroundInstanceId,
+ patch: {
+ template: {
+ __type: "chat",
+ messages: template.messages.map((msg) =>
+ msg.id === message.id ? { ...msg, content: val } : msg
+ ),
+ },
+ },
+ });
+ }}
+ />
+
+
+