@tangle-network/agent-app 0.44.56 → 0.44.58
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/assistant/index.d.ts +1 -1
- package/dist/chat-routes/index.js +1 -1
- package/dist/{chunk-6W5Y4J2X.js → chunk-2UDJH6QR.js} +13 -2
- package/dist/chunk-2UDJH6QR.js.map +1 -0
- package/dist/sandbox/index.d.ts +9 -2
- package/dist/sandbox/index.js +3 -1
- package/dist/web-react/index.d.ts +1 -1
- package/dist/web-react/terminal.d.ts +46 -44
- package/dist/web-react/terminal.js +0 -86
- package/dist/web-react/terminal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-6W5Y4J2X.js.map +0 -1
- package/dist/sandbox-terminal-ChNEdHF8.d.ts +0 -51
package/dist/sandbox/index.d.ts
CHANGED
|
@@ -901,9 +901,16 @@ interface StoppedSandboxResumeRecovery {
|
|
|
901
901
|
replacementBoxKey: string;
|
|
902
902
|
restore?: SandboxRestoreSpec | null;
|
|
903
903
|
}
|
|
904
|
+
/**
|
|
905
|
+
* Default ERE passed to `pgrep -f` when a liveness probe does not override the
|
|
906
|
+
* harness-process matcher. It covers the platform process names used by the
|
|
907
|
+
* fleet's shared OpenCode, Claude Code, and Codex terminal path; products with
|
|
908
|
+
* another harness can override it.
|
|
909
|
+
*/
|
|
910
|
+
declare const DEFAULT_SIDECAR_PROCESS_PATTERN = "opencode|claude|codex";
|
|
904
911
|
/** Define configuration for liveness probes including sidecar process pattern and optional timeouts */
|
|
905
912
|
interface LivenessProbeConfig {
|
|
906
|
-
sidecarProcessPattern
|
|
913
|
+
sidecarProcessPattern?: (harness: Harness) => string;
|
|
907
914
|
execTimeoutMs?: number;
|
|
908
915
|
psTimeoutMs?: number;
|
|
909
916
|
}
|
|
@@ -1332,4 +1339,4 @@ declare function isTerminalPromptEvent(event: unknown): boolean;
|
|
|
1332
1339
|
/** Resolve the interactive question text from a structured event or return null if none found */
|
|
1333
1340
|
declare function detectInteractiveQuestion(event: unknown): string | null;
|
|
1334
1341
|
|
|
1335
|
-
export { type AppToolDescriptor, type AuthenticatedSandboxUser, type BuildAppToolMcpServersOptions, type BuildSandboxToolFileMountsOptions, type D1PrewarmClaimStoreOptions, DEFAULT_PREWARM_CLAIM_TABLE, DEFAULT_SANDBOX_RESOURCES, type DriveSandboxTurnOptions, ENV_TOTAL_MAX_BYTES, ENV_VALUE_MAX_BYTES, type EnsureWorkspaceSandboxOptions, type LivenessProbeConfig, type MemberSyncSeam, type ModelSelection, type ModelSelectionError, type ModelSelectionFailure, type ModelSelectionSource, type Outcome, PREWARM_CLAIM_TABLE_DDL, PROVISION_PAYLOAD_MAX_BYTES, type PeekWorkspaceSandboxOutcome, type PrewarmClaimD1Like, type PrewarmClaimStore, type PrewarmDecision, type PrewarmEvent, type PrewarmOutcome, type PrewarmResult, type ProfileComposeOptions, type PromptInputPart, type ProviderResolutionConfig, type ProvisionPayloadSections, type ProvisionProfileSection, type ResolveSandboxClientCredentialsOptions, type ResolvedModel, type SandboxApiCredentials, type SandboxBuildContext, type SandboxClientCredentials, type SandboxCredentialEnvironment, SandboxEgressPolicyMismatchError, type SandboxEgressPolicySource, type SandboxExecChannel, type SandboxExecOptions, type SandboxExistingBoxStage, type SandboxFileBytesOutcome, type SandboxFileSizeOutcome, SandboxModelResolutionError, type SandboxPermissionLevel, type SandboxPrewarmScope, type SandboxPrewarmer, type SandboxPrewarmerOptions, type SandboxReadiness, SandboxRecoveryFailedError, type SandboxRecoveryPhase, type SandboxResourceConfig, type SandboxRestoreSpec, SandboxRuntimeAuthRefreshError, type SandboxRuntimeConfig, type SandboxRuntimeConnection, type SandboxScope, type SandboxStepTransition, type SandboxTerminalTokenOptions, type SandboxTerminalTokenResult, type SandboxTerminalTokenSubject, type SandboxTerminalWsMatch, type SandboxToolPathOptions, type SandboxToolSpec, type ScopedTokenResult, type SecretStore, type StoppedSandboxResumeFailure, type StoppedSandboxResumeRecovery, type StreamSandboxPromptOptions, type TerminalProxyIdentity, type TerminalUpgradeResponseLike, type WorkspaceSandboxConnectionArgs, type WorkspaceSandboxConnectionHandlerOptions, type WorkspaceSandboxEnsureContext, type WorkspaceSandboxInstanceLike, type WorkspaceSandboxManager, type WorkspaceSandboxManagerOptions, type WorkspaceSandboxRuntimeProxyArgs, type WorkspaceSandboxRuntimeProxyHandlerOptions, type WorkspaceSandboxTerminalUpgradeHandlerOptions, type WriteProfileFilesOptions, assertEnvWithinLimits, assertProvisionPayloadWithinCap, attachReasoningEffort, bearerSubprotocolToken, bearerToken, buildAppToolMcpServers, buildSandboxRuntimeProxyHeaders, buildSandboxToolFileMounts, buildSandboxToolPathSetupScript, classifySeveredStream, collectSandboxPromptText, createD1PrewarmClaimStore, createSandboxPrewarmer, createSandboxTerminalToken, createWorkspaceSandboxConnectionHandler, createWorkspaceSandboxManager, createWorkspaceSandboxRuntimeProxyHandler, createWorkspaceSandboxTerminalUpgradeHandler, deferredCorpusHash, deleteSecret, detectInteractiveQuestion, driveSandboxTurn, encodeSandboxRuntimePath, ensureWorkspaceSandbox, flattenHistory, getClient, isSandboxTerminalWsUpgrade, isTerminalPromptEvent, matchSandboxTerminalWsPath, mergeExtraMcp, mergeHistoryIntoParts, mintSandboxScopedToken, mintTerminalProxyToken, peekWorkspaceSandbox, readSandboxBinaryBytes, readSecret, requireTransportableModel, resetClientCache, resolveModel, resolveModelSelection, resolveSandboxClientCredentials, runSandboxPrompt, runSandboxToolPathSetup, sandboxSidecarProxyUrl, sandboxToolBinDir, sandboxToolPath, sandboxToolRootDir, secretStoreFromClient, selectedBearerSubprotocol, shellQuote, splitDeferredProfileFiles, statSandboxFileSize, storeSecret, streamSandboxPrompt, syncSandboxMemberAdd, syncSandboxMemberRemove, syncSandboxMemberRole, terminalTokenFromRequest, terminalUpgradeSubprotocolEcho, verifySandboxTerminalToken, verifyTerminalProxyToken, writeProfileFilesToBox };
|
|
1342
|
+
export { type AppToolDescriptor, type AuthenticatedSandboxUser, type BuildAppToolMcpServersOptions, type BuildSandboxToolFileMountsOptions, type D1PrewarmClaimStoreOptions, DEFAULT_PREWARM_CLAIM_TABLE, DEFAULT_SANDBOX_RESOURCES, DEFAULT_SIDECAR_PROCESS_PATTERN, type DriveSandboxTurnOptions, ENV_TOTAL_MAX_BYTES, ENV_VALUE_MAX_BYTES, type EnsureWorkspaceSandboxOptions, type LivenessProbeConfig, type MemberSyncSeam, type ModelSelection, type ModelSelectionError, type ModelSelectionFailure, type ModelSelectionSource, type Outcome, PREWARM_CLAIM_TABLE_DDL, PROVISION_PAYLOAD_MAX_BYTES, type PeekWorkspaceSandboxOutcome, type PrewarmClaimD1Like, type PrewarmClaimStore, type PrewarmDecision, type PrewarmEvent, type PrewarmOutcome, type PrewarmResult, type ProfileComposeOptions, type PromptInputPart, type ProviderResolutionConfig, type ProvisionPayloadSections, type ProvisionProfileSection, type ResolveSandboxClientCredentialsOptions, type ResolvedModel, type SandboxApiCredentials, type SandboxBuildContext, type SandboxClientCredentials, type SandboxCredentialEnvironment, SandboxEgressPolicyMismatchError, type SandboxEgressPolicySource, type SandboxExecChannel, type SandboxExecOptions, type SandboxExistingBoxStage, type SandboxFileBytesOutcome, type SandboxFileSizeOutcome, SandboxModelResolutionError, type SandboxPermissionLevel, type SandboxPrewarmScope, type SandboxPrewarmer, type SandboxPrewarmerOptions, type SandboxReadiness, SandboxRecoveryFailedError, type SandboxRecoveryPhase, type SandboxResourceConfig, type SandboxRestoreSpec, SandboxRuntimeAuthRefreshError, type SandboxRuntimeConfig, type SandboxRuntimeConnection, type SandboxScope, type SandboxStepTransition, type SandboxTerminalTokenOptions, type SandboxTerminalTokenResult, type SandboxTerminalTokenSubject, type SandboxTerminalWsMatch, type SandboxToolPathOptions, type SandboxToolSpec, type ScopedTokenResult, type SecretStore, type StoppedSandboxResumeFailure, type StoppedSandboxResumeRecovery, type StreamSandboxPromptOptions, type TerminalProxyIdentity, type TerminalUpgradeResponseLike, type WorkspaceSandboxConnectionArgs, type WorkspaceSandboxConnectionHandlerOptions, type WorkspaceSandboxEnsureContext, type WorkspaceSandboxInstanceLike, type WorkspaceSandboxManager, type WorkspaceSandboxManagerOptions, type WorkspaceSandboxRuntimeProxyArgs, type WorkspaceSandboxRuntimeProxyHandlerOptions, type WorkspaceSandboxTerminalUpgradeHandlerOptions, type WriteProfileFilesOptions, assertEnvWithinLimits, assertProvisionPayloadWithinCap, attachReasoningEffort, bearerSubprotocolToken, bearerToken, buildAppToolMcpServers, buildSandboxRuntimeProxyHeaders, buildSandboxToolFileMounts, buildSandboxToolPathSetupScript, classifySeveredStream, collectSandboxPromptText, createD1PrewarmClaimStore, createSandboxPrewarmer, createSandboxTerminalToken, createWorkspaceSandboxConnectionHandler, createWorkspaceSandboxManager, createWorkspaceSandboxRuntimeProxyHandler, createWorkspaceSandboxTerminalUpgradeHandler, deferredCorpusHash, deleteSecret, detectInteractiveQuestion, driveSandboxTurn, encodeSandboxRuntimePath, ensureWorkspaceSandbox, flattenHistory, getClient, isSandboxTerminalWsUpgrade, isTerminalPromptEvent, matchSandboxTerminalWsPath, mergeExtraMcp, mergeHistoryIntoParts, mintSandboxScopedToken, mintTerminalProxyToken, peekWorkspaceSandbox, readSandboxBinaryBytes, readSecret, requireTransportableModel, resetClientCache, resolveModel, resolveModelSelection, resolveSandboxClientCredentials, runSandboxPrompt, runSandboxToolPathSetup, sandboxSidecarProxyUrl, sandboxToolBinDir, sandboxToolPath, sandboxToolRootDir, secretStoreFromClient, selectedBearerSubprotocol, shellQuote, splitDeferredProfileFiles, statSandboxFileSize, storeSecret, streamSandboxPrompt, syncSandboxMemberAdd, syncSandboxMemberRemove, syncSandboxMemberRole, terminalTokenFromRequest, terminalUpgradeSubprotocolEcho, verifySandboxTerminalToken, verifyTerminalProxyToken, writeProfileFilesToBox };
|
package/dist/sandbox/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_PREWARM_CLAIM_TABLE,
|
|
3
3
|
DEFAULT_SANDBOX_RESOURCES,
|
|
4
|
+
DEFAULT_SIDECAR_PROCESS_PATTERN,
|
|
4
5
|
ENV_TOTAL_MAX_BYTES,
|
|
5
6
|
ENV_VALUE_MAX_BYTES,
|
|
6
7
|
PREWARM_CLAIM_TABLE_DDL,
|
|
@@ -71,7 +72,7 @@ import {
|
|
|
71
72
|
verifySandboxTerminalToken,
|
|
72
73
|
verifyTerminalProxyToken,
|
|
73
74
|
writeProfileFilesToBox
|
|
74
|
-
} from "../chunk-
|
|
75
|
+
} from "../chunk-2UDJH6QR.js";
|
|
75
76
|
import "../chunk-LWSJK546.js";
|
|
76
77
|
import "../chunk-CQZSAR77.js";
|
|
77
78
|
import "../chunk-ICOHEZK6.js";
|
|
@@ -82,6 +83,7 @@ import "../chunk-JML7WKWU.js";
|
|
|
82
83
|
export {
|
|
83
84
|
DEFAULT_PREWARM_CLAIM_TABLE,
|
|
84
85
|
DEFAULT_SANDBOX_RESOURCES,
|
|
86
|
+
DEFAULT_SIDECAR_PROCESS_PATTERN,
|
|
85
87
|
ENV_TOTAL_MAX_BYTES,
|
|
86
88
|
ENV_VALUE_MAX_BYTES,
|
|
87
89
|
PREWARM_CLAIM_TABLE_DDL,
|
|
@@ -15,7 +15,7 @@ import { S as StepAgentActivity } from '../agent-activity-C8ZG0F0M.js';
|
|
|
15
15
|
import { F as FlowTrace } from '../flow-types-CJxEmaRy.js';
|
|
16
16
|
import { a as ReviewQueueItem, c as ReviewQueueState } from '../queue-VTBA5ONX.js';
|
|
17
17
|
export { p as parseReviewQueueItem } from '../queue-VTBA5ONX.js';
|
|
18
|
-
export {
|
|
18
|
+
export { SandboxTerminalConnection, SandboxTerminalConnectionResponse, UseSandboxTerminalConnectionOptions, UseSandboxTerminalConnectionResult, tabTerminalConnectionId, useSandboxTerminalConnection } from './terminal.js';
|
|
19
19
|
import { i as ProductSeatOffer } from '../billing-BibxgALe.js';
|
|
20
20
|
import { SessionSort, SessionPage, SessionSummary, SessionRailAction } from '../session-shell/index.js';
|
|
21
21
|
import { CatalogModel } from '../catalog/index.js';
|
|
@@ -1,49 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/** Define the connection details and status for a sandbox terminal session */
|
|
2
|
+
interface SandboxTerminalConnection {
|
|
3
|
+
runtimeUrl: string | null;
|
|
4
|
+
sidecarUrl: string | null;
|
|
5
|
+
token: string | null;
|
|
6
|
+
expiresAt: string | null;
|
|
7
|
+
status: string;
|
|
8
|
+
error: string | null;
|
|
9
|
+
loading: boolean;
|
|
10
|
+
sandboxId?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Define the response structure for a sandbox terminal connection including URLs, token, status, and errors */
|
|
13
|
+
interface SandboxTerminalConnectionResponse {
|
|
14
|
+
runtimeUrl?: string;
|
|
15
|
+
sidecarUrl?: string;
|
|
16
|
+
token?: string;
|
|
17
|
+
expiresAt?: string;
|
|
18
|
+
status?: string;
|
|
19
|
+
error?: string;
|
|
20
|
+
sandboxId?: string;
|
|
21
|
+
}
|
|
22
|
+
/** Define options for configuring a sandbox terminal connection including workspace ID and connection parameters */
|
|
23
|
+
interface UseSandboxTerminalConnectionOptions {
|
|
24
|
+
workspaceId: string;
|
|
25
|
+
connectionUrl?: string | ((workspaceId: string) => string);
|
|
26
|
+
fetcher?: typeof fetch;
|
|
27
|
+
provisionPollIntervalMs?: number;
|
|
28
|
+
provisionPollTimeoutMs?: number;
|
|
29
|
+
tokenRefreshSkewMs?: number;
|
|
30
|
+
}
|
|
31
|
+
/** Resolve sandbox terminal connection status and provide a method to initiate the connection */
|
|
32
|
+
interface UseSandboxTerminalConnectionResult extends SandboxTerminalConnection {
|
|
33
|
+
connect: () => Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
/** Manage and maintain a sandbox terminal connection with automatic polling and token refresh handling */
|
|
36
|
+
declare function useSandboxTerminalConnection(opts: UseSandboxTerminalConnectionOptions): UseSandboxTerminalConnectionResult;
|
|
5
37
|
/**
|
|
6
|
-
*
|
|
7
|
-
* a status badge, connect/provisioning/error states with a retry, and the lazy
|
|
8
|
-
* `TerminalView` (from `@tangle-network/sandbox-ui`) mounted only once the
|
|
9
|
-
* connection is live. creative-agent and gtm-agent each hand-roll a structurally
|
|
10
|
-
* identical panel; only the copy and the status-tone map are app-specific, so
|
|
11
|
-
* those are props and everything else lives here.
|
|
38
|
+
* Stable-per-tab, unique-per-client terminal connection id.
|
|
12
39
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
40
|
+
* Persists in `sessionStorage` so a reload in the same tab reuses the id (the
|
|
41
|
+
* sidecar restores the same PTY session via `TerminalView.connectionId`), while
|
|
42
|
+
* separate tabs/windows each get a distinct id. Pass the result as
|
|
43
|
+
* `TerminalView`'s `connectionId`. Without it (e.g. gtm-agent today) every tab
|
|
44
|
+
* shares one connection id and their reconnects evict each other.
|
|
16
45
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
46
|
+
* Falls back to an ephemeral id when `sessionStorage` is unavailable (SSR,
|
|
47
|
+
* privacy mode) — still unique per call, just not reload-stable.
|
|
19
48
|
*/
|
|
49
|
+
declare function tabTerminalConnectionId(storageKey?: string): string;
|
|
20
50
|
|
|
21
|
-
type
|
|
22
|
-
interface TerminalStatusDisplay {
|
|
23
|
-
tone: TerminalStatusTone;
|
|
24
|
-
label: string;
|
|
25
|
-
}
|
|
26
|
-
interface WorkspaceTerminalPanelProps {
|
|
27
|
-
/** Live connection state (from {@link useSandboxTerminalConnection}). */
|
|
28
|
-
connection: SandboxTerminalConnection;
|
|
29
|
-
/** Stable per-tab id (from {@link tabTerminalConnectionId}) so the sidecar
|
|
30
|
-
* restores the same PTY across remounts and tabs don't collide. */
|
|
31
|
-
connectionId?: string;
|
|
32
|
-
/** Header title. Default "Terminal". */
|
|
33
|
-
title?: string;
|
|
34
|
-
/** Header subtitle / sandbox label. */
|
|
35
|
-
subtitle?: string;
|
|
36
|
-
/** Whether the terminal tab is visible (forwarded to `TerminalView` for fit). */
|
|
37
|
-
isActive?: boolean;
|
|
38
|
-
/** Reconnect handler — wire to the hook's `connect`. Shown on idle/error. */
|
|
39
|
-
onRetry?: () => void;
|
|
40
|
-
/** Map a `connection.status` to a badge tone + label. The default covers
|
|
41
|
-
* idle/provisioning/running/error; override for app-specific vocabulary. */
|
|
42
|
-
statusDisplay?: (connection: SandboxTerminalConnection) => TerminalStatusDisplay;
|
|
43
|
-
/** Extra header content, right-aligned (actions, sandbox id, …). */
|
|
44
|
-
headerExtra?: ReactNode;
|
|
45
|
-
className?: string;
|
|
46
|
-
}
|
|
47
|
-
declare function WorkspaceTerminalPanel({ connection, connectionId, title, subtitle, isActive, onRetry, statusDisplay, headerExtra, className, }: WorkspaceTerminalPanelProps): ReactNode;
|
|
48
|
-
|
|
49
|
-
export { SandboxTerminalConnection, type TerminalStatusDisplay, type TerminalStatusTone, WorkspaceTerminalPanel, type WorkspaceTerminalPanelProps };
|
|
51
|
+
export { type SandboxTerminalConnection, type SandboxTerminalConnectionResponse, type UseSandboxTerminalConnectionOptions, type UseSandboxTerminalConnectionResult, tabTerminalConnectionId, useSandboxTerminalConnection };
|
|
@@ -2,93 +2,7 @@ import {
|
|
|
2
2
|
tabTerminalConnectionId,
|
|
3
3
|
useSandboxTerminalConnection
|
|
4
4
|
} from "../chunk-HCOROIRT.js";
|
|
5
|
-
|
|
6
|
-
// src/web-react/workspace-terminal-panel.tsx
|
|
7
|
-
import { lazy, Suspense } from "react";
|
|
8
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
var TerminalView = lazy(
|
|
10
|
-
() => import("@tangle-network/sandbox-ui/terminal").then((m) => ({ default: m.TerminalView }))
|
|
11
|
-
);
|
|
12
|
-
var TONE_DOT = {
|
|
13
|
-
idle: "bg-muted-foreground/50",
|
|
14
|
-
connecting: "animate-pulse bg-warning",
|
|
15
|
-
connected: "bg-success",
|
|
16
|
-
error: "bg-destructive"
|
|
17
|
-
};
|
|
18
|
-
function defaultStatusDisplay(conn) {
|
|
19
|
-
if (conn.error) return { tone: "error", label: "Disconnected" };
|
|
20
|
-
if (conn.runtimeUrl && conn.token) return { tone: "connected", label: "Connected" };
|
|
21
|
-
if (conn.loading) return { tone: "connecting", label: conn.status === "provisioning" ? "Provisioning\u2026" : "Connecting\u2026" };
|
|
22
|
-
return { tone: "idle", label: "Idle" };
|
|
23
|
-
}
|
|
24
|
-
function WorkspaceTerminalPanel({
|
|
25
|
-
connection,
|
|
26
|
-
connectionId,
|
|
27
|
-
title = "Terminal",
|
|
28
|
-
subtitle,
|
|
29
|
-
isActive,
|
|
30
|
-
onRetry,
|
|
31
|
-
statusDisplay,
|
|
32
|
-
headerExtra,
|
|
33
|
-
className
|
|
34
|
-
}) {
|
|
35
|
-
const status = (statusDisplay ?? defaultStatusDisplay)(connection);
|
|
36
|
-
const apiUrl = connection.runtimeUrl ?? connection.sidecarUrl;
|
|
37
|
-
const ready = Boolean(apiUrl && connection.token);
|
|
38
|
-
return /* @__PURE__ */ jsxs("div", { className: `flex h-full min-h-0 flex-col overflow-hidden rounded-xl border border-border bg-card ${className ?? ""}`, children: [
|
|
39
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 border-b border-border px-4 py-2.5", children: [
|
|
40
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
41
|
-
/* @__PURE__ */ jsx("p", { className: "truncate text-sm font-medium text-foreground", children: title }),
|
|
42
|
-
subtitle && /* @__PURE__ */ jsx("p", { className: "truncate text-xs text-muted-foreground", children: subtitle })
|
|
43
|
-
] }),
|
|
44
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
45
|
-
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
|
|
46
|
-
/* @__PURE__ */ jsx("span", { className: `h-1.5 w-1.5 rounded-full ${TONE_DOT[status.tone]}`, "aria-hidden": true }),
|
|
47
|
-
status.label
|
|
48
|
-
] }),
|
|
49
|
-
headerExtra
|
|
50
|
-
] })
|
|
51
|
-
] }),
|
|
52
|
-
/* @__PURE__ */ jsx("div", { className: "relative min-h-0 flex-1", children: ready ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(TerminalMessage, { children: "Loading terminal\u2026" }), children: /* @__PURE__ */ jsx(
|
|
53
|
-
TerminalView,
|
|
54
|
-
{
|
|
55
|
-
apiUrl,
|
|
56
|
-
token: connection.token,
|
|
57
|
-
connectionId,
|
|
58
|
-
title,
|
|
59
|
-
subtitle,
|
|
60
|
-
isActive
|
|
61
|
-
}
|
|
62
|
-
) }) : /* @__PURE__ */ jsx(TerminalMessage, { children: connection.error ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
63
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: connection.error }),
|
|
64
|
-
onRetry && /* @__PURE__ */ jsx(
|
|
65
|
-
"button",
|
|
66
|
-
{
|
|
67
|
-
type: "button",
|
|
68
|
-
onClick: onRetry,
|
|
69
|
-
className: "mt-3 inline-flex items-center justify-center rounded-lg border border-border px-3 py-1.5 text-sm font-medium text-foreground transition hover:bg-muted",
|
|
70
|
-
children: "Reconnect"
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
] }) : connection.loading ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: connection.status === "provisioning" ? "Provisioning sandbox\u2026" : "Connecting\u2026" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
74
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Terminal not connected." }),
|
|
75
|
-
onRetry && /* @__PURE__ */ jsx(
|
|
76
|
-
"button",
|
|
77
|
-
{
|
|
78
|
-
type: "button",
|
|
79
|
-
onClick: onRetry,
|
|
80
|
-
className: "mt-3 inline-flex items-center justify-center rounded-lg border border-border px-3 py-1.5 text-sm font-medium text-foreground transition hover:bg-muted",
|
|
81
|
-
children: "Connect"
|
|
82
|
-
}
|
|
83
|
-
)
|
|
84
|
-
] }) }) })
|
|
85
|
-
] });
|
|
86
|
-
}
|
|
87
|
-
function TerminalMessage({ children }) {
|
|
88
|
-
return /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex flex-col items-center justify-center p-6 text-center", children });
|
|
89
|
-
}
|
|
90
5
|
export {
|
|
91
|
-
WorkspaceTerminalPanel,
|
|
92
6
|
tabTerminalConnectionId,
|
|
93
7
|
useSandboxTerminalConnection
|
|
94
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED