zidane-ui 9.1.6 → 9.1.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/adapters/run-host.js +17 -20
- package/dist/adapters/server-files-host.js +3 -1
- package/dist/adapters/server-host.js +18 -11
- package/dist/adapters/server-machines-host.js +3 -1
- package/dist/adapters/server-session-host.js +2 -1
- package/dist/adapters/server-settings-accounts.js +2 -1
- package/dist/adapters/server-settings-host.js +3 -3
- package/dist/adapters/sse-host.js +9 -7
- package/dist/chat/SessionGroupHeader.js +2 -2
- package/dist/chat/SessionHostHeader.js +1 -1
- package/dist/chat/StatusDot.js +24 -20
- package/dist/chat/composer/Composer.d.ts +13 -8
- package/dist/chat/composer/Composer.js +14 -10
- package/dist/chat/composer/ComposerEditor.js +1 -1
- package/dist/chat/composer/HostComposer.d.ts +1 -1
- package/dist/chat/composer/HostComposer.js +7 -10
- package/dist/chat/composer/RunStatusChip.js +13 -1
- package/dist/chat/composer/attachment-ingest.d.ts +4 -1
- package/dist/chat/composer/attachment-ingest.js +27 -10
- package/dist/chat/composer/composer-bus.d.ts +9 -1
- package/dist/chat/composer/composer-bus.js +49 -6
- package/dist/chat/composer/index.d.ts +2 -2
- package/dist/chat/composer/index.js +2 -2
- package/dist/chat/composer/use-draft-target.d.ts +4 -0
- package/dist/chat/composer/use-draft-target.js +15 -4
- package/dist/chat/composer/use-send-prompt.d.ts +5 -1
- package/dist/chat/composer/use-send-prompt.js +2 -12
- package/dist/chat/headless/chip-labels.d.ts +2 -0
- package/dist/chat/headless/chip-labels.js +3 -1
- package/dist/chat/headless/composer/labels-editor.d.ts +2 -0
- package/dist/chat/headless/composer/labels-editor.js +2 -0
- package/dist/chat/headless/file-chip.d.ts +12 -13
- package/dist/chat/headless/file-chip.js +40 -2
- package/dist/chat/headless/fixture-host.js +14 -17
- package/dist/chat/headless/host.d.ts +24 -6
- package/dist/chat/headless/index.d.ts +4 -4
- package/dist/chat/headless/index.js +4 -4
- package/dist/chat/headless/labels.d.ts +16 -0
- package/dist/chat/headless/labels.js +15 -2
- package/dist/chat/headless/send-flow.d.ts +21 -4
- package/dist/chat/headless/send-flow.js +25 -6
- package/dist/chat/headless/session-list.d.ts +11 -0
- package/dist/chat/headless/sidebar/index.js +1 -1
- package/dist/chat/headless/sidebar/labels.d.ts +12 -1
- package/dist/chat/headless/transcript-host.d.ts +8 -1
- package/dist/chat/headless/transcript-labels.d.ts +2 -0
- package/dist/chat/index.d.ts +3 -3
- package/dist/chat/index.js +2 -2
- package/dist/chat/interactions/InboxPanel.js +2 -2
- package/dist/chat/interactions/QuestionField.js +2 -2
- package/dist/chat/rich-composer/RichComposer.d.ts +9 -2
- package/dist/chat/rich-composer/RichComposer.js +28 -7
- package/dist/chat/rich-composer/composer-extensions.d.ts +2 -0
- package/dist/chat/rich-composer/composer-extensions.js +2 -2
- package/dist/chat/rich-composer/composer-keys.js +1 -1
- package/dist/chat/rich-composer/use-composer-bus.js +2 -1
- package/dist/chat/rich-composer/use-composer-editor.d.ts +4 -1
- package/dist/chat/rich-composer/use-composer-editor.js +2 -1
- package/dist/chat/sidebar/SessionSidebar.js +1 -2
- package/dist/chat/sidebar/SidebarSearchRow.js +1 -1
- package/dist/chat/sidebar/useSidebarKeyboardNav.d.ts +0 -2
- package/dist/chat/sidebar/useSidebarKeyboardNav.js +7 -13
- package/dist/chat/testing/contract.d.ts +1 -1
- package/dist/chat/testing/contract.js +8 -7
- package/dist/chat/transcript/BadgeMenu.d.ts +12 -3
- package/dist/chat/transcript/BadgeMenu.js +20 -3
- package/dist/chat/transcript/CodemodeScript.js +147 -44
- package/dist/chat/transcript/EditDiffBlock.js +1 -4
- package/dist/chat/transcript/FileChip.js +60 -14
- package/dist/chat/transcript/LiveOutput.js +7 -3
- package/dist/chat/transcript/badges.js +2 -2
- package/dist/chat/transcript/index.d.ts +2 -2
- package/dist/chat/transcript/markdown-context.d.ts +4 -1
- package/dist/chat/transcript/rolling.d.ts +12 -0
- package/dist/chat/transcript/rolling.js +22 -0
- package/dist/chat/transcript/script-input.d.ts +1 -1
- package/dist/chat/transcript/shell-block.js +70 -60
- package/dist/chat/transcript/tool-row.js +21 -5
- package/dist/code/editor/FileTree.d.ts +3 -1
- package/dist/code/editor/FileTree.js +29 -1
- package/dist/components/Restricted.d.ts +25 -0
- package/dist/components/Restricted.js +32 -0
- package/dist/components/StepFrame.d.ts +1 -1
- package/dist/components/ZidaneMark.d.ts +28 -0
- package/dist/components/ZidaneMark.js +114 -0
- package/dist/components/palette/PalettePanel.d.ts +7 -1
- package/dist/components/palette/PalettePanel.js +37 -11
- package/dist/components/zidane-mark.d.ts +52 -0
- package/dist/components/zidane-mark.js +94 -0
- package/dist/core.css +59 -6
- package/dist/dist/{index-DqCio7Nd.d.ts → index-Bq87OcGy.d.ts} +19 -12
- package/dist/dist/index.d.ts +1 -1
- package/dist/extensions/ExtensionSettingsSection.d.ts +18 -0
- package/dist/extensions/ExtensionSettingsSection.js +227 -0
- package/dist/extensions/headless/host.d.ts +1 -1
- package/dist/extensions/headless/labels.d.ts +41 -1
- package/dist/extensions/headless/labels.js +57 -0
- package/dist/extensions/headless/select.js +1 -2
- package/dist/extensions/index.d.ts +2 -1
- package/dist/extensions/index.js +2 -1
- package/dist/files/FilesTab.js +2 -0
- package/dist/files/TreeColumn.d.ts +5 -1
- package/dist/files/TreeColumn.js +6 -0
- package/dist/files/headless/fixture-host.js +5 -3
- package/dist/files/headless/host.d.ts +24 -6
- package/dist/files/headless/index.d.ts +2 -2
- package/dist/files/headless/labels.d.ts +1 -0
- package/dist/files/headless/labels.js +1 -0
- package/dist/files/testing/contract.js +9 -2
- package/dist/files/useWorkspace.d.ts +14 -2
- package/dist/files/useWorkspace.js +87 -9
- package/dist/git/BranchMenu.js +1 -1
- package/dist/git/MoveSessionDialog.js +1 -1
- package/dist/git/RemoteFolderPicker.js +1 -1
- package/dist/git/WherePicker.js +1 -1
- package/dist/git/headless/index.js +1 -1
- package/dist/git/useEnvironmentChoices.js +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/dist/keybindings/headless/catalog.js +1 -1
- package/dist/labels.d.ts +1 -0
- package/dist/labels.js +1 -0
- package/dist/machines/DaemonMenu.js +1 -1
- package/dist/machines/HostCapabilities.d.ts +23 -1
- package/dist/machines/HostCapabilities.js +149 -65
- package/dist/machines/HostSyncPanel.js +129 -123
- package/dist/machines/HostsSection.js +5 -1
- package/dist/machines/ServerCard.d.ts +4 -2
- package/dist/machines/ServerCard.js +222 -99
- package/dist/machines/ServerMachinesPanel.js +16 -13
- package/dist/machines/ServerUpdatePanel.js +31 -21
- package/dist/machines/TokensPanel.js +75 -53
- package/dist/machines/headless/fixture-host.d.ts +5 -0
- package/dist/machines/headless/fixture-host.js +13 -4
- package/dist/machines/headless/fixtures.js +1 -1
- package/dist/machines/headless/host.d.ts +22 -2
- package/dist/machines/headless/index.d.ts +2 -2
- package/dist/machines/headless/labels.d.ts +22 -1
- package/dist/machines/headless/labels.js +22 -2
- package/dist/machines/testing/contract.d.ts +3 -1
- package/dist/machines/testing/contract.js +9 -0
- package/dist/motion/size.d.ts +22 -1
- package/dist/motion/size.js +82 -4
- package/dist/onboarding/demos/delivery.d.ts +16 -0
- package/dist/onboarding/demos/delivery.js +132 -0
- package/dist/onboarding/demos/index.d.ts +2 -1
- package/dist/onboarding/demos/index.js +2 -1
- package/dist/onboarding/headless/labels.d.ts +8 -0
- package/dist/onboarding/headless/labels.js +7 -0
- package/dist/onboarding/index.d.ts +2 -1
- package/dist/onboarding/index.js +2 -1
- package/dist/onboarding/steps/ConversationStep.js +46 -4
- package/dist/palette/CommandPalette.js +3 -0
- package/dist/palette/PaletteDialog.js +7 -3
- package/dist/palette/usePaletteController.d.ts +10 -0
- package/dist/palette/usePaletteController.js +25 -3
- package/dist/server/sse-handler.js +6 -1
- package/dist/session/ArtifactsPanel.js +1 -1
- package/dist/session/SideChat.js +1 -2
- package/dist/session/UsagePanel.js +1 -1
- package/dist/session/headless/host.d.ts +3 -1
- package/dist/session/headless/index.js +2 -2
- package/dist/settings/SettingsRestricted.d.ts +25 -0
- package/dist/settings/SettingsRestricted.js +44 -0
- package/dist/settings/SettingsRowsPage.js +31 -37
- package/dist/settings/headless/catalog.js +7 -6
- package/dist/settings/headless/labels.d.ts +4 -2
- package/dist/settings/headless/labels.js +4 -2
- package/dist/settings/headless/layout.js +1 -1
- package/dist/settings/headless/providers.d.ts +2 -0
- package/dist/settings/headless/search.d.ts +1 -1
- package/dist/settings/index.d.ts +2 -2
- package/dist/settings/index.js +2 -2
- package/dist/settings/rows.d.ts +51 -8
- package/dist/settings/rows.js +81 -26
- package/dist/settings/sections/enabled-list/EnabledListSection.js +3 -2
- package/dist/settings/sections/environments/EnvironmentsSection.js +4 -3
- package/dist/settings/sections/extensions/ExtensionConfigRows.d.ts +2 -2
- package/dist/settings/sections/extensions/ExtensionConfigRows.js +22 -25
- package/dist/settings/sections/extensions/ExtensionOptionsSection.js +3 -2
- package/dist/settings/sections/extensions/options-labels.d.ts +2 -2
- package/dist/settings/sections/extensions/options-labels.js +2 -2
- package/dist/settings/sections/host-catalog/HostCatalogSection.d.ts +5 -3
- package/dist/settings/sections/host-catalog/HostCatalogSection.js +7 -4
- package/dist/settings/sections/instructions/InstructionsSection.js +24 -17
- package/dist/settings/sections/logs/LogsSection.d.ts +2 -1
- package/dist/settings/sections/logs/LogsSection.js +64 -56
- package/dist/settings/sections/mcp/McpSection.d.ts +1 -1
- package/dist/settings/sections/mcp/McpSection.js +18 -17
- package/dist/settings/sections/models/ModelRows.d.ts +3 -3
- package/dist/settings/sections/models/ModelRows.js +8 -7
- package/dist/settings/sections/performance/PerformanceSection.js +13 -4
- package/dist/settings/sections/performance/labels.d.ts +0 -1
- package/dist/settings/sections/performance/labels.js +0 -1
- package/dist/settings/sections/providers/CredentialSources.js +18 -8
- package/dist/settings/sections/providers/ProvidersSection.d.ts +2 -2
- package/dist/settings/sections/providers/ProvidersSection.js +20 -17
- package/dist/settings/sections/providers/ServerProvidersSection.d.ts +1 -1
- package/dist/settings/sections/providers/ServerProvidersSection.js +10 -14
- package/dist/settings/sections/shared/catalog.js +3 -2
- package/dist/settings/sections/skills/SkillList.js +3 -2
- package/dist/settings/testing/accounts-demo.js +1 -0
- package/dist/settings/testing/accounts.contract.js +2 -0
- package/dist/styles.css +160 -24
- package/dist/terminal/HostTerminalSurface.js +1 -1
- package/dist/terminal/headless/links.d.ts +19 -1
- package/dist/terminal/headless/links.js +26 -2
- package/dist/theme/css-vars.js +1 -0
- package/dist/theme/derive.d.ts +4 -0
- package/dist/theme/derive.js +2 -0
- package/dist/workspace/PanelContentView.js +1 -1
- package/dist/workspace/PanelHome.d.ts +3 -1
- package/dist/workspace/PanelHome.js +4 -3
- package/dist/workspace/SidePanel.d.ts +3 -1
- package/dist/workspace/SidePanel.js +3 -2
- package/dist/workspace/headless/open-target.d.ts +1 -1
- package/dist/workspace/headless/open-target.js +2 -2
- package/package.json +2 -2
- package/src/styles/chat.css +10 -10
- package/src/styles/motion.css +37 -0
- package/src/styles/primitives.css +11 -3
- package/src/styles/sidebar.css +12 -0
- package/src/styles/tokens.css +6 -0
- package/src/styles/transcript.css +69 -5
|
@@ -25,6 +25,11 @@ interface FixtureMachinesOptions {
|
|
|
25
25
|
capabilities?: HostCapabilities | false;
|
|
26
26
|
/** Called when a capability read reaches the fixture. */
|
|
27
27
|
onCapabilities?: (hostId: string, refresh: boolean) => void;
|
|
28
|
+
/** Called when an install reaches the fixture (with `capabilities`); answers how it went. Default: it worked. */
|
|
29
|
+
onInstallTool?: (hostId: string, name: string) => {
|
|
30
|
+
ok: boolean;
|
|
31
|
+
output: string;
|
|
32
|
+
};
|
|
28
33
|
/** Every live session's presence, or `false` for no `presence`. Default: false. */
|
|
29
34
|
presence?: readonly SessionPresence[] | false;
|
|
30
35
|
/** What the token may do, or `false` for no `permitted` store (everything). Default: false. */
|
|
@@ -385,10 +385,19 @@ function createFixtureMachinesHost(options = {}) {
|
|
|
385
385
|
options.onDaemon?.("relaunchApp");
|
|
386
386
|
}
|
|
387
387
|
} } : {},
|
|
388
|
-
...options.capabilities ? {
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
388
|
+
...options.capabilities ? {
|
|
389
|
+
capabilities: async (hostId, opts) => {
|
|
390
|
+
options.onCapabilities?.(hostId, opts?.refresh === true);
|
|
391
|
+
return options.capabilities;
|
|
392
|
+
},
|
|
393
|
+
installTool: async (hostId, name) => ({
|
|
394
|
+
...options.onInstallTool?.(hostId, name) ?? {
|
|
395
|
+
ok: true,
|
|
396
|
+
output: ""
|
|
397
|
+
},
|
|
398
|
+
capabilities: options.capabilities
|
|
399
|
+
})
|
|
400
|
+
} : {},
|
|
392
401
|
...presence ? { presence } : {},
|
|
393
402
|
...options.permitted ? { permitted } : {},
|
|
394
403
|
...options.sync ? { sync: {
|
|
@@ -20,6 +20,11 @@ interface HostSummary extends HostView {
|
|
|
20
20
|
machineServe?: boolean;
|
|
21
21
|
/** The scope this app's token has there. Absent: every method (the user's own computer). */
|
|
22
22
|
scope?: ClientScope;
|
|
23
|
+
/** How to get an admin token there: commands to run on its machine (`token` mints one to paste, `pair` a browser code). */
|
|
24
|
+
adminCommands?: {
|
|
25
|
+
token: string;
|
|
26
|
+
pair: string;
|
|
27
|
+
};
|
|
23
28
|
/** When the server process started, epoch ms. */
|
|
24
29
|
startedAt?: number;
|
|
25
30
|
}
|
|
@@ -56,7 +61,7 @@ type MachineActionResult = {
|
|
|
56
61
|
/** What went wrong, for the UI to word through its labels. `detail` is the backend's own message. */
|
|
57
62
|
interface MachinesError {
|
|
58
63
|
/** Which action failed. */
|
|
59
|
-
kind: 'read' | 'update' | 'forget' | 'remove' | 'tokens' | 'daemon' | 'sync' | 'invite';
|
|
64
|
+
kind: 'read' | 'update' | 'forget' | 'remove' | 'tokens' | 'daemon' | 'sync' | 'invite' | 'install';
|
|
60
65
|
/** The backend's message, shown as is by the default labels. */
|
|
61
66
|
detail: string;
|
|
62
67
|
/** The token's scope does not reach the action (the server answered Forbidden). */
|
|
@@ -257,6 +262,15 @@ interface DaemonControl {
|
|
|
257
262
|
/** Relaunches the app (the daemon runs newer code). Absent: no Relaunch. */
|
|
258
263
|
relaunchApp?(): Promise<void>;
|
|
259
264
|
}
|
|
265
|
+
/** What an install did: it worked, its output's end, and the server's capabilities after it. */
|
|
266
|
+
interface ToolInstallResult {
|
|
267
|
+
/** The install command exited 0. */
|
|
268
|
+
ok: boolean;
|
|
269
|
+
/** The end of what it printed (stdout, then stderr). */
|
|
270
|
+
output: string;
|
|
271
|
+
/** The server's capabilities, probed again after the install. */
|
|
272
|
+
capabilities: HostCapabilities;
|
|
273
|
+
}
|
|
260
274
|
/** An action `permitted` may withhold. */
|
|
261
275
|
type MachinesAction = 'machines.list' | 'machines.forget' | 'machines.invite' | 'update.status' | 'update.manage' | 'tokens.list' | 'tokens.manage';
|
|
262
276
|
/** What the machines components read and the actions they send. */
|
|
@@ -314,6 +328,12 @@ interface MachinesHost {
|
|
|
314
328
|
capabilities?(hostId: string, options?: {
|
|
315
329
|
refresh?: boolean;
|
|
316
330
|
}): Promise<HostCapabilities>;
|
|
331
|
+
/**
|
|
332
|
+
* Installs a missing tool on a server, as its user, when the server's recipe needs no root (`toolInstall` says
|
|
333
|
+
* `run`); answers what it printed and the new capabilities. Rejects with a {@link MachinesError} (`install`).
|
|
334
|
+
* Absent: no Install buttons.
|
|
335
|
+
*/
|
|
336
|
+
installTool?(hostId: string, name: string): Promise<ToolInstallResult>;
|
|
317
337
|
/** Live per-session presence (attached windows, runs, waiting on you). Absent: no presence on the rows. */
|
|
318
338
|
presence?: MachinesPresence;
|
|
319
339
|
/** What the members may do right now; `null` while that is not known (not connected). Absent: everything they offer. */
|
|
@@ -340,4 +360,4 @@ declare function isMachinesError(value: unknown): value is MachinesError;
|
|
|
340
360
|
*/
|
|
341
361
|
declare function isPermitted(permitted: ReadonlySet<MachinesAction> | null | undefined, action: MachinesAction): boolean;
|
|
342
362
|
//#endregion
|
|
343
|
-
export { DaemonControl, type DaemonHealth, DaemonStatus, type HostCapabilities, HostCheckError, HostCheckResult, type HostProviderAuth, HostSignInTarget, HostSummary, HostSync, HostsState, MachineActionResult, type MachineInfo, MachineInvite, MachineLinks, type MachineLinksStatus, MachineList, MachineListState, MachinesAction, MachinesDirectory, MachinesError, MachinesHost, SavedHosts, SavedHostsState, ServerToken, ServerTokenScope, ServerTokens, type ServerUpdateStatus, ServerUpdates, isMachinesError, isPermitted, machinesError };
|
|
363
|
+
export { DaemonControl, type DaemonHealth, DaemonStatus, type HostCapabilities, HostCheckError, HostCheckResult, type HostProviderAuth, HostSignInTarget, HostSummary, HostSync, HostsState, MachineActionResult, type MachineInfo, MachineInvite, MachineLinks, type MachineLinksStatus, MachineList, MachineListState, MachinesAction, MachinesDirectory, MachinesError, MachinesHost, SavedHosts, SavedHostsState, ServerToken, ServerTokenScope, ServerTokens, type ServerUpdateStatus, ServerUpdates, ToolInstallResult, isMachinesError, isPermitted, machinesError };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MachinesPresence, PresenceFeed, SessionPresence, createPresenceStore } from "./presence.js";
|
|
2
2
|
import { DEFAULT_MACHINES_LABELS, MachinesLabels } from "./labels.js";
|
|
3
3
|
import { HostSyncAccount, HostSyncConfig, HostSyncPatch, HostSyncRead, HostSyncState, SyncBlockedReason, SyncCategory, SyncMode, SyncOutcome, SyncPushResult, SyncStatus, createHostSyncReads, shortList, syncBlockedReason, syncOutcome } from "./sync.js";
|
|
4
|
-
import { DaemonControl, DaemonHealth, DaemonStatus, HostCapabilities, HostCheckError, HostCheckResult, HostProviderAuth, HostSignInTarget, HostSummary, HostSync, HostsState, MachineActionResult, MachineInfo, MachineInvite, MachineLinks, MachineLinksStatus, MachineList, MachineListState, MachinesAction, MachinesDirectory, MachinesError, MachinesHost, SavedHosts, SavedHostsState, ServerToken, ServerTokenScope, ServerTokens, ServerUpdateStatus, ServerUpdates, isMachinesError, isPermitted, machinesError } from "./host.js";
|
|
4
|
+
import { DaemonControl, DaemonHealth, DaemonStatus, HostCapabilities, HostCheckError, HostCheckResult, HostProviderAuth, HostSignInTarget, HostSummary, HostSync, HostsState, MachineActionResult, MachineInfo, MachineInvite, MachineLinks, MachineLinksStatus, MachineList, MachineListState, MachinesAction, MachinesDirectory, MachinesError, MachinesHost, SavedHosts, SavedHostsState, ServerToken, ServerTokenScope, ServerTokens, ServerUpdateStatus, ServerUpdates, ToolInstallResult, isMachinesError, isPermitted, machinesError } from "./host.js";
|
|
5
5
|
import { LazyReadableOptions, LazySink, createMachineLists, createOnlineMachines, lazyReadable } from "./stores.js";
|
|
6
6
|
import { MachinesTone, UPDATE_BUSY_STATES, agoText, daemonStatusText, hostCheckMessage, hostCheckOkLine, hostStatusText, hostStatusTone, linkStateText, updateStateLine, uptimeText } from "./messages.js";
|
|
7
7
|
import { hostOfSettingsFocus, hostSettingsFocus } from "./settings-focus.js";
|
|
8
|
-
export { DEFAULT_MACHINES_LABELS, DaemonControl, type DaemonHealth, DaemonStatus, type HostCapabilities, HostCheckError, HostCheckResult, type HostProviderAuth, HostSignInTarget, HostSummary, HostSync, HostSyncAccount, HostSyncConfig, HostSyncPatch, HostSyncRead, HostSyncState, HostsState, LazyReadableOptions, LazySink, MachineActionResult, type MachineInfo, MachineInvite, MachineLinks, type MachineLinksStatus, MachineList, MachineListState, MachinesAction, MachinesDirectory, MachinesError, MachinesHost, MachinesLabels, MachinesPresence, MachinesTone, PresenceFeed, SavedHosts, SavedHostsState, ServerToken, ServerTokenScope, ServerTokens, type ServerUpdateStatus, ServerUpdates, SessionPresence, SyncBlockedReason, type SyncCategory, type SyncMode, SyncOutcome, type SyncPushResult, type SyncStatus, UPDATE_BUSY_STATES, agoText, createHostSyncReads, createMachineLists, createOnlineMachines, createPresenceStore, daemonStatusText, hostCheckMessage, hostCheckOkLine, hostOfSettingsFocus, hostSettingsFocus, hostStatusText, hostStatusTone, isMachinesError, isPermitted, lazyReadable, linkStateText, machinesError, shortList, syncBlockedReason, syncOutcome, updateStateLine, uptimeText };
|
|
8
|
+
export { DEFAULT_MACHINES_LABELS, DaemonControl, type DaemonHealth, DaemonStatus, type HostCapabilities, HostCheckError, HostCheckResult, type HostProviderAuth, HostSignInTarget, HostSummary, HostSync, HostSyncAccount, HostSyncConfig, HostSyncPatch, HostSyncRead, HostSyncState, HostsState, LazyReadableOptions, LazySink, MachineActionResult, type MachineInfo, MachineInvite, MachineLinks, type MachineLinksStatus, MachineList, MachineListState, MachinesAction, MachinesDirectory, MachinesError, MachinesHost, MachinesLabels, MachinesPresence, MachinesTone, PresenceFeed, SavedHosts, SavedHostsState, ServerToken, ServerTokenScope, ServerTokens, type ServerUpdateStatus, ServerUpdates, SessionPresence, SyncBlockedReason, type SyncCategory, type SyncMode, SyncOutcome, type SyncPushResult, type SyncStatus, ToolInstallResult, UPDATE_BUSY_STATES, agoText, createHostSyncReads, createMachineLists, createOnlineMachines, createPresenceStore, daemonStatusText, hostCheckMessage, hostCheckOkLine, hostOfSettingsFocus, hostSettingsFocus, hostStatusText, hostStatusTone, isMachinesError, isPermitted, lazyReadable, linkStateText, machinesError, shortList, syncBlockedReason, syncOutcome, updateStateLine, uptimeText };
|
|
@@ -53,6 +53,19 @@ declare const DEFAULT_MACHINES_LABELS: {
|
|
|
53
53
|
machinesFactVersion: (version: string) => string;
|
|
54
54
|
machinesFactConnected: (ago: string) => string;
|
|
55
55
|
machinesFactScope: (scope: string) => string;
|
|
56
|
+
/** What a section, button or panel says to a connection that may not use it (a chat token). */
|
|
57
|
+
machinesAdminOnly: string;
|
|
58
|
+
/** The chip on a server's card: what this app's token may do there. */
|
|
59
|
+
machinesAccess: (scope: string) => "Admin access" | "Chat access";
|
|
60
|
+
machinesGetAdmin: string;
|
|
61
|
+
machinesGetAdminRun: string;
|
|
62
|
+
machinesGetAdminCopy: string;
|
|
63
|
+
machinesGetAdminToken: string;
|
|
64
|
+
machinesGetAdminTokenField: string;
|
|
65
|
+
machinesGetAdminSave: string;
|
|
66
|
+
machinesGetAdminSaving: string;
|
|
67
|
+
machinesGetAdminSaved: string;
|
|
68
|
+
machinesGetAdminPairNext: string;
|
|
56
69
|
machinesFactUptime: (uptime: string) => string;
|
|
57
70
|
machinesOkLine: (name: string, version?: string, latencyMs?: number) => string;
|
|
58
71
|
/** What to do about a refusal, per registry error code; `message` is the backend's own words. */
|
|
@@ -158,7 +171,6 @@ declare const DEFAULT_MACHINES_LABELS: {
|
|
|
158
171
|
machinesTokensCreatedAt: (ago: string) => string;
|
|
159
172
|
machinesTokensEmpty: string;
|
|
160
173
|
machinesTokensList: string;
|
|
161
|
-
machinesTokensNotPermitted: string;
|
|
162
174
|
machinesDaemonMenu: (health: string) => string;
|
|
163
175
|
machinesDaemon: string;
|
|
164
176
|
machinesDaemonOff: string;
|
|
@@ -232,6 +244,15 @@ declare const DEFAULT_MACHINES_LABELS: {
|
|
|
232
244
|
machinesCapsSync: string;
|
|
233
245
|
machinesCapsClone: string;
|
|
234
246
|
machinesCapsCreateFolders: string;
|
|
247
|
+
machinesCapsInstall: string;
|
|
248
|
+
machinesCapsInstallLabel: (tool: string) => string;
|
|
249
|
+
machinesCapsInstalling: string;
|
|
250
|
+
machinesCapsInstalled: (tool: string) => string;
|
|
251
|
+
machinesCapsInstallFailed: (tool: string) => string;
|
|
252
|
+
machinesCapsInstallCopy: (command: string) => string;
|
|
253
|
+
machinesCapsInstallCopyLabel: (tool: string) => string;
|
|
254
|
+
machinesCapsInstallPage: string;
|
|
255
|
+
machinesCapsInstallPageLabel: (tool: string) => string;
|
|
235
256
|
machinesHostsTitle: string;
|
|
236
257
|
machinesOpenHost: (name: string) => string;
|
|
237
258
|
machinesThisApp: string;
|
|
@@ -48,6 +48,19 @@ const DEFAULT_MACHINES_LABELS = {
|
|
|
48
48
|
machinesFactVersion: (version) => `Zidane ${version}`,
|
|
49
49
|
machinesFactConnected: (ago) => `connected ${ago}`,
|
|
50
50
|
machinesFactScope: (scope) => `${scope} token`,
|
|
51
|
+
/** What a section, button or panel says to a connection that may not use it (a chat token). */
|
|
52
|
+
machinesAdminOnly: "Admin only",
|
|
53
|
+
/** The chip on a server's card: what this app's token may do there. */
|
|
54
|
+
machinesAccess: (scope) => scope === "admin" ? "Admin access" : "Chat access",
|
|
55
|
+
machinesGetAdmin: "Get admin",
|
|
56
|
+
machinesGetAdminRun: "Run this on the server:",
|
|
57
|
+
machinesGetAdminCopy: "Copy the command",
|
|
58
|
+
machinesGetAdminToken: "Then paste the token it prints:",
|
|
59
|
+
machinesGetAdminTokenField: "Admin token",
|
|
60
|
+
machinesGetAdminSave: "Use this token",
|
|
61
|
+
machinesGetAdminSaving: "Checking the token…",
|
|
62
|
+
machinesGetAdminSaved: "Connected with the admin token.",
|
|
63
|
+
machinesGetAdminPairNext: "Then sign out, and log in again with the code it prints.",
|
|
51
64
|
machinesFactUptime: (uptime) => `up ${uptime}`,
|
|
52
65
|
machinesOkLine: (name, version, latencyMs) => `${name} answered${version ? ` (zidane ${version})` : ""}${latencyMs !== void 0 ? ` in ${latencyMs} ms` : ""}.`,
|
|
53
66
|
/** What to do about a refusal, per registry error code; `message` is the backend's own words. */
|
|
@@ -150,7 +163,6 @@ const DEFAULT_MACHINES_LABELS = {
|
|
|
150
163
|
machinesTokensScope: "Scope",
|
|
151
164
|
machinesTokensScopes: {
|
|
152
165
|
chat: "Chat",
|
|
153
|
-
approve: "Approve",
|
|
154
166
|
admin: "Admin",
|
|
155
167
|
machine: "Machine"
|
|
156
168
|
},
|
|
@@ -169,7 +181,6 @@ const DEFAULT_MACHINES_LABELS = {
|
|
|
169
181
|
machinesTokensCreatedAt: (ago) => `created ${ago}`,
|
|
170
182
|
machinesTokensEmpty: "No tokens yet.",
|
|
171
183
|
machinesTokensList: "Tokens",
|
|
172
|
-
machinesTokensNotPermitted: "Managing tokens needs an admin token.",
|
|
173
184
|
machinesDaemonMenu: (health) => `Daemon menu, ${health}`,
|
|
174
185
|
machinesDaemon: "Daemon",
|
|
175
186
|
machinesDaemonOff: "Daemon mode is off",
|
|
@@ -247,6 +258,15 @@ const DEFAULT_MACHINES_LABELS = {
|
|
|
247
258
|
machinesCapsSync: "Settings sync",
|
|
248
259
|
machinesCapsClone: "Clones from clients",
|
|
249
260
|
machinesCapsCreateFolders: "New folders from clients",
|
|
261
|
+
machinesCapsInstall: "Install",
|
|
262
|
+
machinesCapsInstallLabel: (tool) => `Install ${tool} on this server`,
|
|
263
|
+
machinesCapsInstalling: "Installing…",
|
|
264
|
+
machinesCapsInstalled: (tool) => `${tool} is installed.`,
|
|
265
|
+
machinesCapsInstallFailed: (tool) => `${tool} did not install:`,
|
|
266
|
+
machinesCapsInstallCopy: (command) => `Needs root. Run on the server: ${command}`,
|
|
267
|
+
machinesCapsInstallCopyLabel: (tool) => `Copy the command that installs ${tool}`,
|
|
268
|
+
machinesCapsInstallPage: "How to install",
|
|
269
|
+
machinesCapsInstallPageLabel: (tool) => `How to install ${tool}`,
|
|
250
270
|
machinesHostsTitle: "Hosts",
|
|
251
271
|
machinesOpenHost: (name) => `Open ${name}`,
|
|
252
272
|
machinesThisApp: "This app",
|
|
@@ -4,7 +4,7 @@ import { MachinesSyncCapability, MachinesSyncContractBackend, MachinesSyncHarnes
|
|
|
4
4
|
import { HostCapabilities } from "zidane/chat/pure";
|
|
5
5
|
//#region src/machines/testing/contract.d.ts
|
|
6
6
|
/** An optional `MachinesHost` member, by its path. */
|
|
7
|
-
type MachinesHostCapability = 'hosts' | 'refreshHosts' | 'retry' | 'testHost' | 'addHost' | 'renameHost' | 'setHostUrl' | 'removeHost' | 'savedHosts' | 'machines' | 'machines.forget' | 'machines.invite' | 'links' | 'links.shareStart' | 'links.shareStop' | 'links.useServer' | 'pickFolder' | 'updates' | 'updates.check' | 'updates.install' | 'updates.configure' | 'tokens' | 'tokens.create' | 'tokens.revoke' | 'tokens.onChanged' | 'daemon' | 'daemon.reconnect' | 'daemon.restart' | 'daemon.stopRun' | 'daemon.relaunchApp' | 'presence' | 'capabilities' | 'permitted';
|
|
7
|
+
type MachinesHostCapability = 'hosts' | 'refreshHosts' | 'retry' | 'testHost' | 'addHost' | 'renameHost' | 'setHostUrl' | 'removeHost' | 'savedHosts' | 'machines' | 'machines.forget' | 'machines.invite' | 'links' | 'links.shareStart' | 'links.shareStop' | 'links.useServer' | 'pickFolder' | 'updates' | 'updates.check' | 'updates.install' | 'updates.configure' | 'tokens' | 'tokens.create' | 'tokens.revoke' | 'tokens.onChanged' | 'daemon' | 'daemon.reconnect' | 'daemon.restart' | 'daemon.stopRun' | 'daemon.relaunchApp' | 'presence' | 'capabilities' | 'installTool' | 'permitted';
|
|
8
8
|
/** What the backend behind the host holds, and what it records. */
|
|
9
9
|
interface MachinesHostContractBackend {
|
|
10
10
|
/**
|
|
@@ -35,6 +35,8 @@ interface MachinesHostContractBackend {
|
|
|
35
35
|
capabilities: HostCapabilities;
|
|
36
36
|
/** How many capability reads asked for a fresh probe. */
|
|
37
37
|
capabilityRefreshes: number;
|
|
38
|
+
/** The tools an install was asked for, in order. */
|
|
39
|
+
installs: string[];
|
|
38
40
|
/** Every live session's presence. Read at each listing; the harness changes it before it pushes. */
|
|
39
41
|
presence: SessionPresence[];
|
|
40
42
|
/** The backend calls this when a retry reaches it. */
|
|
@@ -51,6 +51,7 @@ const CAPABILITIES = [
|
|
|
51
51
|
"daemon.relaunchApp",
|
|
52
52
|
"presence",
|
|
53
53
|
"capabilities",
|
|
54
|
+
"installTool",
|
|
54
55
|
"permitted"
|
|
55
56
|
];
|
|
56
57
|
const OBJECTS = /* @__PURE__ */ new Set([
|
|
@@ -154,6 +155,7 @@ function contractBackend() {
|
|
|
154
155
|
probedAt: 1
|
|
155
156
|
},
|
|
156
157
|
capabilityRefreshes: 0,
|
|
158
|
+
installs: [],
|
|
157
159
|
presence: [{
|
|
158
160
|
sessionId: "s-1",
|
|
159
161
|
windows: 1,
|
|
@@ -560,6 +562,13 @@ function describeMachinesHostContract(name, makeHarness, capabilities) {
|
|
|
560
562
|
await host.capabilities(id, { refresh: true });
|
|
561
563
|
expect(backend.capabilityRefreshes).toBe(1);
|
|
562
564
|
});
|
|
565
|
+
it.skipIf(!has("installTool"))("installs a tool on the server and answers the new capabilities", async () => {
|
|
566
|
+
const { host, backend, id } = await setup();
|
|
567
|
+
const result = await host.installTool(id, "rg");
|
|
568
|
+
expect(backend.installs).toEqual(["rg"]);
|
|
569
|
+
expect(result.ok).toBe(true);
|
|
570
|
+
expect(result.capabilities.os.platform).toBe("linux");
|
|
571
|
+
});
|
|
563
572
|
it.skipIf(!has("presence"))("follows per-session presence, keeping the entries that did not change", async () => {
|
|
564
573
|
const { host, pushPresence, backend } = await setup();
|
|
565
574
|
const presence = host.presence;
|
package/dist/motion/size.d.ts
CHANGED
|
@@ -36,5 +36,26 @@ interface HeldWidthProps {
|
|
|
36
36
|
* @param props - Component props.
|
|
37
37
|
*/
|
|
38
38
|
declare function HeldWidth({ holdKey, children, className, style }: HeldWidthProps): import("react").JSX.Element;
|
|
39
|
+
/** Props for {@link SmoothHeight}. */
|
|
40
|
+
interface SmoothHeightProps {
|
|
41
|
+
/**
|
|
42
|
+
* What the content is: when it changes (live lines giving way to a result), the height eases from the old
|
|
43
|
+
* content's to the new one's. Between changes the height follows the content at once (it animates itself).
|
|
44
|
+
*/
|
|
45
|
+
swapKey: string;
|
|
46
|
+
/** The content. */
|
|
47
|
+
children: ReactNode;
|
|
48
|
+
/** Extra classes on the outer element. */
|
|
49
|
+
className?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* A block whose height eases when its content is swapped, instead of jumping: the old height is held in the
|
|
53
|
+
* frame the new content lands, then eases to the new one (`settle`), then lets go. Nothing collapses to be
|
|
54
|
+
* measured (the content keeps its own height inside), so a transcript following its bottom follows the ease
|
|
55
|
+
* frame by frame. At once with motion off or reduced.
|
|
56
|
+
*
|
|
57
|
+
* @param props - Component props.
|
|
58
|
+
*/
|
|
59
|
+
declare function SmoothHeight({ swapKey, children, className }: SmoothHeightProps): import("react").JSX.Element;
|
|
39
60
|
//#endregion
|
|
40
|
-
export { HeldWidth, HeldWidthProps, SmoothWidth, SmoothWidthProps };
|
|
61
|
+
export { HeldWidth, HeldWidthProps, SmoothHeight, SmoothHeightProps, SmoothWidth, SmoothWidthProps };
|
package/dist/motion/size.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { readExitMs } from "./presence.js";
|
|
1
|
+
import { readExitMs, readMotionMs } from "./presence.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
4
4
|
//#region src/motion/size.tsx
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Size that moves smoothly instead of jumping: `SmoothWidth` eases to its
|
|
7
7
|
* content, `HeldWidth` holds a slot at its widest content until the mode
|
|
8
|
-
* changes. Styles in
|
|
8
|
+
* changes, `SmoothHeight` eases when its content is swapped. Styles in
|
|
9
|
+
* styles/motion.css.
|
|
9
10
|
*/
|
|
10
11
|
/**
|
|
11
12
|
* Animates its own width to its content's, so a chip that gains a segment
|
|
@@ -22,6 +23,7 @@ function SmoothWidth({ children, className = "", style }) {
|
|
|
22
23
|
if (!el) return void 0;
|
|
23
24
|
const measure = () => setWidth(el.offsetWidth);
|
|
24
25
|
measure();
|
|
26
|
+
if (typeof ResizeObserver === "undefined") return void 0;
|
|
25
27
|
const ro = new ResizeObserver(measure);
|
|
26
28
|
ro.observe(el);
|
|
27
29
|
return () => ro.disconnect();
|
|
@@ -142,5 +144,81 @@ function HeldWidth({ holdKey, children, className = "", style }) {
|
|
|
142
144
|
})
|
|
143
145
|
});
|
|
144
146
|
}
|
|
147
|
+
/**
|
|
148
|
+
* A block whose height eases when its content is swapped, instead of jumping: the old height is held in the
|
|
149
|
+
* frame the new content lands, then eases to the new one (`settle`), then lets go. Nothing collapses to be
|
|
150
|
+
* measured (the content keeps its own height inside), so a transcript following its bottom follows the ease
|
|
151
|
+
* frame by frame. At once with motion off or reduced.
|
|
152
|
+
*
|
|
153
|
+
* @param props - Component props.
|
|
154
|
+
*/
|
|
155
|
+
function SmoothHeight({ swapKey, children, className = "" }) {
|
|
156
|
+
const outer = useRef(null);
|
|
157
|
+
const inner = useRef(null);
|
|
158
|
+
/** The content's height as of the last frame: where an ease starts. */
|
|
159
|
+
const settled = useRef(null);
|
|
160
|
+
const shown = useRef(swapKey);
|
|
161
|
+
const easing = useRef(null);
|
|
162
|
+
useLayoutEffect(() => {
|
|
163
|
+
const el = inner.current;
|
|
164
|
+
if (!el) return void 0;
|
|
165
|
+
settled.current = el.offsetHeight;
|
|
166
|
+
if (typeof ResizeObserver === "undefined") return void 0;
|
|
167
|
+
const ro = new ResizeObserver(() => {
|
|
168
|
+
settled.current = el.offsetHeight;
|
|
169
|
+
});
|
|
170
|
+
ro.observe(el);
|
|
171
|
+
return () => ro.disconnect();
|
|
172
|
+
}, []);
|
|
173
|
+
useLayoutEffect(() => {
|
|
174
|
+
if (shown.current === swapKey) return void 0;
|
|
175
|
+
shown.current = swapKey;
|
|
176
|
+
const box = outer.current;
|
|
177
|
+
const el = inner.current;
|
|
178
|
+
const from = easing.current && box ? box.getBoundingClientRect().height : settled.current;
|
|
179
|
+
if (!box || !el || from === null) return void 0;
|
|
180
|
+
const to = el.offsetHeight;
|
|
181
|
+
if (Math.abs(to - from) < 1 || document.documentElement.dataset.motion !== "full") return void 0;
|
|
182
|
+
easing.current?.();
|
|
183
|
+
box.style.height = `${from}px`;
|
|
184
|
+
box.offsetHeight;
|
|
185
|
+
box.dataset.easing = "";
|
|
186
|
+
box.style.height = `${to}px`;
|
|
187
|
+
let target = to;
|
|
188
|
+
const done = () => {
|
|
189
|
+
clearTimeout(timer);
|
|
190
|
+
box.removeEventListener("transitionend", onEnd);
|
|
191
|
+
box.style.height = "";
|
|
192
|
+
delete box.dataset.easing;
|
|
193
|
+
easing.current = null;
|
|
194
|
+
};
|
|
195
|
+
const onEnd = (event) => {
|
|
196
|
+
if (event.target !== box || event.propertyName !== "height") return;
|
|
197
|
+
const now = el.offsetHeight;
|
|
198
|
+
if (Math.abs(now - target) < 1) {
|
|
199
|
+
done();
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
target = now;
|
|
203
|
+
box.style.height = `${now}px`;
|
|
204
|
+
};
|
|
205
|
+
box.addEventListener("transitionend", onEnd);
|
|
206
|
+
const timer = setTimeout(done, readMotionMs("settle") * 4 + 200);
|
|
207
|
+
easing.current = done;
|
|
208
|
+
}, [swapKey]);
|
|
209
|
+
useLayoutEffect(() => {
|
|
210
|
+
if (typeof ResizeObserver === "undefined" && inner.current) settled.current = inner.current.offsetHeight;
|
|
211
|
+
});
|
|
212
|
+
useEffect(() => () => easing.current?.(), []);
|
|
213
|
+
return /* @__PURE__ */ jsx("div", {
|
|
214
|
+
ref: outer,
|
|
215
|
+
className: `zg-smooth-height ${className}`,
|
|
216
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
217
|
+
ref: inner,
|
|
218
|
+
className: "zg-smooth-height-inner",
|
|
219
|
+
children
|
|
220
|
+
})
|
|
221
|
+
});
|
|
222
|
+
}
|
|
145
223
|
//#endregion
|
|
146
|
-
export { HeldWidth, SmoothWidth };
|
|
224
|
+
export { HeldWidth, SmoothHeight, SmoothWidth };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DemoProps } from "./parts.js";
|
|
2
|
+
import { MessageDelivery } from "zidane/chat";
|
|
3
|
+
//#region src/onboarding/demos/delivery.d.ts
|
|
4
|
+
/** Props of {@link DeliveryDemo}. */
|
|
5
|
+
interface DeliveryDemoProps extends DemoProps {
|
|
6
|
+
/** The delivery the demo shows. */
|
|
7
|
+
delivery: MessageDelivery;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Renders the demo of a "Messages during a run" choice.
|
|
11
|
+
*
|
|
12
|
+
* @param props - Component props.
|
|
13
|
+
*/
|
|
14
|
+
declare function DeliveryDemo({ delivery, on, className, style }: DeliveryDemoProps): import("react").JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { DeliveryDemo, DeliveryDemoProps };
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { MetaChip } from "../../components/Form.js";
|
|
2
|
+
import { useOnboardingLabels } from "../OnboardingProvider.js";
|
|
3
|
+
import { DemoStage } from "./parts.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/onboarding/demos/delivery.tsx
|
|
6
|
+
/** Both scenes share one frame, so the two cards line up. */
|
|
7
|
+
const FRAME = "zg-raised border rounded-zg-lg flex flex-col gap-1 py-1.5 w-full max-w-[280px] h-[108px] overflow-hidden";
|
|
8
|
+
function CallRow({ call, done = true }) {
|
|
9
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
10
|
+
className: "flex items-center gap-2 h-6 px-2 min-w-0 shrink-0",
|
|
11
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
12
|
+
"aria-hidden": true,
|
|
13
|
+
className: `${done ? "i-ph-check text-zg-success" : "i-ph-circle-dashed text-zg-meta"} text-zg-label shrink-0`
|
|
14
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
15
|
+
className: "flex-1 min-w-0 truncate font-mono text-zg-badge",
|
|
16
|
+
children: call
|
|
17
|
+
})]
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/** The user's message, with its image. */
|
|
21
|
+
function Message() {
|
|
22
|
+
const labels = useOnboardingLabels();
|
|
23
|
+
return /* @__PURE__ */ jsx("span", {
|
|
24
|
+
className: "flex justify-end px-2 min-w-0 shrink-0",
|
|
25
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
26
|
+
className: "zg-demo-read flex items-center gap-1.5 h-6 px-2 min-w-0",
|
|
27
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
28
|
+
"aria-hidden": true,
|
|
29
|
+
className: "i-ph-image text-zg-label shrink-0"
|
|
30
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
31
|
+
className: "text-zg-meta truncate",
|
|
32
|
+
children: labels.demoMessage
|
|
33
|
+
})]
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/** Steering: the message lands after the current step, and the next step follows it. */
|
|
38
|
+
function SteerDemo({ on, className, style }) {
|
|
39
|
+
const labels = useOnboardingLabels();
|
|
40
|
+
const [first, planned] = labels.demoMessageCalls;
|
|
41
|
+
return /* @__PURE__ */ jsx(DemoStage, {
|
|
42
|
+
on,
|
|
43
|
+
className,
|
|
44
|
+
style,
|
|
45
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
46
|
+
className: FRAME,
|
|
47
|
+
children: [/* @__PURE__ */ jsx(CallRow, { call: first }), /* @__PURE__ */ jsxs("span", {
|
|
48
|
+
className: "zg-demo-stack",
|
|
49
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
50
|
+
className: "zg-loop zg-demo-before flex flex-col gap-1",
|
|
51
|
+
children: /* @__PURE__ */ jsx(CallRow, {
|
|
52
|
+
call: planned,
|
|
53
|
+
done: false
|
|
54
|
+
})
|
|
55
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
56
|
+
className: "zg-loop zg-demo-after flex flex-col gap-1",
|
|
57
|
+
children: [/* @__PURE__ */ jsx(Message, {}), /* @__PURE__ */ jsx(CallRow, { call: labels.demoSteeredCall })]
|
|
58
|
+
})]
|
|
59
|
+
})]
|
|
60
|
+
})
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/** Queuing: the message waits in the queue while the run works, then goes when it ends. */
|
|
64
|
+
function QueueDemo({ on, className, style }) {
|
|
65
|
+
const labels = useOnboardingLabels();
|
|
66
|
+
const [first, second] = labels.demoMessageCalls;
|
|
67
|
+
return /* @__PURE__ */ jsx(DemoStage, {
|
|
68
|
+
on,
|
|
69
|
+
className,
|
|
70
|
+
style,
|
|
71
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
72
|
+
className: FRAME,
|
|
73
|
+
children: [/* @__PURE__ */ jsx(CallRow, { call: first }), /* @__PURE__ */ jsxs("span", {
|
|
74
|
+
className: "zg-demo-stack",
|
|
75
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
76
|
+
className: "zg-loop zg-demo-before flex flex-col gap-1",
|
|
77
|
+
children: [/* @__PURE__ */ jsx(CallRow, {
|
|
78
|
+
call: second,
|
|
79
|
+
done: false
|
|
80
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
81
|
+
className: "flex items-center gap-1.5 h-6 px-2 min-w-0",
|
|
82
|
+
children: [/* @__PURE__ */ jsxs(MetaChip, {
|
|
83
|
+
tone: "accent",
|
|
84
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
85
|
+
"aria-hidden": true,
|
|
86
|
+
className: "i-ph-stack"
|
|
87
|
+
}), labels.demoQueued]
|
|
88
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
89
|
+
className: "text-zg-meta truncate",
|
|
90
|
+
children: labels.demoMessage
|
|
91
|
+
})]
|
|
92
|
+
})]
|
|
93
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
94
|
+
className: "zg-loop zg-demo-after flex flex-col gap-1",
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ jsx(CallRow, { call: second }),
|
|
97
|
+
/* @__PURE__ */ jsxs("span", {
|
|
98
|
+
className: "flex items-center gap-2 h-3 px-2 shrink-0",
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ jsx("span", { className: "zg-demo-line flex-1" }),
|
|
101
|
+
/* @__PURE__ */ jsx("span", {
|
|
102
|
+
className: "text-zg-badge text-zg-meta shrink-0",
|
|
103
|
+
children: labels.demoRunEnded
|
|
104
|
+
}),
|
|
105
|
+
/* @__PURE__ */ jsx("span", { className: "zg-demo-line flex-1" })
|
|
106
|
+
]
|
|
107
|
+
}),
|
|
108
|
+
/* @__PURE__ */ jsx(Message, {})
|
|
109
|
+
]
|
|
110
|
+
})]
|
|
111
|
+
})]
|
|
112
|
+
})
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Renders the demo of a "Messages during a run" choice.
|
|
117
|
+
*
|
|
118
|
+
* @param props - Component props.
|
|
119
|
+
*/
|
|
120
|
+
function DeliveryDemo({ delivery, on, className, style }) {
|
|
121
|
+
return delivery === "steer" ? /* @__PURE__ */ jsx(SteerDemo, {
|
|
122
|
+
on,
|
|
123
|
+
className,
|
|
124
|
+
style
|
|
125
|
+
}) : /* @__PURE__ */ jsx(QueueDemo, {
|
|
126
|
+
on,
|
|
127
|
+
className,
|
|
128
|
+
style
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
//#endregion
|
|
132
|
+
export { DeliveryDemo };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DemoProps, DemoStage } from "./parts.js";
|
|
2
2
|
import { ApprovalDemo, SandboxDemo } from "./autonomy.js";
|
|
3
|
+
import { DeliveryDemo } from "./delivery.js";
|
|
3
4
|
import { ExtensionDemo } from "./extensions.js";
|
|
4
5
|
import { FeatureDemo, hasFeatureDemo } from "./features.js";
|
|
5
6
|
import { SceneProps } from "./tour.js";
|
|
6
7
|
import { TUTORIAL_SCENES } from "./how-it-works.js";
|
|
7
|
-
export { ApprovalDemo, type DemoProps, DemoStage, ExtensionDemo, FeatureDemo, SandboxDemo, type SceneProps, TUTORIAL_SCENES, hasFeatureDemo };
|
|
8
|
+
export { ApprovalDemo, DeliveryDemo, type DemoProps, DemoStage, ExtensionDemo, FeatureDemo, SandboxDemo, type SceneProps, TUTORIAL_SCENES, hasFeatureDemo };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DemoStage } from "./parts.js";
|
|
2
2
|
import { TUTORIAL_SCENES } from "./how-it-works.js";
|
|
3
3
|
import { ApprovalDemo, SandboxDemo } from "./autonomy.js";
|
|
4
|
+
import { DeliveryDemo } from "./delivery.js";
|
|
4
5
|
import { ExtensionDemo } from "./extensions.js";
|
|
5
6
|
import { FeatureDemo, hasFeatureDemo } from "./features.js";
|
|
6
|
-
export { ApprovalDemo, DemoStage, ExtensionDemo, FeatureDemo, SandboxDemo, TUTORIAL_SCENES, hasFeatureDemo };
|
|
7
|
+
export { ApprovalDemo, DeliveryDemo, DemoStage, ExtensionDemo, FeatureDemo, SandboxDemo, TUTORIAL_SCENES, hasFeatureDemo };
|
|
@@ -153,6 +153,8 @@ declare const DEFAULT_ONBOARDING_LABELS: {
|
|
|
153
153
|
usePreset: (preset: string) => string;
|
|
154
154
|
matchesPreset: (preset: string) => string;
|
|
155
155
|
presetInUse: string;
|
|
156
|
+
messagesDuringRun: string;
|
|
157
|
+
messagesDuringRunHint: string;
|
|
156
158
|
usesTokens: string;
|
|
157
159
|
whatYoullSee: string;
|
|
158
160
|
approvalAsk: (command: string) => string;
|
|
@@ -215,6 +217,11 @@ declare const DEFAULT_ONBOARDING_LABELS: {
|
|
|
215
217
|
demoAsksYou: string;
|
|
216
218
|
demoFlowCalls: readonly ["read_file src/app.ts", "edit src/limits.ts", "bun test", "git commit"];
|
|
217
219
|
demoProjectPath: string;
|
|
220
|
+
demoMessage: string;
|
|
221
|
+
demoMessageCalls: readonly ["read app.ts", "edit api.ts"];
|
|
222
|
+
demoSteeredCall: string;
|
|
223
|
+
demoQueued: string;
|
|
224
|
+
demoRunEnded: string;
|
|
218
225
|
demoSecretPath: string;
|
|
219
226
|
demoAllowed: string;
|
|
220
227
|
demoBlocked: string;
|
|
@@ -330,6 +337,7 @@ declare const DEFAULT_ONBOARDING_LABELS: {
|
|
|
330
337
|
paletteChoose: string;
|
|
331
338
|
paletteTurnOn: string;
|
|
332
339
|
paletteTurnOff: string;
|
|
340
|
+
paletteScopeHint: string;
|
|
333
341
|
editorConflict: string;
|
|
334
342
|
editorConflictDetail: string;
|
|
335
343
|
editorReload: string;
|
|
@@ -207,6 +207,8 @@ const DEFAULT_ONBOARDING_LABELS = {
|
|
|
207
207
|
usePreset: (preset) => `Use ${preset}`,
|
|
208
208
|
matchesPreset: (preset) => `Matches ${preset}`,
|
|
209
209
|
presetInUse: "In use",
|
|
210
|
+
messagesDuringRun: "Messages during a run",
|
|
211
|
+
messagesDuringRunHint: "What happens to a message that you send while the agent works. Alt+Enter sends one message the other way.",
|
|
210
212
|
usesTokens: "Uses tokens",
|
|
211
213
|
whatYoullSee: "What you will see",
|
|
212
214
|
approvalAsk: (command) => `Allow zidane to run ${command}?`,
|
|
@@ -287,6 +289,11 @@ const DEFAULT_ONBOARDING_LABELS = {
|
|
|
287
289
|
"git commit"
|
|
288
290
|
],
|
|
289
291
|
demoProjectPath: "~/code/my-app",
|
|
292
|
+
demoMessage: "Use the staging API",
|
|
293
|
+
demoMessageCalls: ["read app.ts", "edit api.ts"],
|
|
294
|
+
demoSteeredCall: "edit staging.ts",
|
|
295
|
+
demoQueued: "Queued",
|
|
296
|
+
demoRunEnded: "Run ended",
|
|
290
297
|
demoSecretPath: "~/.ssh",
|
|
291
298
|
demoAllowed: "Allowed",
|
|
292
299
|
demoBlocked: "Blocked",
|
|
@@ -5,6 +5,7 @@ import { OnboardingStepFrame, OnboardingStepFrameProps } from "./OnboardingStepF
|
|
|
5
5
|
import { ConversationPresetPreview, ConversationPresetPreviewProps, ConversationPreview, ConversationPreviewProps, transcriptPreviewOptions } from "./conversation.js";
|
|
6
6
|
import { DemoProps, DemoStage } from "./demos/parts.js";
|
|
7
7
|
import { ApprovalDemo, SandboxDemo } from "./demos/autonomy.js";
|
|
8
|
+
import { DeliveryDemo } from "./demos/delivery.js";
|
|
8
9
|
import { ExtensionDemo } from "./demos/extensions.js";
|
|
9
10
|
import { FeatureDemo, hasFeatureDemo } from "./demos/features.js";
|
|
10
11
|
import { SceneProps } from "./demos/tour.js";
|
|
@@ -27,4 +28,4 @@ import { LookStep, LookStepProps } from "./steps/LookStep.js";
|
|
|
27
28
|
import { ReadyStep, ReadyStepProps } from "./steps/ReadyStep.js";
|
|
28
29
|
import { SkillsStep, SkillsStepProps } from "./steps/SkillsStep.js";
|
|
29
30
|
import { WelcomeStep, WelcomeStepProps } from "./steps/WelcomeStep.js";
|
|
30
|
-
export { ApprovalDemo, AutonomyStep, AutonomyStepProps, ConnectProviderCard, ConnectProviderCardProps, ConnectStep, ConnectStepProps, ConnectorsStep, ConnectorsStepProps, ConversationPresetPreview, ConversationPresetPreviewProps, ConversationPreview, ConversationPreviewProps, ConversationStep, ConversationStepProps, type DemoProps, DemoStage, ExtensionDemo, ExtensionMark, ExtensionMarkEntry, ExtensionMarkProps, ExtensionsStep, ExtensionsStepProps, FeatureDemo, FeaturesStep, FeaturesStepProps, GITHUB_SKILL_SOURCE_IMAGES, ImportStep, ImportStepProps, LookStep, LookStepProps, NATIVE_EXTENSION_ICONS, ONBOARDING_STEP_COMPONENTS, OnboardingFlow, OnboardingFlowProps, OnboardingHostProvider, OnboardingHostProviderProps, OnboardingProvider, OnboardingProviderProps, OnboardingRun, OnboardingStepFrame, OnboardingStepFrameProps, OnboardingStepNav, ProviderMark, ProviderMarkProps, ReadyStep, ReadyStepProps, SandboxDemo, type SceneProps, SignInHandle, SkillSourceBrowser, SkillSourceBrowserProps, SkillsStep, SkillsStepProps, SourceBrowser, SourceBrowserProps, SourceBrowserRow, SourceBrowserWords, type SourceCard, SourcePick, TUTORIAL_SCENES, Tutorial, TutorialProps, WelcomeStep, WelcomeStepProps, extensionMarkOf, hasFeatureDemo, transcriptPreviewOptions, useOnboarding, useOnboardingHost, useOnboardingLabels, useOnboardingStep, useSignIn };
|
|
31
|
+
export { ApprovalDemo, AutonomyStep, AutonomyStepProps, ConnectProviderCard, ConnectProviderCardProps, ConnectStep, ConnectStepProps, ConnectorsStep, ConnectorsStepProps, ConversationPresetPreview, ConversationPresetPreviewProps, ConversationPreview, ConversationPreviewProps, ConversationStep, ConversationStepProps, DeliveryDemo, type DemoProps, DemoStage, ExtensionDemo, ExtensionMark, ExtensionMarkEntry, ExtensionMarkProps, ExtensionsStep, ExtensionsStepProps, FeatureDemo, FeaturesStep, FeaturesStepProps, GITHUB_SKILL_SOURCE_IMAGES, ImportStep, ImportStepProps, LookStep, LookStepProps, NATIVE_EXTENSION_ICONS, ONBOARDING_STEP_COMPONENTS, OnboardingFlow, OnboardingFlowProps, OnboardingHostProvider, OnboardingHostProviderProps, OnboardingProvider, OnboardingProviderProps, OnboardingRun, OnboardingStepFrame, OnboardingStepFrameProps, OnboardingStepNav, ProviderMark, ProviderMarkProps, ReadyStep, ReadyStepProps, SandboxDemo, type SceneProps, SignInHandle, SkillSourceBrowser, SkillSourceBrowserProps, SkillsStep, SkillsStepProps, SourceBrowser, SourceBrowserProps, SourceBrowserRow, SourceBrowserWords, type SourceCard, SourcePick, TUTORIAL_SCENES, Tutorial, TutorialProps, WelcomeStep, WelcomeStepProps, extensionMarkOf, hasFeatureDemo, transcriptPreviewOptions, useOnboarding, useOnboardingHost, useOnboardingLabels, useOnboardingStep, useSignIn };
|