mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-27 12:04:49 +02:00
[eric] apps: the full tool-ui widget set is vendored into every app workspace behind an @toolui alias, deps exact-pinned to the host's locked versions
This commit is contained in:
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
# Vendors the tool-ui component system into the app template (ENG-203).
|
||||
# frontend/src/toolui is the single source of truth; the copy under
|
||||
# webapp_template is GENERATED — never hand-edit it, rerun this instead.
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
SRC="$ROOT/frontend/src/toolui"
|
||||
DST="$ROOT/backend/apps/outputs/webapp_template/frontend/src/toolui"
|
||||
|
||||
rm -rf "$DST"
|
||||
mkdir -p "$DST"
|
||||
# node_modules never exists inside src/toolui, so a straight copy is fine.
|
||||
cp -R "$SRC/" "$DST/"
|
||||
|
||||
cat > "$DST/GENERATED.md" <<'EOF'
|
||||
This directory is a GENERATED copy of OpenSwarm's `frontend/src/toolui`
|
||||
(vendored per app template so generated apps can use the tool-ui components).
|
||||
Do not hand-edit; run `scripts/sync-toolui-template.sh` from the OpenSwarm
|
||||
repo root to refresh it.
|
||||
EOF
|
||||
|
||||
echo "Synced $(find "$DST" -type f | wc -l | tr -d ' ') files into the template."
|
||||
Reference in New Issue
Block a user