mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
feat: add Computer Use step to onboarding wizard (sync with master)
This commit is contained in:
@@ -18,7 +18,18 @@
|
||||
"step1Desc": "Connect AstrBot to IM platforms like QQ, Lark, Slack, Telegram, etc.",
|
||||
"step2Title": "Configure AI Model",
|
||||
"step2Desc": "Configure AI models for AstrBot.",
|
||||
"step3Title": "Allow Agent to Use Computer",
|
||||
"step3Desc": "Set whether the agent can access and use the current computer.",
|
||||
"step3HelpTitle": "Allow Agent to Use Computer",
|
||||
"step3HelpItem1": "The agent will be able to access workspace directories (each user's workspace is isolated) and use Skills to perform more complex tasks.",
|
||||
"step3HelpItem2": "For AstrBot administrators, the agent is additionally allowed to execute Shell commands, Python code, and access all local directories.",
|
||||
"step3HelpItem3": "For more granular permission and capability configuration, go to Config File -> General Config -> Computer Use to continue.",
|
||||
"step3HelpClose": "Close",
|
||||
"step3SelectLabel": "Computer Access",
|
||||
"step3Allow": "Allow",
|
||||
"step3Deny": "Deny",
|
||||
"configure": "Configure",
|
||||
"save": "Save",
|
||||
"skip": "Skip",
|
||||
"pending": "Pending",
|
||||
"completed": "Completed",
|
||||
|
||||
@@ -16,7 +16,18 @@
|
||||
"step1Desc": "Подключите AstrBot к QQ, Lark, WeChat, Telegram и другим мессенджерам.",
|
||||
"step2Title": "Настройка AI моделей",
|
||||
"step2Desc": "Выберите и настройте AI провайдеров для AstrBot.",
|
||||
"step3Title": "Разрешить агенту использовать компьютер",
|
||||
"step3Desc": "Установите, может ли агент получать доступ к текущему компьютеру и использовать его.",
|
||||
"step3HelpTitle": "Разрешить агенту использовать компьютер",
|
||||
"step3HelpItem1": "Агент сможет получать доступ к рабочим каталогам и использовать Skills для выполнения более сложных задач.",
|
||||
"step3HelpItem2": "Для администраторов AstrBot агенту дополнительно разрешается выполнять Shell-команды, Python-код и получать доступ ко всем локальным каталогам.",
|
||||
"step3HelpItem3": "Для более детальной настройки прав и возможностей перейдите в Файл конфигурации -> Общая конфигурация -> Использование компьютера.",
|
||||
"step3HelpClose": "Закрыть",
|
||||
"step3SelectLabel": "Доступ к компьютеру",
|
||||
"step3Allow": "Разрешить",
|
||||
"step3Deny": "Запретить",
|
||||
"configure": "Настроить",
|
||||
"save": "Сохранить",
|
||||
"skip": "Пропустить",
|
||||
"pending": "Ожидает",
|
||||
"completed": "Готово",
|
||||
|
||||
@@ -18,7 +18,18 @@
|
||||
"step1Desc": "将 AstrBot 连接到 QQ、飞书、企业微信、Telegram 等 IM 平台。",
|
||||
"step2Title": "配置 AI 模型",
|
||||
"step2Desc": "为 AstrBot 配置 AI 模型。",
|
||||
"step3Title": "允许 Agent 使用电脑",
|
||||
"step3Desc": "设置 Agent 是否可以访问和使用当前电脑。",
|
||||
"step3HelpTitle": "允许 Agent 使用电脑",
|
||||
"step3HelpItem1": "Agent 将可以访问和使用工作区目录(每个用户的工作区目录相互独立)以及 Skills 来执行更多复杂任务。",
|
||||
"step3HelpItem2": "对于 AstrBot 管理员,会额外允许 Agent 执行 Shell 命令、Python 代码,以及访问本机的所有目录。",
|
||||
"step3HelpItem3": "如需更多细化权限与能力配置,可前往 配置文件 -> 普通配置 -> 使用电脑能力 继续设置。",
|
||||
"step3HelpClose": "关闭",
|
||||
"step3SelectLabel": "电脑访问权限",
|
||||
"step3Allow": "允许",
|
||||
"step3Deny": "不允许",
|
||||
"configure": "去配置",
|
||||
"save": "保存",
|
||||
"skip": "跳过",
|
||||
"pending": "待处理",
|
||||
"completed": "已完成",
|
||||
|
||||
@@ -171,11 +171,81 @@
|
||||
</div>
|
||||
</div>
|
||||
</v-timeline-item>
|
||||
|
||||
<v-timeline-item
|
||||
:dot-color="
|
||||
computerAccessStepState === 'completed' ? 'success' : 'primary'
|
||||
"
|
||||
icon="mdi-numeric-4"
|
||||
fill-dot
|
||||
size="small"
|
||||
>
|
||||
<div class="pl-2">
|
||||
<div class="d-flex align-center mb-1">
|
||||
<div class="text-h6 font-weight-bold">
|
||||
{{ tm("onboard.step3Title") }}
|
||||
</div>
|
||||
<v-btn
|
||||
icon
|
||||
variant="text"
|
||||
density="comfortable"
|
||||
size="small"
|
||||
class="ml-1"
|
||||
@click="showComputerAccessHelpDialog = true"
|
||||
>
|
||||
<span class="text-body-2 font-weight-bold">?</span>
|
||||
</v-btn>
|
||||
</div>
|
||||
<p class="text-body-2 text-medium-emphasis mb-3">
|
||||
{{ tm("onboard.step3Desc") }}
|
||||
</p>
|
||||
<div class="d-flex flex-wrap align-center ga-3">
|
||||
<v-select
|
||||
v-model="computerAccessRuntime"
|
||||
:items="computerAccessOptions"
|
||||
item-title="title"
|
||||
item-value="value"
|
||||
:label="tm('onboard.step3SelectLabel')"
|
||||
:loading="savingComputerAccess"
|
||||
:disabled="savingComputerAccess"
|
||||
hide-details
|
||||
density="comfortable"
|
||||
variant="outlined"
|
||||
class="computer-access-select"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</v-timeline-item>
|
||||
</v-timeline>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-dialog v-model="showComputerAccessHelpDialog" max-width="640">
|
||||
<v-card>
|
||||
<v-card-title class="text-h3 font-weight-bold pa-4">
|
||||
{{ tm("onboard.step3HelpTitle") }}
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<ol class="computer-access-help-list">
|
||||
<li>{{ tm("onboard.step3HelpItem1") }}</li>
|
||||
<li>{{ tm("onboard.step3HelpItem2") }}</li>
|
||||
<li>{{ tm("onboard.step3HelpItem3") }}</li>
|
||||
</ol>
|
||||
</v-card-text>
|
||||
<v-card-actions class="px-6 pb-4">
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
color="primary"
|
||||
variant="text"
|
||||
@click="showComputerAccessHelpDialog = false"
|
||||
>
|
||||
{{ tm("onboard.step3HelpClose") }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<v-row class="px-4 mt-4">
|
||||
<v-col cols="12">
|
||||
<v-card class="welcome-card pa-6" elevation="0" border>
|
||||
@@ -316,6 +386,7 @@ interface ApiError {
|
||||
}
|
||||
|
||||
type StepState = "pending" | "completed" | "skipped";
|
||||
type ComputerAccessRuntime = "local" | "none";
|
||||
|
||||
const { tm } = useModuleI18n("features/welcome");
|
||||
const { locale, t } = useI18n();
|
||||
@@ -337,6 +408,11 @@ const apiBaseUrl = ref(apiStore.apiBaseUrl || "http://127.0.0.1:6185");
|
||||
|
||||
const platformStepState = ref<StepState>("pending");
|
||||
const providerStepState = ref<StepState>("pending");
|
||||
const showComputerAccessHelpDialog = ref(false);
|
||||
const computerAccessStepState = ref<StepState>("pending");
|
||||
const computerAccessRuntime = ref<ComputerAccessRuntime>("none");
|
||||
const savedComputerAccessRuntime = ref<ComputerAccessRuntime>("none");
|
||||
const savingComputerAccess = ref(false);
|
||||
const welcomeAnnouncementRaw = ref<unknown>(null);
|
||||
|
||||
function resolveWelcomeAnnouncement(raw: unknown, currentLocale: string) {
|
||||
|
||||
Reference in New Issue
Block a user