Files
agent-radar 2ed3415fb7
Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
源码快照 @ 2026-09-01 (source-only, 剔除非源码素材)
2026-09-01 20:17:27 +08:00

126 lines
4.6 KiB
TypeScript

import type {
AgentGUIComposerViewModel,
AgentGUIDetailViewModel,
AgentGUIInteractionViewModel,
AgentGUINodeViewModel,
AgentGUIOperationsViewModel,
AgentGUIRailViewModel,
AgentGUIReadinessViewModel,
AgentGUIShellViewModel
} from "./agentGuiNodeTypes";
export type FlatAgentGUINodeViewModelFixture = AgentGUIShellViewModel &
AgentGUIRailViewModel &
AgentGUIDetailViewModel &
AgentGUIComposerViewModel &
AgentGUIInteractionViewModel &
AgentGUIReadinessViewModel &
AgentGUIOperationsViewModel;
export type AgentGUINodeViewModelFixtureOverrides =
Partial<FlatAgentGUINodeViewModelFixture>;
export function groupAgentGUINodeViewModelFixture(
flat: FlatAgentGUINodeViewModelFixture
): AgentGUINodeViewModel {
return {
shell: {
workspaceId: flat.workspaceId,
workspacePath: flat.workspacePath,
currentUserId: flat.currentUserId,
data: flat.data
},
rail: {
selectedAgentTarget: flat.selectedAgentTarget,
agentTargets: flat.agentTargets,
agentTargetsLoading: flat.agentTargetsLoading,
providerRailMode: flat.providerRailMode,
comingSoonProviders: flat.comingSoonProviders,
conversationFilter: flat.conversationFilter,
conversations: flat.conversations,
userProjects: flat.userProjects,
activeConversation: flat.activeConversation,
activeConversationId: flat.activeConversationId,
revealRequest: flat.revealRequest,
isLoadingConversations: flat.isLoadingConversations,
listError: flat.listError
},
detail: {
availability: flat.availability,
isLoadingMessages: flat.isLoadingMessages,
isLoadingOlderMessages: flat.isLoadingOlderMessages,
hasOlderMessages: flat.hasOlderMessages,
usage: flat.usage,
hasSentUserMessage: flat.hasSentUserMessage,
avoidGroupingEdits: flat.avoidGroupingEdits,
conversation: flat.conversation,
conversationDetail: flat.conversationDetail
},
composer: {
handoffAgentTargets: flat.handoffAgentTargets,
availableCommands: flat.availableCommands,
availableSkills: flat.availableSkills,
draftPrompt: flat.draftPrompt,
draftContent: flat.draftContent,
isCreatingConversation: flat.isCreatingConversation,
isSubmitting: flat.isSubmitting,
isInterrupting: flat.isInterrupting,
isCancelPending: flat.isCancelPending,
hasPendingSubmitStopTarget: flat.hasPendingSubmitStopTarget,
promptImagesSupported: flat.promptImagesSupported,
compactSupported: flat.compactSupported,
goalPauseSupported: flat.goalPauseSupported,
gate: flat.gate,
isTuttiModeActive: flat.isTuttiModeActive ?? false,
isTuttiModeUpdating: flat.isTuttiModeUpdating ?? false,
tuttiModeEffect: flat.tuttiModeEffect ?? 50,
tuttiModeSpeed: flat.tuttiModeSpeed ?? 50,
tuttiModeUpdateStatus: flat.tuttiModeUpdateStatus ?? "idle",
composerSettings: flat.composerSettings,
queueStatus: flat.queueStatus,
queuedPrompts: flat.queuedPrompts,
drainingQueuedPromptId: flat.drainingQueuedPromptId
},
interaction: {
approvalDisabledReason: flat.approvalDisabledReason ?? null,
interactivePromptDisabledReason:
flat.interactivePromptDisabledReason ?? null,
isRespondingApproval: flat.isRespondingApproval,
isRespondingInteractivePrompt:
flat.isRespondingInteractivePrompt ?? flat.isRespondingApproval,
pendingApproval: flat.pendingApproval,
pendingInteractivePrompt: flat.pendingInteractivePrompt,
sessionChrome: flat.sessionChrome,
inlineNotice: flat.inlineNotice
},
readiness: {
activeLiveState: flat.activeLiveState,
activationError: flat.activationError,
providerReadinessGate: flat.providerReadinessGate
},
operations: {
forkThroughTurnPendingTurnIds: flat.forkThroughTurnPendingTurnIds ?? [],
goalClearNoticeSequence: flat.goalClearNoticeSequence ?? 0,
isDeletingConversation: flat.isDeletingConversation,
isDeletingProjectConversations: flat.isDeletingProjectConversations,
isUserProjectMutationPending: flat.isUserProjectMutationPending ?? false,
pendingDeleteConversation: flat.pendingDeleteConversation,
pendingDeleteProjectConversations: flat.pendingDeleteProjectConversations
}
};
}
export function flattenAgentGUINodeViewModelFixture(
viewModel: AgentGUINodeViewModel
): FlatAgentGUINodeViewModelFixture {
return {
...viewModel.shell,
...viewModel.rail,
...viewModel.detail,
...viewModel.composer,
...viewModel.interaction,
...viewModel.readiness,
...viewModel.operations
};
}