fix: prevent null default_port for terminal tools
This commit is contained in:
@@ -185,6 +185,7 @@ services:
|
|||||||
"category": "ai-assistant",
|
"category": "ai-assistant",
|
||||||
"interface_type": "terminal",
|
"interface_type": "terminal",
|
||||||
"requires_port": False,
|
"requires_port": False,
|
||||||
|
"default_port": 0,
|
||||||
"compose_template": """version: "3.8"
|
"compose_template": """version: "3.8"
|
||||||
services:
|
services:
|
||||||
opencode:
|
opencode:
|
||||||
@@ -247,7 +248,8 @@ volumes:
|
|||||||
existing.definition_type = "compose"
|
existing.definition_type = "compose"
|
||||||
existing.compose_template = tool_data["compose_template"]
|
existing.compose_template = tool_data["compose_template"]
|
||||||
existing.required_variables = tool_data["required_variables"]
|
existing.required_variables = tool_data["required_variables"]
|
||||||
existing.default_port = tool_data.get("default_port")
|
if "default_port" in tool_data:
|
||||||
|
existing.default_port = tool_data["default_port"]
|
||||||
logger.info("Updated built-in tool type: %s", tool_data["name"])
|
logger.info("Updated built-in tool type: %s", tool_data["name"])
|
||||||
|
|
||||||
await session.commit()
|
await session.commit()
|
||||||
|
|||||||
Reference in New Issue
Block a user