~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/hud

A remote MCP server that shows atproto records as interactive UI inside MCP Apps hosts

0
0
109 lines · 3.8 KB Raw History
{
	"$type": "place.hud.view",
	"method": "chat.bsky.convo.listConvos",
	"app": "Bluesky Chat",
	"service": "did:web:api.bsky.chat#bsky_chat",
	"description": "Your Bluesky chats, the latest first; signed in only (params: { readState?: \"unread\", status?: \"accepted\" or \"request\", kind?: \"direct\" or \"group\" })",
	"launch": [{ "title": "Chats" }],
	"signIn": "Sign in to see your chats",
	"origins": ["https://cdn.bsky.app"],
	"thumbnails": [{ "from": "https://cdn.bsky.app/img/avatar/plain/", "to": "https://cdn.bsky.app/img/avatar_thumbnail/plain/" }],
	"query": {
		"items": "convos",
		"cursor": "cursor",
		"summary": { "noun": ["chat", "chats"], "label": { "$": "kind.name" } },
		"layout": {
			"component": "List",
			"props": {
				"items": { "$": "items" },
				"style": "rows",
				"empty": "No chats yet",
				"open": { "query": "chat.bsky.convo.getMessages", "params": { "convoId": { "$": "id" } } }
			},
			"children": [
				{
					"component": "Row",
					"props": { "gap": "md", "align": "start" },
					"children": [
						{
							"component": "List",
							"props": { "items": { "$": "members" }, "others": "did", "limit": 1, "style": "inline", "open": false },
							"children": [{ "component": "Image", "props": { "src": { "$": "avatar" }, "alt": { "$": "handle" }, "size": "avatar" } }]
						},
						{
							"component": "Stack",
							"props": { "gap": "sm" },
							"children": [
								{
									"component": "Row",
									"props": { "gap": "xs", "align": "center", "wrap": "cut" },
									"children": [
										{
											"component": "Stack",
											"props": { "unless": "kind.name" },
											"children": [
												{
													"component": "List",
													"props": { "items": { "$": "members" }, "others": "did", "style": "inline", "open": false },
													"children": [{ "component": "Text", "props": { "value": { "$": ["displayName", "handle"] }, "style": "strong" } }]
												}
											]
										},
										{ "component": "Text", "props": { "value": { "$": "kind.name" }, "style": "strong" } },
										{ "component": "Time", "props": { "value": { "$": "lastMessage.sentAt" } } }
									]
								},
								{
									"component": "Stack",
									"props": { "unless": "kind.name" },
									"children": [
										{
											"component": "List",
											"props": { "items": { "$": "members" }, "others": "did", "limit": 1, "style": "inline", "open": false },
											"children": [{ "component": "Text", "props": { "value": { "$": "handle" }, "style": "muted", "prefix": "@" } }]
										}
									]
								},
								{
									"component": "Stack",
									"props": { "mine": "lastMessage.sender.did" },
									"children": [{ "component": "Text", "props": { "value": { "$": "lastMessage.text" }, "prefix": "You: ", "clamp": 2 } }]
								},
								{
									"component": "Stack",
									"props": { "others": "lastMessage.sender.did" },
									"children": [{ "component": "Text", "props": { "value": { "$": "lastMessage.text" }, "clamp": 2 } }]
								},
								{
									"component": "Stack",
									"props": { "when": "unreadCount" },
									"children": [
										{
											"component": "Row",
											"props": { "gap": "md", "align": "center" },
											"children": [
												{ "component": "Stat", "props": { "value": { "$": "unreadCount" }, "icon": "comment", "label": "unread messages" } },
												{
													"component": "Action",
													"props": {
														"label": "Mark read",
														"done": "Read",
														"call": {
															"method": "chat.bsky.convo.updateRead",
															"service": "did:web:api.bsky.chat#bsky_chat",
															"input": { "convoId": { "$": "id" } }
														}
													}
												}
											]
										}
									]
								}
							]
						}
					]
				}
			]
		}
	}
}