feat: Add AI agent verbose mode, rename scheduled wake setting to scheduled wake, and update system settings layout.

This commit is contained in:
jxxghp
2026-03-27 20:59:53 +08:00
parent 3cc83d10d3
commit 8713e3cc86
5 changed files with 47 additions and 39 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "moviepilot", "name": "moviepilot",
"version": "2.9.18", "version": "2.9.21",
"private": true, "private": true,
"type": "module", "type": "module",
"bin": "dist/service.js", "bin": "dist/service.js",
@@ -127,4 +127,4 @@
"workbox-window": "^7.3.0" "workbox-window": "^7.3.0"
}, },
"packageManager": "yarn@1.22.18" "packageManager": "yarn@1.22.18"
} }
+4 -2
View File
@@ -1335,9 +1335,11 @@ export default {
aiAgentGlobal: 'Global AI Assistant', aiAgentGlobal: 'Global AI Assistant',
aiAgentGlobalHint: aiAgentGlobalHint:
'Enable global AI assistant functionality, all message conversations will be answered by the AI agent without using the /ai command', 'Enable global AI assistant functionality, all message conversations will be answered by the AI agent without using the /ai command',
aiAgentJobInterval: 'AI Agent Job Interval', aiAgentJobInterval: 'Scheduled Wake',
aiAgentJobIntervalHint: aiAgentJobIntervalHint:
'Set the check interval for AI agent scheduled tasks. Select "Disabled" to disable scheduled tasks.', 'Set the check interval for scheduled wake. Select "Disabled" to disable scheduled tasks.',
aiAgentVerbose: 'Verbose Mode',
aiAgentVerboseHint: 'When enabled, tool call process will be displayed in AI agent responses',
aiAgentJobIntervalDisabled: 'Disabled', aiAgentJobIntervalDisabled: 'Disabled',
aiAgentJobInterval1h: '1 Hour', aiAgentJobInterval1h: '1 Hour',
aiAgentJobInterval3h: '3 Hours', aiAgentJobInterval3h: '3 Hours',
+4 -2
View File
@@ -1329,8 +1329,10 @@ export default {
llmBaseUrlHint: 'LLM API的基础URL地址,用于自定义API端点', llmBaseUrlHint: 'LLM API的基础URL地址,用于自定义API端点',
aiAgentGlobal: '全局智能助手', aiAgentGlobal: '全局智能助手',
aiAgentGlobalHint: '启用全局智能助手功能,所有消息对话均使用智能体回答而不用使用/ai命令', aiAgentGlobalHint: '启用全局智能助手功能,所有消息对话均使用智能体回答而不用使用/ai命令',
aiAgentJobInterval: '智能体定时任务间隔', aiAgentJobInterval: '定时唤醒',
aiAgentJobIntervalHint: '设置智能体定时任务的检查间隔,选择"不启用"则不执行定时任务', aiAgentJobIntervalHint: '设置定时唤醒的检查间隔,选择"不启用"则不执行定时任务',
aiAgentVerbose: '啰嗦模式',
aiAgentVerboseHint: '开启后会在智能体回复时显示工具调用过程',
aiAgentJobIntervalDisabled: '不启用', aiAgentJobIntervalDisabled: '不启用',
aiAgentJobInterval1h: '1小时', aiAgentJobInterval1h: '1小时',
aiAgentJobInterval3h: '3小时', aiAgentJobInterval3h: '3小时',
+4 -2
View File
@@ -1330,8 +1330,10 @@ export default {
llmBaseUrlHint: 'LLM API的基礎URL地址,用於自定義API端點', llmBaseUrlHint: 'LLM API的基礎URL地址,用於自定義API端點',
aiAgentGlobal: '全局智能助手', aiAgentGlobal: '全局智能助手',
aiAgentGlobalHint: '啟用全局智能助手功能,所有消息對話均使用智能體回答而不用使用/ai命令', aiAgentGlobalHint: '啟用全局智能助手功能,所有消息對話均使用智能體回答而不用使用/ai命令',
aiAgentJobInterval: '智能體定時任務間隔', aiAgentJobInterval: '定時喚醒',
aiAgentJobIntervalHint: '設置智能體定時任務的檢查間隔,選擇「不啟用」則不執行定時任務', aiAgentJobIntervalHint: '設置定時喚醒的檢查間隔,選擇「不啟用」則不執行定時任務',
aiAgentVerbose: '囉嗦模式',
aiAgentVerboseHint: '開啟後會在智能體回覆時顯示工具調用過程',
aiAgentJobIntervalDisabled: '不啟用', aiAgentJobIntervalDisabled: '不啟用',
aiAgentJobInterval1h: '1小時', aiAgentJobInterval1h: '1小時',
aiAgentJobInterval3h: '3小時', aiAgentJobInterval3h: '3小時',
+33 -31
View File
@@ -131,11 +131,7 @@ const scrapingConfig = [
// 刮削策略设置 // 刮削策略设置
const ScrapingPolicies = ref<Record<string, 'skip' | 'missingOnly' | 'overwrite'>>( const ScrapingPolicies = ref<Record<string, 'skip' | 'missingOnly' | 'overwrite'>>(
Object.fromEntries( Object.fromEntries(scrapingConfig.flatMap(section => section.items.map(item => [item.key, 'missingOnly']))),
scrapingConfig.flatMap(section =>
section.items.map(item => [item.key, 'missingOnly'])
)
)
) )
// 是否发送请求的总开关 // 是否发送请求的总开关
@@ -513,7 +509,8 @@ async function loadScrapingSwitchs() {
if (result.success && result.data?.value) { if (result.success && result.data?.value) {
const loadedSwitches = result.data.value const loadedSwitches = result.data.value
for (const key in loadedSwitches) { for (const key in loadedSwitches) {
if (typeof loadedSwitches[key] === 'boolean') { // 兼容旧数据 if (typeof loadedSwitches[key] === 'boolean') {
// 兼容旧数据
loadedSwitches[key] = loadedSwitches[key] ? 'missingOnly' : 'skip' loadedSwitches[key] = loadedSwitches[key] ? 'missingOnly' : 'skip'
} }
} }
@@ -685,7 +682,7 @@ onDeactivated(() => {
</VRow> </VRow>
<VDivider class="my-4" /> <VDivider class="my-4" />
<VRow> <VRow>
<VCol cols="12" md="6"> <VCol cols="12" md="4">
<VSwitch <VSwitch
v-model="SystemSettings.Basic.AI_AGENT_ENABLE" v-model="SystemSettings.Basic.AI_AGENT_ENABLE"
:label="t('setting.system.aiAgentEnable')" :label="t('setting.system.aiAgentEnable')"
@@ -693,7 +690,7 @@ onDeactivated(() => {
persistent-hint persistent-hint
/> />
</VCol> </VCol>
<VCol v-if="SystemSettings.Basic.AI_AGENT_ENABLE" cols="12" md="6"> <VCol v-if="SystemSettings.Basic.AI_AGENT_ENABLE" cols="12" md="4">
<VSwitch <VSwitch
v-model="SystemSettings.Basic.AI_AGENT_GLOBAL" v-model="SystemSettings.Basic.AI_AGENT_GLOBAL"
:label="t('setting.system.aiAgentGlobal')" :label="t('setting.system.aiAgentGlobal')"
@@ -701,23 +698,12 @@ onDeactivated(() => {
persistent-hint persistent-hint
/> />
</VCol> </VCol>
<VCol v-if="SystemSettings.Basic.AI_AGENT_ENABLE" cols="12" md="6"> <VCol v-if="SystemSettings.Basic.AI_AGENT_ENABLE" cols="12" md="4">
<VSelect <VSwitch
v-model="SystemSettings.Basic.AI_AGENT_JOB_INTERVAL" v-model="SystemSettings.Basic.AI_AGENT_VERBOSE"
:label="t('setting.system.aiAgentJobInterval')" :label="t('setting.system.aiAgentVerbose')"
:hint="t('setting.system.aiAgentJobIntervalHint')" :hint="t('setting.system.aiAgentVerboseHint')"
persistent-hint persistent-hint
:items="[
{ title: t('setting.system.aiAgentJobIntervalDisabled'), value: 0 },
{ title: t('setting.system.aiAgentJobInterval1h'), value: 1 },
{ title: t('setting.system.aiAgentJobInterval3h'), value: 3 },
{ title: t('setting.system.aiAgentJobInterval6h'), value: 6 },
{ title: t('setting.system.aiAgentJobInterval12h'), value: 12 },
{ title: t('setting.system.aiAgentJobInterval24h'), value: 24 },
{ title: t('setting.system.aiAgentJobInterval1w'), value: 168 },
{ title: t('setting.system.aiAgentJobInterval1M'), value: 720 },
]"
prepend-inner-icon="mdi-timer-outline"
/> />
</VCol> </VCol>
<VCol v-if="SystemSettings.Basic.AI_AGENT_ENABLE" cols="12" md="6"> <VCol v-if="SystemSettings.Basic.AI_AGENT_ENABLE" cols="12" md="6">
@@ -787,6 +773,25 @@ onDeactivated(() => {
prepend-inner-icon="mdi-counter" prepend-inner-icon="mdi-counter"
/> />
</VCol> </VCol>
<VCol v-if="SystemSettings.Basic.AI_AGENT_ENABLE" cols="12" md="6">
<VSelect
v-model="SystemSettings.Basic.AI_AGENT_JOB_INTERVAL"
:label="t('setting.system.aiAgentJobInterval')"
:hint="t('setting.system.aiAgentJobIntervalHint')"
persistent-hint
:items="[
{ title: t('setting.system.aiAgentJobIntervalDisabled'), value: 0 },
{ title: t('setting.system.aiAgentJobInterval1h'), value: 1 },
{ title: t('setting.system.aiAgentJobInterval3h'), value: 3 },
{ title: t('setting.system.aiAgentJobInterval6h'), value: 6 },
{ title: t('setting.system.aiAgentJobInterval12h'), value: 12 },
{ title: t('setting.system.aiAgentJobInterval24h'), value: 24 },
{ title: t('setting.system.aiAgentJobInterval1w'), value: 168 },
{ title: t('setting.system.aiAgentJobInterval1M'), value: 720 },
]"
prepend-inner-icon="mdi-timer-outline"
/>
</VCol>
<VCol v-if="SystemSettings.Basic.AI_AGENT_ENABLE" cols="12"> <VCol v-if="SystemSettings.Basic.AI_AGENT_ENABLE" cols="12">
<VSwitch <VSwitch
v-model="SystemSettings.Basic.AI_RECOMMEND_ENABLED" v-model="SystemSettings.Basic.AI_RECOMMEND_ENABLED"
@@ -1209,14 +1214,11 @@ onDeactivated(() => {
<VExpansionPanelText> <VExpansionPanelText>
<VRow v-for="section in scrapingConfig" :key="section.section"> <VRow v-for="section in scrapingConfig" :key="section.section">
<VCol cols="12" class="pb-2"> <VCol cols="12" class="pb-2">
<VListSubheader class="text-lg">{{ t(`setting.system.${section.section}`) }}</VListSubheader> <VListSubheader class="text-lg">
{{ t(`setting.system.${section.section}`) }}
</VListSubheader>
</VCol> </VCol>
<VCol <VCol v-for="item in section.items" :key="item.key" cols="12" md="4">
v-for="item in section.items"
:key="item.key"
cols="12"
md="4"
>
<div class="d-flex align-center"> <div class="d-flex align-center">
<VBtnToggle <VBtnToggle
:model-value="ScrapingPolicies[item.key]" :model-value="ScrapingPolicies[item.key]"