-
Notifications
You must be signed in to change notification settings - Fork 0
feat: include new image opencode #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
pre_command: /cubbi-init.sh | ||
command: /entrypoint.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: The init commands in cubbi_image.yaml
reference /cubbi-init.sh
and /entrypoint.sh
, but these files don't appear to be created or copied in the Dockerfile. This will cause initialization failures. [possible issue, importance: 9]
pre_command: /cubbi-init.sh | |
command: /entrypoint.sh | |
init: | |
pre_command: /cubbi/cubbi_init.py | |
command: tail -f /dev/null |
def _ensure_user_config_dir(self) -> Path: | ||
"""Ensure config directory exists with correct ownership""" | ||
config_dir = self._get_user_config_path() | ||
|
||
# Create the full directory path | ||
try: | ||
config_dir.mkdir(parents=True, exist_ok=True) | ||
except FileExistsError: | ||
# Directory already exists, which is fine | ||
pass | ||
except OSError as e: | ||
self.status.log( | ||
f"Failed to create config directory {config_dir}: {e}", "ERROR" | ||
) | ||
return config_dir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: The _ensure_user_config_dir
method returns config_dir
even after logging an error, which could lead to subsequent operations on a non-existent directory. Consider raising an exception or implementing proper error handling. [possible issue, importance: 7]
def _ensure_user_config_dir(self) -> Path: | |
"""Ensure config directory exists with correct ownership""" | |
config_dir = self._get_user_config_path() | |
# Create the full directory path | |
try: | |
config_dir.mkdir(parents=True, exist_ok=True) | |
except FileExistsError: | |
# Directory already exists, which is fine | |
pass | |
except OSError as e: | |
self.status.log( | |
f"Failed to create config directory {config_dir}: {e}", "ERROR" | |
) | |
return config_dir | |
def _ensure_user_config_dir(self) -> Path: | |
"""Ensure config directory exists with correct ownership""" | |
config_dir = self._get_user_config_path() | |
# Create the full directory path | |
try: | |
config_dir.mkdir(parents=True, exist_ok=True) | |
except FileExistsError: | |
# Directory already exists, which is fine | |
pass | |
except OSError as e: | |
self.status.log( | |
f"Failed to create config directory {config_dir}: {e}", "ERROR" | |
) | |
raise RuntimeError(f"Failed to create config directory: {e}") | |
# Set ownership for the directories | |
config_parent = config_dir.parent | |
if config_parent.exists(): | |
self._set_ownership(config_parent) | |
if config_dir.exists(): | |
self._set_ownership(config_dir) | |
return config_dir |
User description
Summary
This PR add a new image for supporting opencode
PR Type
Enhancement
Description
Add Opencode AI integration for Cubbi
Configure API keys and model settings
Support MCP server integration
Provide containerized environment with Node.js
Changes walkthrough 📝
opencode_plugin.py
Implement Opencode plugin for configuration management
cubbi/images/opencode/opencode_plugin.py
Google, OpenAI, OpenRouter)
permissions
Dockerfile
Create Docker image for Opencode environment
cubbi/images/opencode/Dockerfile
README.md
Document Opencode image usage and configuration
cubbi/images/opencode/README.md
cubbi_image.yaml
Define Opencode image configuration
cubbi/images/opencode/cubbi_image.yaml