[Feature] Allow choosing the CUA image flavour (container or VM) in the CUA Image setting

Đang mở
#10,844 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
1/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
docker, python
Lĩnh vực
backend

Hướng nghiên cứu

Pull request #10835 is already open for this feature. Review its changes to see how it parses the CUA Image setting, selects the requested flavour, and handles unsupported flavours; check that registry image tags remain unchanged and that no schema or API client changes are needed.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Feature Description / 功能描述

English

The CUA Image setting currently accepts only a factory name such as linux, macos, windows or android, and the CUA SDK decides how to realise it. For a local Linux sandbox that means a QEMU virtual machine: the host needs QEMU installed, and the first start downloads a portable QEMU build.

Running the same Linux image in a Docker container is much lighter and is what most local deployments already have, but there is no way to ask for it.

This feature adds an optional :container or :vm suffix to the setting, for example:

CUA Image = linux:container

Only the known flavours are split off, so the tag of a registry reference such as ghcr.io/trycua/xfce:latest is not mistaken for a flavour and the reference is looked up unchanged. When the selected SDK factory does not support the requested flavour, the suffix is ignored with a warning instead of failing the boot. No new configuration key is introduced, so the dashboard schema and the API client stay unchanged.

A PR implementing this is open for review: #10835.

中文

CUA Image 目前只能填工厂名(如 linux、macos、windows、android),实际形态由 CUA SDK 决定。本地 Linux 沙盒会走 QEMU 虚拟机:宿主机需要安装 QEMU,首次启动还要下载 QEMU portable 资源。

而用 Docker 容器运行同一个 Linux 镜像要轻量得多,多数本地部署本来就有 Docker,却没有办法指定。

本功能为该配置项增加可选的 :container / :vm 后缀,例如:

CUA Image = linux:container

只识别已知形态,因此 ghcr.io/trycua/xfce:latest 这类镜像引用的 tag 不会被误判为形态,镜像名会原样参与查找。当所选 SDK 工厂不支持该形态时,仅记录警告并忽略,不会导致启动失败。本功能不新增配置键,dashboard schema 与 API client 均无需变更。

对应 PR 已开启,欢迎评审:#10835。

Use Case / 使用场景

English

  • A local deployment that already runs Docker Desktop (or Docker Engine) wants to use the CUA sandbox without installing QEMU and without waiting for a large QEMU download.
  • A deployment on a host without KVM acceleration prefers a container over a virtual machine.
  • Operators want to choose the flavour explicitly per installation instead of relying on the SDK default, and want to be able to switch back by editing a single setting.

中文

  • 本机已经装了 Docker Desktop(或 Docker Engine),想在不安装 QEMU、不等待大体积 QEMU 下载的前提下使用 CUA 沙盒。
  • 宿主机没有 KVM 加速,希望用容器而不是虚拟机。
  • 希望能按安装环境显式选择形态,而不是依赖 SDK 默认值,并且改一个配置项就能切回去。
Checklist / 检查清单
  • I have searched the Issue list for related features and confirmed this feature idea has never been proposed.
    / 我已在 Issue 列表中搜索过相关功能,确认该功能想法从未被提出过。
  • The feature I am suggesting is related to AstrBot itself, not to a specific plugin.
    / 我建议的功能与 AstrBot 本体相关,而非在建议某一插件的功能。
  • I have read and agree to the project's Code of Conduct.
    / 我已阅读并同意本项目的贡献者行为准则。
  • (Optional) I am willing to submit a PR to help implement this feature.
    / (可选)我愿意提交 PR 以帮助实现该功能。

Thank you for sharing your valuable ideas with us! / 感谢您向我们提交您宝贵的想法!

Ngôn ngữ chính
Python
Star
46.4k
Fork
3.4k
Merge trung bình
1 ngày 11 giờ
Pull request đã merge (30 ngày)
120

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của AstrBotDevs/AstrBot

Tất cả issue của AstrBotDevs/AstrBot

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.