mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-08-26 17:31:34 +00:00
chore: remove legacy TUI configurator; surface last config gap in GUI (#45)
Audit confirmed the Rich TUI (`meshai --config`) is a strict subset of the dashboard GUI (covers FEWER sections) and nothing depends on it for bootstrap. Strip it so the dashboard is the single config surface. - delete meshai/cli/configurator.py (~1435 lines); cli/__init__ minimal - main.py: drop --config + run_configurator dispatch (keep --config-file); bootstrap log now points to config.example.yaml / the dashboard - docker-entrypoint.sh: remove the ttyd `meshai --config` block on :7682 (default-config heredoc + bot exec loop untouched) - docker-compose.yml + Dockerfile: drop the 7682 port + ttyd install (EXPOSE 8080) - README / config.py header / config.example.yaml: de-reference the TUI - drop `rich` from pyproject + requirements (grep-verified unused) Close the only GUI config gap the audit found: - Config.tsx weather tab: add openmeteo.url + wttr.url inputs (backend already round-trips the nested WeatherConfig dataclasses) Bootstrap intact: config.example.yaml copy, entrypoint default-config write, and defaulted Config() when no file exists all remain. `python3 -m meshai` and `--config-file` unchanged. TS/import validated at Docker build. Co-authored-by: Matt Johnson <mj@k7zvx.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7ec0883b44
commit
5de683f7a7
12 changed files with 30 additions and 1483 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
# MeshAI Docker Entrypoint
|
||||
# Runs ttyd for web config access and the bot
|
||||
# Writes a default config on first run, then runs the bot
|
||||
|
||||
export MESHAI_CONFIG="/data/config.yaml"
|
||||
export TERM="${TERM:-xterm-256color}"
|
||||
|
|
@ -10,7 +10,7 @@ if [ ! -f "$MESHAI_CONFIG" ]; then
|
|||
mkdir -p /data
|
||||
cat > "$MESHAI_CONFIG" << 'EOF'
|
||||
# MeshAI Configuration
|
||||
# Configure via http://localhost:7682
|
||||
# Edit this file directly, or configure via the dashboard
|
||||
|
||||
bot:
|
||||
name: ai
|
||||
|
|
@ -66,22 +66,10 @@ meshmonitor:
|
|||
enabled: false
|
||||
inject_into_prompt: true
|
||||
EOF
|
||||
echo "Default config created. Configure via http://localhost:7682"
|
||||
echo "Default config created at $MESHAI_CONFIG. Edit it or configure via the dashboard."
|
||||
fi
|
||||
|
||||
|
||||
# Start ttyd for web-based config access
|
||||
echo "Starting web config interface on port 7682..."
|
||||
ttyd -W -p 7682 \
|
||||
-t enableClipboard=true \
|
||||
-t titleFixed="MeshAI Config" \
|
||||
-t 'theme={"background":"#0d1117","foreground":"#c9d1d9","cursor":"#58a6ff","selectionBackground":"#388bfd"}' \
|
||||
-t fontSize=14 \
|
||||
/bin/bash -c 'while true; do python3 -m meshai --config-file "$MESHAI_CONFIG" --config; sleep 1; done' &
|
||||
|
||||
# Keep ttyd running even if bot fails
|
||||
trap "kill %1 2>/dev/null" EXIT
|
||||
|
||||
# Kill bot gracefully with SIGKILL fallback
|
||||
kill_bot() {
|
||||
local pid=$1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue