feat(schedule): 优化排程任务配置与进度契约处理逻辑

This commit is contained in:
hugo committed 2026-07-08 16:09:28 +08:00
1 parent d54f51ddc3
commit 99453aa52a
65 files changed
+2837 -487

No files matched your search

@@ -162,7 +162,7 @@ watch(() => page.currentAgentId, () => {
/>
<ShippingBatchProgressPanel
v-if="page.isShippingNoticeAgent && (page.shippingBatchSummary || page.activeShippingTaskDetail)"
v-if="page.showShippingProgressWorkspace && (page.shippingBatchSummary || page.activeShippingTaskDetail)"
:conversation-workspace="page.shippingConversationWorkspace"
:active-batch-no="page.activeShippingBatchNo"
:batch-summary="page.shippingBatchSummary"
@@ -313,7 +313,7 @@ watch(() => page.currentAgentId, () => {
/>
<ShippingBatchWorkspaceDrawer
v-if="page.isShippingNoticeAgent && (page.shippingConversationWorkspace || page.shippingBatchSummary)"
v-if="page.showShippingProgressWorkspace && (page.shippingConversationWorkspace || page.shippingBatchSummary)"
v-model:open="page.shippingWorkspaceOpen"
:conversation-workspace="page.shippingConversationWorkspace"
:active-batch-no="page.activeShippingBatchNo"
@@ -572,6 +572,7 @@ export function useChatPage() {
handleDeleteConfirm: dialogs.handleDeleteConfirm,
showChatRating,
isShippingNoticeAgent: shipping.isShippingNoticeAgent,
showShippingProgressWorkspace: shipping.showShippingProgressWorkspace,
shippingBatchSummary: shipping.shippingBatchSummary,
shippingConversationWorkspace: shipping.shippingConversationWorkspace,
activeShippingBatchNo: shipping.activeShippingBatchNo,
@@ -13,7 +13,7 @@ import {
type ComputedRef,
type Ref,
} from 'vue';
import { isShippingNoticeAgent as resolveShippingNoticeAgent } from '@/shared/utils/agent-registry.utils';
import { agentUsesWorkspaceStepperProgress, isShippingNoticeAgent as resolveShippingNoticeAgent } from '@/shared/utils/agent-registry.utils';
import type { AgentRegistryFields } from '@/shared/utils/agent-registry.utils';
import { hasActiveRunningChatRun } from '../shipping/shippingActionBusy';
@@ -168,6 +168,7 @@ export function useChatShipping(options: UseChatShippingOptions) {
// ── 功能开关与 UI refs ────────────────────────────────────
const isShippingNoticeAgent = computed(() => resolveShippingNoticeAgent(currentAgent.value));
const showShippingProgressWorkspace = computed(() => agentUsesWorkspaceStepperProgress(currentAgent.value));
const isShippingActionBusy = computed(() => {
if (shippingActionBusy.value) return true;
return hasActiveRunningChatRun(isThinking.value, activeRunId.value, runs.value);
@@ -949,6 +950,7 @@ export function useChatShipping(options: UseChatShippingOptions) {
return {
shippingBindSend,
isShippingNoticeAgent,
showShippingProgressWorkspace,
prepareMarkdownDisplayText,
shippingAutoFlowRequested,
shippingInventoryPickerRef,
@@ -9,7 +9,8 @@
import { computed, nextTick, ref, watch, type Ref } from 'vue';
import {
agentHasTaskProgress,
agentHasProgress,
agentUsesScheduleRunCounterProgress,
resolveToolRunProgressView,
type AgentRegistryFields,
} from '@/shared/utils/agent-registry.utils';
@@ -65,7 +66,7 @@ export function useChatPageToolRun(ctx: ChatPageToolRunContext) {
const toolRunProgressConfig = computed<ToolRunProgressConfig | null>(() => {
const agent = ctx.currentAgent.value;
if (!agent || !agentHasTaskProgress(agent)) return null;
if (!agent || !agentHasProgress(agent) || !agentUsesScheduleRunCounterProgress(agent)) return null;
const cfg = resolveToolRunProgressView(agent) || {};
const handlerConfig = agent.handler_config && typeof agent.handler_config === 'object'