{
    "tailapp": 2,
    "manifest": {
        "format": 2,
        "app_id": "claude-chat",
        "name": "Claude Chat",
        "version": 1,
        "schema": "tailapps/v0",
        "exported_at": 1795564579,
        "from": "gallery",
        "connections": [
            "anthropic"
        ],
        "files": {
            "app.json": "410831a677261882c1b8f6a7c3353155c651580208e4687cca066525030590e3"
        },
        "signature": "074mnqJhH/s4UGMoeHLkrwnWiqf8jSnoQTJYwrejWuEesl/KBhWpzJ+iOZn0VW6Q5XX9lSO1G0shTx9GC/9SDg==",
        "key_id": "gallery-1"
    },
    "app": {
        "schema": "tailapps/v0",
        "app": "claude-chat",
        "name": "Claude Chat",
        "description": "Chat with Claude using your own Anthropic API key; messages go to api.anthropic.com. Mac only until Connections (keys) come to the iPhone; the conversation stays on this device.",
        "icon": "bubble.left.and.bubble.right",
        "version": 1,
        "permissions": [
            "net:api.anthropic.com",
            "open:url"
        ],
        "state": {
            "history": {
                "type": "list",
                "default": [],
                "sync": false
            },
            "draft": {
                "type": "text",
                "default": "",
                "sync": false
            }
        },
        "settings": {
            "model": {
                "type": "text",
                "label": "Model",
                "default": "claude-sonnet-5-5"
            }
        },
        "actions": {
            "send": {
                "steps": [
                    {
                        "if": "$draft",
                        "then": [
                            {
                                "push": {
                                    "history": {
                                        "role": "user",
                                        "content": "$draft"
                                    }
                                },
                                "at": "end",
                                "max": 100
                            },
                            {
                                "set": {
                                    "draft": ""
                                }
                            },
                            {
                                "fetch": "https://api.anthropic.com/v1/messages",
                                "method": "POST",
                                "auth": "anthropic",
                                "headers": {
                                    "anthropic-version": "2023-06-01"
                                },
                                "body": {
                                    "model": "$settings.model",
                                    "max_tokens": 1024,
                                    "messages": "$history"
                                },
                                "select": "content.0.text",
                                "timeout": 120,
                                "as": "reply"
                            },
                            {
                                "push": {
                                    "history": {
                                        "role": "assistant",
                                        "content": "$reply"
                                    }
                                },
                                "at": "end",
                                "max": 100
                            }
                        ]
                    }
                ]
            },
            "clear": {
                "confirm": "Clear this conversation?",
                "steps": [
                    {
                        "set": {
                            "history": []
                        }
                    }
                ]
            }
        },
        "cards": [
            {
                "id": "main",
                "layout": {
                    "column": [
                        {
                            "list": "$history",
                            "scroll": "end",
                            "height": "fill",
                            "empty": "Ask Claude anything.",
                            "item": {
                                "message": "$item.content",
                                "from": "$item.role | map:{user:'me', else:'them'}",
                                "name": "Claude",
                                "avatar": null
                            }
                        },
                        {
                            "badge": "Claude is thinking",
                            "busy": true,
                            "tone": "accent",
                            "when": "$running.send"
                        },
                        {
                            "field": "Message",
                            "bind": "$draft",
                            "placeholder": "Ask something, then press Return",
                            "on_submit": "send"
                        },
                        {
                            "row": [
                                {
                                    "button": "Clear",
                                    "on": "clear",
                                    "style": "plain",
                                    "disabled": "$running.send"
                                },
                                {
                                    "spacer": true
                                },
                                {
                                    "button": "Send",
                                    "on": "send",
                                    "style": "primary",
                                    "disabled": "$running.send"
                                }
                            ],
                            "align": "center"
                        }
                    ],
                    "gap": "s"
                }
            }
        ],
        "views": {
            "menubar": {
                "icon": "bubble.left.and.bubble.right",
                "in_menu": "row",
                "label": "{$history | count} messages",
                "card": "main"
            },
            "floating": {
                "card": "main",
                "width": "default"
            }
        }
    },
    "app_json": "{\n  \"schema\": \"tailapps/v0\",\n  \"app\": \"claude-chat\",\n  \"name\": \"Claude Chat\",\n  \"description\": \"Chat with Claude using your own Anthropic API key; messages go to api.anthropic.com. Mac only until Connections (keys) come to the iPhone; the conversation stays on this device.\",\n  \"icon\": \"bubble.left.and.bubble.right\",\n  \"version\": 1,\n  \"permissions\": [\"net:api.anthropic.com\", \"open:url\"],\n  \"state\": {\n    \"history\": { \"type\": \"list\", \"default\": [], \"sync\": false },\n    \"draft\": { \"type\": \"text\", \"default\": \"\", \"sync\": false }\n  },\n  \"settings\": {\n    \"model\": { \"type\": \"text\", \"label\": \"Model\", \"default\": \"claude-sonnet-5-5\" }\n  },\n  \"actions\": {\n    \"send\": {\n      \"steps\": [\n        { \"if\": \"$draft\", \"then\": [\n          { \"push\": { \"history\": { \"role\": \"user\", \"content\": \"$draft\" } }, \"at\": \"end\", \"max\": 100 },\n          { \"set\": { \"draft\": \"\" } },\n          { \"fetch\": \"https://api.anthropic.com/v1/messages\", \"method\": \"POST\", \"auth\": \"anthropic\",\n            \"headers\": { \"anthropic-version\": \"2023-06-01\" },\n            \"body\": { \"model\": \"$settings.model\", \"max_tokens\": 1024, \"messages\": \"$history\" },\n            \"select\": \"content.0.text\", \"timeout\": 120, \"as\": \"reply\" },\n          { \"push\": { \"history\": { \"role\": \"assistant\", \"content\": \"$reply\" } }, \"at\": \"end\", \"max\": 100 }\n        ] }\n      ]\n    },\n    \"clear\": {\n      \"confirm\": \"Clear this conversation?\",\n      \"steps\": [{ \"set\": { \"history\": [] } }]\n    }\n  },\n  \"cards\": [{\n    \"id\": \"main\",\n    \"layout\": {\n      \"column\": [\n        { \"list\": \"$history\", \"scroll\": \"end\", \"height\": \"fill\", \"empty\": \"Ask Claude anything.\",\n          \"item\": { \"message\": \"$item.content\", \"from\": \"$item.role | map:{user:'me', else:'them'}\", \"name\": \"Claude\", \"avatar\": null } },\n        { \"badge\": \"Claude is thinking\", \"busy\": true, \"tone\": \"accent\", \"when\": \"$running.send\" },\n        { \"field\": \"Message\", \"bind\": \"$draft\", \"placeholder\": \"Ask something, then press Return\", \"on_submit\": \"send\" },\n        { \"row\": [\n          { \"button\": \"Clear\", \"on\": \"clear\", \"style\": \"plain\", \"disabled\": \"$running.send\" },\n          { \"spacer\": true },\n          { \"button\": \"Send\", \"on\": \"send\", \"style\": \"primary\", \"disabled\": \"$running.send\" }\n        ], \"align\": \"center\" }\n      ],\n      \"gap\": \"s\"\n    }\n  }],\n  \"views\": {\n    \"menubar\": { \"icon\": \"bubble.left.and.bubble.right\", \"in_menu\": \"row\", \"label\": \"{$history | count} messages\", \"card\": \"main\" },\n    \"floating\": { \"card\": \"main\", \"width\": \"default\" }\n  }\n}\n",
    "files": []
}