ModelRelay Integration & Desktop Logic Refactor#5
Merged
Merged
Conversation
added 4 commits
April 18, 2026 10:26
…njection using a shared sync utility
…volume enhancements
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors WebTop startup shell logic to reuse a shared desktop-file syncing utility and adds first-class ModelRelay support (install, autostart shortcut, and PicoClaw config injection) to make ModelRelay available by default inside the container.
Changes:
- Introduces
docker/common.shwith a reusablesync_desktop_filehelper and updates PicoClaw startup to use it. - Adds ModelRelay installation + desktop/autostart integration and attempts to auto-inject a
modelrelayentry into PicoClaw’s config on boot. - Updates Docker image build to include Node.js + ModelRelay and extends README documentation for the new workflow.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
docker/start-picoclaw.sh |
Sources shared helper and uses it to install PicoClaw desktop/autostart entries. |
docker/start-modelrelay.sh |
New init script: syncs ModelRelay desktop entries, prepares npm perms, and injects modelrelay into PicoClaw config. |
docker/common.sh |
New shared sync_desktop_file function (mkdir/chown + content-change replacement). |
docker/ModelRelay.desktop |
New launcher entry to run ModelRelay in a terminal. |
docker/Dockerfile |
Adds Node stage, installs ModelRelay globally, and copies init/desktop assets into /custom-cont-init.d. |
README.md |
Documents ModelRelay integration and updates feature list / quick-start notes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+33
to
+36
| ( | ||
| sleep 15 | ||
| add_model_if_missing "/config/.picoclaw/config.json" | ||
| chown abc:abc "/config/.picoclaw/config.json" |
| sync_desktop_file "$SRC" "/config/Desktop/ModelRelay.desktop" | ||
|
|
||
| # Add modelrelay model to picoclaw's config | ||
| # /config/picoclaw/config.json |
| - **Unified Interface**: Interact with Google Gemini, Anthropic Claude, or any other provider using the standard OpenAI client format. | ||
| - **Smart Routing**: Pre-configured to use `openai/auto-fastest`, automatically selecting the most responsive model for your task. | ||
| - **Zero-Touch Config**: On first boot, WebTop automatically injects ModelRelay into PicoClaw's model list. You just select the `modelrelay` model in the WebUI and start chatting. | ||
| - **Developer Friendly**: Test different LLM backends without changing picoClaw's model config. |
| mkdir -p /config/Desktop | ||
| chown abc:abc /config/.config/autostart | ||
| chown abc:abc /config/Desktop | ||
| source /custom-cont-init.d/common.sh |
| @@ -0,0 +1,37 @@ | |||
| #!/bin/bash | |||
| source /custom-cont-init.d/common.sh | |||
let see if the image blowup Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…cript source commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request: ModelRelay Integration & Desktop Logic Refactor
🦞 Overview
This PR improves the maintainability of the WebTop environment by refactoring shared shell logic and fully integrating ModelRelay as a pre-configured, intelligent API proxy. It automates the configuration of ModelRelay within PicoClaw and generalizes desktop shortcut management.
🚀 Key Changes
1. 🛠️ Infrastructure & Shared Logic
docker/common.sh(New): Centralized thesync_desktop_filelogic into a reusable shell script. This provides a robust way for all startup scripts to deploy desktop icons and autostart entries with:abc:abcownership.start-picoclaw.shandstart-modelrelay.shto source the shared utility, significantly cleaning up the codebase.2. 🔄 ModelRelay Deep Integration
start-modelrelay.shthat detects and injects themodelrelayAPI endpoint (http://localhost:7352/v1) into PicoClaw'sconfig.jsonon first boot.ModelRelay.desktop, enabling a one-click terminal launcher for the relay service.modelrelaypackage runs without permission issues.3. 📝 Documentation & UX
auto-fastest), and zero-config deployment.📂 Files Modified
docker/common.shdocker/ModelRelay.desktopdocker/start-modelrelay.shdocker/start-picoclaw.shdocker/DockerfileREADME.md✅ Verification
sync_desktop_filecorrectly handles creation/sync of files in/config.