From dcd74864150106302e44531a5de2fa73078154be Mon Sep 17 00:00:00 2001 From: Nathan Schneider Date: Tue, 20 Oct 2026 21:56:42 -0600 Subject: [PATCH] =?UTF-8?q?patch=5Findex:=20PWA=20identity=20=E2=80=94=20m?= =?UTF-8?q?anifest=20name/short=5Fname=20'Inference=20Co-op'/'Inference',?= =?UTF-8?q?=20description,=20512=20icon=20purpose=20any+maskable=20(fixes?= =?UTF-8?q?=20generic=20Android=20icon=20+=20LibreChat=20label)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- patch_index.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/patch_index.py b/patch_index.py index 675da0c..1ec80bb 100644 --- a/patch_index.py +++ b/patch_index.py @@ -40,4 +40,22 @@ if "x-coop-build" not in html: html = html.replace("", "\n " + marker, 1) open(PATH, "w", encoding="utf-8").write(html) + +# 4. Web manifest identity: co-op name + a 512 icon installable as "any". +# (theme_color/background_color are fixed by the later Dockerfile sed.) +MPATH = "/app/code/librechat/client/dist/manifest.webmanifest" +try: + import json as _json + + mf = _json.load(open(MPATH, encoding="utf-8")) + mf["name"] = "Inference Co\u2011op" + mf["short_name"] = "Inference" + mf["description"] = "Member-governed AI inference — private and renewable model choices." + for icon in mf.get("icons", []): + if icon.get("sizes") == "512x512": + icon["purpose"] = "any maskable" + open(MPATH, "w", encoding="utf-8").write(_json.dumps(mf, indent=2)) + print("manifest: co-op identity set") +except OSError: + raise SystemExit(0) print("index.html: co-op branding + build marker injected")