源码快照 @ 2026-09-01 (source-only, 剔除非源码素材)
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
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
This commit is contained in:
commit
2ed3415fb7
8018 files changed
+1936476
No files matched your search
@@ -0,0 +1,124 @@
|
||||
import { useMemo } from "react";
|
||||
import type { AgentGUINodeViewModel } from "./agentGuiNodeTypes";
|
||||
|
||||
export function useAgentGUIViewModel(
|
||||
candidate: AgentGUINodeViewModel
|
||||
): AgentGUINodeViewModel {
|
||||
const shell = useMemo(
|
||||
() => candidate.shell,
|
||||
[
|
||||
candidate.shell.currentUserId,
|
||||
candidate.shell.data,
|
||||
candidate.shell.nodeId,
|
||||
candidate.shell.workspaceId,
|
||||
candidate.shell.workspacePath
|
||||
]
|
||||
);
|
||||
const rail = useMemo(
|
||||
() => candidate.rail,
|
||||
[
|
||||
candidate.rail.activeConversation,
|
||||
candidate.rail.activeConversationId,
|
||||
candidate.rail.comingSoonProviders,
|
||||
candidate.rail.conversationFilter,
|
||||
candidate.rail.conversations,
|
||||
candidate.rail.isLoadingConversations,
|
||||
candidate.rail.listError,
|
||||
candidate.rail.providerRailMode,
|
||||
candidate.rail.revealRequest,
|
||||
candidate.rail.agentTargets,
|
||||
candidate.rail.agentTargetsLoading,
|
||||
candidate.rail.selectedAgentTarget,
|
||||
candidate.rail.userProjects
|
||||
]
|
||||
);
|
||||
const detail = useMemo(
|
||||
() => candidate.detail,
|
||||
[
|
||||
candidate.detail.availability,
|
||||
candidate.detail.avoidGroupingEdits,
|
||||
candidate.detail.conversation,
|
||||
candidate.detail.conversationDetail,
|
||||
candidate.detail.hasOlderMessages,
|
||||
candidate.detail.hasSentUserMessage,
|
||||
candidate.detail.isLoadingMessages,
|
||||
candidate.detail.isLoadingOlderMessages,
|
||||
candidate.detail.usage
|
||||
]
|
||||
);
|
||||
const composer = useMemo(
|
||||
() => candidate.composer,
|
||||
[
|
||||
candidate.composer.availableCommands,
|
||||
candidate.composer.availableSkills,
|
||||
candidate.composer.compactSupported,
|
||||
candidate.composer.composerSettings,
|
||||
candidate.composer.draftContent,
|
||||
candidate.composer.draftPrompt,
|
||||
candidate.composer.drainingQueuedPromptId,
|
||||
candidate.composer.goalPauseSupported,
|
||||
candidate.composer.gate,
|
||||
candidate.composer.hasPendingSubmitStopTarget,
|
||||
candidate.composer.handoffAgentTargets,
|
||||
candidate.composer.isCancelPending,
|
||||
candidate.composer.isCreatingConversation,
|
||||
candidate.composer.isInterrupting,
|
||||
candidate.composer.isSubmitting,
|
||||
candidate.composer.isTuttiModeActive,
|
||||
candidate.composer.isTuttiModeUpdating,
|
||||
candidate.composer.promptImagesSupported,
|
||||
candidate.composer.queueStatus,
|
||||
candidate.composer.queuedPrompts,
|
||||
candidate.composer.tuttiModeEffect,
|
||||
candidate.composer.tuttiModeSpeed,
|
||||
candidate.composer.tuttiModeUpdateStatus
|
||||
]
|
||||
);
|
||||
const interaction = useMemo(
|
||||
() => candidate.interaction,
|
||||
[
|
||||
candidate.interaction.inlineNotice,
|
||||
candidate.interaction.approvalDisabledReason,
|
||||
candidate.interaction.canAnswerPendingInteractivePromptFromComposer,
|
||||
candidate.interaction.interactivePromptDisabledReason,
|
||||
candidate.interaction.isRespondingApproval,
|
||||
candidate.interaction.isRespondingInteractivePrompt,
|
||||
candidate.interaction.pendingApproval,
|
||||
candidate.interaction.pendingInteractivePrompt,
|
||||
candidate.interaction.sessionChrome
|
||||
]
|
||||
);
|
||||
const readiness = useMemo(
|
||||
() => candidate.readiness,
|
||||
[
|
||||
candidate.readiness.activationError,
|
||||
candidate.readiness.activeLiveState,
|
||||
candidate.readiness.providerReadinessGate
|
||||
]
|
||||
);
|
||||
const operations = useMemo(
|
||||
() => candidate.operations,
|
||||
[
|
||||
candidate.operations.forkThroughTurnPendingTurnIds,
|
||||
candidate.operations.goalClearNoticeSequence,
|
||||
candidate.operations.isDeletingConversation,
|
||||
candidate.operations.isDeletingProjectConversations,
|
||||
candidate.operations.isUserProjectMutationPending,
|
||||
candidate.operations.pendingDeleteConversation,
|
||||
candidate.operations.pendingDeleteProjectConversations
|
||||
]
|
||||
);
|
||||
|
||||
return useMemo(
|
||||
() => ({
|
||||
shell,
|
||||
rail,
|
||||
detail,
|
||||
composer,
|
||||
interaction,
|
||||
readiness,
|
||||
operations
|
||||
}),
|
||||
[composer, detail, interaction, operations, rail, readiness, shell]
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user