zidane-ui 9.5.2 → 9.6.1
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/index.d.ts +2 -1
- package/dist/adapters/index.js +2 -1
- package/dist/adapters/server-git-host.js +67 -0
- package/dist/adapters/server-host.js +9 -0
- package/dist/adapters/server-oauth-flow.d.ts +2 -2
- package/dist/adapters/server-oauth-flow.js +1 -1
- package/dist/adapters/server-projects.d.ts +53 -2
- package/dist/adapters/server-projects.js +4 -3
- package/dist/adapters/server-session-host.js +112 -4
- package/dist/channels/BindingEditorDialog.js +1 -1
- package/dist/channels/ChannelDefaultsSection.js +1 -1
- package/dist/channels/ChannelsSettingsSection.js +1 -1
- package/dist/channels/ConnectionSetupDialog.js +1 -1
- package/dist/channels/HeldRepliesList.js +1 -1
- package/dist/channels/ProjectChannelsSection.js +1 -1
- package/dist/chat/HostTranscript.js +1 -0
- package/dist/chat/SessionGroupHeader.js +2 -2
- package/dist/chat/composer/ComposerBadges.d.ts +27 -1
- package/dist/chat/composer/ComposerBadges.js +41 -5
- package/dist/chat/composer/ConversationBadges.d.ts +6 -0
- package/dist/chat/composer/ConversationBadges.js +70 -3
- package/dist/chat/composer/DraftPickers.js +4 -0
- package/dist/chat/composer/ServerScopeToggle.d.ts +16 -1
- package/dist/chat/composer/ServerScopeToggle.js +90 -47
- package/dist/chat/composer/index.d.ts +2 -2
- package/dist/chat/composer/use-draft-target.d.ts +18 -2
- package/dist/chat/composer/use-draft-target.js +74 -7
- package/dist/chat/composer/use-new-session-defaults.d.ts +3 -1
- package/dist/chat/composer/use-new-session-defaults.js +19 -14
- package/dist/chat/composer/use-send-prompt.js +2 -2
- package/dist/chat/headless/composer/index.d.ts +2 -2
- package/dist/chat/headless/composer/index.js +2 -2
- package/dist/chat/headless/composer/labels-chrome.d.ts +7 -0
- package/dist/chat/headless/composer/labels-chrome.js +7 -0
- package/dist/chat/headless/composer/labels-editor.d.ts +4 -0
- package/dist/chat/headless/composer/labels-editor.js +4 -0
- package/dist/chat/headless/composer/models.d.ts +2 -0
- package/dist/chat/headless/composer/new-session-defaults.d.ts +12 -1
- package/dist/chat/headless/composer/new-session-defaults.js +30 -1
- package/dist/chat/headless/draft-target.d.ts +27 -6
- package/dist/chat/headless/draft-target.js +36 -3
- package/dist/chat/headless/host.d.ts +7 -0
- package/dist/chat/headless/index.d.ts +4 -4
- package/dist/chat/headless/index.js +29 -29
- package/dist/chat/headless/labels.d.ts +4 -0
- package/dist/chat/headless/send-flow.d.ts +2 -0
- package/dist/chat/headless/send-flow.js +2 -1
- package/dist/chat/headless/session-list.d.ts +4 -0
- package/dist/chat/headless/sidebar/index.d.ts +2 -2
- package/dist/chat/headless/sidebar/labels.d.ts +9 -1
- package/dist/chat/headless/sidebar/labels.js +4 -0
- package/dist/chat/headless/sidebar/rows.d.ts +48 -7
- package/dist/chat/headless/sidebar/rows.js +121 -22
- package/dist/chat/headless/sidebar/types.d.ts +5 -0
- package/dist/chat/headless/transcript/fold-actions.d.ts +8 -3
- package/dist/chat/headless/transcript/fold-actions.js +29 -1
- package/dist/chat/index.d.ts +2 -2
- package/dist/chat/index.js +2 -2
- package/dist/chat/rich-composer/RichComposer.js +58 -11
- package/dist/chat/rich-composer/composer-controls.d.ts +5 -1
- package/dist/chat/rich-composer/composer-controls.js +4 -4
- package/dist/chat/rich-composer/composer-keys.js +2 -2
- package/dist/chat/rich-composer/draft-collab.d.ts +91 -0
- package/dist/chat/rich-composer/draft-collab.js +310 -0
- package/dist/chat/rich-composer/use-composer-editor.d.ts +2 -0
- package/dist/chat/rich-composer/use-draft-collab.d.ts +53 -0
- package/dist/chat/rich-composer/use-draft-collab.js +92 -0
- package/dist/chat/rich-composer/use-draft-mirror.d.ts +11 -0
- package/dist/chat/rich-composer/use-draft-mirror.js +38 -9
- package/dist/chat/sidebar/InboxList.js +1 -1
- package/dist/chat/sidebar/ProjectIcon.d.ts +6 -2
- package/dist/chat/sidebar/ProjectIcon.js +7 -3
- package/dist/chat/sidebar/SessionSidebar.d.ts +30 -1
- package/dist/chat/sidebar/SessionSidebar.js +79 -7
- package/dist/chat/sidebar/SidebarGroupHeader.d.ts +12 -4
- package/dist/chat/sidebar/SidebarGroupHeader.js +70 -28
- package/dist/chat/sidebar/index.d.ts +2 -2
- package/dist/chat/transcript/actions.d.ts +6 -0
- package/dist/chat/transcript/fold.d.ts +2 -1
- package/dist/chat/transcript/fold.js +26 -1
- package/dist/chat/transcript/index.js +3 -3
- package/dist/chat/transcript/notices.d.ts +5 -2
- package/dist/chat/transcript/notices.js +23 -3
- package/dist/chat/transcript/script-input.d.ts +1 -1
- package/dist/components/Avatar.d.ts +36 -0
- package/dist/components/Avatar.js +56 -0
- package/dist/components/AvatarStack.d.ts +58 -0
- package/dist/components/AvatarStack.js +187 -0
- package/dist/components/Tabs.d.ts +6 -1
- package/dist/components/Tabs.js +43 -39
- package/dist/core.css +19 -1
- package/dist/dist/{index-DPbpsCtl.d.ts → index-ChabiHpR.d.ts} +1 -1
- package/dist/dist/index.d.ts +1 -1
- package/dist/git/headless/environment.d.ts +15 -0
- package/dist/git/headless/environment.js +18 -1
- package/dist/git/headless/github.d.ts +11 -0
- package/dist/git/headless/github.js +15 -0
- package/dist/git/headless/host.d.ts +109 -0
- package/dist/git/headless/index.d.ts +5 -4
- package/dist/git/headless/index.js +4 -3
- package/dist/git/headless/labels.d.ts +16 -1
- package/dist/git/headless/labels.js +25 -1
- package/dist/git/testing/contract.d.ts +22 -4
- package/dist/git/testing/contract.js +173 -3
- package/dist/git/testing/index.d.ts +22 -1
- package/dist/git/testing/index.js +135 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/labels.d.ts +4 -0
- package/dist/labels.js +4 -0
- package/dist/onboarding/headless/labels.d.ts +4 -0
- package/dist/session/DraftPeopleStack.d.ts +24 -0
- package/dist/session/DraftPeopleStack.js +48 -0
- package/dist/session/NewProjectDialog.d.ts +28 -8
- package/dist/session/NewProjectDialog.js +225 -40
- package/dist/session/PersonCard.d.ts +29 -0
- package/dist/session/PersonCard.js +199 -0
- package/dist/session/ProjectArtifactsSection.d.ts +4 -1
- package/dist/session/ProjectArtifactsSection.js +149 -34
- package/dist/session/ProjectHome.d.ts +1 -1
- package/dist/session/ProjectHome.js +23 -4
- package/dist/session/ProjectName.d.ts +11 -6
- package/dist/session/ProjectName.js +27 -13
- package/dist/session/ProjectPeopleStack.d.ts +26 -0
- package/dist/session/ProjectPeopleStack.js +56 -0
- package/dist/session/ProjectPublishDialog.js +9 -3
- package/dist/session/ProjectSettingsDialog.d.ts +1 -1
- package/dist/session/ProjectSettingsDialog.js +171 -66
- package/dist/session/ProjectShareDialog.d.ts +1 -1
- package/dist/session/ProjectShareDialog.js +16 -6
- package/dist/session/ProjectToolsSection.js +88 -96
- package/dist/session/ProjectUsage.d.ts +4 -1
- package/dist/session/ProjectUsage.js +13 -4
- package/dist/session/SessionDetailsDialog.d.ts +5 -1
- package/dist/session/SessionDetailsDialog.js +67 -10
- package/dist/session/SessionPeopleStack.js +19 -37
- package/dist/session/SessionProjectPicker.d.ts +54 -0
- package/dist/session/SessionProjectPicker.js +175 -0
- package/dist/session/SessionProvider.d.ts +15 -1
- package/dist/session/SessionProvider.js +28 -6
- package/dist/session/UsageSection.d.ts +2 -4
- package/dist/session/UsageSection.js +57 -55
- package/dist/session/headless/draft-collab.d.ts +55 -0
- package/dist/session/headless/draft-collab.js +127 -0
- package/dist/session/headless/draft-room.d.ts +124 -0
- package/dist/session/headless/draft-room.js +340 -0
- package/dist/session/headless/drafts.d.ts +93 -0
- package/dist/session/headless/drafts.js +79 -0
- package/dist/session/headless/fixture-drafts.d.ts +54 -0
- package/dist/session/headless/fixture-drafts.js +286 -0
- package/dist/session/headless/fixture-host.d.ts +18 -2
- package/dist/session/headless/fixture-host.js +41 -7
- package/dist/session/headless/fixture-projects.d.ts +6 -4
- package/dist/session/headless/fixture-projects.js +25 -4
- package/dist/session/headless/host.d.ts +34 -6
- package/dist/session/headless/index.d.ts +6 -3
- package/dist/session/headless/index.js +6 -3
- package/dist/session/headless/labels.d.ts +47 -2
- package/dist/session/headless/labels.js +17 -1
- package/dist/session/headless/people.d.ts +27 -3
- package/dist/session/headless/people.js +38 -20
- package/dist/session/headless/project-artifact-labels.d.ts +7 -0
- package/dist/session/headless/project-artifact-labels.js +7 -0
- package/dist/session/headless/project-artifacts.d.ts +8 -0
- package/dist/session/headless/project-artifacts.js +15 -1
- package/dist/session/headless/project-labels.d.ts +25 -0
- package/dist/session/headless/project-labels.js +25 -0
- package/dist/session/headless/shared-with.d.ts +28 -0
- package/dist/session/headless/shared-with.js +51 -0
- package/dist/session/host-context.d.ts +11 -0
- package/dist/session/host-context.js +14 -0
- package/dist/session/index.d.ts +7 -3
- package/dist/session/index.js +6 -2
- package/dist/session/new-project-parts.d.ts +67 -0
- package/dist/session/new-project-parts.js +470 -0
- package/dist/session/project-artifact-parts.d.ts +2 -1
- package/dist/session/project-artifact-parts.js +5 -2
- package/dist/session/project-people.d.ts +14 -0
- package/dist/session/project-people.js +86 -0
- package/dist/session/share-people.d.ts +12 -0
- package/dist/session/share-people.js +1 -1
- package/dist/session/testing/contract.d.ts +6 -3
- package/dist/session/testing/contract.js +24 -3
- package/dist/session/testing/drafts.contract.d.ts +30 -0
- package/dist/session/testing/drafts.contract.js +126 -0
- package/dist/session/testing/index.d.ts +2 -1
- package/dist/session/testing/index.js +2 -1
- package/dist/session/use-home-projects.d.ts +11 -2
- package/dist/session/use-home-projects.js +142 -5
- package/dist/session/useDraftCollab.d.ts +24 -0
- package/dist/session/useDraftCollab.js +78 -0
- package/dist/settings/headless/search.d.ts +1 -1
- package/dist/settings/index.js +9 -9
- package/dist/settings/sections/index.js +1 -1
- package/dist/settings/sections/providers/CredentialSources.d.ts +5 -5
- package/dist/settings/sections/providers/CredentialSources.js +5 -22
- package/dist/settings/sections/providers/labels.d.ts +1 -9
- package/dist/settings/sections/providers/labels.js +1 -9
- package/dist/styles.css +20 -9
- package/package.json +4 -3
- package/src/styles/sidebar.css +2 -3
|
@@ -24,14 +24,17 @@ type SetupRow = Extract<Row, {
|
|
|
24
24
|
type CompactRow = Extract<Row, {
|
|
25
25
|
kind: 'compact-summary';
|
|
26
26
|
}>;
|
|
27
|
+
type TaskRow = Extract<Row, {
|
|
28
|
+
kind: 'task';
|
|
29
|
+
}>;
|
|
27
30
|
/** `waiting`: a `spawn` call that has not started yet, every slot being taken. */
|
|
28
31
|
export type FoldActionState = 'waiting' | 'running' | 'ok' | 'err';
|
|
29
|
-
/** One overview line of a folded exchange: a tool call, a run of thoughts, a worker, a note, or a
|
|
32
|
+
/** One overview line of a folded exchange: a tool call, a run of thoughts, a worker, a note, a compaction, or a background task that ended. */
|
|
30
33
|
export interface FoldActionItem {
|
|
31
34
|
/** Stable per action (its first row's id), so lists animate entries, not text changes. */
|
|
32
35
|
id: string;
|
|
33
|
-
/** What the line stands for: a `tool` call, consecutive `thought` segments, a `worker` (subagent), a `note`, the environment's `setup`,
|
|
34
|
-
kind: 'tool' | 'thought' | 'worker' | 'note' | 'setup' | 'compact';
|
|
36
|
+
/** What the line stands for: a `tool` call, consecutive `thought` segments, a `worker` (subagent), a `note`, the environment's `setup`, a `compact`ion the run went through, or a background `task` that ended. */
|
|
37
|
+
kind: 'tool' | 'thought' | 'worker' | 'note' | 'setup' | 'compact' | 'task';
|
|
35
38
|
/** The overview: "Ran bun test", "Read select-stops.ts", "Thought". */
|
|
36
39
|
label: string;
|
|
37
40
|
/** Quiet context after the label: a file's directory, "+2" chained commands. */
|
|
@@ -69,6 +72,8 @@ export interface FoldActionItem {
|
|
|
69
72
|
setup?: SetupRow;
|
|
70
73
|
/** A `compact` line's compaction: its model and tokens ride the line, its summary is the details. */
|
|
71
74
|
compact?: CompactRow;
|
|
75
|
+
/** A `task` line's task: its command, exit and log file are the details. */
|
|
76
|
+
task?: TaskRow;
|
|
72
77
|
}
|
|
73
78
|
/**
|
|
74
79
|
* The overview item for one tool call: the shared words, plus what the details show.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toolFailed } from "./collapse.js";
|
|
2
|
-
import { noteLabel, planFold, setupLabel, thoughtLabel, toolOverview } from "zidane/chat/pure";
|
|
2
|
+
import { noteLabel, planFold, previewLine, setupLabel, taskEndedLabel, taskOutcome, thoughtLabel, toolOverview } from "zidane/chat/pure";
|
|
3
3
|
// src/chat/headless/transcript/fold-actions.ts
|
|
4
4
|
function setupState(row) {
|
|
5
5
|
return row.setup.state === "running" ? "running" : row.setup.state === "failed" ? "err" : "ok";
|
|
@@ -146,6 +146,20 @@ function foldUnits(rows) {
|
|
|
146
146
|
kind: "compact"
|
|
147
147
|
});
|
|
148
148
|
break;
|
|
149
|
+
case "task":
|
|
150
|
+
units.push({
|
|
151
|
+
item: row,
|
|
152
|
+
kind: "task",
|
|
153
|
+
outcome: taskOutcome(row.task)
|
|
154
|
+
});
|
|
155
|
+
break;
|
|
156
|
+
case "task-batch":
|
|
157
|
+
for (const t of row.tasks) units.push({
|
|
158
|
+
item: t,
|
|
159
|
+
kind: "task",
|
|
160
|
+
outcome: taskOutcome(t.task)
|
|
161
|
+
});
|
|
162
|
+
break;
|
|
149
163
|
case "environment-setup": {
|
|
150
164
|
const state = setupState(row);
|
|
151
165
|
const { startedAt, endedAt } = row.setup;
|
|
@@ -226,6 +240,20 @@ function actionItem(step) {
|
|
|
226
240
|
compact: row
|
|
227
241
|
};
|
|
228
242
|
}
|
|
243
|
+
case "task": {
|
|
244
|
+
const row = step.items[0];
|
|
245
|
+
const { command, durationMs } = row.task;
|
|
246
|
+
return {
|
|
247
|
+
id: row.id,
|
|
248
|
+
kind: "task",
|
|
249
|
+
label: taskEndedLabel(taskOutcome(row.task)),
|
|
250
|
+
hint: previewLine(command, 200),
|
|
251
|
+
title: command,
|
|
252
|
+
state: step.state,
|
|
253
|
+
...durationMs > 0 ? { durationMs } : {},
|
|
254
|
+
task: row
|
|
255
|
+
};
|
|
256
|
+
}
|
|
229
257
|
case "tool": return callItem(step.call);
|
|
230
258
|
}
|
|
231
259
|
}
|
package/dist/chat/index.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ import { ApprovalDock, ApprovalDockProps } from "./composer/ApprovalDock.js";
|
|
|
37
37
|
import { ArchivedBanner, ArchivedBannerProps } from "./composer/ArchivedBanner.js";
|
|
38
38
|
import { AttachmentLabelFn, AttachmentRow, AttachmentRowProps, defaultAttachmentTileLabel, useAttachmentRemoval } from "./composer/AttachmentTiles.js";
|
|
39
39
|
import { AttachmentRefusedError, MAX_FILE_ATTACHMENT_BYTES, MAX_IMAGE_ATTACHMENT_BYTES, MAX_MEDIA_ATTACHMENT_BYTES, PASTE_FOLD_CHAR_THRESHOLD, PASTE_FOLD_LINE_THRESHOLD, attachmentErrorText, decodeDataUrlAsText, detectLanguage, formatBytes, isAudioAttachment, isPdfAttachment, isTextLike, isVideoAttachment, pastedTextFilename, readAttachment, shouldFoldPasteToAttachment } from "./composer/attachment-ingest.js";
|
|
40
|
-
import { ComposerBadge, ComposerBadgeTone, ComposerBadges, ComposerBadgesProps } from "./composer/ComposerBadges.js";
|
|
40
|
+
import { ComposerBadge, ComposerBadgeMenu, ComposerBadgeMenuItem, ComposerBadgeTone, ComposerBadges, ComposerBadgesProps } from "./composer/ComposerBadges.js";
|
|
41
41
|
import { MentionItem, SuggestionKind, SuggestionPopup, SuggestionPopupProps, SuggestionSource, SuggestionState, TRIGGER } from "./composer/suggestions.js";
|
|
42
42
|
import { Composer, ComposerHandle, ComposerProps, ComposerResult, ComposerSubmit } from "./composer/Composer.js";
|
|
43
43
|
import { HostAgentPicker, HostAgentPickerProps, HostModelImages, HostModelOptionsPicker, HostModelOptionsPickerProps, HostModelPicker, HostModelPickerProps } from "./composer/HostPickers.js";
|
|
@@ -180,4 +180,4 @@ import { useWheelHoverPause } from "./transcript/useWheelHoverPause.js";
|
|
|
180
180
|
import { MarkdownViews, MarkdownViewsProps } from "./transcript/view-scope.js";
|
|
181
181
|
import "./transcript/index.js";
|
|
182
182
|
import { useChatLabels } from "./useChatLabels.js";
|
|
183
|
-
export { ATTACHMENT_NOTICE_MS, AUTO_FILL_PAGES, AgentPicker, AgentPickerDialog, AgentPickerDialogProps, AgentPickerProps, AgentProfile, AnsiSpans, type AnsiSpansProps, AnsiText, type AnsiTextProps, AnsweredQuestions, AnsweredQuestionsProps, ApprovalDock, ApprovalDockProps, ArchivedBanner, ArchivedBannerProps, AttachmentIcon, AttachmentIconProps, AttachmentLabelFn, AttachmentLabelParts, AttachmentNotices, AttachmentNoticesProps, AttachmentRefusedError, AttachmentRow, AttachmentRowProps, AttachmentTextState, AttachmentTiles, AttachmentTilesProps, AuthFailureCard, AuthFailureCardProps, BADGE_GLYPH, BadgeEffectContext, BadgeMenuBrowser, BadgeMenuComposer, BadgeMenuOpenAction, BadgeMenuProvider, BadgeMenuProviderProps, BadgeMenuSystem, CHIP_CARD_WIDTH, CODE_PANEL, COMMAND_DETAIL_LINE, CardMarkdown, CardMarkdownProps, Caret, CaretProps, ChatProvider, ChatProviderProps, ChipCard, ChipCardProps, ChipHover, ChipHoverProps, ChipOpener, CodeBlockSlotProps, CodemodeScript, type CodemodeScriptProps, CommandCard, CommandCardProps, CommandDetailRow, CommandDetailRowProps, CommandNoteRow, CommandNoteRowProps, CommandScope, CommandScopeContext, CommitCard, CommitCardProps, CompactSummaryRow, CompactSummaryRowProps, Composer, type ComposerAttachment, ComposerBadge, ComposerBadgeTone, ComposerBadges, ComposerBadgesProps, ComposerControls, ComposerControlsProps, ComposerDefaults, ComposerDock, ComposerDockProps, ComposerDraft, ComposerHandle, ComposerHostProvider, ComposerHostProviderProps, ComposerProps, ComposerResult, ComposerRetry, ComposerSearch, ComposerStatusPills, ComposerStatusPillsProps, ComposerSubmit, ComposerTarget, ContextBreakdown, type ContextBreakdownData, ContextBreakdownProps, ContextBreakdownShape, ContextCost, ContextGauge, ContextOrb, ContextOrbProps, ContextUsage, ConversationBadges, ConversationBadgesProps, Cursor, CvRow, CvRowProps, CycleAgentOptions, DEFAULT_BADGE_ORDER, DEFAULT_CONTEXT_BREAKDOWN_SHAPE, DEFAULT_TRANSCRIPT_OPTIONS, DEFAULT_TRANSCRIPT_RENDERERS, DaemonOrb, DaemonOrbButton, DaemonOrbButtonProps, DaemonOrbProps, DefaultInlineText, DefaultInlineTextProps, DefaultMarkdown, DefaultMarkdownProps, DefaultPrompt, DefaultPromptProps, DefaultSessionTitle, DefaultSessionTitleProps, DiffLines, DiffLinesProps, DockCard, DockCardProps, DockRow, DockRowProps, Dot, DotProps, DraftPickers, DraftPickersProps, DraftServer, DraftTarget, DraftTargetOptions, DraftTargetRequest, EFFORT_LEVELS, EditDiffBlock, EditDiffBlockProps, EffortLevel, EffortPickerDialog, EffortPickerDialogProps, ElicitationCard, ElicitationCardProps, EnvironmentSetupDetails, EnvironmentSetupDetailsProps, EnvironmentSetupRow, EnvironmentSetupRowProps, ErrorRow, ErrorRowProps, ExchangeFoldRow, ExchangeFoldRowProps, FILL_MIN_PROMPTS, FailedMark, FailedMarkProps, FailureRow, FailureRowProps, FileBadgeIcon, FileBadgeIconProps, FoldHeader, FoldHeaderProps, ForcedRows, GUTTER_STEP_PX, GroupGlyph, GroupGlyphProps, HostAgentPicker, HostAgentPickerProps, HostBadge, HostBadgeProps, HostComposer, HostComposerProps, HostContextOrb, HostContextOrbProps, HostInteractions, HostInteractionsProps, HostModelChainList, HostModelChainListProps, HostModelImages, HostModelOptionsPicker, HostModelOptionsPickerProps, HostModelPicker, HostModelPickerProps, HostPicker, HostPickerProps, HostStatusDot, HostStatusDotProps, HostTranscript, HostTranscriptProps, HostTurnMenuOptions, INLINE_CODE_CLASS, ImageGenerationBlock, ImageGenerationBlockProps, ImageModelList, ImageModelListProps, type ImageModelRow, InboxPanel, InboxPanelProps, InfoRow, InfoRowProps, InlineChipText, InlineChipTextProps, InlineCode, InlineCodeProps, InlineTextSlotProps, InteractionCard, InteractionCardProps, InteractionTool, InteractionToolBody, InteractionToolBodyProps, LazyRow, LazyRowProps, LineState, LinkBadge, LinkBadgeProps, LinkIcon, LinkIconProps, LiveOutput, type LiveOutputProps, LiveScriptsContext, LoadEarlierRow, LoadEarlierRowProps, LoadFullOutputButton, LoadFullOutputButtonProps, MAX_FILE_ATTACHMENT_BYTES, MAX_IMAGE_ATTACHMENT_BYTES, MAX_MATCHES, MAX_MEDIA_ATTACHMENT_BYTES, MAX_TEXT_PREVIEW_BYTES, Markdown, MarkdownContext, MarkdownContextValue, MarkdownDiagrams, MarkdownDiagramsProps, MarkdownImageProps, MarkdownLinkProps, MarkdownProps, MarkdownSlotProps, MarkdownViews, type MarkdownViewsProps, MentionItem, MermaidDiagram, type MermaidDiagramProps, MessageGroupRow, MessageGroupRowProps, type ModelCatalogRow, ModelCatalogState, ModelChainFooter, ModelChainFooterProps, ModelChainHeader, ModelChainHeaderProps, ModelChainImages, ModelChainList, ModelChainListProps, ModelChainPopover, ModelChainPopoverProps, ModelChainRow, ModelChainRowProps, ModelChainRows, ModelChainRowsProps, ModelChainTooltip, ModelChainTooltipProps, ModelChoice, ModelFlag, ModelFlagProps, ModelGroupHeader, ModelGroupHeaderProps, ModelKind, ModelMeta, ModelMetaProps, ModelOption, ModelOptionsPicker, ModelOptionsPickerProps, type ModelPickRef, ModelPicker, ModelPickerDialog, ModelPickerDialogProps, ModelPickerFrame, ModelPickerFrameProps, ModelPickerProps, ModelProviderChip, ModelProviderChipProps, ModelProviderPills, ModelProviderPillsProps, ModelReasoning, ModelReasoningProps, ModelVerdict, ModelVerdictProps, ModelWindow, ModelWindowProps, NO_COMPOSER_HINT, NestedToolCalls, NestedToolCallsProps, NewChatsDefault, NewSessionDefaults, NewSessionModelSource, NoticeRow, NoticeRowProps, OPTION_ICON, OpenBadgeMenu, OpenSessionContext, OrbState, OrchestratorBadge, OrchestratorBadgeProps, OrderedBadge, PASTE_FOLD_CHAR_THRESHOLD, PASTE_FOLD_LINE_THRESHOLD, ParsedRef, ParsedReferenceUrl, PdfPreview, PdfPreviewProps, PickerGroup, PickerPill, PickerPillProps, PlacePicker, PlacePickerHosts, PlacePickerProps, PlanBody, PlanBodyProps, PlanCard, PlanCardProps, ProjectMenu, ProjectMenuProps, PromptEcho, PromptEchoProps, PromptHistoryProvider, PromptHistoryProviderProps, PromptHistoryValue, PromptLines, PromptLinesProps, PromptSlotProps, ProseMarkdown, ProseMarkdownProps, QuestionField, QuestionFieldProps, QuestionForm, QuestionFormProps, ReadFileBlock, ReadFileBlockProps, RefChip, RefChipProps, RefMatch, ReferenceChip, ReferenceChipProps, ReferenceText, ReferenceTextProps, RepairedRow, RepairedRowProps, RetryPill, RetryPillProps, type RowActionItem, RowContext, RowFrame, RowFrameProps, RowIconsContext, RowPlace, RunEstimateChip, RunEstimateChipProps, RunEstimatesProvider, RunEstimatesProviderProps, RunReceiptInline, RunReceiptInlineProps, RunStatusChip, RunStatusChipProps, RunSummaryRow, RunSummaryRowProps, RunnableCodeBlock, type RunnableCodeBlockProps, SESSION_EVENT_DOT, ScopeToggle, ScopeToggleProps, ScrollPosition, SearchHighlightStyle, SecretInput, SecretInputProps, SelectCursor, SelectCursorProps, SelectTurnCommands, SelectTurnExit, SelectTurnHint, SelectTurnHintKeys, SelectTurnHintKeysProps, type SelectTurnHintProps, SelectTurnKeysOptions, SelectTurnProvider, SelectTurnProviderProps, SelectTurnState, SelectTurnValue, SendButton, SendButtonProps, SendPromptControls, SendPromptOptions, SendRoute, ServerScopeToggle, ServerScopeToggleProps, SessionActivityFilter, SessionArchiveFilter, SessionCard, SessionCardProps, SessionDotState, SessionEventGroupRow, SessionEventGroupRowProps, SessionEventRow, SessionEventRowProps, SessionFilterAction, SessionFilterAxis, SessionFilterExtra, SessionFilterMenu, SessionFilterMenuProps, SessionFilterPlacement, SessionGroupHeader, SessionGroupHeaderProps, SessionHostHeader, SessionHostHeaderProps, SessionList, SessionListProps, SessionListRow, SessionListRowProps, SessionMeters, SessionMetersTarget, SessionProjectAxis, SessionRow, SessionRowBadge, SessionRowList, SessionRowListProps, SessionRowProps, SessionRowState, SessionStreamsProvider, SessionStreamsProviderProps, SessionTitleSlotProps, SessionView, SetupChangedRow, SetupChangedRowProps, ShellBlockProvider, type ShellBlockProviderProps, type ShellBlockScope, ShowMoreRow, ShowMoreRowProps, SkillCard, SkillCardProps, SkillGroupCard, SkillGroupCardProps, SlotEntry, SpawnEndRow, SpawnEndRowProps, SpawnStartRow, SpawnStartRowProps, StatusDot, StatusDotProps, StatusOrb, StatusOrbProps, StickToBottomOptions, SubagentBlock, SubagentBlockProps, SuggestionKind, SuggestionPopup, SuggestionPopupProps, SuggestionSource, SuggestionState, THINKING_LEVELS, TRANSCRIPT_OPTION_KEYS, TRIGGER, TaskBatchRow, TaskBatchRowProps, TaskRow, TaskRowProps, TextPreview, TextPreviewProps, TextPreviewSlotProps, TextRow, TextRowProps, ThinkingBatchRow, ThinkingBatchRowProps, ThinkingLevel, ThinkingRow, ThinkingRowProps, Throbber, ThrobberProps, ThrobberVariant, ToolBatchRow, ToolBatchRowProps, ToolBodySlotProps, ToolDetails, ToolDetailsProps, ToolGlyph, ToolGlyphProps, ToolInput, ToolInputProps, ToolMedia, type ToolMediaItem, ToolMediaProps, ToolRow, ToolRowProps, ToolTiming, ToolTimingProps, Transcript, TranscriptAccounts, TranscriptActions, TranscriptActionsProvider, TranscriptActionsProviderProps, TranscriptFind, TranscriptFindKeyOptions, TranscriptFindOptions, TranscriptFindTarget, TranscriptOptions, TranscriptProps, TranscriptRail, type TranscriptRailProps, TranscriptRailProvider, type TranscriptRailProviderProps, TranscriptRenderers, TranscriptRenderersProvider, type TranscriptRenderersProviderProps, TranscriptRow, TranscriptRowProps, TranscriptRowSlot, TranscriptRowSlotProps, TranscriptRows, TranscriptRowsInput, TranscriptScrollInputs, TranscriptSearch, TranscriptSearchOptions, TranscriptSearchProps, TranscriptSearchState, TranscriptSelection, TranscriptSettling, TranscriptSource, TranscriptTurnMenu, TurnCommands, TurnCommandsOptions, TurnMenuActions, TurnMenuTarget, UserBashRow, UserBashRowProps, UserPromptAttachments, UserPromptAttachmentsProps, UserPromptRow, UserPromptRowProps, WORK_HOLD_MS, WORK_SHOW_MS, WorkerDetails, WorkerDetailsProps, __resetComposerScopesForTests, attachmentErrorText, attachmentLightboxItems, attachmentSrcOf, catalogFromProviders, claimComposerFocus, classifyInlineRef, colorForCategory, compactWindow, contextBreakdownShape, contextGauge, copyPromptLines, createTurnCommands, decodeDataUrlAsText, defaultAttachmentLabel, defaultAttachmentTileLabel, detectLanguage, dotStateFor, drawsImageGeneration, effectiveImageModel, fileBadgeName, fileBadgeSpec, findModel, findRefs, focusComposer, focusComposerWhenReady, formatBytes, groupKeyOf, hasComposerFor, hasFocusedComposer, hasInteractionBody, holdForceMountRows, imageCatalogRows, imageModelKey, imageRequestsOf, isAudioAttachment, isCaretAtEnd, isCaretAtStart, isFocusedComposer, isHiddenRow, isPdfAttachment, isRequired, isTextLike, isVideoAttachment, lineStateOf, lineupKeyOf, linkGlyph, mergeBadgeOrder, modelKey, modelLineup, modelNameOf, modelSearchScore, nextProfileId, numberRef, offCatalogRows, onComposerAttachment, onComposerDraft, onComposerFocus, onComposerInsert, onComposerMention, onComposerPrompt, optionTitle, orbState, orderComposerBadges, parseRefUrl, parseReferenceUrl, parseToolMedia, pastedTextFilename, pickRefOf, pickerGroups, plainTextToDocJson, providerAccountLabel, providerColor, providerHue, providerTint, pushComposerAttachment, pushComposerDraft, pushComposerInsert, pushComposerMention, pushComposerPrompt, readAttachment, refHref, refKey, referenceUrl, registerComposerScope, remarkReferences, remarkRefs, resolveChain, resolvePick, resourceErrorText, revealRow, rowKey, savedPaths, seedDefaults, shouldFoldPasteToAttachment, siteIconValue, suggestionExtension, takePendingComposerFocus, textAttachment, toolMediaSrcOf, turnViewsOf, unresolveChain, useAgentProfiles, useAllInteractions, useAttachmentIngest, useAttachmentNotices, useAttachmentRemoval, useAttachmentText, useBackgroundMount, useBadgeMenu, useCacheHints, useCaptureRunState, useChatHost, useChatLabels, useChipResolution, useClearDraftKnobs, useCommand, useCommitInfo, useComposerFor, useComposerHost, useComposerLabels, useComposerModelName, useComposerProviderLabel, useComposerSearch, useCycleAgent, useDraftKnobs, useDraftTarget, useFillViewportScrollback, useForceMountRows, useForcedRows, useFullOutput, useFullToolCall, useHasFocusedComposer, useHasSessionEvents, useHostResource, useHostSessions, useHostTurnMenu, useInteractionHead, useIsSessionHydrated, useJoinedRunProgress, useModelCatalog, useModelKnobs, useModelName, useModelPickerPrefs, useModelPickerPrefsStore, useNewChatsDefault, useNewSessionDefaults, useOptionalChatHost, useOptionalSessionStreamActions, usePeekRunSeq, usePeekSessionEvents, usePeekSessionRunning, usePendingInteractions, usePromptHistory, useProviderReadyPoll, useRailOutline, useReferenceMatches, useReferenceProviders, useReferenceView, useReferencedSession, useRememberedKnobs, useResolveChipNow, useRowIcons, useRunAccruedCost, useRunElapsedSec, useRunEstimate, useRunMeterValue, useRunOutputTokens, useRunProgress, useRunStartedAt, useSelectStops, useSelectTurn, useSelectTurnKeys, useSendPrompt, useSessionContextStatus, useSessionEdits, useSessionEvents, useSessionEventsSelector, useSessionFallbackModel, useSessionMeters, useSessionPage, useSessionRetry, useSessionRunning, useSessionStreamActions, useSessionStreams, useSessionSystemMd, useSessionTranscript, useSettledReveal, useShellBlockScope, useSiteIcon, useSkill, useStickToBottom, useSustainedWork, useTokenSession, useToolMedia, useTranscriptActions, useTranscriptFind, useTranscriptFindKey, useTranscriptOptions, useTranscriptRailStore, useTranscriptRenderers, useTranscriptRows, useTranscriptScroll, useTranscriptSearch, useTranscriptSelectionCopy, useTurnCommands, useTurnMenu, useWheelHoverPause, withPrimary, workShowDelay };
|
|
183
|
+
export { ATTACHMENT_NOTICE_MS, AUTO_FILL_PAGES, AgentPicker, AgentPickerDialog, AgentPickerDialogProps, AgentPickerProps, AgentProfile, AnsiSpans, type AnsiSpansProps, AnsiText, type AnsiTextProps, AnsweredQuestions, AnsweredQuestionsProps, ApprovalDock, ApprovalDockProps, ArchivedBanner, ArchivedBannerProps, AttachmentIcon, AttachmentIconProps, AttachmentLabelFn, AttachmentLabelParts, AttachmentNotices, AttachmentNoticesProps, AttachmentRefusedError, AttachmentRow, AttachmentRowProps, AttachmentTextState, AttachmentTiles, AttachmentTilesProps, AuthFailureCard, AuthFailureCardProps, BADGE_GLYPH, BadgeEffectContext, BadgeMenuBrowser, BadgeMenuComposer, BadgeMenuOpenAction, BadgeMenuProvider, BadgeMenuProviderProps, BadgeMenuSystem, CHIP_CARD_WIDTH, CODE_PANEL, COMMAND_DETAIL_LINE, CardMarkdown, CardMarkdownProps, Caret, CaretProps, ChatProvider, ChatProviderProps, ChipCard, ChipCardProps, ChipHover, ChipHoverProps, ChipOpener, CodeBlockSlotProps, CodemodeScript, type CodemodeScriptProps, CommandCard, CommandCardProps, CommandDetailRow, CommandDetailRowProps, CommandNoteRow, CommandNoteRowProps, CommandScope, CommandScopeContext, CommitCard, CommitCardProps, CompactSummaryRow, CompactSummaryRowProps, Composer, type ComposerAttachment, ComposerBadge, ComposerBadgeMenu, ComposerBadgeMenuItem, ComposerBadgeTone, ComposerBadges, ComposerBadgesProps, ComposerControls, ComposerControlsProps, ComposerDefaults, ComposerDock, ComposerDockProps, ComposerDraft, ComposerHandle, ComposerHostProvider, ComposerHostProviderProps, ComposerProps, ComposerResult, ComposerRetry, ComposerSearch, ComposerStatusPills, ComposerStatusPillsProps, ComposerSubmit, ComposerTarget, ContextBreakdown, type ContextBreakdownData, ContextBreakdownProps, ContextBreakdownShape, ContextCost, ContextGauge, ContextOrb, ContextOrbProps, ContextUsage, ConversationBadges, ConversationBadgesProps, Cursor, CvRow, CvRowProps, CycleAgentOptions, DEFAULT_BADGE_ORDER, DEFAULT_CONTEXT_BREAKDOWN_SHAPE, DEFAULT_TRANSCRIPT_OPTIONS, DEFAULT_TRANSCRIPT_RENDERERS, DaemonOrb, DaemonOrbButton, DaemonOrbButtonProps, DaemonOrbProps, DefaultInlineText, DefaultInlineTextProps, DefaultMarkdown, DefaultMarkdownProps, DefaultPrompt, DefaultPromptProps, DefaultSessionTitle, DefaultSessionTitleProps, DiffLines, DiffLinesProps, DockCard, DockCardProps, DockRow, DockRowProps, Dot, DotProps, DraftPickers, DraftPickersProps, DraftServer, DraftTarget, DraftTargetOptions, DraftTargetRequest, EFFORT_LEVELS, EditDiffBlock, EditDiffBlockProps, EffortLevel, EffortPickerDialog, EffortPickerDialogProps, ElicitationCard, ElicitationCardProps, EnvironmentSetupDetails, EnvironmentSetupDetailsProps, EnvironmentSetupRow, EnvironmentSetupRowProps, ErrorRow, ErrorRowProps, ExchangeFoldRow, ExchangeFoldRowProps, FILL_MIN_PROMPTS, FailedMark, FailedMarkProps, FailureRow, FailureRowProps, FileBadgeIcon, FileBadgeIconProps, FoldHeader, FoldHeaderProps, ForcedRows, GUTTER_STEP_PX, GroupGlyph, GroupGlyphProps, HostAgentPicker, HostAgentPickerProps, HostBadge, HostBadgeProps, HostComposer, HostComposerProps, HostContextOrb, HostContextOrbProps, HostInteractions, HostInteractionsProps, HostModelChainList, HostModelChainListProps, HostModelImages, HostModelOptionsPicker, HostModelOptionsPickerProps, HostModelPicker, HostModelPickerProps, HostPicker, HostPickerProps, HostStatusDot, HostStatusDotProps, HostTranscript, HostTranscriptProps, HostTurnMenuOptions, INLINE_CODE_CLASS, ImageGenerationBlock, ImageGenerationBlockProps, ImageModelList, ImageModelListProps, type ImageModelRow, InboxPanel, InboxPanelProps, InfoRow, InfoRowProps, InlineChipText, InlineChipTextProps, InlineCode, InlineCodeProps, InlineTextSlotProps, InteractionCard, InteractionCardProps, InteractionTool, InteractionToolBody, InteractionToolBodyProps, LazyRow, LazyRowProps, LineState, LinkBadge, LinkBadgeProps, LinkIcon, LinkIconProps, LiveOutput, type LiveOutputProps, LiveScriptsContext, LoadEarlierRow, LoadEarlierRowProps, LoadFullOutputButton, LoadFullOutputButtonProps, MAX_FILE_ATTACHMENT_BYTES, MAX_IMAGE_ATTACHMENT_BYTES, MAX_MATCHES, MAX_MEDIA_ATTACHMENT_BYTES, MAX_TEXT_PREVIEW_BYTES, Markdown, MarkdownContext, MarkdownContextValue, MarkdownDiagrams, MarkdownDiagramsProps, MarkdownImageProps, MarkdownLinkProps, MarkdownProps, MarkdownSlotProps, MarkdownViews, type MarkdownViewsProps, MentionItem, MermaidDiagram, type MermaidDiagramProps, MessageGroupRow, MessageGroupRowProps, type ModelCatalogRow, ModelCatalogState, ModelChainFooter, ModelChainFooterProps, ModelChainHeader, ModelChainHeaderProps, ModelChainImages, ModelChainList, ModelChainListProps, ModelChainPopover, ModelChainPopoverProps, ModelChainRow, ModelChainRowProps, ModelChainRows, ModelChainRowsProps, ModelChainTooltip, ModelChainTooltipProps, ModelChoice, ModelFlag, ModelFlagProps, ModelGroupHeader, ModelGroupHeaderProps, ModelKind, ModelMeta, ModelMetaProps, ModelOption, ModelOptionsPicker, ModelOptionsPickerProps, type ModelPickRef, ModelPicker, ModelPickerDialog, ModelPickerDialogProps, ModelPickerFrame, ModelPickerFrameProps, ModelPickerProps, ModelProviderChip, ModelProviderChipProps, ModelProviderPills, ModelProviderPillsProps, ModelReasoning, ModelReasoningProps, ModelVerdict, ModelVerdictProps, ModelWindow, ModelWindowProps, NO_COMPOSER_HINT, NestedToolCalls, NestedToolCallsProps, NewChatsDefault, NewSessionDefaults, NewSessionModelSource, NoticeRow, NoticeRowProps, OPTION_ICON, OpenBadgeMenu, OpenSessionContext, OrbState, OrchestratorBadge, OrchestratorBadgeProps, OrderedBadge, PASTE_FOLD_CHAR_THRESHOLD, PASTE_FOLD_LINE_THRESHOLD, ParsedRef, ParsedReferenceUrl, PdfPreview, PdfPreviewProps, PickerGroup, PickerPill, PickerPillProps, PlacePicker, PlacePickerHosts, PlacePickerProps, PlanBody, PlanBodyProps, PlanCard, PlanCardProps, ProjectMenu, ProjectMenuProps, PromptEcho, PromptEchoProps, PromptHistoryProvider, PromptHistoryProviderProps, PromptHistoryValue, PromptLines, PromptLinesProps, PromptSlotProps, ProseMarkdown, ProseMarkdownProps, QuestionField, QuestionFieldProps, QuestionForm, QuestionFormProps, ReadFileBlock, ReadFileBlockProps, RefChip, RefChipProps, RefMatch, ReferenceChip, ReferenceChipProps, ReferenceText, ReferenceTextProps, RepairedRow, RepairedRowProps, RetryPill, RetryPillProps, type RowActionItem, RowContext, RowFrame, RowFrameProps, RowIconsContext, RowPlace, RunEstimateChip, RunEstimateChipProps, RunEstimatesProvider, RunEstimatesProviderProps, RunReceiptInline, RunReceiptInlineProps, RunStatusChip, RunStatusChipProps, RunSummaryRow, RunSummaryRowProps, RunnableCodeBlock, type RunnableCodeBlockProps, SESSION_EVENT_DOT, ScopeToggle, ScopeToggleProps, ScrollPosition, SearchHighlightStyle, SecretInput, SecretInputProps, SelectCursor, SelectCursorProps, SelectTurnCommands, SelectTurnExit, SelectTurnHint, SelectTurnHintKeys, SelectTurnHintKeysProps, type SelectTurnHintProps, SelectTurnKeysOptions, SelectTurnProvider, SelectTurnProviderProps, SelectTurnState, SelectTurnValue, SendButton, SendButtonProps, SendPromptControls, SendPromptOptions, SendRoute, ServerScopeToggle, ServerScopeToggleProps, SessionActivityFilter, SessionArchiveFilter, SessionCard, SessionCardProps, SessionDotState, SessionEventGroupRow, SessionEventGroupRowProps, SessionEventRow, SessionEventRowProps, SessionFilterAction, SessionFilterAxis, SessionFilterExtra, SessionFilterMenu, SessionFilterMenuProps, SessionFilterPlacement, SessionGroupHeader, SessionGroupHeaderProps, SessionHostHeader, SessionHostHeaderProps, SessionList, SessionListProps, SessionListRow, SessionListRowProps, SessionMeters, SessionMetersTarget, SessionProjectAxis, SessionRow, SessionRowBadge, SessionRowList, SessionRowListProps, SessionRowProps, SessionRowState, SessionStreamsProvider, SessionStreamsProviderProps, SessionTitleSlotProps, SessionView, SetupChangedRow, SetupChangedRowProps, ShellBlockProvider, type ShellBlockProviderProps, type ShellBlockScope, ShowMoreRow, ShowMoreRowProps, SkillCard, SkillCardProps, SkillGroupCard, SkillGroupCardProps, SlotEntry, SpawnEndRow, SpawnEndRowProps, SpawnStartRow, SpawnStartRowProps, StatusDot, StatusDotProps, StatusOrb, StatusOrbProps, StickToBottomOptions, SubagentBlock, SubagentBlockProps, SuggestionKind, SuggestionPopup, SuggestionPopupProps, SuggestionSource, SuggestionState, THINKING_LEVELS, TRANSCRIPT_OPTION_KEYS, TRIGGER, TaskBatchRow, TaskBatchRowProps, TaskRow, TaskRowProps, TextPreview, TextPreviewProps, TextPreviewSlotProps, TextRow, TextRowProps, ThinkingBatchRow, ThinkingBatchRowProps, ThinkingLevel, ThinkingRow, ThinkingRowProps, Throbber, ThrobberProps, ThrobberVariant, ToolBatchRow, ToolBatchRowProps, ToolBodySlotProps, ToolDetails, ToolDetailsProps, ToolGlyph, ToolGlyphProps, ToolInput, ToolInputProps, ToolMedia, type ToolMediaItem, ToolMediaProps, ToolRow, ToolRowProps, ToolTiming, ToolTimingProps, Transcript, TranscriptAccounts, TranscriptActions, TranscriptActionsProvider, TranscriptActionsProviderProps, TranscriptFind, TranscriptFindKeyOptions, TranscriptFindOptions, TranscriptFindTarget, TranscriptOptions, TranscriptProps, TranscriptRail, type TranscriptRailProps, TranscriptRailProvider, type TranscriptRailProviderProps, TranscriptRenderers, TranscriptRenderersProvider, type TranscriptRenderersProviderProps, TranscriptRow, TranscriptRowProps, TranscriptRowSlot, TranscriptRowSlotProps, TranscriptRows, TranscriptRowsInput, TranscriptScrollInputs, TranscriptSearch, TranscriptSearchOptions, TranscriptSearchProps, TranscriptSearchState, TranscriptSelection, TranscriptSettling, TranscriptSource, TranscriptTurnMenu, TurnCommands, TurnCommandsOptions, TurnMenuActions, TurnMenuTarget, UserBashRow, UserBashRowProps, UserPromptAttachments, UserPromptAttachmentsProps, UserPromptRow, UserPromptRowProps, WORK_HOLD_MS, WORK_SHOW_MS, WorkerDetails, WorkerDetailsProps, __resetComposerScopesForTests, attachmentErrorText, attachmentLightboxItems, attachmentSrcOf, catalogFromProviders, claimComposerFocus, classifyInlineRef, colorForCategory, compactWindow, contextBreakdownShape, contextGauge, copyPromptLines, createTurnCommands, decodeDataUrlAsText, defaultAttachmentLabel, defaultAttachmentTileLabel, detectLanguage, dotStateFor, drawsImageGeneration, effectiveImageModel, fileBadgeName, fileBadgeSpec, findModel, findRefs, focusComposer, focusComposerWhenReady, formatBytes, groupKeyOf, hasComposerFor, hasFocusedComposer, hasInteractionBody, holdForceMountRows, imageCatalogRows, imageModelKey, imageRequestsOf, isAudioAttachment, isCaretAtEnd, isCaretAtStart, isFocusedComposer, isHiddenRow, isPdfAttachment, isRequired, isTextLike, isVideoAttachment, lineStateOf, lineupKeyOf, linkGlyph, mergeBadgeOrder, modelKey, modelLineup, modelNameOf, modelSearchScore, nextProfileId, numberRef, offCatalogRows, onComposerAttachment, onComposerDraft, onComposerFocus, onComposerInsert, onComposerMention, onComposerPrompt, optionTitle, orbState, orderComposerBadges, parseRefUrl, parseReferenceUrl, parseToolMedia, pastedTextFilename, pickRefOf, pickerGroups, plainTextToDocJson, providerAccountLabel, providerColor, providerHue, providerTint, pushComposerAttachment, pushComposerDraft, pushComposerInsert, pushComposerMention, pushComposerPrompt, readAttachment, refHref, refKey, referenceUrl, registerComposerScope, remarkReferences, remarkRefs, resolveChain, resolvePick, resourceErrorText, revealRow, rowKey, savedPaths, seedDefaults, shouldFoldPasteToAttachment, siteIconValue, suggestionExtension, takePendingComposerFocus, textAttachment, toolMediaSrcOf, turnViewsOf, unresolveChain, useAgentProfiles, useAllInteractions, useAttachmentIngest, useAttachmentNotices, useAttachmentRemoval, useAttachmentText, useBackgroundMount, useBadgeMenu, useCacheHints, useCaptureRunState, useChatHost, useChatLabels, useChipResolution, useClearDraftKnobs, useCommand, useCommitInfo, useComposerFor, useComposerHost, useComposerLabels, useComposerModelName, useComposerProviderLabel, useComposerSearch, useCycleAgent, useDraftKnobs, useDraftTarget, useFillViewportScrollback, useForceMountRows, useForcedRows, useFullOutput, useFullToolCall, useHasFocusedComposer, useHasSessionEvents, useHostResource, useHostSessions, useHostTurnMenu, useInteractionHead, useIsSessionHydrated, useJoinedRunProgress, useModelCatalog, useModelKnobs, useModelName, useModelPickerPrefs, useModelPickerPrefsStore, useNewChatsDefault, useNewSessionDefaults, useOptionalChatHost, useOptionalSessionStreamActions, usePeekRunSeq, usePeekSessionEvents, usePeekSessionRunning, usePendingInteractions, usePromptHistory, useProviderReadyPoll, useRailOutline, useReferenceMatches, useReferenceProviders, useReferenceView, useReferencedSession, useRememberedKnobs, useResolveChipNow, useRowIcons, useRunAccruedCost, useRunElapsedSec, useRunEstimate, useRunMeterValue, useRunOutputTokens, useRunProgress, useRunStartedAt, useSelectStops, useSelectTurn, useSelectTurnKeys, useSendPrompt, useSessionContextStatus, useSessionEdits, useSessionEvents, useSessionEventsSelector, useSessionFallbackModel, useSessionMeters, useSessionPage, useSessionRetry, useSessionRunning, useSessionStreamActions, useSessionStreams, useSessionSystemMd, useSessionTranscript, useSettledReveal, useShellBlockScope, useSiteIcon, useSkill, useStickToBottom, useSustainedWork, useTokenSession, useToolMedia, useTranscriptActions, useTranscriptFind, useTranscriptFindKey, useTranscriptOptions, useTranscriptRailStore, useTranscriptRenderers, useTranscriptRows, useTranscriptScroll, useTranscriptSearch, useTranscriptSelectionCopy, useTurnCommands, useTurnMenu, useWheelHoverPause, withPrimary, workShowDelay };
|
package/dist/chat/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { TranscriptRenderersProvider } from "./transcript/renderer-slots.js";
|
|
2
|
+
import { DiffLines } from "./transcript/DiffLines.js";
|
|
1
3
|
import { ChatProvider, useChatHost, useHostSessions, useOptionalChatHost } from "./ChatProvider.js";
|
|
2
4
|
import { ComposerHostProvider, useComposerHost, useComposerLabels } from "./composer/ComposerHostProvider.js";
|
|
3
5
|
import { TranscriptActionsProvider, attachmentSrcOf, toolMediaSrcOf, useModelName, useTranscriptActions } from "./transcript/actions.js";
|
|
@@ -31,10 +33,8 @@ import { LiveOutput } from "./transcript/LiveOutput.js";
|
|
|
31
33
|
import { CodemodeScript } from "./transcript/CodemodeScript.js";
|
|
32
34
|
import { CODE_PANEL, LoadFullOutputButton, ReadFileBlock, ToolGlyph, ToolInput, ToolTiming, useFullOutput, useFullToolCall } from "./transcript/tool-parts.js";
|
|
33
35
|
import { TextRow, ThinkingBatchRow, ThinkingRow } from "./transcript/prose.js";
|
|
34
|
-
import { DiffLines } from "./transcript/DiffLines.js";
|
|
35
36
|
import { EditDiffBlock } from "./transcript/EditDiffBlock.js";
|
|
36
37
|
import { ToolMedia, useToolMedia } from "./transcript/tool-media.js";
|
|
37
|
-
import { TranscriptRenderersProvider } from "./transcript/renderer-slots.js";
|
|
38
38
|
import { DEFAULT_TRANSCRIPT_RENDERERS, DefaultInlineText, DefaultMarkdown, DefaultPrompt, DefaultSessionTitle, defaultAttachmentLabel, useTranscriptRenderers } from "./transcript/renderers.js";
|
|
39
39
|
import { AttachmentIcon, UserPromptAttachments, UserPromptRow } from "./transcript/prompt.js";
|
|
40
40
|
import { HostTranscript } from "./HostTranscript.js";
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { toast } from "../../app/toast.js";
|
|
1
2
|
import { useLightbox } from "../../components/Lightbox.js";
|
|
3
|
+
import { Tooltip } from "../../components/Tooltip.js";
|
|
2
4
|
import { ExtensionSlot } from "../../extensions/ExtensionSlot.js";
|
|
3
5
|
import { basename } from "../../path.js";
|
|
6
|
+
import { DraftPeopleStack } from "../../session/DraftPeopleStack.js";
|
|
4
7
|
import { AttachmentNotices, attachmentLightboxItems } from "../composer/attachments.js";
|
|
5
8
|
import { AttachmentRow } from "../composer/AttachmentTiles.js";
|
|
6
9
|
import { useComposerHost, useComposerLabels } from "../composer/ComposerHostProvider.js";
|
|
@@ -18,6 +21,7 @@ import { createPopoverGate } from "./mention-popover.js";
|
|
|
18
21
|
import { useComposerBus } from "./use-composer-bus.js";
|
|
19
22
|
import { useComposerEditor } from "./use-composer-editor.js";
|
|
20
23
|
import { useComposerSources } from "./use-composer-sources.js";
|
|
24
|
+
import { useComposerCollab, useComposerCollabBinding } from "./use-draft-collab.js";
|
|
21
25
|
import { serializeDraftText, useDraftMirror } from "./use-draft-mirror.js";
|
|
22
26
|
import { useExtensionComposerEffects } from "./use-extension-composer.js";
|
|
23
27
|
import { useGhostLifecycle, useSharedGhost } from "./use-ghost-lifecycle.js";
|
|
@@ -53,6 +57,8 @@ const DRAFT_HAS_TEXT = "\0draft";
|
|
|
53
57
|
function RichComposer({ disabled, folderPath, fileRoot, activeSessionId = null, hostId = null, running = false, messageDelivery = "queue", onStop, onSend, leadingActions, trailingActions, badges, searchStatus = null, onSearchQueryChange, onSearchNavigate, searchOverlayOpen = false, remoteSearchApply = null, attachmentsEnabled = true, inlineAutocomplete = false, markdown = false, promptSuggestions = false, scopeKey = null, newChatDraftKey, commandArgs, siteIcons, attachmentLabel, textPreview, footer, className, style }) {
|
|
54
58
|
const { completions, autocomplete } = useComposerHost();
|
|
55
59
|
const labels = useComposerLabels();
|
|
60
|
+
const collab = useComposerCollab(activeSessionId);
|
|
61
|
+
const guest = collab.guest;
|
|
56
62
|
const history = usePromptHistory();
|
|
57
63
|
const [historyStatus, setHistoryStatus] = useState(null);
|
|
58
64
|
const editorRef = useRef(null);
|
|
@@ -74,9 +80,9 @@ function RichComposer({ disabled, folderPath, fileRoot, activeSessionId = null,
|
|
|
74
80
|
const modeRef = useRef("normal");
|
|
75
81
|
const ghostGateChangedRef = useRef(() => {});
|
|
76
82
|
const ghostRef = useRef(null);
|
|
77
|
-
const inlineAutocompleteEnabled = !disabled && inlineAutocomplete;
|
|
83
|
+
const inlineAutocompleteEnabled = !disabled && inlineAutocomplete && !guest;
|
|
78
84
|
const historyRecallRef = useRef(false);
|
|
79
|
-
const promptGhost = usePromptGhost(activeSessionId, running, !disabled && promptSuggestions, () => ghostGateChangedRef.current());
|
|
85
|
+
const promptGhost = usePromptGhost(activeSessionId, running, !disabled && promptSuggestions && !guest, () => ghostGateChangedRef.current());
|
|
80
86
|
const applyGhost = (next, prompt) => {
|
|
81
87
|
ghostRef.current = next;
|
|
82
88
|
promptGhost.setPainted(next ? prompt ?? null : null);
|
|
@@ -126,11 +132,15 @@ function RichComposer({ disabled, folderPath, fileRoot, activeSessionId = null,
|
|
|
126
132
|
getCatalog: () => sources.skills(),
|
|
127
133
|
getGroups: () => sources.skillGroups()
|
|
128
134
|
}), []);
|
|
135
|
+
const [heldProviders, setHeldProviders] = useState(extensionCompletionProviders);
|
|
136
|
+
useEffect(() => {
|
|
137
|
+
if (!collab.live) setHeldProviders(extensionCompletionProviders);
|
|
138
|
+
}, [collab.live, extensionCompletionProviders]);
|
|
129
139
|
const editor = useComposerEditor({
|
|
130
140
|
disabled,
|
|
131
|
-
markdown,
|
|
141
|
+
markdown: markdown && !collab.plain,
|
|
132
142
|
folderPath,
|
|
133
|
-
extensionCompletionProviders,
|
|
143
|
+
extensionCompletionProviders: collab.live ? heldProviders : extensionCompletionProviders,
|
|
134
144
|
sources,
|
|
135
145
|
skillsProvider,
|
|
136
146
|
mentionPopovers,
|
|
@@ -140,11 +150,12 @@ function RichComposer({ disabled, folderPath, fileRoot, activeSessionId = null,
|
|
|
140
150
|
ghostRef,
|
|
141
151
|
historyRecallRef,
|
|
142
152
|
ghostGateChangedRef,
|
|
143
|
-
attachmentsEnabled,
|
|
153
|
+
attachmentsEnabled: attachmentsEnabled && !guest,
|
|
144
154
|
history,
|
|
145
155
|
activeSessionId,
|
|
146
156
|
hostId,
|
|
147
157
|
send: (alternate) => send(alternate),
|
|
158
|
+
collab: collab.role,
|
|
148
159
|
onSearchNavigate,
|
|
149
160
|
applyMode,
|
|
150
161
|
applyGhost,
|
|
@@ -155,6 +166,7 @@ function RichComposer({ disabled, folderPath, fileRoot, activeSessionId = null,
|
|
|
155
166
|
useEffect(() => {
|
|
156
167
|
editorRef.current = editor;
|
|
157
168
|
}, [editor]);
|
|
169
|
+
useComposerCollabBinding(editor, collab);
|
|
158
170
|
const focusOnCreate = useRef(false);
|
|
159
171
|
useEffect(() => {
|
|
160
172
|
if (!editor) return;
|
|
@@ -228,7 +240,7 @@ function RichComposer({ disabled, folderPath, fileRoot, activeSessionId = null,
|
|
|
228
240
|
}
|
|
229
241
|
}) ?? "";
|
|
230
242
|
const hasContent = editorPlainText.trim().length > 0 || attachments.length > 0;
|
|
231
|
-
const canSend = !disabled && !submitting && hasContent && composerMode !== "search";
|
|
243
|
+
const canSend = !disabled && !submitting && hasContent && composerMode !== "search" && !guest;
|
|
232
244
|
const shellMode = !disabled && composerMode === "shell";
|
|
233
245
|
const searchMode = !disabled && composerMode === "search";
|
|
234
246
|
useEffect(() => {
|
|
@@ -257,10 +269,31 @@ function RichComposer({ disabled, folderPath, fileRoot, activeSessionId = null,
|
|
|
257
269
|
...newChatDraftKey !== void 0 ? { newChatDraftKey } : {},
|
|
258
270
|
staged,
|
|
259
271
|
applyMode,
|
|
260
|
-
resetHistoryStatus: () => setHistoryStatus(null)
|
|
272
|
+
resetHistoryStatus: () => setHistoryStatus(null),
|
|
273
|
+
collab: collab.role
|
|
261
274
|
});
|
|
275
|
+
const wasGuest = useRef(false);
|
|
276
|
+
useLayoutEffect(() => {
|
|
277
|
+
if (guest === wasGuest.current) return;
|
|
278
|
+
wasGuest.current = guest;
|
|
279
|
+
if (guest) mirror.suspendForGuest();
|
|
280
|
+
else mirror.resumeFromGuest();
|
|
281
|
+
}, [guest, mirror]);
|
|
282
|
+
const ownerLive = collab.live && !guest;
|
|
283
|
+
const wasOwnerLive = useRef(false);
|
|
284
|
+
useEffect(() => {
|
|
285
|
+
if (wasOwnerLive.current && !ownerLive) mirror.publishNow();
|
|
286
|
+
wasOwnerLive.current = ownerLive;
|
|
287
|
+
}, [ownerLive, mirror]);
|
|
288
|
+
useEffect(() => {
|
|
289
|
+
if (guest && collab.open) liveEditor()?.commands.focus("end");
|
|
290
|
+
}, [guest && collab.open, collab.ownerId]);
|
|
291
|
+
const ended = collab.ended;
|
|
292
|
+
useEffect(() => {
|
|
293
|
+
if (ended?.closed === "refused") toast.error(labels.draftJoinFailed, ended.error ? { description: ended.error } : void 0);
|
|
294
|
+
}, [ended, labels.draftJoinFailed]);
|
|
262
295
|
function send(alternate = false) {
|
|
263
|
-
if (!editor) return;
|
|
296
|
+
if (!editor || collab.role() === "guest") return;
|
|
264
297
|
const raw = editorJsonToMarkdown(editor.getJSON(), { blockGap: "\n" }).trim();
|
|
265
298
|
const text = composeSubmitText(modeRef.current, raw);
|
|
266
299
|
if (text === null || !text && attachments.length === 0 || disabled || submittingRef.current) return;
|
|
@@ -450,8 +483,9 @@ function RichComposer({ disabled, folderPath, fileRoot, activeSessionId = null,
|
|
|
450
483
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
451
484
|
className: "flex items-center gap-1 flex-1 min-w-0",
|
|
452
485
|
children: [
|
|
453
|
-
/* @__PURE__ */ jsx(PlusButton, { onClick: onPlusClick }),
|
|
454
|
-
leadingActions,
|
|
486
|
+
!guest && /* @__PURE__ */ jsx(PlusButton, { onClick: onPlusClick }),
|
|
487
|
+
!guest && leadingActions,
|
|
488
|
+
/* @__PURE__ */ jsx(DraftPeopleStack, { sessionId: activeSessionId }),
|
|
455
489
|
shellMode && /* @__PURE__ */ jsxs("span", {
|
|
456
490
|
className: "text-zg-meta inline-flex items-center gap-1 h-5 px-1.5 rounded-full leading-none select-none",
|
|
457
491
|
style: modeChipTone("var(--zg-accent)"),
|
|
@@ -476,7 +510,20 @@ function RichComposer({ disabled, folderPath, fileRoot, activeSessionId = null,
|
|
|
476
510
|
]
|
|
477
511
|
}), /* @__PURE__ */ jsxs("div", {
|
|
478
512
|
className: "flex items-center gap-2 shrink-0 pr-1",
|
|
479
|
-
children: [trailingActions, /* @__PURE__ */ jsx(
|
|
513
|
+
children: [trailingActions, guest && !running ? /* @__PURE__ */ jsx(Tooltip, {
|
|
514
|
+
label: labels.draftSendOwner(collab.ownerName ?? ""),
|
|
515
|
+
side: "top",
|
|
516
|
+
align: "end",
|
|
517
|
+
className: "cursor-not-allowed",
|
|
518
|
+
children: /* @__PURE__ */ jsx(SendStopButton, {
|
|
519
|
+
running: false,
|
|
520
|
+
canSend: false,
|
|
521
|
+
onSend: send,
|
|
522
|
+
onStop,
|
|
523
|
+
disabledReason: labels.draftSendOwner(collab.ownerName ?? ""),
|
|
524
|
+
className: "pointer-events-none"
|
|
525
|
+
})
|
|
526
|
+
}) : /* @__PURE__ */ jsx(SendStopButton, {
|
|
480
527
|
running: running && Boolean(onStop),
|
|
481
528
|
canSend,
|
|
482
529
|
onSend: send,
|
|
@@ -27,6 +27,10 @@ export interface SendStopButtonProps {
|
|
|
27
27
|
onSend: () => void;
|
|
28
28
|
/** Stops the run. */
|
|
29
29
|
onStop?: () => void;
|
|
30
|
+
/** Why the draft can not be sent here (someone else's draft): the button's name while it is disabled. */
|
|
31
|
+
disabledReason?: string;
|
|
32
|
+
/** Extra classes on the button. */
|
|
33
|
+
className?: string;
|
|
30
34
|
}
|
|
31
35
|
/**
|
|
32
36
|
* Unified Send / Stop control — one button element that never unmounts, so
|
|
@@ -47,4 +51,4 @@ export interface SendStopButtonProps {
|
|
|
47
51
|
*
|
|
48
52
|
* @param props - The run and draft state, and the handlers.
|
|
49
53
|
*/
|
|
50
|
-
export declare function SendStopButton({ running, canSend, onSend, onStop }: SendStopButtonProps): import("react").JSX.Element;
|
|
54
|
+
export declare function SendStopButton({ running, canSend, onSend, onStop, disabledReason, className }: SendStopButtonProps): import("react").JSX.Element;
|
|
@@ -52,7 +52,7 @@ const MARK_SPEED = 1.3;
|
|
|
52
52
|
*
|
|
53
53
|
* @param props - The run and draft state, and the handlers.
|
|
54
54
|
*/
|
|
55
|
-
function SendStopButton({ running, canSend, onSend, onStop }) {
|
|
55
|
+
function SendStopButton({ running, canSend, onSend, onStop, disabledReason, className = "" }) {
|
|
56
56
|
const labels = useComposerLabels();
|
|
57
57
|
return /* @__PURE__ */ jsxs("button", {
|
|
58
58
|
type: "button",
|
|
@@ -63,9 +63,9 @@ function SendStopButton({ running, canSend, onSend, onStop }) {
|
|
|
63
63
|
if (running) onStop?.();
|
|
64
64
|
else onSend();
|
|
65
65
|
},
|
|
66
|
-
"aria-label": running ? labels.stop : labels.sendMessage,
|
|
67
|
-
title: running ? labels.stopHint : labels.sendHint,
|
|
68
|
-
className:
|
|
66
|
+
"aria-label": running ? labels.stop : !canSend && disabledReason || labels.sendMessage,
|
|
67
|
+
title: running ? labels.stopHint : disabledReason ? void 0 : labels.sendHint,
|
|
68
|
+
className: `${className} zg-sendstop relative inline-flex items-center justify-center w-8 h-8 rounded-full border-0 cursor-pointer disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--zg-accent)]`.trimStart(),
|
|
69
69
|
children: [
|
|
70
70
|
/* @__PURE__ */ jsx("span", {
|
|
71
71
|
className: "zg-sendstop-layer zg-sendstop-send",
|
|
@@ -57,7 +57,7 @@ function composerEditorProps(latest, name) {
|
|
|
57
57
|
return html.replace(/<\/?([bi]|strong|em|[su]|strike|del|code|mark)\b[^>]*>/gi, "").replace(/\sstyle="[^"]*"/gi, "");
|
|
58
58
|
},
|
|
59
59
|
handleKeyDown(view, event) {
|
|
60
|
-
if (!event.metaKey && !event.ctrlKey && !event.altKey) {
|
|
60
|
+
if (!event.metaKey && !event.ctrlKey && !event.altKey && !latest.current.collab?.()) {
|
|
61
61
|
const bufferEmpty = view.state.doc.textContent.length === 0 && view.state.doc.content.size <= 2;
|
|
62
62
|
const entered = modeForTypedChar(event.key, modeRef.current, bufferEmpty);
|
|
63
63
|
if (entered) {
|
|
@@ -124,7 +124,7 @@ function composerEditorProps(latest, name) {
|
|
|
124
124
|
}
|
|
125
125
|
if ((event.key === "ArrowUp" || event.key === "ArrowDown") && !event.shiftKey && !event.metaKey && !event.ctrlKey && !event.altKey && !mentionPopovers.open) {
|
|
126
126
|
const sessionId = latest.current.activeSessionId;
|
|
127
|
-
if (!sessionId) return false;
|
|
127
|
+
if (!sessionId || latest.current.collab?.()) return false;
|
|
128
128
|
const direction = event.key === "ArrowUp" ? "up" : "down";
|
|
129
129
|
if (!(direction === "up" ? isCaretAtStart(view.state) : isCaretAtEnd(view.state))) return false;
|
|
130
130
|
const serialized = editorRef.current ? draftWireText(editorRef.current.getJSON()) : "";
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The editor side of a collaborative draft (docs/MULTIPLAYER.md, Collaborative
|
|
3
|
+
* drafts): ProseMirror's collab plugin on the composer's editor, bound to a
|
|
4
|
+
* draft room's client (`zidane-ui/session/headless`, `createDraftRoomClient`).
|
|
5
|
+
*
|
|
6
|
+
* - The room's state becomes the document: the snapshot (or the stored text it
|
|
7
|
+
* stands for), then its steps. The owner's first room keeps what they typed
|
|
8
|
+
* since their stored draft as their own first step. A state that comes again
|
|
9
|
+
* (a resync) keeps what this editor has unsent: rebased onto it, sent next.
|
|
10
|
+
* - Local steps go out batched ({@link DRAFT_FLUSH_MS}), one push at a time;
|
|
11
|
+
* local typing never waits on the network.
|
|
12
|
+
* - Steps from the room are applied with `receiveTransaction`, which rebases
|
|
13
|
+
* the unsent ones. Never during an IME composition: they wait for its end.
|
|
14
|
+
* - A snapshot goes out once the draft rests ({@link DRAFT_SNAPSHOT_IDLE_MS})
|
|
15
|
+
* or every {@link DRAFT_SNAPSHOT_STEPS} steps, from an editor with nothing
|
|
16
|
+
* unsent: the owner's stored draft follows it.
|
|
17
|
+
*
|
|
18
|
+
* React-free: it drives any {@link CollabEditor} (the Tiptap editor through
|
|
19
|
+
* {@link tiptapCollabEditor}, a bare `EditorState` in a test).
|
|
20
|
+
*/
|
|
21
|
+
import { DraftRoomClient } from "../../session/headless/draft-room.js";
|
|
22
|
+
import { EditorState, Plugin, Transaction } from "@tiptap/pm/state";
|
|
23
|
+
import { Node } from "@tiptap/pm/model";
|
|
24
|
+
import { Editor } from "@tiptap/core";
|
|
25
|
+
/** Local steps wait this long, batched, before they go out. */
|
|
26
|
+
export declare const DRAFT_FLUSH_MS = 30;
|
|
27
|
+
/** A snapshot goes out once the draft rests this long. */
|
|
28
|
+
export declare const DRAFT_SNAPSHOT_IDLE_MS = 1500;
|
|
29
|
+
/** A snapshot goes out after this many steps, rest or not. */
|
|
30
|
+
export declare const DRAFT_SNAPSHOT_STEPS = 100;
|
|
31
|
+
/** The meta key of a transaction the room made (its state, its steps): not the user's typing. */
|
|
32
|
+
export declare const DRAFT_REMOTE_META = "zgDraftRemote";
|
|
33
|
+
/** What the binding needs of an editor. */
|
|
34
|
+
export interface CollabEditor {
|
|
35
|
+
/** The editor's state now. */
|
|
36
|
+
state: () => EditorState;
|
|
37
|
+
dispatch: (tr: Transaction) => void;
|
|
38
|
+
/** Replace the editor's plugins (a new state configuration, no transaction). */
|
|
39
|
+
reconfigure: (plugins: (current: readonly Plugin[]) => Plugin[]) => void;
|
|
40
|
+
/** An IME composition is going on. */
|
|
41
|
+
composing: () => boolean;
|
|
42
|
+
/** Calls `listener` after each transaction the editor applied. Returns the unsubscribe. */
|
|
43
|
+
onTransaction: (listener: (tr: Transaction) => void) => () => void;
|
|
44
|
+
/** Calls `listener` when an IME composition ends. Returns the unsubscribe. */
|
|
45
|
+
onCompositionEnd: (listener: () => void) => () => void;
|
|
46
|
+
/** The editor was destroyed. */
|
|
47
|
+
destroyed: () => boolean;
|
|
48
|
+
}
|
|
49
|
+
/** Timers the binding waits on. */
|
|
50
|
+
export interface CollabTimers {
|
|
51
|
+
setTimeout: (run: () => void, ms: number) => unknown;
|
|
52
|
+
clearTimeout: (timer: unknown) => void;
|
|
53
|
+
}
|
|
54
|
+
/** How a binding reads and writes the draft's text. */
|
|
55
|
+
export interface DraftCollabOptions {
|
|
56
|
+
/** This editor's client id in the room: new for each editor. */
|
|
57
|
+
clientId: string;
|
|
58
|
+
/** `owner`: the draft is this window's person's own. */
|
|
59
|
+
role: 'owner' | 'guest';
|
|
60
|
+
/** The document (JSON) a stored draft's text stands for, in this editor's schema. */
|
|
61
|
+
docFromText: (text: string) => unknown;
|
|
62
|
+
/** The text of a document, as the stored draft keeps it. */
|
|
63
|
+
textOf: (doc: Node) => string;
|
|
64
|
+
/** The room's state or steps could not be applied here: join again from the start. */
|
|
65
|
+
onDiverged?: (error: unknown) => void;
|
|
66
|
+
/** Whether the editor's schema is the one a room uses (plain). Absent: any. */
|
|
67
|
+
accepts?: () => boolean;
|
|
68
|
+
/** A room opened on an editor whose schema is not a room's: build one that is, and bind that. */
|
|
69
|
+
onWrongSchema?: () => void;
|
|
70
|
+
/** The clock (a test). Default: real timers. */
|
|
71
|
+
timers?: CollabTimers;
|
|
72
|
+
}
|
|
73
|
+
/** A live binding. */
|
|
74
|
+
export interface DraftCollabBinding {
|
|
75
|
+
/** Stops listening to the editor, keeping the room (the room client lets it go: `detach`, `close`, a new editor). */
|
|
76
|
+
stop: () => void;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The composer's Tiptap editor as a {@link CollabEditor}.
|
|
80
|
+
*
|
|
81
|
+
* @param editor - The editor.
|
|
82
|
+
*/
|
|
83
|
+
export declare function tiptapCollabEditor(editor: Editor): CollabEditor;
|
|
84
|
+
/**
|
|
85
|
+
* Binds `editor` to `room`: from now on the editor holds the room's draft.
|
|
86
|
+
*
|
|
87
|
+
* @param editor - The editor.
|
|
88
|
+
* @param room - The room's client.
|
|
89
|
+
* @param options - The client id, the role, and how text maps to a document.
|
|
90
|
+
*/
|
|
91
|
+
export declare function bindDraftCollab(editor: CollabEditor, room: DraftRoomClient, options: DraftCollabOptions): DraftCollabBinding;
|