@p4code/cli 0.7.7 → 0.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.mjs +74 -20
- package/dist/client/assets/{DiffPanel-Bc-Eu0kf.js → DiffPanel-CycYDQWY.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-DxS5rPcd.js → FilePreviewPanel-DrSFJdlH.js} +2 -2
- package/dist/client/assets/{P4DesignScreen-BhSisrO7.js → P4DesignScreen-BAwi1uAr.js} +2 -2
- package/dist/client/assets/{PreviewPanel-D1Ih9QVw.js → PreviewPanel-WIiBGJrA.js} +2 -2
- package/dist/client/assets/{PullRequestCodeTab-C6TwqcLi.js → PullRequestCodeTab-BlZ-wHuh.js} +2 -2
- package/dist/client/assets/{collapsible-_uEtyFgf.js → collapsible-TsDBE7Dh.js} +2 -2
- package/dist/client/assets/{entities-DLfTo_iM.js → entities-BY5ek9Cd.js} +2 -2
- package/dist/client/assets/{fileCommentAnnotations-BHXI1UK7.js → fileCommentAnnotations-Beq-lrCQ.js} +2 -2
- package/dist/client/assets/{index-CiEqjE3h.js → index-DPN7FTpP.js} +15 -6
- package/dist/client/assets/{renderFileChildren-CflVX2Au.js → renderFileChildren-C2VdfGrx.js} +2 -2
- package/dist/client/assets/{textarea-DuUlMEYa.js → textarea-CUYIXA4Q.js} +24 -24
- package/dist/client/assets/{toggle-group-BkZFhaN9.js → toggle-group-CJJfBTwV.js} +2 -2
- package/dist/client/index.html +4 -4
- package/dist/{renderer-DZwr3Qmo.mjs → renderer-CcbFiDA_.mjs} +2 -2
- package/dist/{runtime-DC_ewLnZ.mjs → runtime-4S909Au8.mjs} +2 -2
- package/dist/{src-DjTfFS-z.mjs → src-KPj1bz7P.mjs} +56 -2
- package/package.json +1 -1
package/dist/bin.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { a as HostProcessEnvironment, c as HostProcessPlatform, i as HostProcessArguments, l as HostProcessUserId, n as PtySpawnError, o as HostProcessExecutablePath, r as HostProcessArchitecture, s as HostProcessHostname, t as PtyAdapter } from "./PtyAdapter-DLKyoorI.mjs";
|
|
4
|
-
import { $ as FeedSourceUpsertInput, $a as PreviewAutomationStatus, $c as MODEL_SLUG_ALIASES_BY_PROVIDER, $i as UserInputQuestion, $l as CommandId, $n as P4_PROJECT_FILE_NAME, $o as DEFAULT_COMPRESS_MODE, $r as TaskUpdateInput, $s as ProjectMetaUpdatedPayload$1, $t as ThreadContextUpdateInput, A as DesignLibraryManifest, Aa as PreviewAutomationClientDisconnectedError, Ac as ThreadPullRequestLink, Ai as anyWorktreeRuleEnabled, Al as HubClientRevokeInput, An as ThreadAdviseNotPermittedError, Ao as HubNotificationPreferences, Ar as OpenRouterToolFailedError, As as OrchestrationGetSnapshotError, At as AGENT_ASSET_FILE_MAX_CHARS, B as DesignValidateRequest, Ba as PreviewAutomationPressInput, Bc as ThreadSnoozedPayload$1, Bi as KeybindingsConfig, Bl as AuthOrchestrationOperateScope, Bn as ThreadRequestResult, Bo as ThreadEvidenceReportActivity, Br as TaskGetInput, Bs as OrchestrationSearchThreadsError, Bt as AssetCompressInput, C as DesignApplyReceipt, Ca as ExternalLauncherBrowserSpawnError, Cc as ThreadPairGateId, Ci as DeviceToolTargetInput, Cl as VcsRepositoryDetectionError, Cn as ThreadSpawnResult, Co as HUB_TUNNEL_INITIAL_WINDOW_BYTES, Cr as ServerSettingsError, Cs as OrchestrationCheckpointSummary, Ct as FilesystemBrowseError, D as DesignGuideRequest, Da as ExternalLauncherUnsupportedEditorError, Dc as ThreadPinReorderedPayload$1, Di as DEFAULT_WORKTREE_CLEANUP_SETTINGS, Dl as HubClientEnrollmentExchange, Dn as AdviseToolUnavailableError, Do as HubAgentActivityInput, Dr as OpenRouterChatInput, Ds as OrchestrationEventMetadata, Dt as mcpOAuthStorageName, E as DesignGuideReceipt, Ea as ExternalLauncherUnknownEditorError, Ec as ThreadPairTriageAdvancedPayload$1, Ei as SshDeviceHostConfig, El as HubClientAssetGrantInput, En as ThreadWaitResult, Eo as HubTunnelControl, Er as OpenRouterApiKeyError, Es as OrchestrationEvent, Et as McpServerRegistration, F as DesignStatusReceipt, Fa as PreviewAutomationInvalidSelectorError, Fc as ThreadRuntimeModeSetPayload$1, Fi as planSettingsSync, Fl as AuthAccessTokenType, Fn as ThreadAskNotPermittedError, Fo as HubAnalyticsQuery, Fr as HubTaskCreateInput, Fs as OrchestrationMessageRole, Ft as AgentAssetListFilter, G as FeedCleanupResult, Ga as PreviewAutomationResizeInput, Gc as ThreadUnsnoozedPayload$1, Gi as PluginManifest, Gl as EnvironmentAuthorizationError, Gn as TicketResolveError, Go as ThreadWatchFailedError, Gr as TaskNotStartableError, Gs as OrchestrationThreadActivityTone, Gt as MemoryAppendInput, H as FeedArticle, Ha as PreviewAutomationRecordingStatus, Hc as ThreadUnarchivedPayload$1, Hi as MODEL_PICKER_JUMP_KEYBINDING_COMMANDS, Hl as AuthReviewWriteScope, Hn as TrackerApiKeyError, Ho as ThreadEvidenceReportResult, Hr as TaskListFilter, Hs as OrchestrationSessionStatus, Ht as AssetCompressResult, I as DesignStatusRequest, Ia as PreviewAutomationMalformedResponseError, Ic as ThreadScheduledTaskCancelledPayload$1, Ii as describeFusionPromptRejection, Il as AuthAccessWriteScope, In as ThreadAskResult, Io as THREAD_EVIDENCE_REPORT_MAX_CHARS, Ir as HubTaskPutInput, Is as OrchestrationProposedPlanId, It as AgentAssetName, J as FeedListResult, Ja as PreviewAutomationScrollInput, Jc as ANTIGRAVITY_DEFAULT_MODEL, Ji as ResourceMonitorCommand, Jl as isChatProject, Jn as ProjectListEntriesError, Jo as ThreadWatchReviewResult, Jr as TaskSourceSelector, Js as PROVIDER_SEND_TURN_MAX_DOCUMENT_BYTES, Jt as ThreadCleanupResult, K as FeedEngagement, Ka as PreviewAutomationResizeResult, Kc as ThreadWorkspaceLifecycle, Ki as DesktopHostTelemetryMessage, Kl as ServerAuthSessionMethod, Kn as TicketResolveInput, Ko as ThreadWatchNotPermittedError, Kr as TaskProposeInput, Ks as OrchestrationThreadPairGate, Kt as MemoryAppendResult, L as DesignStylesReceipt, La as PreviewAutomationNavigateInput, Lc as ThreadScheduledTaskCreatedPayload$1, Li as rejectFusionPromptOverride, Ll as AuthAdministrativeScopes, Ln as ThreadAskToolError, Lo as THREAD_REVIEW_ITEM_MAX_BYTES, Lr as Task, Ls as OrchestrationReadModel, Lt as AgentAssetWriteInput, M as DesignRenderReceipt, Ma as PreviewAutomationError, Mc as ThreadPullRequestsUpdatedPayload, Mi as SETTINGS_SYNC_FILE_PATH, Ml as HubServerMembership, Mn as ThreadAdviseToolError, Mo as HUB_ANALYTICS_QUERY_LIMITS, Mr as TypeSafeAskInput, Ms as OrchestrationGetTurnDiffResult, Mt as AgentAsset, N as DesignRenderRequest, Na as PreviewAutomationEvaluateInput, Nc as ThreadQueuedMessageRemovedPayload$1, Ni as SettingsSyncPayload, Nl as AuthAccessReadScope, Nn as ThreadAskFailedError, No as HubAnalyticsFactInput, Nr as TypeSafeAskResult, Ns as OrchestrationGetWorkflowScriptError, Nt as AgentAssetFiles, O as DesignInspectReceipt, Oa as PREVIEW_AUTOMATION_V1_OPERATIONS, Oc as ThreadPinnedPayload$1, Oi as EMPTY_WORKTREE_CLEANUP_PREVIEW, Ol as HubClientEnrollmentInput, On as ThreadAdviseFailedError, Oo as HubLiveActivityRegistrationInput, Or as OpenRouterChatResult, Os as OrchestrationEventType, Ot as mcpSecretStorageName, P as DesignSelection, Pa as PreviewAutomationExecutionError, Pc as ThreadRevertedPayload$1, Pi as filterSyncedSettings, Pl as AuthAccessStreamError, Pn as ThreadAskInput, Po as HubAnalyticsPage, Pr as DEFAULT_TASK_SOURCE, Ps as OrchestrationMessage, Pt as AgentAssetKind, Q as FeedSourceId, Qa as PreviewAutomationSnapshotInput, Qc as DEFAULT_TEXT_GENERATION_MODEL_BY_PROVIDER, Qi as MONITOR_TOOL_TASK_TYPES, Ql as CheckpointRef, Qn as P4ProjectFile, Qo as CompressMode, Qr as TaskToolUnavailableError, Qs as ProjectDeletedPayload$1, Qt as ThreadContextSummarizer, R as DesignStylesRequest, Ra as PreviewAutomationNoAvailableHostError, Rc as ThreadScheduledTaskFiredPayload$1, Ri as resolveFusionPromptOverride, Rl as AuthClientMetadataDeviceType, Rn as ThreadGateRespondInput, Rr as TaskCreateInput, Rs as OrchestrationScheduledTaskId, Rt as HubLinkError, S as DesignSubscribeRequest, Sa as EDITORS, Sc as ThreadPairGateAdvancedPayload$1, Si as DeviceToolScreenshotResult, Sl as VcsProcessTimeoutError, Sn as ThreadSpawnNotPermittedError, So as EnvironmentScopeRequiredError, Sr as ServerSettings, Ss as OrchestrationCheckpointStatus, St as AssetWorkspaceRootNormalizationError, Ta as ExternalLauncherEditorSpawnError, Tc as ThreadPairGateResolvedPayload$1, Ti as LOCAL_DEVICE_HOST_ID, Tl as HubAccountId, Tn as ThreadWaitInput, To as HUB_TUNNEL_WEBSOCKET_PROTOCOL, Tr as DEFAULT_OPENROUTER_DECISIONS_MODEL, Ts as OrchestrationDispatchCommandError, Tt as McpServerName, U as FeedArticleId, Ua as PreviewAutomationRemoteUnavailableError, Uc as ThreadUnpinnedPayload$1, Ui as ResolvedKeybindingRule, Ul as AuthStandardClientScopes, Un as TicketCommentInput, Uo as ThreadWatchEventsInput, Ur as TaskNotFoundError, Us as OrchestrationShellSnapshot, Ut as AssetCompressValidationFailedError, V as FEED_CATEGORIES, Va as PreviewAutomationRecordingArtifact, Vc as ThreadTurnDiffCompletedPayload$1, Vi as KeybindingsConfigError, Vl as AuthOrchestrationReadScope, Vn as SupervisorApiKeyError, Vo as ThreadEvidenceReportInput, Vr as TaskLabel, Vs as OrchestrationSession, Vt as AssetCompressRefusedError, W as FeedCleanupInput, Wa as PreviewAutomationRequestQueueClosedError, Wc as ThreadUnpromptedSubagentsSetPayload$1, Wi as THREAD_JUMP_KEYBINDING_COMMANDS, Wl as AuthTerminalOperateScope, Wn as TicketCommentResult, Wo as ThreadWatchEventsResult, Wr as TaskNotLinkedError, Ws as OrchestrationThread, Wt as MemoryAppendFailedError, X as FeedRefreshResult, Xa as PreviewAutomationSetColorSchemeResult, Xc as DEFAULT_MODEL_BY_PROVIDER, Xi as INERT_TASK_TYPES, Xl as ApprovalRequestId, Xn as ProjectSearchEntriesError, Xo as WatchToolUnavailableError, Xr as TaskStoreError, Xs as PROVIDER_SEND_TURN_MAX_INPUT_CHARS, Xt as ThreadConfigureResult, Y as FeedMarkReadInput, Ya as PreviewAutomationSetColorSchemeInput, Yc as DEFAULT_MODEL, Yi as ResourceMonitorEvent, Yl as AgentAssetId, Yn as ProjectReadFileError, Yo as ThreadWatchToolError, Yr as TaskStatus, Ys as PROVIDER_SEND_TURN_MAX_IMAGE_BYTES, Yt as ThreadConfigureInput, Z as FeedSource, Za as PreviewAutomationSnapshot, Zi as MONITOR_TASK_TYPES, Zl as AuthSessionId, Zn as ProjectWriteFileError, Zo as ChatAttachment, Zr as TaskToolError, Zs as ProjectCreatedPayload$1, Zt as ThreadContextReadResult, _ as UserInputRankingError, _a as TerminalNotRunningError, _c as ThreadMessageSentPayload, _i as DeviceToolCloseInput, _l as VcsProcessMissingExitCodeError, _n as ThreadRenameRejectedError, _o as EnvironmentHttpCommonError, _r as DEFAULT_SERVER_SETTINGS, _s as ModelSelection, _t as AssetWorkspaceAssetNotFoundError, a as ComputerUseDeviceRequest, aa as UsageLimitSourceId, ac as ProviderSessionRuntimeStatus, ai as DeviceColorFilter, al as isProviderDriverKind$1, an as ThreadMergeChildResult, ao as PreviewAutomationUnavailableError, ar as ServerProcessResourceHistoryFailureTag, at as parentThreadIdFromSidechat, au as PortSchema, b as DesignRpcGroup, ba as TerminalWriteError, bc as ThreadPairCursorAdvancedPayload$1, bi as DeviceToolOpenInput, bl as VcsProcessSpawnError, bn as ThreadSnoozeResult, bo as EnvironmentRequestInvalidError, br as OpenCodeSettings, bs as OrchestrationAggregateKind, bt as AssetWorkspacePathValidationError, c as ComputerUseHostRegistration, ca as ProviderRespondToUserInputInput, cc as ThreadActivityAppendedPayload$1, ci as DeviceHostId, cl as PullRequestUnavailableError, cn as ThreadPairCreateInput, co as FILL_PREVIEW_VIEWPORT, cr as ServerSelfUpdateError, cs as FUSION_GATE_UNWATCHED_SUMMARY, ct as AssetLocalFileNotFoundError, cu as ProviderItemId, d as ComputerUseJsInput, da as ProviderStopSessionInput, dc as ThreadCompressModeSetPayload$1, di as DeviceListInput, dl as resolvePullRequestAuthorFilter, dn as ThreadPairDetachResult, do as PreviewTabId, dr as ClaudeSettings, ds as FUSION_RETRY_PROMPT_PREFIX, dt as AssetPreviewTypeValidationError, du as RuntimeTaskId, ea as WorkflowScriptProvenance, ec as ProjectScript, ei as UNKNOWN_TASK_STATUS_FALLBACK, el as ModelCapabilities, en as ThreadContextUpdateResult, eo as PreviewAutomationTabNotFoundError, er as GitCommandError, es as DEFAULT_PROVIDER_INTERACTION_MODE, et as FeedSummary, eu as EnvironmentId, f as ComputerUseOutput, fc as ThreadComputerUseGrantSetPayload$1, fi as DeviceNotFoundError, fl as SourceControlProviderError, fn as ThreadPlanReadInput, fo as DesktopBackendBootstrap, fr as CodexSettings, fs as FUSION_REVIEW_MESSAGE_ID_PREFIX, ft as AssetProjectFaviconInspectionError, fu as TaskId, g as ProviderSetupError, ga as TerminalHistoryError, gc as ThreadMessageQueuedPayload$1, gi as DeviceSessionDetailInput, gl as VcsProcessExitError, gn as ThreadRenameInput, go as EnvironmentHttpApi, gr as DEFAULT_PROVIDER_HEALTH_REFRESH_INTERVAL, gs as JEV_CONSULTED_ACTIVITY_KIND, gt as AssetWorkspaceAssetInspectionError, gu as TurnId, h as DeviceCommandResult, ha as TerminalCwdStatError, hc as ThreadInteractionModeSetPayload$1, hi as DevicePlatformUnavailableError, hl as VcsDriverKind, hn as ThreadPlanUpdateResult, ho as EnvironmentAuthenticatedPrincipal, hr as DEFAULT_JEV_ROLE_ROUTING_MIN_CONFIDENCE, hs as FusionReviewPolicy, ht as AssetSigningKeyLoadError, hu as TrimmedNonEmptyString, i as COMPUTER_USE_MAX_OUTPUT_CHARS, ia as UsageLimitSourceError, ic as ProviderInteractionMode, ii as DeviceBootError, il as defaultInstanceIdForDriver, in as ThreadMergeChildInput, io as PreviewAutomationTypeInput, ir as ServerLocalCliUpdateError, is as FUSION_EVIDENCE_REPORT_REPAIR_MESSAGE_ID_PREFIX, it as isSidechatThreadId, iu as NonNegativeInt, ja as PreviewAutomationControlInterruptedError, jc as ThreadPullRequestStack, ji as SETTINGS_SYNC_ASSET_NAME, jl as HubClientSocketTicketInput, jn as ThreadAdviseResult, jo as HubPushRegistrationInput, jr as TypeSafeAskFailedError, js as OrchestrationGetTurnDiffError, jt as AGENT_ASSET_TOTAL_MAX_BYTES, k as DesignInspectRequest, ka as PreviewAutomationClickInput, kc as ThreadProposedPlanUpsertedPayload$1, ki as WORKTREE_CLEANUP_RULES, kl as HubClientId, kn as ThreadAdviseInput, ko as HubLiveActivityRemoveInput, kr as OpenRouterDecideInput, ks as OrchestrationGetFullThreadDiffError, kt as mcpUserScopeSessionName, l as ComputerUseHostReport, la as ProviderSendTurnInput, lc as ThreadArchivedPayload$1, li as DeviceHostUnavailableError, ll as pullRequestHostOf, ln as ThreadPairCreateResult, lo as PreviewInvalidUrlError, lr as isProviderAvailable, ls as FUSION_JEV_PROMPT_PREFIX, lt as AssetLocalPathValidationError, lu as RuntimeItemId, m as DeviceCommandInput, ma as TerminalCwdNotFoundError, mc as ThreadDeletedPayload$1, mi as DevicePlatformAvailability, ml as SourceControlRepositoryError, mn as ThreadPlanUpdateInput, mo as EnvironmentAuthenticatedAuth, mr as DEFAULT_AUTOMATIC_GIT_FETCH_INTERVAL, ms as FusionReviewExperiment, mt as AssetProjectFaviconResolutionError, mu as ThreadPairId, n as WsRpcGroup, na as ProviderResetCreditError, nc as ProjectionPendingApprovalStatus, ni as DeviceActionInput, nl as ProviderDriverKind, nn as ThreadControlRejectedError, no as PreviewAutomationTargetNotEditableError, nr as GitPullRequestMaterializationError, ns as FUSION_ACTIVATION_PROMPT_PREFIX, nt as BtwAskError, nu as IsoDateTime, o as ComputerUseEnrollmentRequest, oa as ProviderInterruptTurnInput, oc as ProviderUserInputAnswers, oi as DeviceDetail, ol as PullRequestOperationError, on as ThreadMessageInput, oo as PreviewAutomationUnsupportedClientError, or as ServerProvider, os as FUSION_GATE_MESSAGE_ID_PREFIX, ot as AssetAttachmentNotFoundError, ou as PositiveInt, p as ComputerUseSourceAttestation, pa as TerminalCwdNotDirectoryError, pc as ThreadCreatedPayload$1, pi as DeviceOperationError, pl as SourceControlProviderKind, pn as ThreadPlanReadResult, po as EnvironmentAuthInvalidError, pr as CursorSettings, ps as FUSION_REVIEW_PROMPT_PREFIX, pt as AssetProjectFaviconNotFoundError, pu as ThreadId, q as FeedError, qa as PreviewAutomationResultTooLargeError, qc as orchestrationThreadNotFoundMessage, qi as DesktopTelemetryControlMessage, ql as P4_CHAT_PROJECT_ID, qn as TicketResolveResult, qo as ThreadWatchReviewInput, qr as TaskProposeResult, qs as OrchestrationThreadSearchSource, qt as ThreadCleanupInput, ra as ProviderResetCreditOutcome, rc as ProviderApprovalDecision, ri as DeviceActionUnavailableError, rl as ProviderInstanceId, rn as ThreadControlToolError, ro as PreviewAutomationTimeoutError, rr as TextGenerationError, rs as FUSION_ADVICE_PROMPT_PREFIX, rt as SIDECHAT_THREAD_ID_PREFIX, ru as MessageId, s as ComputerUseError, sa as ProviderRespondToRequestInput, sc as RuntimeMode$1, si as DeviceDetailInput, sl as PullRequestStack, sn as ThreadMessageResult, so as PreviewAutomationWaitForInput, sr as ServerProviderUpdateError, ss as FUSION_GATE_PROMPT_PREFIX, st as AssetLocalFileInspectionError, su as ProjectId, t as WS_METHODS, ta as isToolLifecycleItemType, tc as ProjectionPendingApprovalDecision, ti as isReadableTaskId, tl as PREFERRED_DEFAULT_CODEX_MODELS, tn as ThreadControlNotPermittedError, to as PreviewAutomationTabTargetInput, tr as GitManagerError, ts as DEFAULT_RUNTIME_MODE$2, tt as UsageReadError, tu as EventId, u as ComputerUseHostResponse, ua as ProviderSessionStartInput, uc as ThreadCompletionFields, ui as DeviceId, ul as pullRequestProviderRequirement, un as ThreadPairDetachInput, uo as PreviewSessionLookupError, ur as AntigravitySettings, us as FUSION_NO_OBJECTION_TEXT, ut as AssetMdxBuildError, uu as RuntimeRequestId, v as DesignAssetRequest, va as TerminalResizeError, vc as ThreadMetaUpdatedPayload$1, vi as DeviceToolError, vl as VcsProcessOutputLimitError, vn as ThreadRenameResult, vo as EnvironmentInternalError, vr as GrokSettings, vs as ORCHESTRATION_WS_METHODS, vt as AssetWorkspaceContextNotFoundError, w as DesignApplyRequest, wa as ExternalLauncherCommandNotFoundError, wc as ThreadPairGateOpenedPayload$1, wi as DeviceToolUnavailableError, wl as VcsUnsupportedOperationError, wn as ThreadToolUnavailableError, wr as clampProviderHealthRefreshSeconds, ws as OrchestrationCommandReceiptStatus, wt as McpRegistryError, x as DesignServiceError, xa as DesktopPreviewScreenshotArtifactSchema, xc as ThreadPairDetachedPayload$1, xi as DeviceToolOpenResult, xl as VcsProcessStdinWriteError, xn as ThreadSpawnInput, xo as EnvironmentResourceNotFoundError, xr as STORAGE_CLEANUP_TARGETS, xs as OrchestrationCheckpointFile, xt as AssetWorkspaceResolutionError, y as DesignHumanApplyRequest, ya as TerminalSessionLookupError, yc as ThreadPairCreatedPayload$1, yi as DeviceToolListResult, yl as VcsProcessOutputReadError, yn as ThreadSnoozeInput, yo as EnvironmentOperationForbiddenError, yr as MuseSettings, ys as OrchestrationActorKind, yt as AssetWorkspaceContextResolutionError, z as DesignValidateReceipt, za as PreviewAutomationOpenInput, zc as ThreadSessionSetPayload$1, zi as KeybindingRule, zl as AuthEnvironmentScopes, zn as ThreadGateRespondResult, zo as THREAD_REVIEW_SCAN_LIMIT, zr as TaskCurrentInput, zs as OrchestrationScheduledTaskStatus, zt as agentAssetTotalBytes } from "./src-DjTfFS-z.mjs";
|
|
5
|
-
import { a as documentContentDigest, c as parseDesign, d as reviewState, f as selectLayoutItems, i as diagnostic, l as patchNode, m as validateDesign, n as canonicalSerialize, o as fileHash, p as semanticDiff, r as computeLayout, s as isConfinedRelativePath, t as buildIndexes } from "./runtime-
|
|
4
|
+
import { $ as FeedSourceUpsertInput, $a as PreviewAutomationStatus, $c as MODEL_SLUG_ALIASES_BY_PROVIDER, $i as UserInputQuestion, $l as CommandId, $n as P4_PROJECT_FILE_NAME, $o as DEFAULT_COMPRESS_MODE, $r as TaskUpdateInput, $s as ProjectMetaUpdatedPayload$1, $t as ThreadContextUpdateInput, A as DesignLibraryManifest, Aa as PreviewAutomationClientDisconnectedError, Ac as ThreadPullRequestLink, Ai as anyWorktreeRuleEnabled, Al as HubClientRevokeInput, An as ThreadAdviseNotPermittedError, Ao as HubNotificationPreferences, Ar as OpenRouterToolFailedError, As as OrchestrationGetSnapshotError, At as AGENT_ASSET_FILE_MAX_CHARS, B as DesignValidateRequest, Ba as PreviewAutomationPressInput, Bc as ThreadSnoozedPayload$1, Bi as KeybindingsConfig, Bl as AuthOrchestrationOperateScope, Bn as ThreadRequestResult, Bo as ThreadEvidenceReportActivity, Br as TaskGetInput, Bs as OrchestrationSearchThreadsError, Bt as AssetCompressInput, C as DesignApplyReceipt, Ca as ExternalLauncherBrowserSpawnError, Cc as ThreadPairGateId, Ci as DeviceToolTargetInput, Cl as VcsRepositoryDetectionError, Cn as ThreadSpawnResult, Co as HUB_TUNNEL_INITIAL_WINDOW_BYTES, Cr as ServerSettingsError, Cs as OrchestrationCheckpointSummary, Ct as FilesystemBrowseError, D as DesignGuideRequest, Da as ExternalLauncherUnsupportedEditorError, Dc as ThreadPinReorderedPayload$1, Di as DEFAULT_WORKTREE_CLEANUP_SETTINGS, Dl as HubClientEnrollmentExchange, Dn as AdviseToolUnavailableError, Do as HubAgentActivityInput, Dr as OpenRouterChatInput, Ds as OrchestrationEventMetadata, Dt as mcpOAuthStorageName, E as DesignGuideReceipt, Ea as ExternalLauncherUnknownEditorError, Ec as ThreadPairTriageAdvancedPayload$1, Ei as SshDeviceHostConfig, El as HubClientAssetGrantInput, En as ThreadWaitResult, Eo as HubTunnelControl, Er as OpenRouterApiKeyError, Es as OrchestrationEvent, Et as McpServerRegistration, F as DesignStatusReceipt, Fa as PreviewAutomationInvalidSelectorError, Fc as ThreadRuntimeModeSetPayload$1, Fi as planSettingsSync, Fl as AuthAccessTokenType, Fn as ThreadAskNotPermittedError, Fo as HubAnalyticsQuery, Fr as HubTaskCreateInput, Fs as OrchestrationMessageRole, Ft as AgentAssetListFilter, G as FeedCleanupResult, Ga as PreviewAutomationResizeInput, Gc as ThreadUnsnoozedPayload$1, Gi as PluginManifest, Gl as EnvironmentAuthorizationError, Gn as TicketResolveError, Go as ThreadWatchFailedError, Gr as TaskNotStartableError, Gs as OrchestrationThreadActivityTone, Gt as MemoryAppendInput, H as FeedArticle, Ha as PreviewAutomationRecordingStatus, Hc as ThreadUnarchivedPayload$1, Hi as MODEL_PICKER_JUMP_KEYBINDING_COMMANDS, Hl as AuthReviewWriteScope, Hn as TrackerApiKeyError, Ho as ThreadEvidenceReportResult, Hr as TaskListFilter, Hs as OrchestrationSessionStatus, Ht as AssetCompressResult, I as DesignStatusRequest, Ia as PreviewAutomationMalformedResponseError, Ic as ThreadScheduledTaskCancelledPayload$1, Ii as describeFusionPromptRejection, Il as AuthAccessWriteScope, In as ThreadAskResult, Io as THREAD_EVIDENCE_REPORT_MAX_CHARS, Ir as HubTaskPutInput, Is as OrchestrationProposedPlanId, It as AgentAssetName, J as FeedListResult, Ja as PreviewAutomationScrollInput, Jc as ANTIGRAVITY_DEFAULT_MODEL, Ji as ResourceMonitorCommand, Jl as isChatProject, Jn as ProjectListEntriesError, Jo as ThreadWatchReviewResult, Jr as TaskSourceSelector, Js as PROVIDER_SEND_TURN_MAX_DOCUMENT_BYTES, Jt as ThreadCleanupResult, K as FeedEngagement, Ka as PreviewAutomationResizeResult, Kc as ThreadWorkspaceLifecycle, Ki as DesktopHostTelemetryMessage, Kl as ServerAuthSessionMethod, Kn as TicketResolveInput, Ko as ThreadWatchNotPermittedError, Kr as TaskProposeInput, Ks as OrchestrationThreadPairGate, Kt as MemoryAppendResult, L as DesignStylesReceipt, La as PreviewAutomationNavigateInput, Lc as ThreadScheduledTaskCreatedPayload$1, Li as rejectFusionPromptOverride, Ll as AuthAdministrativeScopes, Ln as ThreadAskToolError, Lo as THREAD_REVIEW_ITEM_MAX_BYTES, Lr as Task, Ls as OrchestrationReadModel, Lt as AgentAssetWriteInput, M as DesignRenderReceipt, Ma as PreviewAutomationError, Mc as ThreadPullRequestsUpdatedPayload, Mi as SETTINGS_SYNC_FILE_PATH, Ml as HubServerMembership, Mn as ThreadAdviseToolError, Mo as HUB_ANALYTICS_QUERY_LIMITS, Mr as TypeSafeAskInput, Ms as OrchestrationGetTurnDiffResult, Mt as AgentAsset, N as DesignRenderRequest, Na as PreviewAutomationEvaluateInput, Nc as ThreadQueuedMessageRemovedPayload$1, Ni as SettingsSyncPayload, Nl as AuthAccessReadScope, Nn as ThreadAskFailedError, No as HubAnalyticsFactInput, Nr as TypeSafeAskResult, Ns as OrchestrationGetWorkflowScriptError, Nt as AgentAssetFiles, O as DesignInspectReceipt, Oa as PREVIEW_AUTOMATION_V1_OPERATIONS, Oc as ThreadPinnedPayload$1, Oi as EMPTY_WORKTREE_CLEANUP_PREVIEW, Ol as HubClientEnrollmentInput, On as ThreadAdviseFailedError, Oo as HubLiveActivityRegistrationInput, Or as OpenRouterChatResult, Os as OrchestrationEventType, Ot as mcpSecretStorageName, P as DesignSelection, Pa as PreviewAutomationExecutionError, Pc as ThreadRevertedPayload$1, Pi as filterSyncedSettings, Pl as AuthAccessStreamError, Pn as ThreadAskInput, Po as HubAnalyticsPage, Pr as DEFAULT_TASK_SOURCE, Ps as OrchestrationMessage, Pt as AgentAssetKind, Q as FeedSourceId, Qa as PreviewAutomationSnapshotInput, Qc as DEFAULT_TEXT_GENERATION_MODEL_BY_PROVIDER, Qi as MONITOR_TOOL_TASK_TYPES, Ql as CheckpointRef, Qn as P4ProjectFile, Qo as CompressMode, Qr as TaskToolUnavailableError, Qs as ProjectDeletedPayload$1, Qt as ThreadContextSummarizer, R as DesignStylesRequest, Ra as PreviewAutomationNoAvailableHostError, Rc as ThreadScheduledTaskFiredPayload$1, Ri as resolveFusionPromptOverride, Rl as AuthClientMetadataDeviceType, Rn as ThreadGateRespondInput, Rr as TaskCreateInput, Rs as OrchestrationScheduledTaskId, Rt as HubLinkError, S as DesignSubscribeRequest, Sa as EDITORS, Sc as ThreadPairGateAdvancedPayload$1, Si as DeviceToolScreenshotResult, Sl as VcsProcessTimeoutError, Sn as ThreadSpawnNotPermittedError, So as EnvironmentScopeRequiredError, Sr as ServerSettings, Ss as OrchestrationCheckpointStatus, St as AssetWorkspaceRootNormalizationError, Ta as ExternalLauncherEditorSpawnError, Tc as ThreadPairGateResolvedPayload$1, Ti as LOCAL_DEVICE_HOST_ID, Tl as HubAccountId, Tn as ThreadWaitInput, To as HUB_TUNNEL_WEBSOCKET_PROTOCOL, Tr as DEFAULT_OPENROUTER_DECISIONS_MODEL, Ts as OrchestrationDispatchCommandError, Tt as McpServerName, U as FeedArticleId, Ua as PreviewAutomationRemoteUnavailableError, Uc as ThreadUnpinnedPayload$1, Ui as ResolvedKeybindingRule, Ul as AuthStandardClientScopes, Un as TicketCommentInput, Uo as ThreadWatchEventsInput, Ur as TaskNotFoundError, Us as OrchestrationShellSnapshot, Ut as AssetCompressValidationFailedError, V as FEED_CATEGORIES, Va as PreviewAutomationRecordingArtifact, Vc as ThreadTurnDiffCompletedPayload$1, Vi as KeybindingsConfigError, Vl as AuthOrchestrationReadScope, Vn as SupervisorApiKeyError, Vo as ThreadEvidenceReportInput, Vr as TaskLabel, Vs as OrchestrationSession, Vt as AssetCompressRefusedError, W as FeedCleanupInput, Wa as PreviewAutomationRequestQueueClosedError, Wc as ThreadUnpromptedSubagentsSetPayload$1, Wi as THREAD_JUMP_KEYBINDING_COMMANDS, Wl as AuthTerminalOperateScope, Wn as TicketCommentResult, Wo as ThreadWatchEventsResult, Wr as TaskNotLinkedError, Ws as OrchestrationThread, Wt as MemoryAppendFailedError, X as FeedRefreshResult, Xa as PreviewAutomationSetColorSchemeResult, Xc as DEFAULT_MODEL_BY_PROVIDER, Xi as INERT_TASK_TYPES, Xl as ApprovalRequestId, Xn as ProjectSearchEntriesError, Xo as WatchToolUnavailableError, Xr as TaskStoreError, Xs as PROVIDER_SEND_TURN_MAX_INPUT_CHARS, Xt as ThreadConfigureResult, Y as FeedMarkReadInput, Ya as PreviewAutomationSetColorSchemeInput, Yc as DEFAULT_MODEL, Yi as ResourceMonitorEvent, Yl as AgentAssetId, Yn as ProjectReadFileError, Yo as ThreadWatchToolError, Yr as TaskStatus, Ys as PROVIDER_SEND_TURN_MAX_IMAGE_BYTES, Yt as ThreadConfigureInput, Z as FeedSource, Za as PreviewAutomationSnapshot, Zi as MONITOR_TASK_TYPES, Zl as AuthSessionId, Zn as ProjectWriteFileError, Zo as ChatAttachment, Zr as TaskToolError, Zs as ProjectCreatedPayload$1, Zt as ThreadContextReadResult, _ as UserInputRankingError, _a as TerminalNotRunningError, _c as ThreadMessageSentPayload, _i as DeviceToolCloseInput, _l as VcsProcessMissingExitCodeError, _n as ThreadRenameRejectedError, _o as EnvironmentHttpCommonError, _r as DEFAULT_SERVER_SETTINGS, _s as ModelSelection, _t as AssetWorkspaceAssetNotFoundError, a as ComputerUseDeviceRequest, aa as UsageLimitSourceId, ac as ProviderSessionRuntimeStatus, ai as DeviceColorFilter, al as isProviderDriverKind$1, an as ThreadMergeChildResult, ao as PreviewAutomationUnavailableError, ar as ServerProcessResourceHistoryFailureTag, at as parentThreadIdFromSidechat, au as PortSchema, b as DesignRpcGroup, ba as TerminalWriteError, bc as ThreadPairCursorAdvancedPayload$1, bi as DeviceToolOpenInput, bl as VcsProcessSpawnError, bn as ThreadSnoozeResult, bo as EnvironmentRequestInvalidError, br as OpenCodeSettings, bs as OrchestrationAggregateKind, bt as AssetWorkspacePathValidationError, c as ComputerUseHostRegistration, ca as ProviderRespondToUserInputInput, cc as ThreadActivityAppendedPayload$1, ci as DeviceHostId, cl as PullRequestUnavailableError, cn as ThreadPairCreateInput, co as FILL_PREVIEW_VIEWPORT, cr as ServerSelfUpdateError, cs as FUSION_GATE_UNWATCHED_SUMMARY, ct as AssetLocalFileNotFoundError, cu as ProviderItemId, d as ComputerUseJsInput, da as ProviderStopSessionInput, dc as ThreadCompressModeSetPayload$1, di as DeviceListInput, dl as resolvePullRequestAuthorFilter, dn as ThreadPairDetachResult, do as PreviewTabId, dr as ClaudeSettings, ds as FUSION_RETRY_PROMPT_PREFIX, dt as AssetPreviewTypeValidationError, du as RuntimeTaskId, ea as WorkflowScriptProvenance, ec as ProjectScript, ei as UNKNOWN_TASK_STATUS_FALLBACK, el as ModelCapabilities, en as ThreadContextUpdateResult, eo as PreviewAutomationTabNotFoundError, er as GitCommandError, es as DEFAULT_PROVIDER_INTERACTION_MODE, et as FeedSummary, eu as EnvironmentId, f as ComputerUseOutput, fc as ThreadComputerUseGrantSetPayload$1, fi as DeviceNotFoundError, fl as SourceControlProviderError, fn as ThreadPlanReadInput, fo as DesktopBackendBootstrap, fr as CodexSettings, fs as FUSION_REVIEW_MESSAGE_ID_PREFIX, ft as AssetProjectFaviconInspectionError, fu as TaskId, g as ProviderSetupError, ga as TerminalHistoryError, gc as ThreadMessageQueuedPayload$1, gi as DeviceSessionDetailInput, gl as VcsProcessExitError, gn as ThreadRenameInput, go as EnvironmentHttpApi, gr as DEFAULT_PROVIDER_HEALTH_REFRESH_INTERVAL, gs as JEV_CONSULTED_ACTIVITY_KIND, gt as AssetWorkspaceAssetInspectionError, gu as TurnId, h as DeviceCommandResult, ha as TerminalCwdStatError, hc as ThreadInteractionModeSetPayload$1, hi as DevicePlatformUnavailableError, hl as VcsDriverKind, hn as ThreadPlanUpdateResult, ho as EnvironmentAuthenticatedPrincipal, hr as DEFAULT_JEV_ROLE_ROUTING_MIN_CONFIDENCE, hs as FusionReviewPolicy, ht as AssetSigningKeyLoadError, hu as TrimmedNonEmptyString, i as COMPUTER_USE_MAX_OUTPUT_CHARS, ia as UsageLimitSourceError, ic as ProviderInteractionMode, ii as DeviceBootError, il as defaultInstanceIdForDriver, in as ThreadMergeChildInput, io as PreviewAutomationTypeInput, ir as ServerLocalCliUpdateError, is as FUSION_EVIDENCE_REPORT_REPAIR_MESSAGE_ID_PREFIX, it as isSidechatThreadId, iu as NonNegativeInt, ja as PreviewAutomationControlInterruptedError, jc as ThreadPullRequestStack, ji as SETTINGS_SYNC_ASSET_NAME, jl as HubClientSocketTicketInput, jn as ThreadAdviseResult, jo as HubPushRegistrationInput, jr as TypeSafeAskFailedError, js as OrchestrationGetTurnDiffError, jt as AGENT_ASSET_TOTAL_MAX_BYTES, k as DesignInspectRequest, ka as PreviewAutomationClickInput, kc as ThreadProposedPlanUpsertedPayload$1, ki as WORKTREE_CLEANUP_RULES, kl as HubClientId, kn as ThreadAdviseInput, ko as HubLiveActivityRemoveInput, kr as OpenRouterDecideInput, ks as OrchestrationGetFullThreadDiffError, kt as mcpUserScopeSessionName, l as ComputerUseHostReport, la as ProviderSendTurnInput, lc as ThreadArchivedPayload$1, li as DeviceHostUnavailableError, ll as pullRequestHostOf, ln as ThreadPairCreateResult, lo as PreviewInvalidUrlError, lr as isProviderAvailable, ls as FUSION_JEV_PROMPT_PREFIX, lt as AssetLocalPathValidationError, lu as RuntimeItemId, m as DeviceCommandInput, ma as TerminalCwdNotFoundError, mc as ThreadDeletedPayload$1, mi as DevicePlatformAvailability, ml as SourceControlRepositoryError, mn as ThreadPlanUpdateInput, mo as EnvironmentAuthenticatedAuth, mr as DEFAULT_AUTOMATIC_GIT_FETCH_INTERVAL, ms as FusionReviewExperiment, mt as AssetProjectFaviconResolutionError, mu as ThreadPairId, n as WsRpcGroup, na as ProviderResetCreditError, nc as ProjectionPendingApprovalStatus, ni as DeviceActionInput, nl as ProviderDriverKind, nn as ThreadControlRejectedError, no as PreviewAutomationTargetNotEditableError, nr as GitPullRequestMaterializationError, ns as FUSION_ACTIVATION_PROMPT_PREFIX, nt as BtwAskError, nu as IsoDateTime, o as ComputerUseEnrollmentRequest, oa as ProviderInterruptTurnInput, oc as ProviderUserInputAnswers, oi as DeviceDetail, ol as PullRequestOperationError, on as ThreadMessageInput, oo as PreviewAutomationUnsupportedClientError, or as ServerProvider, os as FUSION_GATE_MESSAGE_ID_PREFIX, ot as AssetAttachmentNotFoundError, ou as PositiveInt, p as ComputerUseSourceAttestation, pa as TerminalCwdNotDirectoryError, pc as ThreadCreatedPayload$1, pi as DeviceOperationError, pl as SourceControlProviderKind, pn as ThreadPlanReadResult, po as EnvironmentAuthInvalidError, pr as CursorSettings, ps as FUSION_REVIEW_PROMPT_PREFIX, pt as AssetProjectFaviconNotFoundError, pu as ThreadId, q as FeedError, qa as PreviewAutomationResultTooLargeError, qc as orchestrationThreadNotFoundMessage, qi as DesktopTelemetryControlMessage, ql as P4_CHAT_PROJECT_ID, qn as TicketResolveResult, qo as ThreadWatchReviewInput, qr as TaskProposeResult, qs as OrchestrationThreadSearchSource, qt as ThreadCleanupInput, ra as ProviderResetCreditOutcome, rc as ProviderApprovalDecision, ri as DeviceActionUnavailableError, rl as ProviderInstanceId, rn as ThreadControlToolError, ro as PreviewAutomationTimeoutError, rr as TextGenerationError, rs as FUSION_ADVICE_PROMPT_PREFIX, rt as SIDECHAT_THREAD_ID_PREFIX, ru as MessageId, s as ComputerUseError, sa as ProviderRespondToRequestInput, sc as RuntimeMode$1, si as DeviceDetailInput, sl as PullRequestStack, sn as ThreadMessageResult, so as PreviewAutomationWaitForInput, sr as ServerProviderUpdateError, ss as FUSION_GATE_PROMPT_PREFIX, st as AssetLocalFileInspectionError, su as ProjectId, t as WS_METHODS, ta as isToolLifecycleItemType, tc as ProjectionPendingApprovalDecision, ti as isReadableTaskId, tl as PREFERRED_DEFAULT_CODEX_MODELS, tn as ThreadControlNotPermittedError, to as PreviewAutomationTabTargetInput, tr as GitManagerError, ts as DEFAULT_RUNTIME_MODE$2, tt as UsageReadError, tu as EventId, u as ComputerUseHostResponse, ua as ProviderSessionStartInput, uc as ThreadCompletionFields, ui as DeviceId, ul as pullRequestProviderRequirement, un as ThreadPairDetachInput, uo as PreviewSessionLookupError, ur as AntigravitySettings, us as FUSION_NO_OBJECTION_TEXT, ut as AssetMdxBuildError, uu as RuntimeRequestId, v as DesignAssetRequest, va as TerminalResizeError, vc as ThreadMetaUpdatedPayload$1, vi as DeviceToolError, vl as VcsProcessOutputLimitError, vn as ThreadRenameResult, vo as EnvironmentInternalError, vr as GrokSettings, vs as ORCHESTRATION_WS_METHODS, vt as AssetWorkspaceContextNotFoundError, w as DesignApplyRequest, wa as ExternalLauncherCommandNotFoundError, wc as ThreadPairGateOpenedPayload$1, wi as DeviceToolUnavailableError, wl as VcsUnsupportedOperationError, wn as ThreadToolUnavailableError, wr as clampProviderHealthRefreshSeconds, ws as OrchestrationCommandReceiptStatus, wt as McpRegistryError, x as DesignServiceError, xa as DesktopPreviewScreenshotArtifactSchema, xc as ThreadPairDetachedPayload$1, xi as DeviceToolOpenResult, xl as VcsProcessStdinWriteError, xn as ThreadSpawnInput, xo as EnvironmentResourceNotFoundError, xr as STORAGE_CLEANUP_TARGETS, xs as OrchestrationCheckpointFile, xt as AssetWorkspaceResolutionError, y as DesignHumanApplyRequest, ya as TerminalSessionLookupError, yc as ThreadPairCreatedPayload$1, yi as DeviceToolListResult, yl as VcsProcessOutputReadError, yn as ThreadSnoozeInput, yo as EnvironmentOperationForbiddenError, yr as MuseSettings, ys as OrchestrationActorKind, yt as AssetWorkspaceContextResolutionError, z as DesignValidateReceipt, za as PreviewAutomationOpenInput, zc as ThreadSessionSetPayload$1, zi as KeybindingRule, zl as AuthEnvironmentScopes, zn as ThreadGateRespondResult, zo as THREAD_REVIEW_SCAN_LIMIT, zr as TaskCurrentInput, zs as OrchestrationScheduledTaskStatus, zt as agentAssetTotalBytes } from "./src-KPj1bz7P.mjs";
|
|
5
|
+
import { a as documentContentDigest, c as parseDesign, d as reviewState, f as selectLayoutItems, i as diagnostic, l as patchNode, m as validateDesign, n as canonicalSerialize, o as fileHash, p as semanticDiff, r as computeLayout, s as isConfinedRelativePath, t as buildIndexes } from "./runtime-4S909Au8.mjs";
|
|
6
6
|
import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
|
|
7
7
|
import * as NodeServices from "@effect/platform-node/NodeServices";
|
|
8
8
|
import * as Console from "effect/Console";
|
|
@@ -261,7 +261,7 @@ const make$123 = () => {
|
|
|
261
261
|
const layer$124 = Layer.sync(NetService, make$123);
|
|
262
262
|
//#endregion
|
|
263
263
|
//#region package.json
|
|
264
|
-
var version$1 = "0.7.
|
|
264
|
+
var version$1 = "0.7.9";
|
|
265
265
|
//#endregion
|
|
266
266
|
//#region ../../packages/shared/src/serverInstance.ts
|
|
267
267
|
/**
|
|
@@ -37889,7 +37889,7 @@ function createStore(resolveRoot, options) {
|
|
|
37889
37889
|
});
|
|
37890
37890
|
watchers.set(root, watcher);
|
|
37891
37891
|
};
|
|
37892
|
-
const
|
|
37892
|
+
const resolve = async (request) => {
|
|
37893
37893
|
const target = decodeSubscribe(request, { onExcessProperty: "error" });
|
|
37894
37894
|
if (!target.documentPath.endsWith(".p4design")) throw new DesignServiceError({
|
|
37895
37895
|
code: "unsafe-path",
|
|
@@ -37897,13 +37897,17 @@ function createStore(resolveRoot, options) {
|
|
|
37897
37897
|
});
|
|
37898
37898
|
const root = await NodeFSP.realpath(await resolveRoot(target));
|
|
37899
37899
|
await confinedPath(root, target.documentPath);
|
|
37900
|
-
ensureWatcher(root);
|
|
37901
37900
|
return {
|
|
37902
37901
|
key: keyOf(root, target.documentPath),
|
|
37903
37902
|
root,
|
|
37904
37903
|
target
|
|
37905
37904
|
};
|
|
37906
37905
|
};
|
|
37906
|
+
const locate = async (request) => {
|
|
37907
|
+
const located = await resolve(request);
|
|
37908
|
+
ensureWatcher(located.root);
|
|
37909
|
+
return located;
|
|
37910
|
+
};
|
|
37907
37911
|
const load = async (key, root, target) => {
|
|
37908
37912
|
const prior = states.get(key) ?? {
|
|
37909
37913
|
target: {
|
|
@@ -38255,6 +38259,66 @@ function createStore(resolveRoot, options) {
|
|
|
38255
38259
|
};
|
|
38256
38260
|
});
|
|
38257
38261
|
};
|
|
38262
|
+
/** The optional Skia renderer, loaded once; a failed load is tried again on the next render. */
|
|
38263
|
+
const loadRenderer = async () => {
|
|
38264
|
+
try {
|
|
38265
|
+
renderer ??= (options.loadRenderer ?? (() => import("./renderer-CcbFiDA_.mjs")))();
|
|
38266
|
+
return await renderer;
|
|
38267
|
+
} catch (error) {
|
|
38268
|
+
renderer = void 0;
|
|
38269
|
+
throw new DesignServiceError({
|
|
38270
|
+
code: "renderer-unavailable",
|
|
38271
|
+
message: `Optional Skia CPU renderer could not load; install skia-canvas 3.0.8 for this host. ${error instanceof Error ? error.message : "Native backend unavailable"}`
|
|
38272
|
+
});
|
|
38273
|
+
}
|
|
38274
|
+
};
|
|
38275
|
+
const writePng = async (png) => {
|
|
38276
|
+
await NodeFSP.mkdir(options.artifactRoot, { recursive: true });
|
|
38277
|
+
const pngPath = NodePath.join(options.artifactRoot, `${fileHash(png)}.png`);
|
|
38278
|
+
await NodeFSP.writeFile(pngPath, png);
|
|
38279
|
+
return pngPath;
|
|
38280
|
+
};
|
|
38281
|
+
/**
|
|
38282
|
+
* The whole document scaled to fit `maxEdge` pixels, or null when it draws nothing. Reads the
|
|
38283
|
+
* file once without keeping state or watching its folder.
|
|
38284
|
+
*/
|
|
38285
|
+
const thumbnail = async (target, maxEdge) => {
|
|
38286
|
+
const { root, target: decoded } = await resolve(target);
|
|
38287
|
+
const bytes = await readConfined(root, decoded.documentPath);
|
|
38288
|
+
const parsed = parseDesign(bytes.toString("utf8"));
|
|
38289
|
+
if (parsed.status !== "editable") return null;
|
|
38290
|
+
const source = {
|
|
38291
|
+
fileHash: fileHash(bytes),
|
|
38292
|
+
document: parsed.document,
|
|
38293
|
+
dependencies: await loadDependencies(root, decoded.documentPath, parsed.document)
|
|
38294
|
+
};
|
|
38295
|
+
const context = source.dependencies?.context;
|
|
38296
|
+
const items = computeLayout(source.document, {}, context).items;
|
|
38297
|
+
if (!items.length) return null;
|
|
38298
|
+
const left = Math.min(...items.map((i) => i.bounds.x)), top = Math.min(...items.map((i) => i.bounds.y));
|
|
38299
|
+
const bounds = {
|
|
38300
|
+
x: left,
|
|
38301
|
+
y: top,
|
|
38302
|
+
width: Math.max(...items.map((i) => i.bounds.x + i.bounds.width)) - left,
|
|
38303
|
+
height: Math.max(...items.map((i) => i.bounds.y + i.bounds.height)) - top
|
|
38304
|
+
};
|
|
38305
|
+
const scale = Math.min(1, maxEdge / Math.max(bounds.width, bounds.height));
|
|
38306
|
+
if (!(scale > 0) || bounds.width * scale < 1 || bounds.height * scale < 1) return null;
|
|
38307
|
+
const result = await (await loadRenderer()).renderDesignPng({
|
|
38308
|
+
document: source.document,
|
|
38309
|
+
...source.dependencies ? {
|
|
38310
|
+
context: source.dependencies.context,
|
|
38311
|
+
assets: source.dependencies.assets
|
|
38312
|
+
} : {},
|
|
38313
|
+
theme: {},
|
|
38314
|
+
bounds,
|
|
38315
|
+
scale
|
|
38316
|
+
});
|
|
38317
|
+
return {
|
|
38318
|
+
fileHash: source.fileHash,
|
|
38319
|
+
pngPath: await writePng(result.png)
|
|
38320
|
+
};
|
|
38321
|
+
};
|
|
38258
38322
|
const render = (target, input) => {
|
|
38259
38323
|
const request = decodeRender(input, { onExcessProperty: "error" });
|
|
38260
38324
|
return withState({
|
|
@@ -38284,17 +38348,7 @@ function createStore(resolveRoot, options) {
|
|
|
38284
38348
|
code: "render-limit",
|
|
38285
38349
|
message: "PNG dimensions exceed the render limit"
|
|
38286
38350
|
});
|
|
38287
|
-
|
|
38288
|
-
renderer ??= (options.loadRenderer ?? (() => import("./renderer-DZwr3Qmo.mjs")))();
|
|
38289
|
-
await renderer;
|
|
38290
|
-
} catch (error) {
|
|
38291
|
-
renderer = void 0;
|
|
38292
|
-
throw new DesignServiceError({
|
|
38293
|
-
code: "renderer-unavailable",
|
|
38294
|
-
message: `Optional Skia CPU renderer could not load; install skia-canvas 3.0.8 for this host. ${error instanceof Error ? error.message : "Native backend unavailable"}`
|
|
38295
|
-
});
|
|
38296
|
-
}
|
|
38297
|
-
const result = await (await renderer).renderDesignPng({
|
|
38351
|
+
const result = await (await loadRenderer()).renderDesignPng({
|
|
38298
38352
|
document: s.document,
|
|
38299
38353
|
...s.dependencies ? {
|
|
38300
38354
|
context: s.dependencies.context,
|
|
@@ -38305,9 +38359,7 @@ function createStore(resolveRoot, options) {
|
|
|
38305
38359
|
scale: request.scale,
|
|
38306
38360
|
...nodeIds ? { nodeIds } : {}
|
|
38307
38361
|
});
|
|
38308
|
-
await
|
|
38309
|
-
const pngPath = NodePath.join(options.artifactRoot, `${fileHash(result.png)}.png`);
|
|
38310
|
-
await NodeFSP.writeFile(pngPath, result.png);
|
|
38362
|
+
const pngPath = await writePng(result.png);
|
|
38311
38363
|
const nodeBounds = Object.fromEntries(selected.map((i) => [i.ownerId, i.bounds]));
|
|
38312
38364
|
return {
|
|
38313
38365
|
documentPath: s.documentPath,
|
|
@@ -38353,6 +38405,7 @@ function createStore(resolveRoot, options) {
|
|
|
38353
38405
|
inspect,
|
|
38354
38406
|
validate,
|
|
38355
38407
|
render,
|
|
38408
|
+
thumbnail,
|
|
38356
38409
|
readAsset,
|
|
38357
38410
|
locate,
|
|
38358
38411
|
events,
|
|
@@ -38384,6 +38437,7 @@ var DesignService = class DesignService extends Context.Service()("@p4code/desig
|
|
|
38384
38437
|
inspect: Effect.fn("DesignService.inspect")((target, request) => checked(() => store.inspect(target, request))),
|
|
38385
38438
|
validate: Effect.fn("DesignService.validate")((target, request) => checked(() => store.validate(target, request))),
|
|
38386
38439
|
render: Effect.fn("DesignService.render")((target, request) => checked(() => store.render(target, request))),
|
|
38440
|
+
thumbnail: Effect.fn("DesignService.thumbnail")((target, maxEdge) => checked(() => store.thumbnail(target, maxEdge))),
|
|
38387
38441
|
readAsset: Effect.fn("DesignService.readAsset")((target, id, sourceDocumentId, expectedContentHash) => checked(() => store.readAsset(target, id, sourceDocumentId, expectedContentHash))),
|
|
38388
38442
|
subscribe: (target) => Stream.callback(Effect.fn("DesignService.subscribe")(function* (queue) {
|
|
38389
38443
|
const { key } = yield* checked(() => store.locate(target));
|
|
@@ -48314,7 +48368,7 @@ async function runDesignTransfer(request, options, emit, signal) {
|
|
|
48314
48368
|
const native = async () => {
|
|
48315
48369
|
check();
|
|
48316
48370
|
try {
|
|
48317
|
-
return renderer ??= await (options.loadRenderer ?? (() => import("./renderer-
|
|
48371
|
+
return renderer ??= await (options.loadRenderer ?? (() => import("./renderer-CcbFiDA_.mjs")))();
|
|
48318
48372
|
} catch {
|
|
48319
48373
|
throw fail$2("Optional renderer unavailable; install skia-canvas 3.0.8 for this host", "renderer-unavailable");
|
|
48320
48374
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{n as t,r as n,t as r}from"./compiler-runtime-CLAvuQ-D.js";import{Al as i,Bi as a,Cl as o,Ei as s,G as c,Hi as ee,Ln as l,Mn as u,Ni as d,Pi as te,Qs as f,Ui as p,Un as ne,Vc as m,Vi as h,W as g,Xs as _,Ys as v,Zs as y,_l as b,al as x,au as S,dl as C,dt as w,ki as re,l as T,ot as ie,q as E,zi as D}from"./textarea-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{n as t,r as n,t as r}from"./compiler-runtime-CLAvuQ-D.js";import{Al as i,Bi as a,Cl as o,Ei as s,G as c,Hi as ee,Ln as l,Mn as u,Ni as d,Pi as te,Qs as f,Ui as p,Un as ne,Vc as m,Vi as h,W as g,Xs as _,Ys as v,Zs as y,_l as b,al as x,au as S,dl as C,dt as w,ki as re,l as T,ot as ie,q as E,zi as D}from"./textarea-CUYIXA4Q.js";import{I as O,_ as ae,m as oe}from"./entities-BY5ek9Cd.js";import{a as se,c as k,i as A,n as j,o as M,r as ce,s as le,t as ue}from"./toggle-group-CJJfBTwV.js";import{Cr as N,D as de,Dr as fe,Lr as pe,O as me,Tr as he,Wi as ge,X as _e,Z as ve,_r as ye,ct as be,dr as xe,dt as Se,fr as Ce,ft as we,h as Te,hi as Ee,hr as De,k as P,kr as Oe,li as ke,lr as Ae,lt as je,mr as Me,ot as Ne,p as Pe,pi as Fe,pr as Ie,qi as Le,st as Re,ur as ze,ut as Be,wr as Ve}from"./index-DPN7FTpP.js";import{a as He,n as Ue}from"./fileCommentAnnotations-Beq-lrCQ.js";var We=f(`pilcrow`,[[`path`,{d:`M13 4v16`,key:`8vvj80`}],[`path`,{d:`M17 4v16`,key:`7dpous`}],[`path`,{d:`M19 4H9.5a4.5 4.5 0 0 0 0 9H13`,key:`sh4n9v`}]]),F=e(n(),1);function Ge({threadRef:e,filePath:t,activeCwd:n,openInEditor:r,openFileSurface:i}){if(e){if(i){i(t);return}m.getState().openFile(e,t);return}r(n?N(t,n):t)}var I=r();function Ke(e,t){let n=(0,I.c)(4),r=he(e,t),i;return n[0]!==r.data||n[1]!==r.error||n[2]!==r.isPending?(i={data:r.data,error:r.error,isPending:r.isPending},n[0]=r.data,n[1]=r.error,n[2]=r.isPending,n[3]=i):i=n[3],i}var L=t(),qe=[];function Je(e){return(e.endSide??e.side)===`deletions`?`deletions`:`additions`}function R(e,t,n){let r=Je(t),i=e.findIndex(e=>e.side===r&&e.lineNumber===t.end);return i<0?[...e,{side:r,lineNumber:t.end,metadata:{entries:[n]}}]:e.map((e,t)=>t===i?{...e,metadata:{entries:[...e.metadata.entries,n]}}:e)}function Ye(e){let t=(0,I.c)(50),{files:n,sectionId:r,sectionTitle:i,composerDraftTarget:a,options:o,viewerRef:s,className:c,renderHeaderPrefix:ee}=e,d=u(Qe),te=u(B),f;t[0]===a?f=t[1]:(f=e=>e.getComposerDraft(a)?.reviewComments??qe,t[0]=a,t[1]=f);let p=u(f),[m,h]=(0,F.useState)(null),[g,_]=(0,F.useState)(null),v;t[2]===n?v=t[3]:(v=new Map(n.map(Ze)),t[2]=n,t[3]=v);let y=v,b;if(t[4]!==g||t[5]!==n||t[6]!==p||t[7]!==r){let e;t[9]!==g||t[10]!==p||t[11]!==r?(e=e=>{let{fileDiff:t,filePath:n,fileKey:i,collapsed:a}=e,o=p.filter(e=>e.sectionId===r&&e.filePath===n&&(e.fenceLanguage??`diff`)===`diff`).reduce((e,n)=>{let r=ne(t,n);return r?R(e,r,{id:n.id,kind:`comment`,range:r,rangeLabel:n.rangeLabel,text:n.text}):e},[]),s=g?.fileKey===i?[...o,g.annotation]:o;return{id:i,type:`diff`,fileDiff:t,annotations:s,collapsed:a,version:Re(`${a?`1`:`0`}:${s.flatMap(z).join(`:`)}`)}},t[9]=g,t[10]=p,t[11]=r,t[12]=e):e=t[12],b=n.map(e),t[4]=g,t[5]=n,t[6]=p,t[7]=r,t[8]=b}else b=t[8];let x=b,S;t[13]!==a||t[14]!==g?.annotation||t[15]!==te?(S=e=>{h(null),g?.annotation.metadata.entries.some(t=>t.id===e)?_(null):te(a,e)},t[13]=a,t[14]=g?.annotation,t[15]=te,t[16]=S):S=t[16];let C=S,w;t[17]!==d||t[18]!==a||t[19]!==g||t[20]!==y||t[21]!==r||t[22]!==i?(w=(e,t)=>{let n=g?.annotation.metadata.entries.find(t=>t.id===e),o=g?y.get(g.fileKey):void 0;if(!n||!o)return;let s=l({id:n.id,sectionId:r,sectionTitle:i,filePath:o.filePath,fileDiff:o.fileDiff,range:n.range,text:t});s&&d(a,s),h(null),_(null)},t[17]=d,t[18]=a,t[19]=g,t[20]=y,t[21]=r,t[22]=i,t[23]=w):w=t[23];let re=w,T;t[24]!==y||t[25]!==r||t[26]!==i?(T=(e,t)=>{if(!e)return;let n=t.item;if(n.type!==`diff`)return;let a=y.get(n.id);if(!a)return;let o=Ue(),s=l({id:o,sectionId:r,sectionTitle:i,filePath:a.filePath,fileDiff:a.fileDiff,range:e,text:``});s&&_({fileKey:n.id,annotation:{side:Je(e),lineNumber:e.end,metadata:{entries:[{id:o,kind:`draft`,range:e,rangeLabel:s.rangeLabel,text:``}]}}})},t[24]=y,t[25]=r,t[26]=i,t[27]=T):T=t[27];let ie=T,E=g!==null,D;t[28]===s?D=t[29]:(D=s?{ref:s}:{},t[28]=s,t[29]=D);let O;t[30]===c?O=t[31]:(O=c?{className:c}:{},t[30]=c,t[31]=O);let ae=!E,oe=!E,k;t[32]!==ie||t[33]!==o||t[34]!==oe||t[35]!==ae?(k={...o,enableGutterUtility:ae,enableLineSelection:oe,onLineSelectionEnd:ie},t[32]=ie,t[33]=o,t[34]=oe,t[35]=ae,t[36]=k):k=t[36];let A;t[37]===ee?A=t[38]:(A=e=>e.type===`diff`?ee(e.fileDiff,e.id,e.collapsed===!0):null,t[37]=ee,t[38]=A);let j;t[39]!==C||t[40]!==re?(j=e=>(0,L.jsx)(`div`,{className:`py-1`,children:e.metadata.entries.map(e=>(0,L.jsx)(He,{kind:e.kind,rangeLabel:e.rangeLabel,text:e.text,onCancel:()=>C(e.id),onComment:t=>re(e.id,t),onDelete:()=>C(e.id)},e.id))}),t[39]=C,t[40]=re,t[41]=j):j=t[41];let M;return t[42]!==x||t[43]!==m||t[44]!==k||t[45]!==A||t[46]!==j||t[47]!==D||t[48]!==O?(M=(0,L.jsx)(se,{...D,...O,items:x,selectedLines:m,onSelectedLinesChange:h,options:k,renderHeaderPrefix:A,renderAnnotation:j}),t[42]=x,t[43]=m,t[44]=k,t[45]=A,t[46]=j,t[47]=D,t[48]=O,t[49]=M):M=t[49],M}function z(e){return e.metadata.entries.map(Xe)}function Xe(e){return`${e.id}:${e.rangeLabel}:${e.text}`}function Ze(e){return[e.fileKey,e]}function B(e){return e.removeReviewComment}function Qe(e){return e.addReviewComment}function $e(e){return{diffPreview:C(e,{label:`environment-data:review:diff-preview`,tag:S.reviewGetDiffPreview,staleTimeMs:5e3})}}var et=$e(w);function V(e){return e.remoteName&&e.name.startsWith(`${e.remoteName}/`)?e.name.slice(e.remoteName.length+1):e.name}function tt(e,t){let n=new Set(t),r=e.map(e=>{let r=t.filter(t=>n.has(t)&&V(t)===e.name),i=r.find(e=>e.remoteName===`origin`)??r[0]??null;return i&&n.delete(i),{id:`local:${e.name}`,label:e.name,local:e,remote:i}}),i=t.filter(e=>n.has(e)).map(e=>({id:`remote:${e.name}`,label:e.name,local:null,remote:e}));return[...r,...i]}function nt(e,t){let n=t.trim().toLocaleLowerCase();return n.length===0?e:e.filter(e=>e.label.toLocaleLowerCase().includes(n)||e.local?.name.toLocaleLowerCase().includes(n)===!0||e.remote?.name.toLocaleLowerCase().includes(n)===!0)}var H=`__automatic_base_ref__`,rt=new Set,it=`
|
|
2
2
|
[data-diffs-header],
|
|
3
3
|
[data-diff],
|
|
4
4
|
[data-file],
|
|
@@ -95,4 +95,4 @@ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{n as t,r as n,t as r}f
|
|
|
95
95
|
text-decoration-color: currentColor;
|
|
96
96
|
}
|
|
97
97
|
`;function U({mode:e=`inline`,composerDraftTarget:t,initialGitScope:n,threadRef:r}){let{resolvedTheme:l}=Ve(),u=O(),[f]=(0,F.useState)(n),[ne,m]=(0,F.useState)(`stacked`),[S,C]=(0,F.useState)(u.wordWrap),[w,se]=(0,F.useState)(u.diffIgnoreWhitespace),[N,he]=(0,F.useState)(``),[Te,Re]=(0,F.useState)(()=>({scopeKey:null,fileKeys:rt})),He=(0,F.useRef)(null),Ue=r.threadId,I=ae(r),qe=I?.projectId??null,Je=oe(I&&qe?{environmentId:I.environmentId,projectId:qe}:null),R=I?.worktreePath??Je?.workspaceRoot,z=x(ie.configValueAtom(I?.environmentId??null)),Xe=fe(I?.environmentId??null,z?.availableEditors??[]),Ze=T(I!=null&&R!=null?ke.status({environmentId:I.environmentId,input:{cwd:R}}):null),B=P(e=>me(e.byThreadKey,r,f===`unstaged`)),Qe=Ze.data?.isRepo??!0,{turnDiffSummaries:$e,inferredCheckpointTurnCountByTurnId:V}=de(I),U=(0,F.useMemo)(()=>[...$e].toSorted((e,t)=>{let n=e.checkpointTurnCount??V[e.turnId]??0,r=t.checkpointTurnCount??V[t.turnId]??0;return n===r?t.completedAt.localeCompare(e.completedAt):r-n}),[V,$e]);(0,F.useEffect)(()=>{B.kind===`turn`&&P.getState().reconcileTurnSelection(r,U.map(e=>e.turnId))},[B,U,r]);let W=B.kind===`turn`?B.turnId:null,G=B.kind===`unstaged`?`unstaged`:`branch`,K=B.kind===`branch`?B.baseRef:null,at=B.kind===`turn`?B.filePath:null,ot=B.kind===`turn`?B.revealRequestId:0,q=W===null?void 0:U.find(e=>e.turnId===W)??U[0],J=q&&(q.checkpointTurnCount??V[q.turnId]),st=U[0],ct=W===null?G===`unstaged`?`Working tree`:`Branch changes`:q?.turnId===st?.turnId?`Latest turn`:`Turn ${J??`?`}`,lt=q?`turn:${q.turnId}`:G,Y=`${r.environmentId}:${r.threadId}:${lt}`,ut=Te.scopeKey===Y?Te.fileKeys:rt,dt=q?`Turn ${J??`?`}`:G===`unstaged`?`Working tree`:`Branch changes`,ft=(0,F.useMemo)(()=>typeof J==`number`?{fromTurnCount:Math.max(0,J-1),toTurnCount:J}:null,[J]),pt=Ke({environmentId:I?.environmentId??null,threadId:Ue,fromTurnCount:ft?.fromTurnCount??null,toTurnCount:ft?.toTurnCount??null,ignoreWhitespace:w,cacheScope:q?`turn:${q.turnId}`:null},{enabled:Qe&&q!==void 0}),mt=T(W===null&&I&&R?et.diffPreview({environmentId:I.environmentId,input:{cwd:R,...K?{baseRef:K}:{},ignoreWhitespace:w}}):null),ht=W===null&&mt.error?.includes(`configured workspace root`)===!0&&z?.cwd!==void 0&&z.cwd!==R,gt=T(ht&&I&&z?et.diffPreview({environmentId:I.environmentId,input:{cwd:z.cwd,...K?{baseRef:K}:{},ignoreWhitespace:w}}):null),X=ht?gt:mt,Z=X.data?.sources.find(e=>e.kind===(G===`unstaged`?`working-tree`:`branch-range`)),_t=T(W===null&&G===`branch`&&I&&X.data?.cwd?ke.listRefs({environmentId:I.environmentId,input:{cwd:X.data.cwd,includeMatchingRemoteRefs:!0,refKind:`local`,...N.trim().length>0?{query:N.trim()}:{},limit:100}}):null),vt=T(W===null&&G===`branch`&&I&&X.data?.cwd?ke.listRefs({environmentId:I.environmentId,input:{cwd:X.data.cwd,includeMatchingRemoteRefs:!0,refKind:`remote`,...N.trim().length>0?{query:N.trim()}:{},limit:100}}):null),yt=tt(_t.data?.refs.filter(e=>e.name!==Z?.headRef)??[],vt.data?.refs??[]),bt=nt(yt,N),xt=e=>K&&K===e.remote?.name?K:e.local?.name??e.remote?.name??e.id,St=[H,...yt.map(xt)],Ct=[...N.trim().length===0?[H]:[],...bt.map(xt)],wt=Z?.diff,Tt=q?pt.data?.diff:wt,Et=!q&&Z?.truncated===!0,Dt=q?pt.isPending:X.isPending,Ot=q?pt.error:X.error,kt=typeof Tt==`string`&&Tt.trim().length===0,Q=(0,F.useMemo)(()=>Be(Tt,`diff-panel:${l}`,{compactPartialHunkOffsets:W===null}),[l,Tt,W]),At=(0,F.useMemo)(()=>!Q||Q.kind!==`files`?[]:Q.files.toSorted((e,t)=>we(e).localeCompare(we(t),void 0,{numeric:!0,sensitivity:`base`})),[Q]),$=(0,F.useMemo)(()=>At.map(e=>{let t=Ne(e);return{fileDiff:e,filePath:we(e),fileKey:t,collapsed:ut.has(t)}}),[ut,At]),jt=(0,F.useMemo)(()=>$.map(e=>e.fileKey),[$]),Mt=ce(jt,ut),Nt=(0,F.useMemo)(()=>je(At),[At]);(0,F.useEffect)(()=>{if(!at)return;let e=$.find(e=>e.filePath===at);e&&He.current?.scrollTo({type:`item`,id:e.fileKey,align:`start`})},[$,at,ot]);let Pt=ye({threadRef:r,workspaceRoot:R??null}),Ft=(0,F.useCallback)(e=>{Ge({threadRef:r,filePath:e,activeCwd:R,openFileSurface:Pt,openInEditor:e=>{(async()=>{let t=await Xe(e);t._tag===`Failure`&&!b(t)&&console.warn(`Failed to open diff file in editor.`,{operation:`open-diff-file`,environmentId:r.environmentId,threadId:r.threadId,...i(o(t))})})()}})},[R,Pt,Xe,r]),It=(0,F.useCallback)(e=>{Re(t=>{let n=new Set(t.scopeKey===Y?t.fileKeys:[]);return n.has(e)?n.delete(e):n.add(e),{scopeKey:Y,fileKeys:n}})},[Y]),Lt=(0,F.useCallback)(()=>{Re(e=>{let t=e.scopeKey===Y?e.fileKeys:rt;return{scopeKey:Y,fileKeys:A(jt,t)}})},[Y,jt]),Rt=e=>{P.getState().selectTurn(r,e)},zt=e=>{P.getState().selectGitScope(r,e)},Bt=e=>{P.getState().selectBranchBaseRef(r,e)};return(0,L.jsx)(ve,{mode:e,header:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-3 [-webkit-app-region:no-drag]`,children:[(0,L.jsxs)(re,{children:[(0,L.jsxs)(ee,{className:`inline-flex h-6 max-w-full items-center gap-1 rounded-md bg-muted/70 px-2 text-xs font-medium text-foreground outline-none transition-colors hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring`,"aria-label":`Diff scope: ${ct}`,children:[(0,L.jsx)(`span`,{className:`truncate`,children:ct}),(0,L.jsx)(_,{className:`size-3.5 shrink-0 text-muted-foreground`})]}),(0,L.jsxs)(te,{align:`start`,className:`w-60`,children:[(0,L.jsx)(d,{className:W===null&&G===`unstaged`?`bg-foreground/[0.08]`:void 0,onClick:()=>zt(`unstaged`),children:(0,L.jsx)(`span`,{children:`Working tree`})}),(0,L.jsx)(d,{className:W===null&&G===`branch`?`bg-foreground/[0.08]`:void 0,onClick:()=>zt(`branch`),children:(0,L.jsx)(`span`,{children:`Branch changes`})}),(0,L.jsx)(d,{className:W!==null&&q?.turnId===st?.turnId?`bg-foreground/[0.08]`:void 0,onClick:()=>{st&&Rt(st.turnId)},children:(0,L.jsx)(`span`,{children:`Latest turn`})}),(0,L.jsxs)(D,{children:[(0,L.jsx)(h,{children:`Turn`}),(0,L.jsx)(a,{className:`w-64`,children:U.map(e=>{let t=e.checkpointTurnCount??V[e.turnId]??`?`;return(0,L.jsxs)(d,{className:e.turnId===q?.turnId?`bg-foreground/[0.08]`:void 0,onClick:()=>Rt(e.turnId),children:[(0,L.jsxs)(`span`,{children:[`Turn `,t]}),(0,L.jsx)(`span`,{className:`ml-auto text-xs tabular-nums text-muted-foreground`,children:pe(e.completedAt,u.timestampFormat)})]},e.turnId)})})]})]})]}),W===null&&G===`branch`&&Z?.baseRef&&(0,L.jsxs)(`div`,{className:`flex min-w-0 max-w-full items-center gap-2 overflow-hidden text-xs text-muted-foreground`,title:`${Z.headRef??`HEAD`} → ${Z.baseRef}`,"aria-label":`Comparing ${Z.headRef??`HEAD`} against ${Z.baseRef}`,children:[(0,L.jsx)(`span`,{className:`min-w-0 max-w-48 truncate`,children:Z.headRef??`HEAD`}),(0,L.jsx)(Le,{className:`size-3.5 shrink-0 opacity-70`}),(0,L.jsxs)(Ae,{items:St,filteredItems:Ct,value:K??H,onOpenChange:e=>{e||he(``)},onValueChange:e=>{e&&Bt(e===H?null:e)},children:[(0,L.jsxs)(De,{className:`inline-flex min-w-0 max-w-48 items-center gap-1 overflow-hidden rounded-md px-1.5 py-1 outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring`,"aria-label":`Change comparison target. Currently ${Z.baseRef}`,children:[(0,L.jsx)(`span`,{className:`min-w-0 truncate`,children:Z.baseRef}),(0,L.jsx)(_,{className:`size-3.5 shrink-0 opacity-70`})]}),(0,L.jsxs)(Me,{align:`start`,className:`w-72 min-w-0 max-w-[calc(100vw-1rem)] overflow-hidden [&>[data-slot=combobox-popup]]:min-w-0 [&>[data-slot=combobox-popup]]:overflow-hidden`,children:[(0,L.jsx)(`div`,{className:`min-w-0 shrink-0 px-3 pt-2.5`,children:(0,L.jsxs)(`div`,{className:`relative -translate-y-px border-b border-border/70 pb-1.5 transition-colors focus-within:border-ring`,children:[(0,L.jsx)(Ee,{"aria-hidden":`true`,className:`pointer-events-none absolute top-1.5 left-0 size-4 shrink-0 text-muted-foreground/55`}),(0,L.jsx)(xe,{className:`[&_input]:h-6.5 [&_input]:ps-5 [&_input]:font-sans [&_input]:leading-6.5`,inputClassName:`rounded-none bg-transparent text-sm`,placeholder:`Search refs...`,showTrigger:!1,size:`sm`,unstyled:!0,value:N,onChange:e=>he(e.target.value)})]})}),(0,L.jsxs)(`div`,{className:`grid shrink-0 grid-cols-[1rem_minmax(0,1fr)] items-center gap-2 border-b border-border/70 ps-3 pe-6.5 pt-2 pb-1.5 font-medium text-[10px] text-muted-foreground uppercase tracking-wide`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`}),(0,L.jsxs)(`div`,{className:`grid min-w-0 grid-cols-[minmax(0,1fr)_2rem] items-center`,children:[(0,L.jsx)(`span`,{children:`Branch`}),(0,L.jsx)(`span`,{className:`text-right`,children:`Remote`})]})]}),(0,L.jsx)(ze,{children:`No matching refs.`}),(0,L.jsxs)(Ie,{className:`max-h-64 min-w-0 overflow-x-hidden`,children:[(0,L.jsx)(Ce,{className:`h-8 w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)] py-0`,contentClassName:`w-full min-w-0 overflow-hidden`,value:H,children:(0,L.jsx)(`span`,{className:`block min-w-0 truncate`,children:`Automatic`})}),yt.map(e=>{let t=xt(e),n=e.local!==null&&e.remote!==null,r=e.remote?.name===t;return(0,L.jsx)(Ce,{className:`h-8 w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)] py-0`,contentClassName:`w-full min-w-0 overflow-hidden`,value:t,children:(0,L.jsxs)(`div`,{className:`grid w-full min-w-0 grid-cols-[minmax(0,1fr)_2rem] items-center overflow-hidden`,children:[(0,L.jsx)(`span`,{className:`block min-w-0 truncate pe-2`,children:e.label}),n?(0,L.jsx)(`div`,{className:`flex justify-end`,onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:(0,L.jsx)(Oe,{"aria-label":`Use remote version of ${e.label}`,checked:r,className:`[--thumb-size:--spacing(3)]`,onCheckedChange:t=>{let n=t?e.remote?.name:e.local?.name;n&&Bt(n)}})}):e.remote?(0,L.jsx)(`span`,{className:`flex justify-end text-muted-foreground`,title:`Remote only`,children:(0,L.jsx)(y,{"aria-hidden":`true`,className:`size-3`})}):null]})},e.id)})]})]})]})]})]}),(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1 [-webkit-app-region:no-drag]`,children:[$.length>0&&(0,L.jsx)(Pe,{additions:Nt.additions,deletions:Nt.deletions,className:`mr-1 text-[11px]`,layout:`inline`}),$.length>0&&(0,L.jsxs)(g,{children:[(0,L.jsx)(E,{render:(0,L.jsx)(s,{type:`button`,size:`icon-xs`,variant:`outline`,"aria-label":Mt?`Expand all files`:`Collapse all files`,onClick:Lt}),children:Mt?(0,L.jsx)(ge,{className:`size-3`}):(0,L.jsx)(k,{className:`size-3`})}),(0,L.jsx)(c,{side:`top`,children:Mt?`Expand all files`:`Collapse all files`})]}),(0,L.jsxs)(j,{className:`shrink-0`,variant:`outline`,size:`xs`,value:[ne],onValueChange:e=>{let t=e[0];(t===`stacked`||t===`split`)&&m(t)},children:[(0,L.jsx)(ue,{"aria-label":`Stacked diff view`,value:`stacked`,children:(0,L.jsx)(M,{className:`size-3`})}),(0,L.jsx)(ue,{"aria-label":`Split diff view`,value:`split`,children:(0,L.jsx)(le,{className:`size-3`})})]}),(0,L.jsxs)(g,{children:[(0,L.jsx)(E,{render:(0,L.jsx)(ue,{"aria-label":S?`Disable diff line wrapping`:`Enable diff line wrapping`,variant:`outline`,size:`xs`,pressed:S,onPressedChange:e=>{C(!!e)}}),children:(0,L.jsx)(Fe,{className:`size-3`})}),(0,L.jsx)(c,{side:`top`,children:S?`Disable line wrapping`:`Enable line wrapping`})]}),(0,L.jsxs)(g,{children:[(0,L.jsx)(E,{render:(0,L.jsx)(ue,{"aria-label":w?`Show whitespace changes`:`Hide whitespace changes`,variant:`outline`,size:`xs`,pressed:w,onPressedChange:e=>{se(!!e)}}),children:(0,L.jsx)(We,{className:`size-3`})}),(0,L.jsx)(c,{side:`top`,children:w?`Show whitespace changes`:`Hide whitespace changes`})]})]})]}),children:I?Qe?W!==null&&U.length===0?(0,L.jsx)(`div`,{className:`flex flex-1 items-center justify-center px-5 text-center text-xs text-muted-foreground/70`,children:`No completed turns yet.`}):(0,L.jsx)(L.Fragment,{children:(0,L.jsxs)(`div`,{className:`diff-panel-viewport flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden`,children:[Et&&(0,L.jsx)(`p`,{className:`shrink-0 border-b border-border/70 bg-muted/40 px-3 py-1.5 text-[11px] text-muted-foreground`,children:`This diff was truncated because it exceeded the preview limit. The changes shown are incomplete.`}),Ot&&!Q&&(0,L.jsx)(`div`,{className:`px-3`,children:(0,L.jsx)(`p`,{className:`mb-2 text-[11px] text-red-500/80`,children:Ot})}),Q?Q.kind===`files`?(0,L.jsx)(`div`,{className:`min-h-0 flex-1`,onClickCapture:e=>{let t=(e.nativeEvent.composedPath?.()??[]).find(e=>e instanceof HTMLElement&&e.hasAttribute(`data-title`))?.textContent?.trim();t&&Ft(t)},children:(0,L.jsx)(Ye,{viewerRef:He,className:`diff-render-surface h-full min-h-0 overflow-auto`,files:$,sectionId:lt,sectionTitle:dt,composerDraftTarget:t,renderHeaderPrefix:(e,t,n)=>{let r=we(e);return(0,L.jsxs)(g,{children:[(0,L.jsx)(E,{render:(0,L.jsx)(`button`,{type:`button`,className:p(`inline-flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-sm border-0 bg-transparent p-0 transition-colors hover:bg-foreground/10 focus-visible:outline-hidden`,be(e)),"aria-label":n?`Expand ${r}`:`Collapse ${r}`,"aria-expanded":!n,onClick:e=>{e.stopPropagation(),It(t)}}),children:n?(0,L.jsx)(v,{className:`size-4`}):(0,L.jsx)(_,{className:`size-4`})}),(0,L.jsx)(c,{side:`top`,children:n?`Expand diff`:`Collapse diff`})]})},options:{diffStyle:ne===`split`?`split`:`unified`,lineDiffType:`none`,overflow:S?`wrap`:`scroll`,theme:Se(l),themeType:l,unsafeCSS:it,stickyHeaders:!0,itemMetrics:{diffHeaderHeight:33},layout:{paddingTop:0,paddingBottom:8,gap:8}}},Y??lt)}):(0,L.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto p-2`,children:(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`p`,{className:`text-[11px] text-muted-foreground/75`,children:Q.reason}),(0,L.jsx)(`pre`,{className:p(`max-h-[72vh] rounded-md border border-border/70 bg-background/70 p-3 font-mono text-[11px] leading-relaxed text-muted-foreground/90`,S?`overflow-auto whitespace-pre-wrap wrap-break-word`:`overflow-auto`),children:Q.text})]})}):Dt?(0,L.jsx)(_e,{label:q?`Loading checkpoint diff...`:G===`unstaged`?`Loading working tree diff...`:`Loading branch diff...`}):(0,L.jsx)(`div`,{className:`flex h-full items-center justify-center px-3 py-2 text-xs text-muted-foreground/70`,children:(0,L.jsx)(`p`,{children:kt?`No net changes in this selection.`:`No patch available for this selection.`})})]})}):(0,L.jsx)(`div`,{className:`flex flex-1 items-center justify-center px-5 text-center text-xs text-muted-foreground/70`,children:`Turn diffs are unavailable because this project is not a git repository.`}):(0,L.jsx)(`div`,{className:`flex flex-1 items-center justify-center px-5 text-center text-xs text-muted-foreground/70`,children:`Select a thread to inspect turn diffs.`})})}export{Te as DiffWorkerPoolProvider,U as default};
|
|
98
|
-
//# sourceMappingURL=DiffPanel-
|
|
98
|
+
//# sourceMappingURL=DiffPanel-CycYDQWY.js.map
|