diff --git a/src/components/agent/AgentAssistantPanel.vue b/src/components/agent/AgentAssistantPanel.vue index f6f30782..9b5fd231 100644 --- a/src/components/agent/AgentAssistantPanel.vue +++ b/src/components/agent/AgentAssistantPanel.vue @@ -235,7 +235,7 @@ const slashCommandQuery = computed(() => { // 根据输入内容过滤可用斜杠命令。 const filteredSlashCommands = computed(() => { const query = slashCommandQuery.value - if (!query) return slashCommands.value.slice(0, 8) + if (!query) return slashCommands.value return slashCommands.value .filter(command => { @@ -243,7 +243,6 @@ const filteredSlashCommands = computed(() => { return haystack.includes(query) }) - .slice(0, 8) }) // 判断是否展示命令建议浮层。 const showSlashCommandMenu = computed( @@ -253,6 +252,10 @@ const showSlashCommandMenu = computed( !recording.value && (filteredSlashCommands.value.length > 0 || slashCommandsLoading.value), ) +// 根据智能体处理状态切换输入框背景提示。 +const inputPlaceholder = computed(() => + sending.value ? t('agentAssistant.processingPlaceholder') : t('agentAssistant.placeholder'), +) const recordingTimeText = computed(() => { const seconds = Math.max(0, recordingDuration.value) const minutes = Math.floor(seconds / 60) @@ -1616,6 +1619,7 @@ async function handleChoiceClick(message: AgentChatMessage, choice: AgentChoiceC refreshMessageList() persistState() await streamAgentMessage(agentMessage, [], [], [], [], { + echoUser: false, displayText: choiceSelection.selected_label || choiceSelection.selected_description, choiceSelection, originalMessageId: String(result.data?.original_message_id || message.id), @@ -1641,6 +1645,7 @@ async function handleChoiceClick(message: AgentChatMessage, choice: AgentChoiceC persistState() await streamAgentMessage(agentMessage, [], [], [], [], { + echoUser: false, displayText: choiceSelection.selected_label || choiceSelection.selected_description, choiceSelection, }) @@ -2159,7 +2164,7 @@ onScopeDispose(() => { class="agent-assistant-textarea" rows="1" :disabled="sending || recording" - :placeholder="t('agentAssistant.placeholder')" + :placeholder="inputPlaceholder" @input="handleInputChange" @keydown="handleInputKeydown" /> diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index bf564d21..b102d6b7 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -723,6 +723,7 @@ export default { emptyTitle: 'What should we handle today?', emptySubtitle: 'Ask about sites, subscriptions, downloads, or organization tasks.', placeholder: 'Ask MoviePilot, Type / for commands', + processingPlaceholder: 'MoviePilot is working, please wait...', commandLoading: 'Loading commands...', commandLoadFailed: 'Failed to load commands', stop: 'Stop generating', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 5bdba4bb..bc709a34 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -719,6 +719,7 @@ export default { emptyTitle: '今天想处理什么?', emptySubtitle: '站点、订阅、下载、整理任务,都可以直接问我。', placeholder: '询问 MoviePilot,输入 / 使用命令', + processingPlaceholder: '智能体正在处理,请稍候...', commandLoading: '正在加载命令...', commandLoadFailed: '命令列表加载失败', stop: '停止生成', diff --git a/src/locales/zh-TW.ts b/src/locales/zh-TW.ts index 7f5b5f36..f883113e 100644 --- a/src/locales/zh-TW.ts +++ b/src/locales/zh-TW.ts @@ -719,6 +719,7 @@ export default { emptyTitle: '今天想處理什麼?', emptySubtitle: '站點、訂閱、下載、整理任務,都可以直接問我。', placeholder: '詢問 MoviePilot,輸入 / 使用命令', + processingPlaceholder: '智能體正在處理,請稍候...', commandLoading: '正在載入命令...', commandLoadFailed: '命令列表載入失敗', stop: '停止生成',