feat(agent): 增强 Agent 配置,新增结构化字段与聊天功能支持
This commit is contained in:
1 parent
ac4262cd75
commit
c8ce77199e
183 files changed
+11690
-2300
No files matched your search
@@ -20,12 +20,16 @@ import LedgerConfigPanel from '@/features/maintenance/components/LedgerConfigPan
|
||||
import MaintenanceRecordManagerPanel from '@/features/maintenance/components/MaintenanceRecordManagerPanel.vue';
|
||||
import { useChatPageContext } from '@/features/chat/composables/chat.context';
|
||||
import { matchesTrainingAgent } from '@/features/chat/training/trainingWorkspace.utils';
|
||||
import { agentHasIntentUiProfile } from '@/shared/utils/agent-registry.utils';
|
||||
|
||||
const page = useChatPageContext();
|
||||
const isTrainingAgentPage = computed(() => matchesTrainingAgent(page.currentAgent));
|
||||
const isMaintenanceAgentPage = computed(() => {
|
||||
const name = String(page.currentAgent?.name || '').trim();
|
||||
return name === '设备维保助手' || (name.includes('设备维保') && name.includes('助手'));
|
||||
const isMaintenanceAgentPage = computed(() => agentHasIntentUiProfile(page.currentAgent, 'maintenance'));
|
||||
const embeddedIframeSrc = computed(() => {
|
||||
const agent = page.currentAgent;
|
||||
if (!agent) return undefined;
|
||||
const url = agent.iframe_url;
|
||||
return url ? String(url) : undefined;
|
||||
});
|
||||
const hideWelcomePanel = computed(() => isTrainingAgentPage.value);
|
||||
const isTrainingWorkspaceExpanded = ref(false);
|
||||
@@ -132,9 +136,9 @@ watch(() => page.currentAgentId, () => {
|
||||
<p class="text-sm animate-pulse text-muted">{{ $t('chat.loadingAgent') }}</p>
|
||||
</div>
|
||||
|
||||
<div v-else-if="page.currentAgent.type === 'iframe'" class="relative h-full w-full flex-1">
|
||||
<div v-else-if="page.currentAgent.runtime_provider === 'iframe' || page.currentAgent.conversation_mode === 'embedded'" class="relative h-full w-full flex-1">
|
||||
<iframe
|
||||
:src="page.currentAgent.extra_config?.iframe_url"
|
||||
:src="embeddedIframeSrc"
|
||||
class="h-full w-full border-0 bg-surface"
|
||||
allow="microphone; camera; clipboard-read; clipboard-write"
|
||||
/>
|
||||
@@ -227,6 +231,7 @@ watch(() => page.currentAgentId, () => {
|
||||
:shipping-notice-picker-ref-holder="page.shippingNoticePickerRefHolder"
|
||||
:get-kb-label="page.getKbLabel"
|
||||
@send="page.handleSend()"
|
||||
@stop="page.stopActiveGeneration()"
|
||||
@voice-click="page.handleVoiceFeatureClick"
|
||||
@remove-attachment="page.removeAttachment"
|
||||
@local-files-selected="page.handleLocalFilesSelected"
|
||||
|
||||
Reference in new issue
Block a user