{
    "version": "1.20.3",
    "description": "Powerful AI desktop client with support for ChatGPT, Claude and other LLMs.",
    "homepage": "https://chatboxai.app/",
    "license": {
        "identifier": "GPL-3.0-or-later",
        "url": "https://github.com/chatboxai/chatbox/blob/main/LICENSE"
    },
    "architecture": {
        "64bit": {
            "url": "https://download.chatboxai.app/releases/Chatbox-1.20.3-Setup.exe#/dl.7z",
            "hash": "874171c6c7358ff3915f01412eb036154a5ded7a76c4663fb0f592d2c5c23b13"
        },
        "arm64": {
            "url": "https://download.chatboxai.app/releases/Chatbox-1.20.3-Setup.exe#/dl.7z",
            "hash": "874171c6c7358ff3915f01412eb036154a5ded7a76c4663fb0f592d2c5c23b13"
        }
    },
    "pre_install": [
        "$arch = $architecture -replace 'bit',''",
        "Expand-7ZipArchive \"$dir\\`$PLUGINSDIR\\app-$arch.7z\" \"$dir\" -Removal",
        "Remove-Item \"$dir\\`$*\" -Force -Recurse"
    ],
    "post_install": [
        "$file = \"$persist_dir\\User Data\\config.json\"",
        "if (!(Test-Path \"$dir\\User Data\\*\") -and (Test-Path \"$env:APPDATA\\xyz.chatboxapp.app\")) {",
        "    info '[Portable Mode]: Copying user data...'",
        "    Copy-Item \"$env:APPDATA\\xyz.chatboxapp.app\\*\" \"$dir\\User Data\" -Recurse",
        "    if ((Test-Path $file)) {",
        "        warn \"Disabling incompatible autoUpdate\"",
        "        (Get-Content $file) -replace '\"autoUpdate\": true', '\"autoUpdate\": false' | Set-Content $file -Encoding ASCII",
        "    }",
        "}",
        "if (!(Test-Path $file)) {",
        "   $json = \"{`n`t'settings': {`n`t`t'autoUpdate': false`n`t}`n}`n\"",
        "   $json.Replace(\"'\", '\"') | Out-File -FilePath $file -Encoding ASCII",
        "   warn \"Do not enable autoUpdate inside Chatbox, use scoop update instead\"",
        "}"
    ],
    "shortcuts": [
        [
            "Chatbox.exe",
            "Chatbox",
            "--user-data-dir=\"$dir\\User Data\""
        ]
    ],
    "persist": "User Data",
    "checkver": {
        "url": "https://chatboxai.app/en/help-center/changelog",
        "regex": "https://download\\.chatboxai\\.app/releases/Chatbox-([0-9.]+)-Setup.exe"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://download.chatboxai.app/releases/Chatbox-$version-Setup.exe#/dl.7z"
            },
            "arm64": {
                "url": "https://download.chatboxai.app/releases/Chatbox-$version-Setup.exe#/dl.7z"
            }
        }
    }
}
