@opengeni/react 0.11.0 → 0.13.0
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/README.md +1 -1
- package/dist/{chunk-5C7RGAWA.js → chunk-NFYVQWIB.js} +170 -64
- package/dist/chunk-NFYVQWIB.js.map +1 -0
- package/dist/index.d.ts +791 -145
- package/dist/index.js +5447 -2213
- package/dist/index.js.map +1 -1
- package/dist/{machines-BeZ3bD3t.d.ts → machines-CnlMb7E-.d.ts} +5 -5
- package/dist/machines.d.ts +1 -1
- package/dist/machines.js +1 -1
- package/package.json +17 -12
- package/src/approvals.ts +16 -4
- package/src/client.ts +32 -5
- package/src/commands/index.ts +1 -7
- package/src/commands/registry.ts +46 -12
- package/src/components/chat-composer.tsx +135 -39
- package/src/components/code-editor.tsx +28 -36
- package/src/components/command-palette.tsx +26 -5
- package/src/components/desktop-viewer.tsx +29 -16
- package/src/components/diff-view.tsx +27 -189
- package/src/components/enrollment-consent.tsx +28 -10
- package/src/components/enrollment-device-flow.tsx +8 -5
- package/src/components/file-browser.tsx +190 -56
- package/src/components/fleet-tile.tsx +13 -4
- package/src/components/machine-card.tsx +16 -4
- package/src/components/machine-dock-bar.tsx +20 -8
- package/src/components/machine-metrics.tsx +31 -8
- package/src/components/machine-status-pill.tsx +26 -5
- package/src/components/machines-dashboard.tsx +8 -2
- package/src/components/markdown.tsx +39 -9
- package/src/components/message-timeline.tsx +633 -109
- package/src/components/pierre-diff.tsx +83 -15
- package/src/components/pierre-file.tsx +10 -9
- package/src/components/sandbox-files.tsx +110 -227
- package/src/components/sandbox-terminal.tsx +256 -88
- package/src/components/sandbox-workspace.tsx +823 -0
- package/src/components/session-status.tsx +28 -2
- package/src/components/workbench-changes.tsx +541 -0
- package/src/components/workspace-dock.tsx +85 -22
- package/src/hooks/internal.ts +5 -2
- package/src/hooks/use-available-models.ts +7 -2
- package/src/hooks/use-billing-usage.ts +4 -1
- package/src/hooks/use-codex-accounts.ts +74 -44
- package/src/hooks/use-composer.ts +57 -36
- package/src/hooks/use-environments.ts +92 -47
- package/src/hooks/use-file-attachments.ts +101 -55
- package/src/hooks/use-goal.ts +52 -16
- package/src/hooks/use-machine-chip.ts +134 -0
- package/src/hooks/use-machines.ts +34 -16
- package/src/hooks/use-packs.ts +24 -19
- package/src/hooks/use-relay-frame-stream.ts +5 -2
- package/src/hooks/use-rigs.ts +335 -0
- package/src/hooks/use-sandbox-files.ts +213 -39
- package/src/hooks/use-sandbox-git.ts +188 -11
- package/src/hooks/use-sandbox-terminal.ts +18 -14
- package/src/hooks/use-scheduled-tasks.ts +10 -2
- package/src/hooks/use-session-capabilities.ts +77 -20
- package/src/hooks/use-session-control.ts +49 -21
- package/src/hooks/use-session-events.ts +48 -20
- package/src/hooks/use-session-lineage.ts +119 -0
- package/src/hooks/use-session.ts +43 -28
- package/src/hooks/use-slash-commands.ts +6 -4
- package/src/hooks/use-turn-queue.ts +74 -147
- package/src/hooks/use-windowed-sections.ts +204 -0
- package/src/hooks/use-workspace-capture.ts +233 -0
- package/src/hooks/use-workspace-edit.ts +231 -0
- package/src/hooks/use-workspace-sessions.ts +48 -5
- package/src/hooks/use-workspaces.ts +18 -15
- package/src/index.ts +128 -23
- package/src/lib/format.ts +44 -6
- package/src/lib/xterm-renderer.ts +65 -0
- package/src/lib/xterm-theme.ts +224 -18
- package/src/machines.ts +13 -3
- package/src/provider.tsx +3 -1
- package/src/timeline/activity-rail.tsx +213 -54
- package/src/timeline/disclosure-context.tsx +12 -2
- package/src/timeline/index.ts +21 -2
- package/src/timeline/parsers.ts +44 -10
- package/src/timeline/projection.ts +435 -84
- package/src/timeline/shared.tsx +111 -24
- package/src/timeline/tool-diff.tsx +24 -20
- package/src/timeline/tool-renderers.tsx +98 -21
- package/src/timeline/turn-summary.tsx +76 -23
- package/src/timeline/types.ts +96 -12
- package/styles/tokens.css +2 -2
- package/dist/chunk-5C7RGAWA.js.map +0 -1
|
@@ -73,7 +73,12 @@ export type ConnectionStatusPillProps = {
|
|
|
73
73
|
* the Machines dashboard, the dock header, and the session timeline. Reconnecting
|
|
74
74
|
* breathes (the resiliency-as-headline blip), online/offline hold still.
|
|
75
75
|
*/
|
|
76
|
-
export function ConnectionStatusPill({
|
|
76
|
+
export function ConnectionStatusPill({
|
|
77
|
+
status,
|
|
78
|
+
label,
|
|
79
|
+
size = "md",
|
|
80
|
+
className,
|
|
81
|
+
}: ConnectionStatusPillProps) {
|
|
77
82
|
const meta = CONNECTION_STATUS_META[status];
|
|
78
83
|
return (
|
|
79
84
|
<span
|
|
@@ -100,8 +105,16 @@ export type ConnectionDotProps = {
|
|
|
100
105
|
export function ConnectionDot({ status, className }: ConnectionDotProps) {
|
|
101
106
|
const meta = CONNECTION_STATUS_META[status];
|
|
102
107
|
return (
|
|
103
|
-
<span
|
|
104
|
-
|
|
108
|
+
<span
|
|
109
|
+
className={cn(
|
|
110
|
+
"relative inline-flex size-1.5 shrink-0 rounded-full",
|
|
111
|
+
meta.dotClassName,
|
|
112
|
+
className,
|
|
113
|
+
)}
|
|
114
|
+
>
|
|
115
|
+
{meta.pulse ? (
|
|
116
|
+
<span className={cn("absolute inset-0 animate-og-pulse rounded-full", meta.dotClassName)} />
|
|
117
|
+
) : null}
|
|
105
118
|
</span>
|
|
106
119
|
);
|
|
107
120
|
}
|
|
@@ -121,11 +134,19 @@ export type MachineStatusPillProps = {
|
|
|
121
134
|
* dashboard row, the dock header, and the timeline all reuse so the status
|
|
122
135
|
* language is identical everywhere.
|
|
123
136
|
*/
|
|
124
|
-
export function MachineStatusPill({
|
|
137
|
+
export function MachineStatusPill({
|
|
138
|
+
state,
|
|
139
|
+
sharedSessionCount,
|
|
140
|
+
size = "md",
|
|
141
|
+
className,
|
|
142
|
+
}: MachineStatusPillProps) {
|
|
125
143
|
const stateBadge = MACHINE_STATE_BADGE_META[state];
|
|
126
144
|
const shared = (sharedSessionCount ?? 0) > 1;
|
|
127
145
|
return (
|
|
128
|
-
<span
|
|
146
|
+
<span
|
|
147
|
+
className={cn("og-root inline-flex flex-wrap items-center gap-1", className)}
|
|
148
|
+
data-machine-state={state}
|
|
149
|
+
>
|
|
129
150
|
<ConnectionStatusPill status={connectionStatusForState(state)} size={size} />
|
|
130
151
|
{stateBadge ? (
|
|
131
152
|
<span
|
|
@@ -143,7 +143,10 @@ export function MachinesDashboard({
|
|
|
143
143
|
{loading && machines.length === 0 ? (
|
|
144
144
|
<div data-machines-loading className="grid gap-3 sm:grid-cols-2">
|
|
145
145
|
{[0, 1].map((i) => (
|
|
146
|
-
<div
|
|
146
|
+
<div
|
|
147
|
+
key={i}
|
|
148
|
+
className="h-36 animate-og-pulse rounded-og-lg border border-og-border bg-og-surface-1"
|
|
149
|
+
/>
|
|
147
150
|
))}
|
|
148
151
|
</div>
|
|
149
152
|
) : isEmpty ? (
|
|
@@ -153,7 +156,10 @@ export function MachinesDashboard({
|
|
|
153
156
|
{machines.map((machine) => (
|
|
154
157
|
<MachineCard
|
|
155
158
|
key={machine.sandboxId}
|
|
156
|
-
machine={{
|
|
159
|
+
machine={{
|
|
160
|
+
...machine,
|
|
161
|
+
active: machine.active || machine.sandboxId === activeSandboxId,
|
|
162
|
+
}}
|
|
157
163
|
onAttach={onAttach}
|
|
158
164
|
attaching={attachingSandboxId === machine.sandboxId}
|
|
159
165
|
/>
|
|
@@ -26,7 +26,10 @@ export type MarkdownProps = {
|
|
|
26
26
|
|
|
27
27
|
const components: Components = {
|
|
28
28
|
h1: ({ children, ...props }) => (
|
|
29
|
-
<h1
|
|
29
|
+
<h1
|
|
30
|
+
className="mt-5 mb-2.5 text-xl font-semibold tracking-tight text-og-fg first:mt-0"
|
|
31
|
+
{...props}
|
|
32
|
+
>
|
|
30
33
|
{children}
|
|
31
34
|
</h1>
|
|
32
35
|
),
|
|
@@ -36,12 +39,18 @@ const components: Components = {
|
|
|
36
39
|
</h2>
|
|
37
40
|
),
|
|
38
41
|
h3: ({ children, ...props }) => (
|
|
39
|
-
<h3
|
|
42
|
+
<h3
|
|
43
|
+
className="mt-4 mb-1.5 text-og-md font-semibold tracking-tight text-og-fg first:mt-0"
|
|
44
|
+
{...props}
|
|
45
|
+
>
|
|
40
46
|
{children}
|
|
41
47
|
</h3>
|
|
42
48
|
),
|
|
43
49
|
h4: ({ children, ...props }) => (
|
|
44
|
-
<h4
|
|
50
|
+
<h4
|
|
51
|
+
className="mt-4 mb-1.5 text-og-sm font-semibold uppercase tracking-[0.04em] text-og-fg-muted first:mt-0"
|
|
52
|
+
{...props}
|
|
53
|
+
>
|
|
45
54
|
{children}
|
|
46
55
|
</h4>
|
|
47
56
|
),
|
|
@@ -71,12 +80,18 @@ const components: Components = {
|
|
|
71
80
|
</a>
|
|
72
81
|
),
|
|
73
82
|
ul: ({ children, ...props }) => (
|
|
74
|
-
<ul
|
|
83
|
+
<ul
|
|
84
|
+
className="my-2.5 ml-5 flex list-disc flex-col gap-1 marker:text-og-fg-subtle first:mt-0 last:mb-0"
|
|
85
|
+
{...props}
|
|
86
|
+
>
|
|
75
87
|
{children}
|
|
76
88
|
</ul>
|
|
77
89
|
),
|
|
78
90
|
ol: ({ children, ...props }) => (
|
|
79
|
-
<ol
|
|
91
|
+
<ol
|
|
92
|
+
className="my-2.5 ml-5 flex list-decimal flex-col gap-1 marker:text-og-fg-subtle first:mt-0 last:mb-0"
|
|
93
|
+
{...props}
|
|
94
|
+
>
|
|
80
95
|
{children}
|
|
81
96
|
</ol>
|
|
82
97
|
),
|
|
@@ -84,7 +99,10 @@ const components: Components = {
|
|
|
84
99
|
// negative margin pull the checkbox back to the bullet column so it aligns
|
|
85
100
|
// with the text.
|
|
86
101
|
li: ({ children, ...props }) => (
|
|
87
|
-
<li
|
|
102
|
+
<li
|
|
103
|
+
className="leading-7 marker:text-og-fg-subtle [&>ul]:my-1 [&>ol]:my-1 [&:has(>input)]:list-none [&:has(>input)]:-ml-5"
|
|
104
|
+
{...props}
|
|
105
|
+
>
|
|
88
106
|
{children}
|
|
89
107
|
</li>
|
|
90
108
|
),
|
|
@@ -142,16 +160,28 @@ const components: Components = {
|
|
|
142
160
|
</thead>
|
|
143
161
|
),
|
|
144
162
|
th: ({ children, ...props }) => (
|
|
145
|
-
<th
|
|
163
|
+
<th
|
|
164
|
+
className="border-b border-og-border px-3 py-1.5 text-left font-medium text-og-fg"
|
|
165
|
+
{...props}
|
|
166
|
+
>
|
|
146
167
|
{children}
|
|
147
168
|
</th>
|
|
148
169
|
),
|
|
149
170
|
td: ({ children, ...props }) => (
|
|
150
|
-
<td
|
|
171
|
+
<td
|
|
172
|
+
className="border-b border-og-border px-3 py-1.5 align-top text-og-fg-muted [tr:last-child>&]:border-b-0"
|
|
173
|
+
{...props}
|
|
174
|
+
>
|
|
151
175
|
{children}
|
|
152
176
|
</td>
|
|
153
177
|
),
|
|
154
|
-
img: ({ alt, ...props }) =>
|
|
178
|
+
img: ({ alt, ...props }) => (
|
|
179
|
+
<img
|
|
180
|
+
alt={alt ?? ""}
|
|
181
|
+
className="my-3 max-w-full rounded-og-md border border-og-border"
|
|
182
|
+
{...props}
|
|
183
|
+
/>
|
|
184
|
+
),
|
|
155
185
|
};
|
|
156
186
|
|
|
157
187
|
function MarkdownImpl({ children, className }: MarkdownProps) {
|