zidane-ui 9.3.1 → 9.4.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/dist/adapters/live.d.ts +2 -0
- package/dist/adapters/live.js +3 -0
- package/dist/adapters/server-git-host.js +5 -2
- package/dist/adapters/server-host.js +17 -11
- package/dist/adapters/server-machines-host.js +7 -0
- package/dist/adapters/server-session-host.js +49 -0
- package/dist/adapters/server-settings-sections.js +4 -1
- package/dist/adapters/sse-host.js +3 -0
- package/dist/adapters/sse-protocol.d.ts +10 -0
- package/dist/appearance/ZoomIndicator.js +5 -8
- package/dist/chat/HostTranscript.js +15 -1
- package/dist/chat/SessionStreamsProvider.d.ts +1 -1
- package/dist/chat/Transcript.d.ts +3 -2
- package/dist/chat/Transcript.js +26 -7
- package/dist/chat/composer/ComposerEditor.js +1 -1
- package/dist/chat/composer/ModelOptionsPicker.js +6 -2
- package/dist/chat/composer/ModelPicker.d.ts +1 -1
- package/dist/chat/composer/PlacePicker.d.ts +3 -1
- package/dist/chat/composer/PlacePicker.js +5 -1
- package/dist/chat/composer/use-draft-target.js +15 -3
- package/dist/chat/headless/block-runs.js +26 -1
- package/dist/chat/headless/chip-views.js +1 -1
- package/dist/chat/headless/draft-target.d.ts +28 -1
- package/dist/chat/headless/draft-target.js +22 -1
- package/dist/chat/headless/hosts.d.ts +4 -0
- package/dist/chat/headless/index.d.ts +25 -25
- package/dist/chat/headless/index.js +6 -6
- package/dist/chat/headless/markdown-scan.d.ts +0 -2
- package/dist/chat/headless/markdown-scan.js +3 -8
- package/dist/chat/headless/markdown-stream.js +3 -3
- package/dist/chat/headless/prompt-origin.d.ts +2 -0
- package/dist/chat/headless/prompt-origin.js +6 -2
- package/dist/chat/headless/sidebar/directory.d.ts +10 -1
- package/dist/chat/headless/sidebar/directory.js +9 -1
- package/dist/chat/headless/sidebar/environment.d.ts +15 -4
- package/dist/chat/headless/sidebar/environment.js +27 -9
- package/dist/chat/headless/sidebar/index.d.ts +2 -2
- package/dist/chat/headless/sidebar/index.js +2 -2
- package/dist/chat/headless/sidebar/labels.d.ts +9 -2
- package/dist/chat/headless/sidebar/labels.js +8 -1
- package/dist/chat/headless/streams/actions.d.ts +2 -2
- package/dist/chat/headless/streams/actions.js +1 -1
- package/dist/chat/headless/streams/event-bytes.d.ts +12 -1
- package/dist/chat/headless/streams/event-bytes.js +13 -1
- package/dist/chat/headless/streams/store.d.ts +21 -5
- package/dist/chat/headless/streams/store.js +36 -7
- package/dist/chat/headless/streams/transcript-map.js +2 -5
- package/dist/chat/headless/streams/types.d.ts +2 -1
- package/dist/chat/headless/transcript/collapse.js +3 -0
- package/dist/chat/index.d.ts +2 -2
- package/dist/chat/index.js +2 -2
- package/dist/chat/sidebar/ProjectIcon.js +1 -1
- package/dist/chat/sidebar/RowChips.js +2 -2
- package/dist/chat/sidebar/SessionSidebar.d.ts +6 -0
- package/dist/chat/sidebar/SessionSidebar.js +23 -16
- package/dist/chat/sidebar/SidebarFilterMenu.js +0 -1
- package/dist/chat/sidebar/SidebarFold.js +17 -16
- package/dist/chat/sidebar/SidebarSessionRow.d.ts +7 -1
- package/dist/chat/sidebar/SidebarSessionRow.js +11 -8
- package/dist/chat/sidebar/session-menu.d.ts +4 -0
- package/dist/chat/sidebar/session-menu.js +14 -2
- package/dist/chat/sidebar/sidebar-live.js +28 -4
- package/dist/chat/sidebar/useInboxRows.js +6 -6
- package/dist/chat/sidebar/useInboxTriage.js +50 -47
- package/dist/chat/sidebar/useSessionSearch.js +19 -18
- package/dist/chat/transcript/FileChip.js +28 -0
- package/dist/chat/transcript/LazyRow.d.ts +1 -1
- package/dist/chat/transcript/LazyRow.js +3 -4
- package/dist/chat/transcript/PromptEcho.js +3 -11
- package/dist/chat/transcript/SessionChip.d.ts +11 -0
- package/dist/chat/transcript/SessionChip.js +34 -0
- package/dist/chat/transcript/TranscriptRail.d.ts +1 -1
- package/dist/chat/transcript/chip-details.d.ts +11 -0
- package/dist/chat/transcript/chip-details.js +17 -1
- package/dist/chat/transcript/fold-worker.js +2 -1
- package/dist/chat/transcript/fold.js +11 -3
- package/dist/chat/transcript/index.d.ts +2 -2
- package/dist/chat/transcript/index.js +2 -2
- package/dist/chat/transcript/markdown-cache.d.ts +10 -1
- package/dist/chat/transcript/markdown-cache.js +37 -4
- package/dist/chat/transcript/markdown.js +27 -34
- package/dist/chat/transcript/media-gallery.js +13 -16
- package/dist/chat/transcript/messages.js +5 -4
- package/dist/chat/transcript/prompt.d.ts +1 -1
- package/dist/chat/transcript/row-mount.d.ts +27 -8
- package/dist/chat/transcript/row-mount.js +114 -80
- package/dist/chat/transcript/row-parking.d.ts +27 -0
- package/dist/chat/transcript/row-parking.js +37 -1
- package/dist/chat/transcript/script-input.d.ts +1 -1
- package/dist/chat/transcript/tool-parts.js +0 -1
- package/dist/chat/transcript/use-transcript-rows.d.ts +1 -1
- package/dist/chat/transcript/useHistoryBackfill.d.ts +42 -0
- package/dist/chat/transcript/useHistoryBackfill.js +170 -0
- package/dist/chat/transcript/useTranscriptFind.js +2 -4
- package/dist/chat/transcript/useTranscriptScroll.d.ts +7 -4
- package/dist/chat/transcript/useTranscriptScroll.js +12 -1
- package/dist/chat/transcript/useTranscriptSearch.d.ts +2 -2
- package/dist/chat/transcript/useTranscriptSearch.js +6 -6
- package/dist/chat/transcript/useTranscriptSelectionCopy.d.ts +5 -5
- package/dist/chat/transcript/useTranscriptSelectionCopy.js +28 -7
- package/dist/code/editor/FileTree.d.ts +2 -0
- package/dist/code/editor/FileTree.js +1 -1
- package/dist/code/editor/FileView.js +16 -25
- package/dist/code/editor/find/useFind.js +17 -17
- package/dist/code/editor/useCodeDocument.js +22 -19
- package/dist/code/editor/useDetachCleanup.js +4 -3
- package/dist/code/use-highlighted-html.js +12 -13
- package/dist/components/IconButton.d.ts +3 -1
- package/dist/components/IconButton.js +7 -2
- package/dist/components/IconButtonTip.d.ts +3 -1
- package/dist/components/IconButtonTip.js +2 -1
- package/dist/components/RowActionsMenu.js +7 -14
- package/dist/components/Tooltip.d.ts +4 -1
- package/dist/components/Tooltip.js +8 -6
- package/dist/components/assign-ref.d.ts +8 -0
- package/dist/components/assign-ref.js +12 -0
- package/dist/components/floating/FloatingSurface.js +2 -2
- package/dist/components/floating/HoverCard.js +32 -14
- package/dist/components/floating/Popover.js +4 -7
- package/dist/components/floating/useAnchoredPosition.d.ts +5 -3
- package/dist/components/floating/useAnchoredPosition.js +7 -7
- package/dist/components/object-key.d.ts +7 -0
- package/dist/components/object-key.js +18 -0
- package/dist/components/palette/PaletteList.js +2 -7
- package/dist/components/tooltip-arming.d.ts +3 -0
- package/dist/components/tooltip-arming.js +8 -1
- package/dist/core.css +3 -3
- package/dist/dist/{index-C6-t1SS9.d.ts → index-BheVJOLc.d.ts} +1 -0
- package/dist/dist/index.d.ts +2 -2
- package/dist/files/FilesTab.js +0 -1
- package/dist/files/TreeColumn.d.ts +2 -4
- package/dist/files/TreeColumn.js +0 -5
- package/dist/files/headless/host.d.ts +3 -7
- package/dist/files/headless/labels.d.ts +0 -1
- package/dist/files/headless/labels.js +0 -1
- package/dist/files/headless/workspace-diff.js +1 -1
- package/dist/files/useCodeReview.js +1 -3
- package/dist/files/useFilesDiagnostics.d.ts +1 -1
- package/dist/files/useFilesDiagnostics.js +4 -11
- package/dist/files/useOpenFiles.js +9 -12
- package/dist/files/useWorkspace.d.ts +5 -7
- package/dist/files/useWorkspace.js +4 -15
- package/dist/git/GitBar.js +5 -3
- package/dist/git/MoveSessionDialog.d.ts +18 -8
- package/dist/git/MoveSessionDialog.js +32 -53
- package/dist/git/MoveToDialog.d.ts +61 -0
- package/dist/git/MoveToDialog.js +240 -0
- package/dist/git/SandboxManager.js +9 -4
- package/dist/git/SyncChip.js +11 -4
- package/dist/git/TeleportSessionDialog.d.ts +69 -0
- package/dist/git/TeleportSessionDialog.js +440 -0
- package/dist/git/headless/host.d.ts +14 -0
- package/dist/git/headless/index.d.ts +2 -1
- package/dist/git/headless/index.js +2 -1
- package/dist/git/headless/labels.d.ts +44 -1
- package/dist/git/headless/labels.js +50 -0
- package/dist/git/headless/sandboxes.d.ts +1 -1
- package/dist/git/headless/sandboxes.js +4 -3
- package/dist/git/headless/teleport.d.ts +76 -0
- package/dist/git/headless/teleport.js +19 -0
- package/dist/git/index.d.ts +4 -2
- package/dist/git/index.js +4 -2
- package/dist/git/useEnvironmentChoices.d.ts +5 -2
- package/dist/git/useEnvironmentChoices.js +12 -4
- package/dist/hooks/useLatest.d.ts +8 -0
- package/dist/hooks/useLatest.js +17 -0
- package/dist/hooks/useMinuteTick.d.ts +6 -2
- package/dist/hooks/useMinuteTick.js +12 -6
- package/dist/hooks/useNearViewport.js +11 -8
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/dist/keybindings/KeybindingsProvider.js +3 -4
- package/dist/keybindings/headless/catalog.d.ts +1 -1
- package/dist/keybindings/headless/catalog.js +18 -0
- package/dist/machines/AddServerForm.js +55 -3
- package/dist/machines/Banners.d.ts +2 -2
- package/dist/machines/Banners.js +3 -3
- package/dist/machines/DaemonMenu.js +1 -3
- package/dist/machines/HostsSection.js +5 -1
- package/dist/machines/OrganizationPanel.d.ts +25 -0
- package/dist/machines/OrganizationPanel.js +266 -0
- package/dist/machines/PersonalLayerPanel.d.ts +32 -0
- package/dist/machines/PersonalLayerPanel.js +360 -0
- package/dist/machines/headless/fixture-host.d.ts +10 -0
- package/dist/machines/headless/fixture-host.js +44 -0
- package/dist/machines/headless/host.d.ts +21 -1
- package/dist/machines/headless/index.d.ts +3 -1
- package/dist/machines/headless/index.js +3 -1
- package/dist/machines/headless/labels.d.ts +55 -0
- package/dist/machines/headless/labels.js +58 -1
- package/dist/machines/headless/layer.d.ts +64 -0
- package/dist/machines/headless/layer.js +56 -0
- package/dist/machines/headless/organization.d.ts +38 -0
- package/dist/machines/headless/organization.js +44 -0
- package/dist/machines/index.d.ts +3 -1
- package/dist/machines/index.js +3 -1
- package/dist/machines/testing/contract.d.ts +25 -1
- package/dist/machines/testing/contract.js +97 -1
- package/dist/motion/grow.js +12 -13
- package/dist/motion/swap.js +2 -5
- package/dist/motion/use-flip-list.d.ts +14 -0
- package/dist/motion/use-flip-list.js +17 -12
- package/dist/palette/headless/app-sources.js +37 -0
- package/dist/palette/headless/labels.js +3 -0
- package/dist/server/sse-handler.js +25 -2
- package/dist/session/DiffFileTree.js +1 -4
- package/dist/session/OpenSessionsDialog.d.ts +46 -0
- package/dist/session/OpenSessionsDialog.js +170 -0
- package/dist/session/PlanTracker.js +1 -2
- package/dist/session/ProjectHome.js +10 -9
- package/dist/session/RemindersPanel.js +10 -12
- package/dist/session/SecretsPanel.js +2 -1
- package/dist/session/SessionPeopleStack.d.ts +23 -0
- package/dist/session/SessionPeopleStack.js +65 -0
- package/dist/session/SessionPlaceMenu.js +5 -4
- package/dist/session/ShareSessionDialog.d.ts +32 -0
- package/dist/session/ShareSessionDialog.js +342 -0
- package/dist/session/TypingLine.d.ts +22 -0
- package/dist/session/TypingLine.js +31 -0
- package/dist/session/headless/host.d.ts +40 -1
- package/dist/session/headless/index.d.ts +4 -2
- package/dist/session/headless/index.js +3 -1
- package/dist/session/headless/labels.d.ts +49 -0
- package/dist/session/headless/labels.js +56 -0
- package/dist/session/headless/people.d.ts +29 -0
- package/dist/session/headless/people.js +53 -0
- package/dist/session/headless/place.d.ts +5 -0
- package/dist/session/headless/place.js +5 -1
- package/dist/session/headless/typing.d.ts +37 -0
- package/dist/session/headless/typing.js +60 -0
- package/dist/session/index.d.ts +5 -1
- package/dist/session/index.js +5 -1
- package/dist/settings/headless/search.d.ts +1 -1
- package/dist/settings/headless/sections-host.d.ts +7 -2
- package/dist/settings/section.d.ts +15 -3
- package/dist/settings/section.js +15 -3
- package/dist/settings/sections/environments/EnvironmentsSection.js +30 -6
- package/dist/settings/sections/keybindings/labels.d.ts +3 -0
- package/dist/settings/sections/keybindings/labels.js +3 -0
- package/dist/settings/sections/keybindings/rows.js +12 -0
- package/dist/settings/sections/logs/LogsSection.js +5 -8
- package/dist/styles.css +32 -7
- package/dist/terminal/HostTerminalSurface.js +28 -30
- package/dist/terminal/TerminalPanel.js +4 -12
- package/dist/terminal/TerminalProvider.d.ts +10 -2
- package/dist/terminal/TerminalProvider.js +10 -2
- package/dist/terminal/headless/labels.d.ts +0 -1
- package/dist/terminal/headless/labels.js +1 -2
- package/dist/terminal/headless/store.js +5 -1
- package/dist/workspace/LayoutBudget.js +1 -7
- package/package.json +2 -2
- package/src/styles/chat.css +3 -1
- package/src/styles/palette.css +3 -3
- package/src/styles/transcript.css +17 -3
- /package/dist/dist/{index-De9AbmxS.d.ts → index-ttmMvjgM.d.ts} +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* "Share…": who shares a session and what they may do (docs/MULTIPLAYER.md).
|
|
3
|
+
* A short dialog on the modal layer, opened with `useShareSession()`, over
|
|
4
|
+
* `SessionHost.sharing`.
|
|
5
|
+
*
|
|
6
|
+
* The owner invites people of the organization with a grant, changes or
|
|
7
|
+
* removes a member's grant, opens the session to the organization (with the
|
|
8
|
+
* grant people who join get), and transfers it. Removing and transferring ask
|
|
9
|
+
* once, in the dialog. A member sees the same list, picks their
|
|
10
|
+
* notifications and can leave. Everyone is told that the session acts as its
|
|
11
|
+
* owner.
|
|
12
|
+
*/
|
|
13
|
+
import { CSSProperties } from "react";
|
|
14
|
+
/** Props for {@link ShareSessionDialog}. */
|
|
15
|
+
export interface ShareSessionDialogProps {
|
|
16
|
+
/** The session to share. */
|
|
17
|
+
sessionId: string;
|
|
18
|
+
/** Closes the dialog. */
|
|
19
|
+
onClose: () => void;
|
|
20
|
+
/** Extra classes on the root. */
|
|
21
|
+
className?: string;
|
|
22
|
+
/** Inline styles on the root. */
|
|
23
|
+
style?: CSSProperties;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The share dialog.
|
|
27
|
+
*
|
|
28
|
+
* @param props - The {@link ShareSessionDialogProps}.
|
|
29
|
+
*/
|
|
30
|
+
export declare function ShareSessionDialog({ sessionId, onClose, className, style }: ShareSessionDialogProps): import("react").JSX.Element | null;
|
|
31
|
+
/** Opens the share dialog over the `SessionHost` in context; `undefined` without `sharing` or a modal layer (hide the control). */
|
|
32
|
+
export declare function useShareSession(): ((sessionId: string) => void) | undefined;
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import { useOptionalModal } from "../app/ModalProvider.js";
|
|
2
|
+
import { buttonClass } from "../components/button.js";
|
|
3
|
+
import { Checkbox, MetaChip } from "../components/Form.js";
|
|
4
|
+
import { Notice } from "../components/Notice.js";
|
|
5
|
+
import { errorMessage } from "../components/report-error.js";
|
|
6
|
+
import { SourceAvatar } from "../onboarding/skills/parts.js";
|
|
7
|
+
import { useSessionHost } from "./SessionProvider.js";
|
|
8
|
+
import { useSessionLabels } from "./useSessionLabels.js";
|
|
9
|
+
import { useCallback, useEffect, useState } from "react";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
// src/session/ShareSessionDialog.tsx
|
|
12
|
+
const TITLE_ID = "share-session-title";
|
|
13
|
+
const GRANTS = [
|
|
14
|
+
"read",
|
|
15
|
+
"prompt",
|
|
16
|
+
"trusted"
|
|
17
|
+
];
|
|
18
|
+
const NOTIFY_LEVELS = ["all", "attention"];
|
|
19
|
+
/** A picker of words (grants, people, levels): sans, like every value a person reads as words. */
|
|
20
|
+
const PICKER = "zg-well h-7 px-2 text-zg-label";
|
|
21
|
+
/**
|
|
22
|
+
* The share dialog.
|
|
23
|
+
*
|
|
24
|
+
* @param props - The {@link ShareSessionDialogProps}.
|
|
25
|
+
*/
|
|
26
|
+
function ShareSessionDialog({ sessionId, onClose, className, style }) {
|
|
27
|
+
const sharing = useSessionHost().sharing;
|
|
28
|
+
const labels = useSessionLabels();
|
|
29
|
+
const [view, setView] = useState(null);
|
|
30
|
+
const [people, setPeople] = useState([]);
|
|
31
|
+
const [invitee, setInvitee] = useState("");
|
|
32
|
+
const [grant, setGrant] = useState("prompt");
|
|
33
|
+
const [error, setError] = useState(null);
|
|
34
|
+
const [heir, setHeir] = useState("");
|
|
35
|
+
/** The transfer row, shown from the footer's Transfer…: rare and irreversible, so out of the everyday controls. */
|
|
36
|
+
const [transferring, setTransferring] = useState(false);
|
|
37
|
+
/** A removal or a transfer waiting for its second press. */
|
|
38
|
+
const [confirming, setConfirming] = useState(null);
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
if (!sharing) return void 0;
|
|
41
|
+
let live = true;
|
|
42
|
+
sharing.get(sessionId).then((found) => live && setView(found)).catch((err) => live && setError({
|
|
43
|
+
message: labels.shareLoadFailed,
|
|
44
|
+
detail: errorMessage(err)
|
|
45
|
+
}));
|
|
46
|
+
sharing.users(sessionId).then((found) => live && setPeople(found)).catch((err) => live && setError({
|
|
47
|
+
message: labels.shareUsersFailed,
|
|
48
|
+
detail: errorMessage(err)
|
|
49
|
+
}));
|
|
50
|
+
return () => {
|
|
51
|
+
live = false;
|
|
52
|
+
};
|
|
53
|
+
}, [
|
|
54
|
+
sharing,
|
|
55
|
+
sessionId,
|
|
56
|
+
labels
|
|
57
|
+
]);
|
|
58
|
+
const run = (change) => {
|
|
59
|
+
setError(null);
|
|
60
|
+
setConfirming(null);
|
|
61
|
+
change().then((next) => next && setView(next)).catch((err) => setError({
|
|
62
|
+
message: labels.shareFailed,
|
|
63
|
+
detail: errorMessage(err)
|
|
64
|
+
}));
|
|
65
|
+
};
|
|
66
|
+
if (!sharing) return null;
|
|
67
|
+
const owner = view?.you === "owner";
|
|
68
|
+
const taken = /* @__PURE__ */ new Set([view?.owner?.userId, ...(view?.members ?? []).map((m) => m.userId)]);
|
|
69
|
+
const candidates = people.filter((p) => !taken.has(p.userId));
|
|
70
|
+
const label = (p) => p.name ? `${p.name} (${p.email})` : p.email;
|
|
71
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
72
|
+
className: `zg-modal-panel zg-float w-[480px] max-w-[92vw] flex flex-col overflow-hidden${className ? ` ${className}` : ""}`,
|
|
73
|
+
style,
|
|
74
|
+
"data-testid": "share-session-dialog",
|
|
75
|
+
onMouseDown: (e) => e.stopPropagation(),
|
|
76
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
77
|
+
className: "px-5 pt-4 pb-4 flex flex-col gap-3 min-h-0",
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h2", {
|
|
80
|
+
id: TITLE_ID,
|
|
81
|
+
className: "m-0 text-sm font-semibold text-[var(--zg-text)] zg-balance",
|
|
82
|
+
children: labels.shareTitle
|
|
83
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
84
|
+
className: "m-0 mt-1 text-zg-label text-[var(--zg-text-muted)]",
|
|
85
|
+
children: labels.shareActsAsOwner
|
|
86
|
+
})] }),
|
|
87
|
+
!view && !error && /* @__PURE__ */ jsx("p", {
|
|
88
|
+
className: "m-0 text-zg-label text-[var(--zg-text-muted)]",
|
|
89
|
+
children: labels.shareLoading
|
|
90
|
+
}),
|
|
91
|
+
view?.frozen && /* @__PURE__ */ jsx(Notice, {
|
|
92
|
+
tone: "warning",
|
|
93
|
+
children: labels.shareFrozen
|
|
94
|
+
}),
|
|
95
|
+
view && /* @__PURE__ */ jsxs("ul", {
|
|
96
|
+
className: "m-0 p-0 list-none flex flex-col gap-1.5",
|
|
97
|
+
"data-testid": "share-members",
|
|
98
|
+
children: [view.owner && /* @__PURE__ */ jsxs("li", {
|
|
99
|
+
className: "flex items-center gap-2 min-w-0",
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ jsx(SourceAvatar, {
|
|
102
|
+
owner: view.owner.name ?? view.owner.email,
|
|
103
|
+
...view.owner.avatar ? { src: view.owner.avatar } : {},
|
|
104
|
+
size: "sm"
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ jsx("span", {
|
|
107
|
+
className: "flex-1 min-w-0 truncate text-zg-label text-[var(--zg-text)]",
|
|
108
|
+
children: label(view.owner)
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ jsx(MetaChip, { children: labels.shareOwner })
|
|
111
|
+
]
|
|
112
|
+
}), view.members.map((member) => /* @__PURE__ */ jsxs("li", {
|
|
113
|
+
className: "flex items-center gap-2 min-w-0",
|
|
114
|
+
"data-testid": `share-member-${member.userId}`,
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ jsx(SourceAvatar, {
|
|
117
|
+
owner: member.name ?? member.email,
|
|
118
|
+
...member.avatar ? { src: member.avatar } : {},
|
|
119
|
+
size: "sm"
|
|
120
|
+
}),
|
|
121
|
+
/* @__PURE__ */ jsx("span", {
|
|
122
|
+
className: "flex-1 min-w-0 truncate text-zg-label text-[var(--zg-text)]",
|
|
123
|
+
children: label(member)
|
|
124
|
+
}),
|
|
125
|
+
owner ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("select", {
|
|
126
|
+
"aria-label": labels.shareGrantFor(member.name ?? member.email),
|
|
127
|
+
value: member.grant,
|
|
128
|
+
onChange: (e) => run(() => sharing.setGrant(sessionId, member.userId, e.target.value)),
|
|
129
|
+
className: PICKER,
|
|
130
|
+
children: GRANTS.map((g) => /* @__PURE__ */ jsx("option", {
|
|
131
|
+
value: g,
|
|
132
|
+
children: labels.shareGrants[g]
|
|
133
|
+
}, g))
|
|
134
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
135
|
+
type: "button",
|
|
136
|
+
"data-testid": `share-remove-${member.userId}`,
|
|
137
|
+
className: buttonClass({
|
|
138
|
+
variant: "ghost",
|
|
139
|
+
size: "xs"
|
|
140
|
+
}),
|
|
141
|
+
onClick: () => setConfirming({
|
|
142
|
+
kind: "remove",
|
|
143
|
+
person: member
|
|
144
|
+
}),
|
|
145
|
+
children: labels.shareRemove
|
|
146
|
+
})] }) : /* @__PURE__ */ jsx(MetaChip, { children: labels.shareGrants[member.grant] })
|
|
147
|
+
]
|
|
148
|
+
}, member.userId))]
|
|
149
|
+
}),
|
|
150
|
+
owner && /* @__PURE__ */ jsxs("div", {
|
|
151
|
+
className: "flex items-center gap-2 min-w-0",
|
|
152
|
+
children: [
|
|
153
|
+
/* @__PURE__ */ jsxs("select", {
|
|
154
|
+
"aria-label": labels.shareInvitePlaceholder,
|
|
155
|
+
value: invitee,
|
|
156
|
+
onChange: (e) => setInvitee(e.target.value),
|
|
157
|
+
"data-testid": "share-invitee",
|
|
158
|
+
className: `${PICKER} flex-1 min-w-0`,
|
|
159
|
+
children: [/* @__PURE__ */ jsx("option", {
|
|
160
|
+
value: "",
|
|
161
|
+
children: labels.shareInvitePlaceholder
|
|
162
|
+
}), candidates.map((p) => /* @__PURE__ */ jsx("option", {
|
|
163
|
+
value: p.userId,
|
|
164
|
+
children: label(p)
|
|
165
|
+
}, p.userId))]
|
|
166
|
+
}),
|
|
167
|
+
/* @__PURE__ */ jsx("select", {
|
|
168
|
+
"aria-label": labels.shareInviteGrant,
|
|
169
|
+
value: grant,
|
|
170
|
+
onChange: (e) => setGrant(e.target.value),
|
|
171
|
+
className: PICKER,
|
|
172
|
+
children: GRANTS.map((g) => /* @__PURE__ */ jsx("option", {
|
|
173
|
+
value: g,
|
|
174
|
+
children: labels.shareGrants[g]
|
|
175
|
+
}, g))
|
|
176
|
+
}),
|
|
177
|
+
/* @__PURE__ */ jsx("button", {
|
|
178
|
+
type: "button",
|
|
179
|
+
"data-testid": "share-invite",
|
|
180
|
+
disabled: !invitee,
|
|
181
|
+
className: buttonClass({
|
|
182
|
+
variant: "secondary",
|
|
183
|
+
size: "xs"
|
|
184
|
+
}),
|
|
185
|
+
onClick: () => run(async () => {
|
|
186
|
+
const next = await sharing.invite(sessionId, invitee, grant);
|
|
187
|
+
setInvitee("");
|
|
188
|
+
return next;
|
|
189
|
+
}),
|
|
190
|
+
children: labels.shareInvite
|
|
191
|
+
})
|
|
192
|
+
]
|
|
193
|
+
}),
|
|
194
|
+
owner && view && /* @__PURE__ */ jsxs("div", {
|
|
195
|
+
className: "flex items-center gap-2 flex-wrap",
|
|
196
|
+
children: [/* @__PURE__ */ jsxs("button", {
|
|
197
|
+
type: "button",
|
|
198
|
+
role: "checkbox",
|
|
199
|
+
"aria-checked": view.open,
|
|
200
|
+
"data-testid": "share-open",
|
|
201
|
+
onClick: () => run(() => sharing.setOpen(sessionId, !view.open, view.defaultGrant)),
|
|
202
|
+
className: "flex items-center gap-2 bg-transparent border-0 p-0 text-left text-zg-label text-[var(--zg-text)] cursor-pointer",
|
|
203
|
+
children: [/* @__PURE__ */ jsx(Checkbox, { checked: view.open }), /* @__PURE__ */ jsx("span", { children: labels.shareOpen })]
|
|
204
|
+
}), view.open && /* @__PURE__ */ jsxs("label", {
|
|
205
|
+
className: "flex items-center gap-1.5 text-zg-label text-[var(--zg-text-muted)]",
|
|
206
|
+
children: [labels.shareOpenGrant, /* @__PURE__ */ jsx("select", {
|
|
207
|
+
value: view.defaultGrant,
|
|
208
|
+
onChange: (e) => run(() => sharing.setOpen(sessionId, true, e.target.value)),
|
|
209
|
+
className: PICKER,
|
|
210
|
+
children: GRANTS.map((g) => /* @__PURE__ */ jsx("option", {
|
|
211
|
+
value: g,
|
|
212
|
+
children: labels.shareGrants[g]
|
|
213
|
+
}, g))
|
|
214
|
+
})]
|
|
215
|
+
})]
|
|
216
|
+
}),
|
|
217
|
+
owner && transferring && people.some((p) => p.userId !== view?.owner?.userId) && /* @__PURE__ */ jsxs("div", {
|
|
218
|
+
className: "flex items-center gap-2 min-w-0",
|
|
219
|
+
children: [/* @__PURE__ */ jsxs("select", {
|
|
220
|
+
"aria-label": labels.shareTransfer,
|
|
221
|
+
value: heir,
|
|
222
|
+
onChange: (e) => setHeir(e.target.value),
|
|
223
|
+
"data-testid": "share-heir",
|
|
224
|
+
className: `${PICKER} flex-1 min-w-0`,
|
|
225
|
+
children: [/* @__PURE__ */ jsx("option", {
|
|
226
|
+
value: "",
|
|
227
|
+
children: labels.shareTransfer
|
|
228
|
+
}), people.filter((p) => p.userId !== view?.owner?.userId).map((p) => /* @__PURE__ */ jsx("option", {
|
|
229
|
+
value: p.userId,
|
|
230
|
+
children: label(p)
|
|
231
|
+
}, p.userId))]
|
|
232
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
233
|
+
type: "button",
|
|
234
|
+
"data-testid": "share-transfer",
|
|
235
|
+
disabled: !heir,
|
|
236
|
+
className: buttonClass({
|
|
237
|
+
variant: "secondary",
|
|
238
|
+
size: "xs"
|
|
239
|
+
}),
|
|
240
|
+
onClick: () => {
|
|
241
|
+
const person = people.find((p) => p.userId === heir);
|
|
242
|
+
if (person) setConfirming({
|
|
243
|
+
kind: "transfer",
|
|
244
|
+
person
|
|
245
|
+
});
|
|
246
|
+
},
|
|
247
|
+
children: labels.shareTransferSubmit
|
|
248
|
+
})]
|
|
249
|
+
}),
|
|
250
|
+
view?.notify && sharing.setNotify && (view.members.length > 0 || view.open || !owner) && /* @__PURE__ */ jsxs("label", {
|
|
251
|
+
className: "flex items-center gap-1.5 text-zg-label text-[var(--zg-text-muted)]",
|
|
252
|
+
children: [labels.shareNotify, /* @__PURE__ */ jsx("select", {
|
|
253
|
+
"data-testid": "share-notify",
|
|
254
|
+
value: view.notify,
|
|
255
|
+
onChange: (e) => run(() => sharing.setNotify(sessionId, e.target.value)),
|
|
256
|
+
className: PICKER,
|
|
257
|
+
children: NOTIFY_LEVELS.map((level) => /* @__PURE__ */ jsx("option", {
|
|
258
|
+
value: level,
|
|
259
|
+
children: labels.shareNotifyLevels[level]
|
|
260
|
+
}, level))
|
|
261
|
+
})]
|
|
262
|
+
}),
|
|
263
|
+
confirming && /* @__PURE__ */ jsx(Notice, {
|
|
264
|
+
tone: "warning",
|
|
265
|
+
action: /* @__PURE__ */ jsxs("span", {
|
|
266
|
+
className: "flex items-center gap-1.5",
|
|
267
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
268
|
+
type: "button",
|
|
269
|
+
className: buttonClass({
|
|
270
|
+
variant: "ghost",
|
|
271
|
+
size: "xs"
|
|
272
|
+
}),
|
|
273
|
+
onClick: () => setConfirming(null),
|
|
274
|
+
children: labels.shareConfirmCancel
|
|
275
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
276
|
+
type: "button",
|
|
277
|
+
"data-testid": "share-confirm-yes",
|
|
278
|
+
className: buttonClass({
|
|
279
|
+
variant: "danger-solid",
|
|
280
|
+
size: "xs"
|
|
281
|
+
}),
|
|
282
|
+
onClick: () => run(() => confirming.kind === "remove" ? sharing.remove(sessionId, confirming.person.userId) : sharing.transfer(sessionId, confirming.person.userId)),
|
|
283
|
+
children: confirming.kind === "remove" ? labels.shareRemove : labels.shareTransferSubmit
|
|
284
|
+
})]
|
|
285
|
+
}),
|
|
286
|
+
children: confirming.kind === "remove" ? labels.shareRemoveConfirm(label(confirming.person)) : labels.shareTransferConfirm(label(confirming.person))
|
|
287
|
+
}),
|
|
288
|
+
error && /* @__PURE__ */ jsx(Notice, {
|
|
289
|
+
tone: "error",
|
|
290
|
+
detail: error.detail,
|
|
291
|
+
children: error.message
|
|
292
|
+
})
|
|
293
|
+
]
|
|
294
|
+
}), /* @__PURE__ */ jsxs("footer", {
|
|
295
|
+
className: "flex items-center justify-end gap-2 px-5 py-3 bg-[var(--zg-tray)]",
|
|
296
|
+
children: [
|
|
297
|
+
owner && !transferring && people.some((p) => p.userId !== view?.owner?.userId) && /* @__PURE__ */ jsx("button", {
|
|
298
|
+
type: "button",
|
|
299
|
+
"data-testid": "share-transfer-open",
|
|
300
|
+
className: `${buttonClass({ variant: "ghost" })} mr-auto`,
|
|
301
|
+
onClick: () => setTransferring(true),
|
|
302
|
+
children: labels.shareTransfer
|
|
303
|
+
}),
|
|
304
|
+
view && view.you !== "owner" && view.you !== null && /* @__PURE__ */ jsx("button", {
|
|
305
|
+
type: "button",
|
|
306
|
+
"data-testid": "share-leave",
|
|
307
|
+
className: `${buttonClass({ variant: "ghost" })} mr-auto`,
|
|
308
|
+
onClick: () => run(async () => {
|
|
309
|
+
await sharing.leave(sessionId);
|
|
310
|
+
onClose();
|
|
311
|
+
}),
|
|
312
|
+
children: labels.shareLeave
|
|
313
|
+
}),
|
|
314
|
+
/* @__PURE__ */ jsx("button", {
|
|
315
|
+
type: "button",
|
|
316
|
+
onClick: onClose,
|
|
317
|
+
className: buttonClass({ variant: "solid" }),
|
|
318
|
+
children: labels.shareDone
|
|
319
|
+
})
|
|
320
|
+
]
|
|
321
|
+
})]
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
/** Opens the share dialog over the `SessionHost` in context; `undefined` without `sharing` or a modal layer (hide the control). */
|
|
325
|
+
function useShareSession() {
|
|
326
|
+
const sharing = useSessionHost().sharing;
|
|
327
|
+
const modal = useOptionalModal();
|
|
328
|
+
const openLayer = modal?.openLayer;
|
|
329
|
+
const closeLayer = modal?.closeLayer;
|
|
330
|
+
const open = useCallback((sessionId) => {
|
|
331
|
+
if (!openLayer || !closeLayer) return;
|
|
332
|
+
openLayer(/* @__PURE__ */ jsx(ShareSessionDialog, {
|
|
333
|
+
sessionId,
|
|
334
|
+
onClose: () => closeLayer()
|
|
335
|
+
}), {
|
|
336
|
+
onDismiss: () => {},
|
|
337
|
+
labelledBy: TITLE_ID
|
|
338
|
+
});
|
|
339
|
+
}, [openLayer, closeLayer]);
|
|
340
|
+
return sharing && openLayer && closeLayer ? open : void 0;
|
|
341
|
+
}
|
|
342
|
+
export { ShareSessionDialog, useShareSession };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* "Ann is typing…": who else is typing in a shared session (organization
|
|
3
|
+
* mode, docs/MULTIPLAYER.md), from the host's `sharing.typing`. Nothing when
|
|
4
|
+
* nobody is, or when the host has no `typing`. One quiet line, announced
|
|
5
|
+
* politely to screen readers.
|
|
6
|
+
*/
|
|
7
|
+
import { CSSProperties } from "react";
|
|
8
|
+
/** Props for {@link TypingLine}. */
|
|
9
|
+
export interface TypingLineProps {
|
|
10
|
+
/** The session whose typists to show. */
|
|
11
|
+
sessionId: string;
|
|
12
|
+
/** Extra classes on the root. */
|
|
13
|
+
className?: string;
|
|
14
|
+
/** Inline styles on the root. */
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Renders who else is typing in `sessionId`, or nothing.
|
|
19
|
+
*
|
|
20
|
+
* @param props - The session, `className` and `style`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function TypingLine(props: TypingLineProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useSessionHost } from "./SessionProvider.js";
|
|
2
|
+
import { useSessionLabels } from "./useSessionLabels.js";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
// src/session/TypingLine.tsx
|
|
6
|
+
const NOBODY = [];
|
|
7
|
+
/**
|
|
8
|
+
* Renders who else is typing in `sessionId`, or nothing.
|
|
9
|
+
*
|
|
10
|
+
* @param props - The session, `className` and `style`.
|
|
11
|
+
*/
|
|
12
|
+
function TypingLine(props) {
|
|
13
|
+
const { sessionId, className = "", style } = props;
|
|
14
|
+
const typing = useSessionHost().sharing?.typing;
|
|
15
|
+
const labels = useSessionLabels();
|
|
16
|
+
const [people, setPeople] = useState(NOBODY);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (!typing) return void 0;
|
|
19
|
+
return typing.watch(sessionId, setPeople);
|
|
20
|
+
}, [typing, sessionId]);
|
|
21
|
+
if (!typing || people.length === 0) return null;
|
|
22
|
+
const text = people.length === 1 ? labels.typingOne(people[0].name) : people.length === 2 ? labels.typingTwo(people[0].name, people[1].name) : labels.typingMany(people.length);
|
|
23
|
+
return /* @__PURE__ */ jsx("div", {
|
|
24
|
+
role: "status",
|
|
25
|
+
"aria-live": "polite",
|
|
26
|
+
className: `px-3 text-xs text-[var(--zg-text-muted)] truncate ${className}`.trimEnd(),
|
|
27
|
+
style,
|
|
28
|
+
children: text
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
export { TypingLine };
|
|
@@ -11,11 +11,13 @@
|
|
|
11
11
|
* methods.
|
|
12
12
|
*/
|
|
13
13
|
import { Readable } from "../../chat/headless/store.js";
|
|
14
|
+
import { SessionPeople } from "./people.js";
|
|
15
|
+
import { SessionTyping } from "./typing.js";
|
|
14
16
|
import { ProviderResetOutcome, ProviderResetTarget, ProviderUsageSnapshot as ProviderUsageSnapshot$1, UsageRange, UsageSummary } from "./usage.js";
|
|
15
17
|
import { ExtensionArtifactRowFact, ExtensionBadgeIcon, ExtensionBadgeTone, Schedule, ScheduleFire, ScheduleInput, SchedulePatch, SecretTtl } from "zidane/chat/pure";
|
|
16
18
|
import { SessionArtifact } from "zidane";
|
|
17
19
|
import { ActivePlanSummary, MessageDelivery, PlanEditOp, PlanStep, PlanView, PlansSnapshot, PromptAttachment, QueuedAttachment, TodoItem } from "zidane/chat";
|
|
18
|
-
import { IpcResult, RunningWorkItem } from "zidane/ipc";
|
|
20
|
+
import { IpcResult, MemberGrant, NotifyLevel, OpenSessionView, ParticipantView, RunningWorkItem, SessionSharingView } from "zidane/ipc";
|
|
19
21
|
import { SessionTurn } from "zidane/types";
|
|
20
22
|
/** One message waiting in a session's queue, as the queue panel shows it. */
|
|
21
23
|
export interface QueuedMessage {
|
|
@@ -298,8 +300,45 @@ export interface SessionSideChats {
|
|
|
298
300
|
/** Calls `onChange` with a session's id when its row changes (a model pick). Returns the unsubscribe. */
|
|
299
301
|
subscribe?: (onChange: (sessionId: string) => void) => () => void;
|
|
300
302
|
}
|
|
303
|
+
/**
|
|
304
|
+
* Who shares a session, on a zidane-server in organization mode
|
|
305
|
+
* (docs/MULTIPLAYER.md). Every method answers the session's sharing as it is
|
|
306
|
+
* after the change. A host without sharing leaves `SessionHost.sharing` out.
|
|
307
|
+
*/
|
|
308
|
+
export interface SessionSharingHost {
|
|
309
|
+
/** Who shares the session now. */
|
|
310
|
+
get: (sessionId: string) => Promise<SessionSharingView>;
|
|
311
|
+
/** Invite a person (an email or a user id), with a grant. */
|
|
312
|
+
invite: (sessionId: string, user: string, grant?: MemberGrant) => Promise<SessionSharingView>;
|
|
313
|
+
/** Change what a member may do. */
|
|
314
|
+
setGrant: (sessionId: string, userId: string, grant: MemberGrant) => Promise<SessionSharingView>;
|
|
315
|
+
/** Remove a member. */
|
|
316
|
+
remove: (sessionId: string, userId: string) => Promise<SessionSharingView>;
|
|
317
|
+
/** List the session in the directory (or not), with the grant people who join get. */
|
|
318
|
+
setOpen: (sessionId: string, open: boolean, defaultGrant?: MemberGrant) => Promise<SessionSharingView>;
|
|
319
|
+
/** Hand the session to another person; the caller stays as a trusted member. */
|
|
320
|
+
transfer: (sessionId: string, userId: string) => Promise<SessionSharingView>;
|
|
321
|
+
/** A member leaves the session. */
|
|
322
|
+
leave: (sessionId: string) => Promise<void>;
|
|
323
|
+
/** The organization's people, for the invite picker. */
|
|
324
|
+
users: (sessionId: string) => Promise<ParticipantView[]>;
|
|
325
|
+
/** The open sessions anyone may join ("Open sessions"). Absent: no directory. */
|
|
326
|
+
directory?: () => Promise<OpenSessionView[]>;
|
|
327
|
+
/** Join an open session with its default grant. */
|
|
328
|
+
join?: (sessionId: string) => Promise<SessionSharingView>;
|
|
329
|
+
/** Calls `listener` when who shares a session changed anywhere (`members:changed`): the open sessions are read again. Returns the unsubscribe. */
|
|
330
|
+
onChanged?: (listener: () => void) => () => void;
|
|
331
|
+
/** The caller's notifications for a session: every run that ends, or only what needs them. Absent: no "Notify me". */
|
|
332
|
+
setNotify?: (sessionId: string, notify: NotifyLevel) => Promise<SessionSharingView>;
|
|
333
|
+
/** Who else has a session open (the avatars at the right of its header). Absent: no avatars. */
|
|
334
|
+
people?: SessionPeople;
|
|
335
|
+
/** Who else is typing in a session ("Ann is typing…" under the composer). Absent: no typing line. */
|
|
336
|
+
typing?: SessionTyping;
|
|
337
|
+
}
|
|
301
338
|
/** The session panels' host. Every member is optional: what a host leaves out is not shown. */
|
|
302
339
|
export interface SessionHost {
|
|
340
|
+
/** Sharing the session with people of the organization (docs/MULTIPLAYER.md). Absent: no "Share…". */
|
|
341
|
+
sharing?: SessionSharingHost;
|
|
303
342
|
/** The plans. Absent: no Todos panel. */
|
|
304
343
|
plans?: SessionPlans;
|
|
305
344
|
/** The type-ahead queues. Absent: no queue. */
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ArtifactsState, countArtifacts, createArtifactsState, groupArtifactRows, plainArtifactRow } from "./artifacts.js";
|
|
2
2
|
import { DiffListFile, DiffTreeDir, DiffTreeFile, DiffTreeNode, buildDiffTree, fileOrder, relativeTo, visibleRows } from "./diff-tree.js";
|
|
3
3
|
import { EMPTY_HOME_PREFS, HOME_BLOCK_NAME_MAX, HomeBlock, HomeBlockSource, HomePrefs, HomeRow, addHomeBlockCopy, arrangeHomeBlocks, duplicateHomeBlock, hideHomeBlock, homeBlocksOf, homeRows, moveHomeBlock, parseHomePrefs, placeHomeBlock, removeHomeBlock, renameHomeBlock, setHomeBlockIcon, setHomeBlockView, setHomeBlockWidth, showHomeBlock } from "./home-layout.js";
|
|
4
|
-
import { ActivePlanSummary, PlanControlAction, PlanEditOp, PlanStep, PlanView, PlansSnapshot, PromptAttachment, QueueAddDelivery, QueueAddOptions, QueuePushDelivery, QueuedAttachment, QueuedMessage, RunningWorkItem, Schedule, ScheduleFire, ScheduleInput, SchedulePatch, SchedulesStatus, SessionArtifact, SessionArtifactGroup, SessionArtifactRow, SessionArtifactRowView, SessionArtifacts, SessionCacheReport, SessionDetailsActions, SessionExportFormat, SessionHost, SessionPlans, SessionQueue, SessionRunningWork, SessionSchedules, SessionSecretEntry, SessionSecretInput, SessionSecrets, SessionSideChats, SessionTurn, SessionTurns, SessionUsage, SideChatLookup, SideChatSession, TodoItem } from "./host.js";
|
|
4
|
+
import { ActivePlanSummary, PlanControlAction, PlanEditOp, PlanStep, PlanView, PlansSnapshot, PromptAttachment, QueueAddDelivery, QueueAddOptions, QueuePushDelivery, QueuedAttachment, QueuedMessage, RunningWorkItem, Schedule, ScheduleFire, ScheduleInput, SchedulePatch, SchedulesStatus, SessionArtifact, SessionArtifactGroup, SessionArtifactRow, SessionArtifactRowView, SessionArtifacts, SessionCacheReport, SessionDetailsActions, SessionExportFormat, SessionHost, SessionPlans, SessionQueue, SessionRunningWork, SessionSchedules, SessionSecretEntry, SessionSecretInput, SessionSecrets, SessionSharingHost, SessionSideChats, SessionTurn, SessionTurns, SessionUsage, SideChatLookup, SideChatSession, TodoItem } from "./host.js";
|
|
5
5
|
import { KeyedState, createKeyedState } from "./keyed.js";
|
|
6
6
|
import { DEFAULT_SESSION_LABELS, SessionLabels } from "./labels.js";
|
|
7
|
+
import { PresenceRow, SessionPeople, createSessionPeople } from "./people.js";
|
|
7
8
|
import { SessionPlaceTone, environmentStateLabel, isExternalEnvironment, isReconnecting, sessionPlaceTone } from "./place.js";
|
|
8
9
|
import { InboxPlans, PlansState, TodoTallyCounts, createPlansState, displayedPlan, inboxPlans, planTally } from "./plans.js";
|
|
9
10
|
import { QueueBackend, QueueState, createQueueState, toQueuedMessages } from "./queue.js";
|
|
@@ -14,6 +15,7 @@ import { SecretsState, createSecretsState, sortSecrets } from "./secrets.js";
|
|
|
14
15
|
import { SessionActionName, SessionActionTarget, SessionActions, SessionActionsDeps, SessionConfirmOptions, createSessionActions, sessionKeyCommands } from "./session-actions.js";
|
|
15
16
|
import { SessionDiffEntry, SessionEditEvent, collectSessionDiffs, fileDiffCounts, groupByPath } from "./session-diffs.js";
|
|
16
17
|
import { SideRefusal, SideRequests, createSideRequests, parseSideCommand } from "./side.js";
|
|
18
|
+
import { SessionTyping, TYPING_EXPIRE_MS, TypingPerson, TypingSignal, createSessionTyping } from "./typing.js";
|
|
17
19
|
import { ProviderResetCredit, ProviderResetOutcome, ProviderResetTarget, ProviderUsageSnapshot, ProviderUsageSource, ProviderUsageState, ProviderUsageView, USAGE_RANGES, USAGE_SNAPSHOT_KEY, UsageHeatmapDay, UsageModelDayPoint, UsageModelRow, UsageProviderRow, UsageRange, UsageSummaries, UsageSummary, UsageSummaryState, UsageSummaryStateOptions, createProviderUsageState, createUsageSummaryState, isUsageSummary, pickUsageSummary } from "./usage.js";
|
|
18
20
|
import { formatTokens, localDayString } from "./usage-format.js";
|
|
19
|
-
export { type ActivePlanSummary, ArtifactsState, DEFAULT_SESSION_LABELS, DiffListFile, DiffTreeDir, DiffTreeFile, DiffTreeNode, EMPTY_HOME_PREFS, HOME_BLOCK_NAME_MAX, HomeBlock, HomeBlockSource, HomePrefs, HomeRow, InboxPlans, KeyedState, PlanControlAction, type PlanEditOp, type PlanStep, type PlanView, type PlansSnapshot, PlansState, type PromptAttachment, type ProviderResetCredit, type ProviderResetOutcome, ProviderResetTarget, type ProviderUsageSnapshot, ProviderUsageSource, ProviderUsageState, ProviderUsageView, QueueAddDelivery, QueueAddOptions, QueueBackend, QueuePushDelivery, QueueState, type QueuedAttachment, QueuedMessage, ReminderWhen, RemindersSummary, type RunningWorkItem, RunningWorkState, type Schedule, type ScheduleFire, type ScheduleInput, type SchedulePatch, SchedulesBackend, SchedulesState, SchedulesStatus, SecretsState, SessionActionName, SessionActionTarget, SessionActions, SessionActionsDeps, type SessionArtifact, SessionArtifactGroup, SessionArtifactRow, SessionArtifactRowView, SessionArtifacts, SessionCacheReport, SessionConfirmOptions, SessionDetailsActions, SessionDiffEntry, SessionEditEvent, SessionExportFormat, SessionHost, SessionLabels, SessionPlaceTone, SessionPlans, SessionQueue, SessionRunningWork, SessionSchedules, SessionSecretEntry, SessionSecretInput, SessionSecrets, SessionSideChats, type SessionTurn, SessionTurns, SessionUsage, SideChatLookup, SideChatSession, SideRefusal, SideRequests, StagedAttachment, type TodoItem, TodoTallyCounts, USAGE_RANGES, USAGE_SNAPSHOT_KEY, UsageHeatmapDay, UsageModelDayPoint, UsageModelRow, UsageProviderRow, UsageRange, UsageSummaries, UsageSummary, UsageSummaryState, UsageSummaryStateOptions, addHomeBlockCopy, arrangeHomeBlocks, attachmentsKey, buildDiffTree, canKeepSchedule, collectSessionDiffs, countArtifacts, createArtifactsState, createKeyedState, createPlansState, createProviderUsageState, createQueueState, createRunningWorkState, createSchedulesState, createSecretsState, createSessionActions, createSideRequests, createUsageSummaryState, displayedPlan, duplicateHomeBlock, environmentStateLabel, fileDiffCounts, fileOrder, formatTokens, groupArtifactRows, groupByPath, hideHomeBlock, homeBlocksOf, homeRows, inboxPlans, isExternalEnvironment, isReconnecting, isScheduleFinished, isUsageSummary, localDayString, moveHomeBlock, parseHomePrefs, parseSideCommand, pickUsageSummary, placeHomeBlock, plainArtifactRow, planTally, readReminderWhen, relativeTo, remindersSummary, removeHomeBlock, renameHomeBlock, sameRunningWork, sessionKeyCommands, sessionPlaceTone, setHomeBlockIcon, setHomeBlockView, setHomeBlockWidth, showHomeBlock, sortSchedules, sortSecrets, stagedToWire, toQueuedMessages, upcomingSchedules, visibleRows, wireToStaged };
|
|
21
|
+
export { type ActivePlanSummary, ArtifactsState, DEFAULT_SESSION_LABELS, DiffListFile, DiffTreeDir, DiffTreeFile, DiffTreeNode, EMPTY_HOME_PREFS, HOME_BLOCK_NAME_MAX, HomeBlock, HomeBlockSource, HomePrefs, HomeRow, InboxPlans, KeyedState, PlanControlAction, type PlanEditOp, type PlanStep, type PlanView, type PlansSnapshot, PlansState, PresenceRow, type PromptAttachment, type ProviderResetCredit, type ProviderResetOutcome, ProviderResetTarget, type ProviderUsageSnapshot, ProviderUsageSource, ProviderUsageState, ProviderUsageView, QueueAddDelivery, QueueAddOptions, QueueBackend, QueuePushDelivery, QueueState, type QueuedAttachment, QueuedMessage, ReminderWhen, RemindersSummary, type RunningWorkItem, RunningWorkState, type Schedule, type ScheduleFire, type ScheduleInput, type SchedulePatch, SchedulesBackend, SchedulesState, SchedulesStatus, SecretsState, SessionActionName, SessionActionTarget, SessionActions, SessionActionsDeps, type SessionArtifact, SessionArtifactGroup, SessionArtifactRow, SessionArtifactRowView, SessionArtifacts, SessionCacheReport, SessionConfirmOptions, SessionDetailsActions, SessionDiffEntry, SessionEditEvent, SessionExportFormat, SessionHost, SessionLabels, SessionPeople, SessionPlaceTone, SessionPlans, SessionQueue, SessionRunningWork, SessionSchedules, SessionSecretEntry, SessionSecretInput, SessionSecrets, SessionSharingHost, SessionSideChats, type SessionTurn, SessionTurns, SessionTyping, SessionUsage, SideChatLookup, SideChatSession, SideRefusal, SideRequests, StagedAttachment, TYPING_EXPIRE_MS, type TodoItem, TodoTallyCounts, TypingPerson, TypingSignal, USAGE_RANGES, USAGE_SNAPSHOT_KEY, UsageHeatmapDay, UsageModelDayPoint, UsageModelRow, UsageProviderRow, UsageRange, UsageSummaries, UsageSummary, UsageSummaryState, UsageSummaryStateOptions, addHomeBlockCopy, arrangeHomeBlocks, attachmentsKey, buildDiffTree, canKeepSchedule, collectSessionDiffs, countArtifacts, createArtifactsState, createKeyedState, createPlansState, createProviderUsageState, createQueueState, createRunningWorkState, createSchedulesState, createSecretsState, createSessionActions, createSessionPeople, createSessionTyping, createSideRequests, createUsageSummaryState, displayedPlan, duplicateHomeBlock, environmentStateLabel, fileDiffCounts, fileOrder, formatTokens, groupArtifactRows, groupByPath, hideHomeBlock, homeBlocksOf, homeRows, inboxPlans, isExternalEnvironment, isReconnecting, isScheduleFinished, isUsageSummary, localDayString, moveHomeBlock, parseHomePrefs, parseSideCommand, pickUsageSummary, placeHomeBlock, plainArtifactRow, planTally, readReminderWhen, relativeTo, remindersSummary, removeHomeBlock, renameHomeBlock, sameRunningWork, sessionKeyCommands, sessionPlaceTone, setHomeBlockIcon, setHomeBlockView, setHomeBlockWidth, showHomeBlock, sortSchedules, sortSecrets, stagedToWire, toQueuedMessages, upcomingSchedules, visibleRows, wireToStaged };
|
|
@@ -3,6 +3,7 @@ import { buildDiffTree, fileOrder, relativeTo, visibleRows } from "./diff-tree.j
|
|
|
3
3
|
import { EMPTY_HOME_PREFS, HOME_BLOCK_NAME_MAX, addHomeBlockCopy, arrangeHomeBlocks, duplicateHomeBlock, hideHomeBlock, homeBlocksOf, homeRows, moveHomeBlock, parseHomePrefs, placeHomeBlock, removeHomeBlock, renameHomeBlock, setHomeBlockIcon, setHomeBlockView, setHomeBlockWidth, showHomeBlock } from "./home-layout.js";
|
|
4
4
|
import { createKeyedState } from "./keyed.js";
|
|
5
5
|
import { DEFAULT_SESSION_LABELS } from "./labels.js";
|
|
6
|
+
import { createSessionPeople } from "./people.js";
|
|
6
7
|
import { environmentStateLabel, isExternalEnvironment, isReconnecting, sessionPlaceTone } from "./place.js";
|
|
7
8
|
import { createPlansState, displayedPlan, inboxPlans, planTally } from "./plans.js";
|
|
8
9
|
import { createQueueState, toQueuedMessages } from "./queue.js";
|
|
@@ -13,6 +14,7 @@ import { createSecretsState, sortSecrets } from "./secrets.js";
|
|
|
13
14
|
import { createSessionActions, sessionKeyCommands } from "./session-actions.js";
|
|
14
15
|
import { collectSessionDiffs, fileDiffCounts, groupByPath } from "./session-diffs.js";
|
|
15
16
|
import { createSideRequests, parseSideCommand } from "./side.js";
|
|
17
|
+
import { TYPING_EXPIRE_MS, createSessionTyping } from "./typing.js";
|
|
16
18
|
import { USAGE_RANGES, USAGE_SNAPSHOT_KEY, createProviderUsageState, createUsageSummaryState, isUsageSummary, pickUsageSummary } from "./usage.js";
|
|
17
19
|
import { formatTokens, localDayString } from "./usage-format.js";
|
|
18
|
-
export { DEFAULT_SESSION_LABELS, EMPTY_HOME_PREFS, HOME_BLOCK_NAME_MAX, USAGE_RANGES, USAGE_SNAPSHOT_KEY, addHomeBlockCopy, arrangeHomeBlocks, attachmentsKey, buildDiffTree, canKeepSchedule, collectSessionDiffs, countArtifacts, createArtifactsState, createKeyedState, createPlansState, createProviderUsageState, createQueueState, createRunningWorkState, createSchedulesState, createSecretsState, createSessionActions, createSideRequests, createUsageSummaryState, displayedPlan, duplicateHomeBlock, environmentStateLabel, fileDiffCounts, fileOrder, formatTokens, groupArtifactRows, groupByPath, hideHomeBlock, homeBlocksOf, homeRows, inboxPlans, isExternalEnvironment, isReconnecting, isScheduleFinished, isUsageSummary, localDayString, moveHomeBlock, parseHomePrefs, parseSideCommand, pickUsageSummary, placeHomeBlock, plainArtifactRow, planTally, readReminderWhen, relativeTo, remindersSummary, removeHomeBlock, renameHomeBlock, sameRunningWork, sessionKeyCommands, sessionPlaceTone, setHomeBlockIcon, setHomeBlockView, setHomeBlockWidth, showHomeBlock, sortSchedules, sortSecrets, stagedToWire, toQueuedMessages, upcomingSchedules, visibleRows, wireToStaged };
|
|
20
|
+
export { DEFAULT_SESSION_LABELS, EMPTY_HOME_PREFS, HOME_BLOCK_NAME_MAX, TYPING_EXPIRE_MS, USAGE_RANGES, USAGE_SNAPSHOT_KEY, addHomeBlockCopy, arrangeHomeBlocks, attachmentsKey, buildDiffTree, canKeepSchedule, collectSessionDiffs, countArtifacts, createArtifactsState, createKeyedState, createPlansState, createProviderUsageState, createQueueState, createRunningWorkState, createSchedulesState, createSecretsState, createSessionActions, createSessionPeople, createSessionTyping, createSideRequests, createUsageSummaryState, displayedPlan, duplicateHomeBlock, environmentStateLabel, fileDiffCounts, fileOrder, formatTokens, groupArtifactRows, groupByPath, hideHomeBlock, homeBlocksOf, homeRows, inboxPlans, isExternalEnvironment, isReconnecting, isScheduleFinished, isUsageSummary, localDayString, moveHomeBlock, parseHomePrefs, parseSideCommand, pickUsageSummary, placeHomeBlock, plainArtifactRow, planTally, readReminderWhen, relativeTo, remindersSummary, removeHomeBlock, renameHomeBlock, sameRunningWork, sessionKeyCommands, sessionPlaceTone, setHomeBlockIcon, setHomeBlockView, setHomeBlockWidth, showHomeBlock, sortSchedules, sortSecrets, stagedToWire, toQueuedMessages, upcomingSchedules, visibleRows, wireToStaged };
|
|
@@ -271,6 +271,12 @@ export declare const DEFAULT_SESSION_LABELS: {
|
|
|
271
271
|
lost: string;
|
|
272
272
|
unreachable: string;
|
|
273
273
|
};
|
|
274
|
+
/** Work on a ready environment, in place of `placeTones.busy` ("Setting up"). */
|
|
275
|
+
placeWorking: {
|
|
276
|
+
pausing: string;
|
|
277
|
+
deleting: string;
|
|
278
|
+
action: (label?: string) => string;
|
|
279
|
+
};
|
|
274
280
|
placeTip: (where: string, state: string) => string;
|
|
275
281
|
placeResumes: string;
|
|
276
282
|
/** After `placeTones.removed`: when the new sandbox comes. */
|
|
@@ -397,6 +403,49 @@ export declare const DEFAULT_SESSION_LABELS: {
|
|
|
397
403
|
detailsMarkdown: string;
|
|
398
404
|
detailsJson: string;
|
|
399
405
|
detailsHtml: string;
|
|
406
|
+
/** At the right of a shared session's header: who else has it open. */
|
|
407
|
+
peopleHere: (names: readonly string[]) => string;
|
|
408
|
+
peopleMore: (count: number) => string;
|
|
409
|
+
/** Under the composer of a shared session: who else is typing. */
|
|
410
|
+
typingOne: (name: string) => string;
|
|
411
|
+
typingTwo: (first: string, second: string) => string;
|
|
412
|
+
typingMany: (count: number) => string;
|
|
413
|
+
shareTitle: string;
|
|
414
|
+
shareNotify: string;
|
|
415
|
+
shareNotifyLevels: Record<"all" | "attention", string>;
|
|
416
|
+
shareOwner: string;
|
|
417
|
+
shareGrants: Record<"read" | "prompt" | "trusted", string>;
|
|
418
|
+
shareInvite: string;
|
|
419
|
+
shareInvitePlaceholder: string;
|
|
420
|
+
shareRemove: string;
|
|
421
|
+
shareOpen: string;
|
|
422
|
+
shareOpenGrant: string;
|
|
423
|
+
shareLeave: string;
|
|
424
|
+
shareFrozen: string;
|
|
425
|
+
shareActsAsOwner: string;
|
|
426
|
+
shareLoading: string;
|
|
427
|
+
shareFailed: string;
|
|
428
|
+
shareLoadFailed: string;
|
|
429
|
+
shareUsersFailed: string;
|
|
430
|
+
/** The grant picker of one member, for screen readers. */
|
|
431
|
+
shareGrantFor: (name: string) => string;
|
|
432
|
+
/** The grant picker next to Invite, for screen readers. */
|
|
433
|
+
shareInviteGrant: string;
|
|
434
|
+
shareRemoveConfirm: (name: string) => string;
|
|
435
|
+
shareTransferConfirm: (name: string) => string;
|
|
436
|
+
shareConfirmCancel: string;
|
|
437
|
+
shareDone: string;
|
|
438
|
+
shareTransfer: string;
|
|
439
|
+
openSessionsTitle: string;
|
|
440
|
+
openSessionsNone: string;
|
|
441
|
+
openSessionsLoading: string;
|
|
442
|
+
openSessionsLoadFailed: string;
|
|
443
|
+
openSessionsJoinFailed: string;
|
|
444
|
+
openSessionsJoin: string;
|
|
445
|
+
openSessionsOpen: string;
|
|
446
|
+
/** The people in an open session, its owner included. */
|
|
447
|
+
openSessionsMembers: (count: number) => string;
|
|
448
|
+
shareTransferSubmit: string;
|
|
400
449
|
diffChangedFiles: string;
|
|
401
450
|
diffFindings: (errors: number, warnings: number) => string;
|
|
402
451
|
todoTally: Record<TodoStatus, string>;
|