zidane-ui 9.2.2 → 9.3.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/browser-keybindings-host.js +3 -1
- package/dist/adapters/live.d.ts +6 -0
- package/dist/adapters/live.js +16 -8
- package/dist/adapters/server-composer-host.js +22 -9
- package/dist/adapters/server-host.js +143 -18
- package/dist/adapters/server-media.d.ts +9 -1
- package/dist/adapters/server-media.js +14 -1
- package/dist/adapters/server-settings-host.js +30 -3
- package/dist/adapters/server-settings-sections.js +23 -1
- package/dist/adapters/server-sidebar-host.d.ts +3 -1
- package/dist/adapters/server-sidebar-host.js +10 -1
- package/dist/app/ModalProvider.js +1 -1
- package/dist/approvals/ApprovalShell.js +1 -1
- package/dist/chat/DaemonOrb.d.ts +29 -1
- package/dist/chat/DaemonOrb.js +25 -12
- package/dist/chat/HostTranscript.d.ts +0 -12
- package/dist/chat/HostTranscript.js +6 -1
- package/dist/chat/SessionStreamsProvider.d.ts +8 -0
- package/dist/chat/SessionStreamsProvider.js +11 -2
- package/dist/chat/StatusDot.js +8 -2
- package/dist/chat/Transcript.d.ts +20 -11
- package/dist/chat/Transcript.js +335 -162
- package/dist/chat/composer/ComposerEditor.js +1 -1
- package/dist/chat/headless/host.d.ts +43 -7
- package/dist/chat/headless/index.d.ts +8 -6
- package/dist/chat/headless/index.js +11 -9
- package/dist/chat/headless/labels.d.ts +30 -0
- package/dist/chat/headless/labels.js +29 -0
- package/dist/chat/headless/markdown-chunks.d.ts +2 -1
- package/dist/chat/headless/markdown-chunks.js +12 -20
- package/dist/chat/headless/markdown-scan.d.ts +66 -0
- package/dist/chat/headless/markdown-scan.js +124 -0
- package/dist/chat/headless/markdown-stream.d.ts +64 -0
- package/dist/chat/headless/markdown-stream.js +143 -0
- package/dist/chat/headless/output-pager.d.ts +68 -0
- package/dist/chat/headless/output-pager.js +113 -0
- package/dist/chat/headless/session-list.d.ts +20 -0
- package/dist/chat/headless/sidebar/activity.d.ts +14 -0
- package/dist/chat/headless/sidebar/activity.js +32 -0
- package/dist/chat/headless/sidebar/directory.d.ts +17 -2
- package/dist/chat/headless/sidebar/directory.js +50 -54
- package/dist/chat/headless/sidebar/environment.d.ts +5 -2
- package/dist/chat/headless/sidebar/environment.js +11 -2
- package/dist/chat/headless/sidebar/host.d.ts +15 -0
- package/dist/chat/headless/sidebar/inbox.d.ts +12 -3
- package/dist/chat/headless/sidebar/inbox.js +18 -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 +38 -2
- package/dist/chat/headless/sidebar/labels.js +16 -0
- package/dist/chat/headless/sidebar/prewarm.d.ts +68 -0
- package/dist/chat/headless/sidebar/prewarm.js +114 -0
- package/dist/chat/headless/streams/actions.d.ts +2 -0
- package/dist/chat/headless/streams/actions.js +1 -0
- package/dist/chat/headless/streams/event-bytes.d.ts +6 -0
- package/dist/chat/headless/streams/event-bytes.js +34 -0
- package/dist/chat/headless/streams/live-events.d.ts +25 -1
- package/dist/chat/headless/streams/live-events.js +53 -2
- package/dist/chat/headless/streams/selectors.d.ts +3 -0
- package/dist/chat/headless/streams/selectors.js +8 -1
- package/dist/chat/headless/streams/session-streams.d.ts +15 -3
- package/dist/chat/headless/streams/session-streams.js +31 -3
- package/dist/chat/headless/streams/store.d.ts +24 -1
- package/dist/chat/headless/streams/store.js +51 -26
- package/dist/chat/headless/streams/transcript-map.d.ts +57 -0
- package/dist/chat/headless/streams/transcript-map.js +88 -0
- package/dist/chat/headless/streams/transcript.d.ts +4 -2
- package/dist/chat/headless/streams/transcript.js +19 -7
- package/dist/chat/headless/transcript/batch.js +5 -1
- package/dist/chat/headless/transcript/blob-media.d.ts +15 -0
- package/dist/chat/headless/transcript/blob-media.js +23 -0
- package/dist/chat/headless/transcript/collapse.d.ts +10 -0
- package/dist/chat/headless/transcript/collapse.js +32 -6
- package/dist/chat/headless/transcript/derive.d.ts +98 -0
- package/dist/chat/headless/transcript/derive.js +89 -0
- package/dist/chat/headless/transcript/exchange-media.d.ts +3 -1
- package/dist/chat/headless/transcript/exchange-media.js +8 -5
- package/dist/chat/headless/transcript/fold-actions.d.ts +8 -3
- package/dist/chat/headless/transcript/fold-actions.js +16 -0
- package/dist/chat/headless/transcript/fold-attachments.d.ts +2 -0
- package/dist/chat/headless/transcript/fold-attachments.js +3 -2
- package/dist/chat/headless/transcript/fold.d.ts +4 -2
- package/dist/chat/headless/transcript/fold.js +37 -7
- package/dist/chat/headless/transcript/incremental.d.ts +53 -0
- package/dist/chat/headless/transcript/incremental.js +181 -0
- package/dist/chat/headless/transcript/index.d.ts +2 -1
- package/dist/chat/headless/transcript/index.js +2 -1
- package/dist/chat/headless/transcript/nesting.js +2 -1
- package/dist/chat/headless/transcript/rail.d.ts +142 -0
- package/dist/chat/headless/transcript/rail.js +290 -0
- package/dist/chat/headless/transcript/rows.d.ts +11 -1
- package/dist/chat/headless/transcript/run-failures.d.ts +4 -0
- package/dist/chat/headless/transcript/run-failures.js +31 -2
- package/dist/chat/headless/transcript/seams.d.ts +78 -0
- package/dist/chat/headless/transcript/seams.js +116 -0
- package/dist/chat/headless/transcript/tool-media.d.ts +6 -7
- package/dist/chat/headless/transcript/tool-media.js +27 -9
- package/dist/chat/headless/transcript-labels.d.ts +1 -0
- package/dist/chat/headless/turn-labels.d.ts +1 -0
- package/dist/chat/headless/turn-labels.js +2 -1
- package/dist/chat/index.d.ts +10 -8
- package/dist/chat/index.js +9 -7
- package/dist/chat/interactions/ElicitationCard.js +1 -1
- package/dist/chat/interactions/InteractionCard.js +1 -1
- package/dist/chat/interactions/PlanCard.js +3 -3
- package/dist/chat/interactions/QuestionField.js +4 -4
- package/dist/chat/interactions/QuestionForm.js +3 -3
- package/dist/chat/interactions/SecretInput.js +1 -1
- package/dist/chat/sidebar/ProjectIcon.d.ts +1 -1
- package/dist/chat/sidebar/ProjectIcon.js +1 -1
- package/dist/chat/sidebar/RowChips.d.ts +3 -2
- package/dist/chat/sidebar/RowChips.js +6 -3
- package/dist/chat/sidebar/SessionSidebar.js +13 -14
- package/dist/chat/sidebar/SidebarFooter.d.ts +8 -5
- package/dist/chat/sidebar/SidebarFooter.js +6 -6
- package/dist/chat/sidebar/SidebarFrame.d.ts +2 -0
- package/dist/chat/sidebar/SidebarFrame.js +5 -2
- package/dist/chat/sidebar/SidebarSessionRow.d.ts +3 -1
- package/dist/chat/sidebar/SidebarSessionRow.js +3 -1
- package/dist/chat/sidebar/SpacesSection.d.ts +20 -1
- package/dist/chat/sidebar/SpacesSection.js +34 -13
- package/dist/chat/sidebar/index.d.ts +2 -2
- package/dist/chat/sidebar/session-menu.d.ts +11 -2
- package/dist/chat/sidebar/session-menu.js +50 -5
- package/dist/chat/sidebar/sidebar-live.js +1 -1
- package/dist/chat/sidebar/useInboxRows.js +43 -2
- package/dist/chat/sidebar/useInboxTriage.js +19 -14
- package/dist/chat/testing/contract.d.ts +5 -3
- package/dist/chat/testing/contract.js +66 -1
- package/dist/chat/testing/fixture-sidebar-host.d.ts +7 -1
- package/dist/chat/testing/fixture-sidebar-host.js +12 -0
- package/dist/chat/testing/sidebar.contract.d.ts +6 -0
- package/dist/chat/testing/sidebar.contract.js +24 -0
- package/dist/chat/transcript/DiffLines.d.ts +6 -1
- package/dist/chat/transcript/DiffLines.js +35 -20
- package/dist/chat/transcript/EditDiffBlock.d.ts +5 -1
- package/dist/chat/transcript/EditDiffBlock.js +89 -30
- package/dist/chat/transcript/InteractionToolBody.js +1 -1
- package/dist/chat/transcript/LazyRow.d.ts +40 -40
- package/dist/chat/transcript/LazyRow.js +101 -149
- package/dist/chat/transcript/MermaidDiagram.js +2 -1
- package/dist/chat/transcript/SelectCursor.d.ts +11 -1
- package/dist/chat/transcript/SelectCursor.js +10 -5
- package/dist/chat/transcript/SubagentBlock.js +3 -2
- package/dist/chat/transcript/TranscriptRail.d.ts +109 -0
- package/dist/chat/transcript/TranscriptRail.js +579 -0
- package/dist/chat/transcript/TranscriptRow.d.ts +4 -7
- package/dist/chat/transcript/TranscriptRow.js +9 -5
- package/dist/chat/transcript/actions.d.ts +43 -3
- package/dist/chat/transcript/actions.js +27 -1
- package/dist/chat/transcript/clipped-output.d.ts +58 -0
- package/dist/chat/transcript/clipped-output.js +131 -0
- package/dist/chat/transcript/fold-attachments.js +10 -5
- package/dist/chat/transcript/fold-worker.js +3 -2
- package/dist/chat/transcript/fold.js +21 -2
- package/dist/chat/transcript/index.d.ts +11 -9
- package/dist/chat/transcript/index.js +10 -8
- package/dist/chat/transcript/markdown-cache.d.ts +7 -1
- package/dist/chat/transcript/markdown-cache.js +12 -1
- package/dist/chat/transcript/markdown.js +116 -54
- package/dist/chat/transcript/media-gallery.d.ts +3 -2
- package/dist/chat/transcript/media-gallery.js +10 -7
- package/dist/chat/transcript/notices.d.ts +23 -1
- package/dist/chat/transcript/notices.js +110 -28
- package/dist/chat/transcript/prompt.js +6 -4
- package/dist/chat/transcript/prose.js +3 -1
- package/dist/chat/transcript/receipt-parts.d.ts +22 -0
- package/dist/chat/transcript/receipt-parts.js +87 -0
- package/dist/chat/transcript/root-items.d.ts +96 -0
- package/dist/chat/transcript/root-items.js +180 -0
- package/dist/chat/transcript/row-mount.d.ts +165 -0
- package/dist/chat/transcript/row-mount.js +498 -0
- package/dist/chat/transcript/row-parking.d.ts +125 -0
- package/dist/chat/transcript/row-parking.js +135 -0
- package/dist/chat/transcript/row-ui-state.d.ts +37 -0
- package/dist/chat/transcript/row-ui-state.js +53 -0
- package/dist/chat/transcript/run-rows.js +6 -78
- package/dist/chat/transcript/script-input.d.ts +1 -1
- package/dist/chat/transcript/scroll-clamp.js +1 -1
- package/dist/chat/transcript/tasks.js +3 -2
- package/dist/chat/transcript/tool-media.d.ts +4 -2
- package/dist/chat/transcript/tool-media.js +15 -7
- package/dist/chat/transcript/tool-parts.d.ts +27 -4
- package/dist/chat/transcript/tool-parts.js +31 -5
- package/dist/chat/transcript/tool-payload.js +26 -11
- package/dist/chat/transcript/tool-row.d.ts +2 -1
- package/dist/chat/transcript/tool-row.js +38 -19
- package/dist/chat/transcript/use-transcript-rows.d.ts +24 -7
- package/dist/chat/transcript/use-transcript-rows.js +28 -46
- package/dist/chat/transcript/useSettledReveal.js +15 -3
- package/dist/chat/transcript/useStickToBottom.js +4 -4
- package/dist/chat/transcript/useTranscriptSearch.js +30 -14
- package/dist/chat/transcript/view-scope.d.ts +26 -6
- package/dist/chat/transcript/view-scope.js +106 -20
- package/dist/components/ChoiceCards.js +1 -1
- package/dist/components/ConfirmDialog.js +1 -1
- package/dist/components/CopyValue.d.ts +33 -0
- package/dist/components/CopyValue.js +54 -0
- package/dist/components/Form.js +1 -1
- package/dist/components/HowItWorks.js +1 -1
- package/dist/components/Menu.js +1 -1
- package/dist/components/StepFrame.js +2 -2
- package/dist/components/SwatchPicker.js +1 -1
- package/dist/components/ToggleCard.js +1 -1
- package/dist/components/floating/HoverCard.js +2 -3
- package/dist/components/floating/hover-delay.d.ts +4 -0
- package/dist/components/floating/hover-delay.js +6 -0
- package/dist/core.css +14 -12
- package/dist/dist/{index-Betz0OWq.d.ts → index-C6-t1SS9.d.ts} +21 -2
- package/dist/dist/index-De9AbmxS.d.ts +1 -0
- package/dist/dist/index.d.ts +5 -5
- package/dist/dist/sandbox-CSUihARm.d.ts +2 -0
- package/dist/dist/{timeout-CyU7HLyz.d.ts → timeout-CmTx6V9y.d.ts} +1 -0
- package/dist/extensions/ExtensionDialogHost.js +1 -1
- package/dist/files/TreeColumn.js +3 -1
- package/dist/files/headless/host.d.ts +2 -2
- package/dist/git/ImportRepoDialog.js +1 -1
- package/dist/git/MoveSessionDialog.js +2 -2
- package/dist/git/SandboxManager.d.ts +42 -0
- package/dist/git/SandboxManager.js +297 -0
- package/dist/git/SyncChip.js +1 -1
- package/dist/git/headless/index.d.ts +2 -1
- package/dist/git/headless/index.js +2 -1
- package/dist/git/headless/labels.d.ts +29 -0
- package/dist/git/headless/labels.js +34 -1
- package/dist/git/headless/sandboxes.d.ts +43 -0
- package/dist/git/headless/sandboxes.js +52 -0
- package/dist/git/index.d.ts +2 -1
- package/dist/git/index.js +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/keybindings/headless/catalog.d.ts +1 -1
- package/dist/keybindings/headless/catalog.js +12 -0
- package/dist/machines/HostsSection.d.ts +1 -1
- package/dist/machines/headless/labels.js +2 -2
- package/dist/motion/flip-list.js +3 -10
- package/dist/motion/presence.d.ts +10 -0
- package/dist/motion/presence.js +20 -1
- package/dist/motion/swap.d.ts +8 -2
- package/dist/motion/swap.js +5 -2
- package/dist/onboarding/conversation.js +27 -15
- package/dist/onboarding/demos/how-it-works.js +1 -1
- package/dist/onboarding/skills/parts.js +4 -4
- package/dist/onboarding/sources/SourceBrowser.js +1 -1
- package/dist/onboarding/steps/ReadyStep.js +1 -1
- package/dist/onboarding/steps/connect/KeyForm.js +1 -1
- package/dist/palette/headless/app-sources.js +20 -0
- package/dist/palette/headless/labels.js +2 -0
- package/dist/session/PlanTracker.js +3 -3
- package/dist/session/SecretsPanel.js +1 -1
- package/dist/session/SessionHeader.d.ts +18 -6
- package/dist/session/SessionHeader.js +68 -12
- package/dist/session/SessionPlaceMenu.d.ts +35 -0
- package/dist/session/SessionPlaceMenu.js +299 -0
- package/dist/session/SessionShell.js +1 -1
- package/dist/session/TurnDetailsDialog.js +1 -1
- package/dist/session/headless/index.d.ts +2 -1
- package/dist/session/headless/index.js +2 -1
- package/dist/session/headless/labels.d.ts +73 -0
- package/dist/session/headless/labels.js +73 -0
- package/dist/session/headless/place.d.ts +49 -0
- package/dist/session/headless/place.js +57 -0
- package/dist/session/index.d.ts +2 -1
- package/dist/session/index.js +2 -1
- package/dist/settings/ConversationPresetsCard.js +1 -1
- package/dist/settings/SettingCard.js +2 -2
- package/dist/settings/SettingsRowsPage.js +1 -1
- package/dist/settings/headless/fixture-performance.js +4 -2
- package/dist/settings/headless/fixture-sections.js +7 -0
- package/dist/settings/headless/labels.d.ts +1 -1
- package/dist/settings/headless/labels.js +1 -1
- package/dist/settings/headless/layout.d.ts +4 -4
- package/dist/settings/headless/layout.js +1 -1
- package/dist/settings/headless/performance.d.ts +4 -0
- package/dist/settings/headless/search.d.ts +2 -2
- package/dist/settings/headless/sections-host.d.ts +20 -2
- package/dist/settings/sections/claude-import/ClaudeImportDialog.js +1 -1
- package/dist/settings/sections/enabled-list/EnabledListSection.js +2 -2
- package/dist/settings/sections/environments/EnvironmentsSection.d.ts +9 -3
- package/dist/settings/sections/environments/EnvironmentsSection.js +292 -52
- package/dist/settings/sections/environments/labels.d.ts +15 -0
- package/dist/settings/sections/environments/labels.js +18 -3
- package/dist/settings/sections/extensions/ChangeOriginDialog.js +1 -1
- package/dist/settings/sections/extensions/ExtensionSourceBrowser.js +1 -1
- package/dist/settings/sections/extensions/ExtensionsSection.d.ts +3 -2
- package/dist/settings/sections/extensions/ExtensionsSection.js +9 -3
- package/dist/settings/sections/host-catalog/HostCatalogSection.js +15 -5
- package/dist/settings/sections/keybindings/labels.d.ts +2 -0
- package/dist/settings/sections/keybindings/labels.js +2 -0
- package/dist/settings/sections/keybindings/rows.js +8 -0
- package/dist/settings/sections/models/SpacesDefaultsSection.d.ts +7 -3
- package/dist/settings/sections/models/SpacesDefaultsSection.js +11 -5
- package/dist/settings/sections/performance/PerformanceSection.js +8 -1
- package/dist/settings/sections/performance/labels.d.ts +2 -0
- package/dist/settings/sections/performance/labels.js +2 -0
- package/dist/settings/sections/skills/SkillGroups.js +1 -1
- package/dist/settings/server-app.d.ts +4 -2
- package/dist/settings/server-app.js +7 -3
- package/dist/settings/testing/sections.contract.d.ts +7 -1
- package/dist/settings/testing/sections.contract.js +37 -0
- package/dist/styles.css +243 -19
- package/dist/terminal/TerminalDrawer.js +3 -1
- package/dist/views/headless/answers.d.ts +8 -2
- package/dist/views/headless/answers.js +58 -1
- package/dist/views/headless/placement.d.ts +78 -0
- package/dist/views/headless/placement.js +154 -44
- package/dist/workspace/SidePanel.js +3 -1
- package/package.json +2 -2
- package/src/styles/base.css +13 -0
- package/src/styles/chat.css +30 -0
- package/src/styles/components.css +0 -10
- package/src/styles/files.css +5 -0
- package/src/styles/sidebar.css +29 -7
- package/src/styles/terminal.css +6 -0
- package/src/styles/tokens.css +5 -0
- package/src/styles/transcript.css +138 -0
- package/src/styles/workspace.css +6 -0
- package/dist/dist/index-QcFzZlao.d.ts +0 -1
- package/dist/dist/sandbox-D0zsW8I1.d.ts +0 -2
- /package/dist/dist/{types-_Dtoq_No.d.ts → execution-failure-SREfl-EZ.d.ts} +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { constant, writable } from "../store.js";
|
|
2
2
|
import { applyInboxPatch, nextWakeAt } from "./inbox-state.js";
|
|
3
3
|
import { createNotificationStore } from "./notifications.js";
|
|
4
|
+
import { createPrewarmer } from "./prewarm.js";
|
|
4
5
|
import { NO_SIDEBAR_CONTRIBUTIONS, filterQueryOf, filtersForSpace, mergeSidebarSpaces, resolveGrouping, resolveSort, spaceMembership, switcherSpaces } from "./query.js";
|
|
5
6
|
import { isProjectMember } from "./rows.js";
|
|
6
7
|
import { VIEW_CHOICE } from "./types.js";
|
|
7
|
-
import { DEFAULT_SIDEBAR_VIEW, DEFAULT_SIDEBAR_VIEW_DEFAULTS } from "./view.js";
|
|
8
|
-
import { DEFAULT_SPACE_ID, SESSION_INBOX_KEYS, SessionQueryError, activeSpaceOf, createRecentChanges, normalizeSpaces, projectNameOf, resolveSessionSpace, sessionDirLabel, viewQuery } from "zidane/chat/pure";
|
|
8
|
+
import { DEFAULT_SIDEBAR_VIEW, DEFAULT_SIDEBAR_VIEW_DEFAULTS, DEFAULT_SWITCHER_PREFS } from "./view.js";
|
|
9
|
+
import { DEFAULT_SPACE_ID, SESSION_INBOX_KEYS, SessionQueryError, activeSpaceOf, arrangeSpaceList, createRecentChanges, normalizeSpaces, projectNameOf, resolveSessionSpace, sessionDirLabel, viewQuery } from "zidane/chat/pure";
|
|
9
10
|
// src/chat/headless/sidebar/directory.ts
|
|
10
11
|
/** The longest wait of one timer (`setTimeout` overflows past 2^31 ms): a later snooze end re-arms on the way. */
|
|
11
12
|
const MAX_TIMER_MS = 2 ** 31 - 1;
|
|
@@ -16,8 +17,6 @@ function withInboxFields(row, fields) {
|
|
|
16
17
|
else next[key] = fields[key];
|
|
17
18
|
return next;
|
|
18
19
|
}
|
|
19
|
-
const PREWARM_FULL_THRESHOLD = 12;
|
|
20
|
-
const PREWARM_WINDOW_RADIUS = 6;
|
|
21
20
|
/** The activity axis as a relative `updatedAt` bound, for a saved view's query. */
|
|
22
21
|
const ACTIVITY_BOUND = {
|
|
23
22
|
"1d": "-1d",
|
|
@@ -54,6 +53,13 @@ function createSessionDirectory(options) {
|
|
|
54
53
|
let switcherFrom = null;
|
|
55
54
|
let switcher = [];
|
|
56
55
|
let hiddenSpaces = [];
|
|
56
|
+
const sharedList = (settings) => settings.spacesShared === true && options.saveSpaceList !== void 0;
|
|
57
|
+
/** Saves the switcher's arrangement into the shared list. */
|
|
58
|
+
const saveArrangement = (order, hidden) => {
|
|
59
|
+
const byId = new Map(merged.map((s) => [s.id, s]));
|
|
60
|
+
const list = arrangeSpaceList(options.settings.get().spaceList, order.flatMap((id) => byId.has(id) ? [byId.get(id)] : []), hidden);
|
|
61
|
+
options.saveSpaceList(list).catch((err) => options.onError?.(err));
|
|
62
|
+
};
|
|
57
63
|
const spacesFrom = (settings, spaceId) => {
|
|
58
64
|
const spacesOn = settings.spaces;
|
|
59
65
|
const contributions = contributionsStore.get();
|
|
@@ -65,7 +71,8 @@ function createSessionDirectory(options) {
|
|
|
65
71
|
merged = mergeSidebarSpaces(normalizeSpaces(settings.spaceList), settings.spaceList, contributions.spaces);
|
|
66
72
|
}
|
|
67
73
|
const spaces = merged;
|
|
68
|
-
const
|
|
74
|
+
const shared = sharedList(settings);
|
|
75
|
+
const prefs = shared ? DEFAULT_SWITCHER_PREFS : views.switcher.get();
|
|
69
76
|
if (!switcherFrom || switcherFrom.spaces !== spaces || switcherFrom.prefs !== prefs) {
|
|
70
77
|
switcherFrom = {
|
|
71
78
|
spaces,
|
|
@@ -73,7 +80,7 @@ function createSessionDirectory(options) {
|
|
|
73
80
|
};
|
|
74
81
|
switcher = switcherSpaces(spaces, prefs);
|
|
75
82
|
const hidden = new Set(prefs.hidden);
|
|
76
|
-
hiddenSpaces = spaces.filter((s) => s.id !== DEFAULT_SPACE_ID && hidden.has(s.id));
|
|
83
|
+
hiddenSpaces = spaces.filter((s) => s.id !== DEFAULT_SPACE_ID && (shared ? s.hidden === true : hidden.has(s.id)));
|
|
77
84
|
}
|
|
78
85
|
return {
|
|
79
86
|
spacesOn,
|
|
@@ -224,51 +231,13 @@ function createSessionDirectory(options) {
|
|
|
224
231
|
patch({ hostNotice: null });
|
|
225
232
|
}
|
|
226
233
|
};
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
if (raw.length <= PREWARM_FULL_THRESHOLD) candidates = raw;
|
|
235
|
-
else {
|
|
236
|
-
const anchor = activeSessionId ? raw.findIndex((s) => s.id === activeSessionId) : -1;
|
|
237
|
-
const center = anchor === -1 ? 0 : anchor;
|
|
238
|
-
const start = Math.max(0, center - PREWARM_WINDOW_RADIUS);
|
|
239
|
-
const end = Math.min(raw.length, center + PREWARM_WINDOW_RADIUS + 1);
|
|
240
|
-
candidates = raw.slice(start, end);
|
|
241
|
-
}
|
|
242
|
-
const keep = new Set(candidates.map((s) => s.id));
|
|
243
|
-
if (activeSessionId) keep.add(activeSessionId);
|
|
244
|
-
for (const key of options.pinned?.() ?? []) keep.add(key);
|
|
245
|
-
streams.evictExcept(keep);
|
|
246
|
-
const targets = candidates.filter((session) => !streams.hasEvents(session.id));
|
|
247
|
-
if (targets.length === 0) return;
|
|
248
|
-
let cancelled = false;
|
|
249
|
-
let handle;
|
|
250
|
-
const pump = (index) => {
|
|
251
|
-
if (cancelled || index >= targets.length) return;
|
|
252
|
-
handle = idle.request(() => {
|
|
253
|
-
if (cancelled) return;
|
|
254
|
-
const session = targets[index];
|
|
255
|
-
const next = () => pump(index + 1);
|
|
256
|
-
if (streams.hasEvents(session.id)) {
|
|
257
|
-
next();
|
|
258
|
-
return;
|
|
259
|
-
}
|
|
260
|
-
options.loadEvents(session.id, { prewarm: true }).then((events) => {
|
|
261
|
-
if (cancelled) return;
|
|
262
|
-
if (!streams.hasEvents(session.id)) streams.setEventsPage(session.id, events);
|
|
263
|
-
}).catch(() => {}).finally(next);
|
|
264
|
-
});
|
|
265
|
-
};
|
|
266
|
-
pump(0);
|
|
267
|
-
stopPrewarm = () => {
|
|
268
|
-
cancelled = true;
|
|
269
|
-
if (handle !== void 0) idle.cancel(handle);
|
|
270
|
-
};
|
|
271
|
-
};
|
|
234
|
+
const prewarmer = createPrewarmer({
|
|
235
|
+
streams,
|
|
236
|
+
loadEvents: options.loadEvents,
|
|
237
|
+
idle,
|
|
238
|
+
...options.pinned ? { pinned: options.pinned } : {},
|
|
239
|
+
...options.prewarm
|
|
240
|
+
});
|
|
272
241
|
/** `direction`: the way the list slides; by default the switcher's order (a wrapping step overrides it). */
|
|
273
242
|
const showSpace = (spaceId, direction) => {
|
|
274
243
|
const { spaces, switcherSpaces: order, activeSpace, allSessions, activeSessionId, spacesOn } = state.get();
|
|
@@ -345,11 +314,26 @@ function createSessionDirectory(options) {
|
|
|
345
314
|
lastRows = allSessions;
|
|
346
315
|
lastActive = activeSessionId;
|
|
347
316
|
reconcile();
|
|
348
|
-
|
|
317
|
+
prewarmer.update(allSessions, activeSessionId);
|
|
349
318
|
}));
|
|
350
319
|
offs.push(options.settings.subscribe(reconcile));
|
|
351
320
|
offs.push(views.space.subscribe(reconcile));
|
|
352
321
|
offs.push(views.switcher.subscribe(reconcile));
|
|
322
|
+
const adoptSwitcher = () => {
|
|
323
|
+
const prefs = views.switcher.get();
|
|
324
|
+
if (!sharedList(options.settings.get()) || prefs.order.length === 0 && prefs.hidden.length === 0) return;
|
|
325
|
+
const order = switcherSpaces(merged.map((s) => ({
|
|
326
|
+
...s,
|
|
327
|
+
hidden: false
|
|
328
|
+
})), {
|
|
329
|
+
order: prefs.order,
|
|
330
|
+
hidden: []
|
|
331
|
+
}).map((s) => s.id);
|
|
332
|
+
saveArrangement(order, /* @__PURE__ */ new Set([...prefs.hidden, ...merged.filter((s) => s.hidden).map((s) => s.id)]));
|
|
333
|
+
views.setSwitcher(DEFAULT_SWITCHER_PREFS);
|
|
334
|
+
};
|
|
335
|
+
adoptSwitcher();
|
|
336
|
+
offs.push(options.settings.subscribe(adoptSwitcher));
|
|
353
337
|
let offContributions = contributionsStore.subscribe(reconcile);
|
|
354
338
|
offs.push(() => offContributions());
|
|
355
339
|
followContributions = (next) => {
|
|
@@ -523,8 +507,7 @@ function createSessionDirectory(options) {
|
|
|
523
507
|
return () => {
|
|
524
508
|
for (const off of offs.splice(0).reverse()) off();
|
|
525
509
|
followContributions = null;
|
|
526
|
-
|
|
527
|
-
stopPrewarm = null;
|
|
510
|
+
prewarmer.stop();
|
|
528
511
|
};
|
|
529
512
|
},
|
|
530
513
|
refresh,
|
|
@@ -615,6 +598,14 @@ function createSessionDirectory(options) {
|
|
|
615
598
|
},
|
|
616
599
|
setSpaceHidden(spaceId, hidden) {
|
|
617
600
|
if (spaceId === DEFAULT_SPACE_ID) return;
|
|
601
|
+
if (sharedList(options.settings.get())) {
|
|
602
|
+
const now = new Set(merged.filter((s) => s.hidden).map((s) => s.id));
|
|
603
|
+
if (hidden) now.add(spaceId);
|
|
604
|
+
else now.delete(spaceId);
|
|
605
|
+
saveArrangement(merged.map((s) => s.id), now);
|
|
606
|
+
if (hidden && state.get().activeSpace.id === spaceId) showSpace(DEFAULT_SPACE_ID);
|
|
607
|
+
return;
|
|
608
|
+
}
|
|
618
609
|
const prefs = views.switcher.get();
|
|
619
610
|
const rest = prefs.hidden.filter((id) => id !== spaceId);
|
|
620
611
|
views.setSwitcher({
|
|
@@ -630,6 +621,11 @@ function createSessionDirectory(options) {
|
|
|
630
621
|
if (at === -1 || to < 0 || to >= order.length) return;
|
|
631
622
|
order.splice(at, 1);
|
|
632
623
|
order.splice(to, 0, spaceId);
|
|
624
|
+
if (sharedList(options.settings.get())) {
|
|
625
|
+
const hidden = merged.filter((s) => s.hidden);
|
|
626
|
+
saveArrangement([...order, ...hidden.map((s) => s.id)], new Set(hidden.map((s) => s.id)));
|
|
627
|
+
return;
|
|
628
|
+
}
|
|
633
629
|
const prefs = views.switcher.get();
|
|
634
630
|
const kept = prefs.order.filter((id) => !order.includes(id));
|
|
635
631
|
views.setSwitcher({
|
|
@@ -19,12 +19,15 @@ export declare function runsInRemoteSandbox(environment: SessionEnvironmentSumma
|
|
|
19
19
|
*/
|
|
20
20
|
export declare function environmentKindLabel(kind: string, labels: Pick<SidebarLabels, 'environmentKinds' | 'environmentOnMachine'>): string;
|
|
21
21
|
/**
|
|
22
|
-
* Where a session runs, in one line: tooltips and screen readers.
|
|
22
|
+
* Where a session runs, in one line: tooltips and screen readers. Its state is the header dot's
|
|
23
|
+
* (`sessionPlaceTone`), so a row and the header agree: reconnecting is not a failure, and an
|
|
24
|
+
* environment that broke after setup says how.
|
|
23
25
|
*
|
|
24
26
|
* @param environment - The session's environment.
|
|
25
27
|
* @param labels - The sidebar labels.
|
|
28
|
+
* @param now - The current time, epoch ms (a reconnect window that passed reads as failed).
|
|
26
29
|
*/
|
|
27
|
-
export declare function environmentSummaryText(environment: SessionEnvironmentSummary, labels: SidebarLabels): string;
|
|
30
|
+
export declare function environmentSummaryText(environment: SessionEnvironmentSummary, labels: SidebarLabels, now?: number): string;
|
|
28
31
|
/**
|
|
29
32
|
* The delete confirmation: the question, and a warning when the session's sandbox goes with it.
|
|
30
33
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { sessionPlaceTone } from "../../../session/headless/place.js";
|
|
1
2
|
import { parseMachineKind } from "zidane/chat/pure";
|
|
2
3
|
// src/chat/headless/sidebar/environment.ts
|
|
3
4
|
/** Kinds whose work lives in a remote sandbox: deleting the session deletes it. */
|
|
@@ -22,19 +23,27 @@ function environmentKindLabel(kind, labels) {
|
|
|
22
23
|
return labels.environmentKinds[kind] ?? kind;
|
|
23
24
|
}
|
|
24
25
|
/**
|
|
25
|
-
* Where a session runs, in one line: tooltips and screen readers.
|
|
26
|
+
* Where a session runs, in one line: tooltips and screen readers. Its state is the header dot's
|
|
27
|
+
* (`sessionPlaceTone`), so a row and the header agree: reconnecting is not a failure, and an
|
|
28
|
+
* environment that broke after setup says how.
|
|
26
29
|
*
|
|
27
30
|
* @param environment - The session's environment.
|
|
28
31
|
* @param labels - The sidebar labels.
|
|
32
|
+
* @param now - The current time, epoch ms (a reconnect window that passed reads as failed).
|
|
29
33
|
*/
|
|
30
|
-
function environmentSummaryText(environment, labels) {
|
|
34
|
+
function environmentSummaryText(environment, labels, now = Date.now()) {
|
|
31
35
|
const label = environmentKindLabel(environment.kind, labels);
|
|
32
36
|
const where = environment.branch ? labels.environmentOnBranch(label, environment.branch) : label;
|
|
33
37
|
if (environment.state === "provisioning") {
|
|
34
38
|
const step = environment.progress?.steps.find((s) => s.id === environment.progress?.step);
|
|
35
39
|
return step ? labels.environmentSettingUpStep(where, step.label) : labels.environmentSettingUp(where);
|
|
36
40
|
}
|
|
41
|
+
if (environment.state === "failed" && environment.removed) return labels.environmentRemoved(where);
|
|
42
|
+
if (sessionPlaceTone(environment, void 0, now) === "reconnecting") return labels.environmentReconnecting(where);
|
|
43
|
+
if (environment.state === "failed" && environment.failure === "lost") return labels.environmentGone(where, environment.error);
|
|
44
|
+
if (environment.state === "failed" && environment.failure === "unreachable") return labels.environmentNotAnswering(where, environment.error);
|
|
37
45
|
if (environment.state === "failed") return labels.environmentSetupFailed(where, environment.error);
|
|
46
|
+
if (environment.resuming) return labels.environmentResuming(where);
|
|
38
47
|
if (environment.suspended) return labels.environmentPaused(where);
|
|
39
48
|
return where;
|
|
40
49
|
}
|
|
@@ -21,6 +21,21 @@ export interface SidebarEnvironmentHost {
|
|
|
21
21
|
run: (sessionId: string, actionId: string) => Promise<EnvironmentActionResult>;
|
|
22
22
|
/** Sets a failed environment up again; progress arrives as the session's row changing. */
|
|
23
23
|
retry: (sessionId: string) => Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Starts a paused environment now, as the next prompt would; the row shows it resuming until it answers, then
|
|
26
|
+
* this resolves. Resolves at once when it isn't paused; rejects when it fails to start. Absent: no "Wake up".
|
|
27
|
+
*/
|
|
28
|
+
wake?: (sessionId: string) => Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Pauses an idle environment now, as the idle sweep would; the row shows it paused. Rejects while it runs, or
|
|
31
|
+
* when its kind can't pause. Absent: no "Pause".
|
|
32
|
+
*/
|
|
33
|
+
pause?: (sessionId: string) => Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Deletes the session's sandbox and keeps the session; its next prompt sets up a new one. Rejects while it
|
|
36
|
+
* runs, or when its kind keeps it. Absent: no "Delete sandbox".
|
|
37
|
+
*/
|
|
38
|
+
remove?: (sessionId: string) => Promise<void>;
|
|
24
39
|
}
|
|
25
40
|
/** The sidebar's platform capabilities. Every member is optional. */
|
|
26
41
|
export interface SidebarHost {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The inbox layout's rows: one flat list instead of groups. React-free.
|
|
3
3
|
*
|
|
4
|
-
* pinned favorites, in their manual order (`sidebarOrder`), then
|
|
5
|
-
* active the rest
|
|
4
|
+
* pinned favorites, in their manual order (`sidebarOrder`), then by the user's last message
|
|
5
|
+
* active the rest active in the last 3 days, by the user's last message (else creation); flat, or in
|
|
6
|
+
* project folders. Agent activity never reorders a section: rows stay put while agents work
|
|
6
7
|
* ── the shelves, docked under the list by the sidebar; each one folds ──
|
|
7
8
|
* working sessions with a run going, latest message first
|
|
8
9
|
* snoozed hidden until their snooze ends, the earliest first
|
|
@@ -87,7 +88,14 @@ export interface InboxRowsOptions {
|
|
|
87
88
|
activeId?: string | null;
|
|
88
89
|
/** How long without activity moves a session to Earlier (`inboxEarlierAfterMs`). Default {@link INBOX_EARLIER_AFTER_MS}. */
|
|
89
90
|
earlierAfterMs?: number;
|
|
91
|
+
/**
|
|
92
|
+
* Sessions whose run ended a moment ago ({@link INBOX_RUN_HOLD_MS}): still on the Working shelf, so a gap between
|
|
93
|
+
* two runs (a queued message going out, a run resuming) does not send a row to Active and straight back.
|
|
94
|
+
*/
|
|
95
|
+
holdRunning?: ReadonlySet<string>;
|
|
90
96
|
}
|
|
97
|
+
/** How long a session whose run ended stays on the Working shelf, in ms: longer than the gap between two runs. */
|
|
98
|
+
export declare const INBOX_RUN_HOLD_MS = 1500;
|
|
91
99
|
/**
|
|
92
100
|
* Which section a session belongs in.
|
|
93
101
|
*
|
|
@@ -95,8 +103,9 @@ export interface InboxRowsOptions {
|
|
|
95
103
|
* @param now - Epoch ms: whether its snooze has ended.
|
|
96
104
|
* @param earlierAfterMs - How long without activity moves it to Earlier. Default {@link INBOX_EARLIER_AFTER_MS}.
|
|
97
105
|
* @param needsYou - The sessions waiting on the user: in the list (Pinned or Active), never on a shelf.
|
|
106
|
+
* @param holdRunning - Sessions whose run just ended: still Working for a moment (`InboxRowsOptions.holdRunning`).
|
|
98
107
|
*/
|
|
99
|
-
export declare function inboxSectionOf(session: SidebarListSession, now: number, earlierAfterMs?: number, needsYou?: ReadonlySet<string>): InboxSection;
|
|
108
|
+
export declare function inboxSectionOf(session: SidebarListSession, now: number, earlierAfterMs?: number, needsYou?: ReadonlySet<string>, holdRunning?: ReadonlySet<string>): InboxSection;
|
|
100
109
|
/**
|
|
101
110
|
* Whether `a` comes before `b` in a section's order (negative), after it (positive), or ties: Pinned by manual
|
|
102
111
|
* order then recency, Active by newest return (the ones waiting on the user first), each shelf by its own.
|
|
@@ -31,25 +31,33 @@ function inboxEarlierAfterMs(days) {
|
|
|
31
31
|
}
|
|
32
32
|
/** Where the folded shelves persist (a JSON array of shelf ids). */
|
|
33
33
|
const INBOX_SHELVES_KEY = "zg-sidebar-inbox-shelves:v2";
|
|
34
|
+
/** How long a session whose run ended stays on the Working shelf, in ms: longer than the gap between two runs. */
|
|
35
|
+
const INBOX_RUN_HOLD_MS = 1500;
|
|
34
36
|
const EMPTY = /* @__PURE__ */ new Set();
|
|
35
37
|
const PAGED = /* @__PURE__ */ new Set(["earlier", "settled"]);
|
|
36
|
-
/**
|
|
38
|
+
/** Its last activity, agent's included: what moves it to Earlier after days without any. */
|
|
37
39
|
const returnedAt = (s) => Math.max(s.updatedAt, s.lastUserMessageAt ?? 0, s.createdAt);
|
|
38
40
|
/**
|
|
41
|
+
* What orders a section: the user's last message, else when they created it. Never the agent's activity, so a
|
|
42
|
+
* run starting, saving or ending reorders nothing; a row moves up only when the user sends to it.
|
|
43
|
+
*/
|
|
44
|
+
const touchedAt = (s) => Math.max(s.lastUserMessageAt ?? 0, s.createdAt);
|
|
45
|
+
/**
|
|
39
46
|
* Which section a session belongs in.
|
|
40
47
|
*
|
|
41
48
|
* @param session - The session.
|
|
42
49
|
* @param now - Epoch ms: whether its snooze has ended.
|
|
43
50
|
* @param earlierAfterMs - How long without activity moves it to Earlier. Default {@link INBOX_EARLIER_AFTER_MS}.
|
|
44
51
|
* @param needsYou - The sessions waiting on the user: in the list (Pinned or Active), never on a shelf.
|
|
52
|
+
* @param holdRunning - Sessions whose run just ended: still Working for a moment (`InboxRowsOptions.holdRunning`).
|
|
45
53
|
*/
|
|
46
|
-
function inboxSectionOf(session, now, earlierAfterMs = INBOX_EARLIER_AFTER_MS, needsYou) {
|
|
54
|
+
function inboxSectionOf(session, now, earlierAfterMs = INBOX_EARLIER_AFTER_MS, needsYou, holdRunning) {
|
|
47
55
|
if (needsYou?.has(session.id) && !session.archived) return session.favorite ? "pinned" : "active";
|
|
48
56
|
if (isSnoozed(session, now)) return "snoozed";
|
|
49
57
|
if (session.archived) return "archived";
|
|
50
58
|
if (session.settledAt !== void 0) return "settled";
|
|
51
59
|
if (session.favorite) return "pinned";
|
|
52
|
-
if (session.status === "running") return "working";
|
|
60
|
+
if (session.status === "running" || holdRunning?.has(session.id)) return "working";
|
|
53
61
|
if (returnedAt(session) < now - earlierAfterMs) return "earlier";
|
|
54
62
|
return "active";
|
|
55
63
|
}
|
|
@@ -58,12 +66,12 @@ function comparePinned(a, b) {
|
|
|
58
66
|
if (a.sidebarOrder !== void 0 && b.sidebarOrder !== void 0) return a.sidebarOrder < b.sidebarOrder ? -1 : a.sidebarOrder > b.sidebarOrder ? 1 : 0;
|
|
59
67
|
if (a.sidebarOrder !== void 0) return -1;
|
|
60
68
|
if (b.sidebarOrder !== void 0) return 1;
|
|
61
|
-
return
|
|
69
|
+
return touchedAt(b) - touchedAt(a);
|
|
62
70
|
}
|
|
63
71
|
const SHELF_ORDER = {
|
|
64
|
-
working: (a, b) => (b
|
|
72
|
+
working: (a, b) => touchedAt(b) - touchedAt(a),
|
|
65
73
|
snoozed: (a, b) => (a.snoozedUntil ?? 0) - (b.snoozedUntil ?? 0),
|
|
66
|
-
earlier: (a, b) =>
|
|
74
|
+
earlier: (a, b) => touchedAt(b) - touchedAt(a),
|
|
67
75
|
settled: (a, b) => (b.settledAt ?? 0) - (a.settledAt ?? 0),
|
|
68
76
|
archived: (a, b) => b.updatedAt - a.updatedAt
|
|
69
77
|
};
|
|
@@ -78,7 +86,7 @@ const SHELF_ORDER = {
|
|
|
78
86
|
*/
|
|
79
87
|
function compareInboxSection(section, a, b, needsYou = EMPTY) {
|
|
80
88
|
if (section === "pinned") return comparePinned(a, b);
|
|
81
|
-
if (section === "active") return Number(needsYou.has(b.id)) - Number(needsYou.has(a.id)) ||
|
|
89
|
+
if (section === "active") return Number(needsYou.has(b.id)) - Number(needsYou.has(a.id)) || touchedAt(b) - touchedAt(a);
|
|
82
90
|
return SHELF_ORDER[section](a, b);
|
|
83
91
|
}
|
|
84
92
|
/**
|
|
@@ -111,7 +119,8 @@ function buildInboxRows(sessions, options) {
|
|
|
111
119
|
archived: []
|
|
112
120
|
};
|
|
113
121
|
const needsYou = options.needsYou ?? EMPTY;
|
|
114
|
-
|
|
122
|
+
const holdRunning = options.holdRunning ?? EMPTY;
|
|
123
|
+
for (const s of sessions) by[inboxSectionOf(s, now, earlierAfterMs, needsYou, holdRunning)].push(s);
|
|
115
124
|
for (const section of [
|
|
116
125
|
"pinned",
|
|
117
126
|
"active",
|
|
@@ -236,4 +245,4 @@ function inboxDockStart(rows) {
|
|
|
236
245
|
const at = rows.findIndex((row) => row.kind === "shelf");
|
|
237
246
|
return at < 0 ? rows.length : at;
|
|
238
247
|
}
|
|
239
|
-
export { INBOX_EARLIER_AFTER_MS, INBOX_PAGE, INBOX_PAGE_MORE, INBOX_SHELVES, INBOX_SHELVES_FOLDED, INBOX_SHELVES_KEY, buildInboxRows, compareInboxSection, inboxDockStart, inboxEarlierAfterMs, inboxFolderOf, inboxSectionOf, inboxSessionOrder, nextInboxChangeAt };
|
|
248
|
+
export { INBOX_EARLIER_AFTER_MS, INBOX_PAGE, INBOX_PAGE_MORE, INBOX_RUN_HOLD_MS, INBOX_SHELVES, INBOX_SHELVES_FOLDED, INBOX_SHELVES_KEY, buildInboxRows, compareInboxSection, inboxDockStart, inboxEarlierAfterMs, inboxFolderOf, inboxSectionOf, inboxSessionOrder, nextInboxChangeAt };
|
|
@@ -7,7 +7,7 @@ import { deleteSessionPrompt, environmentKindLabel, environmentSummaryText, runs
|
|
|
7
7
|
import { RunEstimatesRow, RunEstimatesSignal, RunEstimatesStore, createRunEstimates, pickRunEstimate } from "./estimates.js";
|
|
8
8
|
import { SESSION_HISTORY_LIMIT, SessionHistory, SessionHistoryDirection, SessionHistoryOptions, SessionHistoryPage, SessionHistoryState, SessionHistoryStore, createSessionHistory, parseSessionHistory } from "./history.js";
|
|
9
9
|
import { SessionWindowMode, SidebarEnvironmentHost, SidebarHost } from "./host.js";
|
|
10
|
-
import { INBOX_EARLIER_AFTER_MS, INBOX_PAGE, INBOX_PAGE_MORE, INBOX_SHELVES, INBOX_SHELVES_FOLDED, INBOX_SHELVES_KEY, InboxRow, InboxRowsOptions, InboxSection, InboxShelfId, InboxUrgency, buildInboxRows, compareInboxSection, inboxDockStart, inboxEarlierAfterMs, inboxFolderOf, inboxSectionOf, inboxSessionOrder, nextInboxChangeAt } from "./inbox.js";
|
|
10
|
+
import { INBOX_EARLIER_AFTER_MS, INBOX_PAGE, INBOX_PAGE_MORE, INBOX_RUN_HOLD_MS, INBOX_SHELVES, INBOX_SHELVES_FOLDED, INBOX_SHELVES_KEY, InboxRow, InboxRowsOptions, InboxSection, InboxShelfId, InboxUrgency, buildInboxRows, compareInboxSection, inboxDockStart, inboxEarlierAfterMs, inboxFolderOf, inboxSectionOf, inboxSessionOrder, nextInboxChangeAt } from "./inbox.js";
|
|
11
11
|
import { SessionInboxFields, SessionInboxPatch, applyInboxPatch, isSettled, isSnoozed, nextWakeAt } from "./inbox-state.js";
|
|
12
12
|
import { DEFAULT_SIDEBAR_LABELS, SidebarLabels } from "./labels.js";
|
|
13
13
|
import { SessionNotification, SessionNotificationStore, createNotificationStore } from "./notifications.js";
|
|
@@ -18,4 +18,4 @@ import { AGENT_GROUPING, MAX_ROW_CHIPS, NO_SIDEBAR_CONTRIBUTIONS, SidebarContrib
|
|
|
18
18
|
import { BuildQuerySidebarRowsOptions, BuildSidebarRowsOptions, CHATS_BUCKET, SidebarListRow, SidebarNode, buildHostSidebarRows, buildQuerySidebarRows, buildSidebarRows, groupsByFolder, isProjectMember, itemRows, nestSidebarRows, partitionMainSession, projectPathOf, repoGroups } from "./rows.js";
|
|
19
19
|
import { SessionActivityFilter, SessionArchiveFilter, SidebarExtensionView, SidebarGroupBy, SidebarInboxGroupBy, SidebarLayout, SidebarListSession, SidebarOrigin, SidebarSortBy, SidebarView, VIEW_CHOICE } from "./types.js";
|
|
20
20
|
import { DEFAULT_SIDEBAR_VIEW, DEFAULT_SIDEBAR_VIEW_DEFAULTS, DEFAULT_SWITCHER_PREFS, SIDEBAR_SPACE_KEY, SIDEBAR_SWITCHER_KEY, SIDEBAR_VIEW_KEY, SIDEBAR_VIEW_VERSION, SidebarLastSessions, SidebarViewDefaults, SidebarViewMap, SidebarViewPicks, SidebarViewRecord, SidebarViews, SidebarViewsHost, SidebarViewsOptions, SidebarViewsStorage, SpaceSwitcherPrefs, createSidebarViews, defaultSidebarLayout, parseSidebarView, parseSidebarViewPicks, parseSwitcherPrefs, readSidebarViews, resolveSidebarView, sidebarLayoutOf, sidebarViewDefaults } from "./view.js";
|
|
21
|
-
export { AGENT_GROUPING, BuildQuerySidebarRowsOptions, BuildSidebarRowsOptions, CHATS_BUCKET, COMMON_EMOJI, CompactionProgress, CompactionProgressStore, CompactionSignal, DEFAULT_SIDEBAR_LABELS, DEFAULT_SIDEBAR_VIEW, DEFAULT_SIDEBAR_VIEW_DEFAULTS, DEFAULT_SWITCHER_PREFS, DirectoryServer, DirectorySettings, DotStateInput, INBOX_EARLIER_AFTER_MS, INBOX_PAGE, INBOX_PAGE_MORE, INBOX_SHELVES, INBOX_SHELVES_FOLDED, INBOX_SHELVES_KEY, InboxRow, InboxRowsOptions, InboxSection, InboxShelfId, InboxUrgency, MAIN_SESSION_ICON_KEY, MAX_ROW_CHIPS, NO_SIDEBAR_CONTRIBUTIONS, PINNED_PROJECTS_KEY, PROJECT_ICONS_KEY, PinsBySpace, ProjectIcon, ProjectIconMap, ProjectInSpace, RunEstimatesRow, RunEstimatesSignal, RunEstimatesStore, RuntimeNow, RuntimeOrigin, SESSION_HISTORY_LIMIT, SIDEBAR_SPACE_KEY, SIDEBAR_SWITCHER_KEY, SIDEBAR_VIEW_KEY, SIDEBAR_VIEW_VERSION, SessionActivity, SessionActivityFilter, SessionActivitySignal, SessionActivityStore, SessionArchiveFilter, SessionBadgesEntry, SessionBadgesSource, SessionBadgesStore, SessionDirectory, SessionDirectoryOptions, SessionDirectorySource, SessionDirectoryState, SessionDirectoryStreams, SessionHistory, SessionHistoryDirection, SessionHistoryOptions, SessionHistoryPage, SessionHistoryState, SessionHistoryStore, type SessionInboxFields, type SessionInboxPatch, SessionNotification, SessionNotificationStore, SessionRef, SessionRemoval, SessionRowChange, SessionWindowMode, SidebarContributionStores, SidebarContributions, SidebarDotState, SidebarEnvironmentHost, SidebarExtensionView, SidebarGroupBy, SidebarGrouping, SidebarHost, SidebarInboxGroupBy, SidebarItemEntry, SidebarLabels, SidebarLastSessions, type SidebarLayout, SidebarListRow, SidebarListSession, SidebarNode, SidebarOrigin, SidebarQueryLayer, SidebarRowChip, SidebarRowDecoration, SidebarSortBy, SidebarSpace, SidebarView, SidebarViewDefaults, SidebarViewMap, SidebarViewPicks, SidebarViewRecord, SidebarViews, SidebarViewsHost, SidebarViewsOptions, SidebarViewsStorage, SpaceSwitcherPrefs, VIEW_CHOICE, activityLabel, applyInboxPatch, availableProjectsOf, buildHostSidebarRows, buildInboxRows, buildQuerySidebarRows, buildSidebarRows, claimChildSessions, clearedViewFilters, compareInboxSection, createCompactionProgress, createDecorator, createNotificationStore, createRunEstimates, createSessionActivity, createSessionBadges, createSessionDirectory, createSessionHistory, createSidebarViews, defaultSidebarLayout, deleteSessionPrompt, deriveDotState, environmentKindLabel, environmentSummaryText, extensionSpaceOf, filterDirectorySessions, filterQueryOf, filtersForSpace, firstGrapheme, groupsByFolder, inboxDockStart, inboxEarlierAfterMs, inboxFolderOf, inboxSectionOf, inboxSessionOrder, isProjectIcon, isProjectMember, isSettled, isSnoozed, itemRows, itemsForSpace, mergeSidebarSpaces, nestSidebarRows, nextInboxChangeAt, nextSavedViewName, nextWakeAt, parsePinnedProjects, parseProjectIcons, parseSessionHistory, parseSidebarView, parseSidebarViewPicks, parseSwitcherPrefs, partitionMainSession, pickRunEstimate, pinSession, pinnedSessions, projectKeyOf, projectPathOf, readSidebarViews, reduceActivity, reduceCompaction, repoGroups, resolveGrouping, resolveSidebarView, resolveSort, runsInRemoteSandbox, sessionRefsOf, sidebarContributionsOf, sidebarLayoutOf, sidebarViewDefaults, spaceMembership, switcherSpaces, viewFilterOf, viewFiltersOn, withPinnedProject };
|
|
21
|
+
export { AGENT_GROUPING, BuildQuerySidebarRowsOptions, BuildSidebarRowsOptions, CHATS_BUCKET, COMMON_EMOJI, CompactionProgress, CompactionProgressStore, CompactionSignal, DEFAULT_SIDEBAR_LABELS, DEFAULT_SIDEBAR_VIEW, DEFAULT_SIDEBAR_VIEW_DEFAULTS, DEFAULT_SWITCHER_PREFS, DirectoryServer, DirectorySettings, DotStateInput, INBOX_EARLIER_AFTER_MS, INBOX_PAGE, INBOX_PAGE_MORE, INBOX_RUN_HOLD_MS, INBOX_SHELVES, INBOX_SHELVES_FOLDED, INBOX_SHELVES_KEY, InboxRow, InboxRowsOptions, InboxSection, InboxShelfId, InboxUrgency, MAIN_SESSION_ICON_KEY, MAX_ROW_CHIPS, NO_SIDEBAR_CONTRIBUTIONS, PINNED_PROJECTS_KEY, PROJECT_ICONS_KEY, PinsBySpace, ProjectIcon, ProjectIconMap, ProjectInSpace, RunEstimatesRow, RunEstimatesSignal, RunEstimatesStore, RuntimeNow, RuntimeOrigin, SESSION_HISTORY_LIMIT, SIDEBAR_SPACE_KEY, SIDEBAR_SWITCHER_KEY, SIDEBAR_VIEW_KEY, SIDEBAR_VIEW_VERSION, SessionActivity, SessionActivityFilter, SessionActivitySignal, SessionActivityStore, SessionArchiveFilter, SessionBadgesEntry, SessionBadgesSource, SessionBadgesStore, SessionDirectory, SessionDirectoryOptions, SessionDirectorySource, SessionDirectoryState, SessionDirectoryStreams, SessionHistory, SessionHistoryDirection, SessionHistoryOptions, SessionHistoryPage, SessionHistoryState, SessionHistoryStore, type SessionInboxFields, type SessionInboxPatch, SessionNotification, SessionNotificationStore, SessionRef, SessionRemoval, SessionRowChange, SessionWindowMode, SidebarContributionStores, SidebarContributions, SidebarDotState, SidebarEnvironmentHost, SidebarExtensionView, SidebarGroupBy, SidebarGrouping, SidebarHost, SidebarInboxGroupBy, SidebarItemEntry, SidebarLabels, SidebarLastSessions, type SidebarLayout, SidebarListRow, SidebarListSession, SidebarNode, SidebarOrigin, SidebarQueryLayer, SidebarRowChip, SidebarRowDecoration, SidebarSortBy, SidebarSpace, SidebarView, SidebarViewDefaults, SidebarViewMap, SidebarViewPicks, SidebarViewRecord, SidebarViews, SidebarViewsHost, SidebarViewsOptions, SidebarViewsStorage, SpaceSwitcherPrefs, VIEW_CHOICE, activityLabel, applyInboxPatch, availableProjectsOf, buildHostSidebarRows, buildInboxRows, buildQuerySidebarRows, buildSidebarRows, claimChildSessions, clearedViewFilters, compareInboxSection, createCompactionProgress, createDecorator, createNotificationStore, createRunEstimates, createSessionActivity, createSessionBadges, createSessionDirectory, createSessionHistory, createSidebarViews, defaultSidebarLayout, deleteSessionPrompt, deriveDotState, environmentKindLabel, environmentSummaryText, extensionSpaceOf, filterDirectorySessions, filterQueryOf, filtersForSpace, firstGrapheme, groupsByFolder, inboxDockStart, inboxEarlierAfterMs, inboxFolderOf, inboxSectionOf, inboxSessionOrder, isProjectIcon, isProjectMember, isSettled, isSnoozed, itemRows, itemsForSpace, mergeSidebarSpaces, nestSidebarRows, nextInboxChangeAt, nextSavedViewName, nextWakeAt, parsePinnedProjects, parseProjectIcons, parseSessionHistory, parseSidebarView, parseSidebarViewPicks, parseSwitcherPrefs, partitionMainSession, pickRunEstimate, pinSession, pinnedSessions, projectKeyOf, projectPathOf, readSidebarViews, reduceActivity, reduceCompaction, repoGroups, resolveGrouping, resolveSidebarView, resolveSort, runsInRemoteSandbox, sessionRefsOf, sidebarContributionsOf, sidebarLayoutOf, sidebarViewDefaults, spaceMembership, switcherSpaces, viewFilterOf, viewFiltersOn, withPinnedProject };
|
|
@@ -6,7 +6,7 @@ import { deriveDotState } from "./dot-state.js";
|
|
|
6
6
|
import { deleteSessionPrompt, environmentKindLabel, environmentSummaryText, runsInRemoteSandbox } from "./environment.js";
|
|
7
7
|
import { createRunEstimates, pickRunEstimate } from "./estimates.js";
|
|
8
8
|
import { SESSION_HISTORY_LIMIT, createSessionHistory, parseSessionHistory } from "./history.js";
|
|
9
|
-
import { INBOX_EARLIER_AFTER_MS, INBOX_PAGE, INBOX_PAGE_MORE, INBOX_SHELVES, INBOX_SHELVES_FOLDED, INBOX_SHELVES_KEY, buildInboxRows, compareInboxSection, inboxDockStart, inboxEarlierAfterMs, inboxFolderOf, inboxSectionOf, inboxSessionOrder, nextInboxChangeAt } from "./inbox.js";
|
|
9
|
+
import { INBOX_EARLIER_AFTER_MS, INBOX_PAGE, INBOX_PAGE_MORE, INBOX_RUN_HOLD_MS, INBOX_SHELVES, INBOX_SHELVES_FOLDED, INBOX_SHELVES_KEY, buildInboxRows, compareInboxSection, inboxDockStart, inboxEarlierAfterMs, inboxFolderOf, inboxSectionOf, inboxSessionOrder, nextInboxChangeAt } from "./inbox.js";
|
|
10
10
|
import { applyInboxPatch, isSettled, isSnoozed, nextWakeAt } from "./inbox-state.js";
|
|
11
11
|
import { DEFAULT_SIDEBAR_LABELS } from "./labels.js";
|
|
12
12
|
import { createNotificationStore } from "./notifications.js";
|
|
@@ -17,4 +17,4 @@ import { AGENT_GROUPING, MAX_ROW_CHIPS, NO_SIDEBAR_CONTRIBUTIONS, claimChildSess
|
|
|
17
17
|
import { CHATS_BUCKET, buildHostSidebarRows, buildQuerySidebarRows, buildSidebarRows, groupsByFolder, isProjectMember, itemRows, nestSidebarRows, partitionMainSession, projectPathOf, repoGroups } from "./rows.js";
|
|
18
18
|
import { VIEW_CHOICE } from "./types.js";
|
|
19
19
|
import { DEFAULT_SIDEBAR_VIEW, DEFAULT_SIDEBAR_VIEW_DEFAULTS, DEFAULT_SWITCHER_PREFS, SIDEBAR_SPACE_KEY, SIDEBAR_SWITCHER_KEY, SIDEBAR_VIEW_KEY, SIDEBAR_VIEW_VERSION, createSidebarViews, defaultSidebarLayout, parseSidebarView, parseSidebarViewPicks, parseSwitcherPrefs, readSidebarViews, resolveSidebarView, sidebarLayoutOf, sidebarViewDefaults } from "./view.js";
|
|
20
|
-
export { AGENT_GROUPING, CHATS_BUCKET, COMMON_EMOJI, DEFAULT_SIDEBAR_LABELS, DEFAULT_SIDEBAR_VIEW, DEFAULT_SIDEBAR_VIEW_DEFAULTS, DEFAULT_SWITCHER_PREFS, INBOX_EARLIER_AFTER_MS, INBOX_PAGE, INBOX_PAGE_MORE, INBOX_SHELVES, INBOX_SHELVES_FOLDED, INBOX_SHELVES_KEY, MAIN_SESSION_ICON_KEY, MAX_ROW_CHIPS, NO_SIDEBAR_CONTRIBUTIONS, PINNED_PROJECTS_KEY, PROJECT_ICONS_KEY, SESSION_HISTORY_LIMIT, SIDEBAR_SPACE_KEY, SIDEBAR_SWITCHER_KEY, SIDEBAR_VIEW_KEY, SIDEBAR_VIEW_VERSION, VIEW_CHOICE, activityLabel, applyInboxPatch, availableProjectsOf, buildHostSidebarRows, buildInboxRows, buildQuerySidebarRows, buildSidebarRows, claimChildSessions, clearedViewFilters, compareInboxSection, createCompactionProgress, createDecorator, createNotificationStore, createRunEstimates, createSessionActivity, createSessionBadges, createSessionDirectory, createSessionHistory, createSidebarViews, defaultSidebarLayout, deleteSessionPrompt, deriveDotState, environmentKindLabel, environmentSummaryText, extensionSpaceOf, filterDirectorySessions, filterQueryOf, filtersForSpace, firstGrapheme, groupsByFolder, inboxDockStart, inboxEarlierAfterMs, inboxFolderOf, inboxSectionOf, inboxSessionOrder, isProjectIcon, isProjectMember, isSettled, isSnoozed, itemRows, itemsForSpace, mergeSidebarSpaces, nestSidebarRows, nextInboxChangeAt, nextSavedViewName, nextWakeAt, parsePinnedProjects, parseProjectIcons, parseSessionHistory, parseSidebarView, parseSidebarViewPicks, parseSwitcherPrefs, partitionMainSession, pickRunEstimate, pinSession, pinnedSessions, projectKeyOf, projectPathOf, readSidebarViews, reduceActivity, reduceCompaction, repoGroups, resolveGrouping, resolveSidebarView, resolveSort, runsInRemoteSandbox, sessionRefsOf, sidebarContributionsOf, sidebarLayoutOf, sidebarViewDefaults, spaceMembership, switcherSpaces, viewFilterOf, viewFiltersOn, withPinnedProject };
|
|
20
|
+
export { AGENT_GROUPING, CHATS_BUCKET, COMMON_EMOJI, DEFAULT_SIDEBAR_LABELS, DEFAULT_SIDEBAR_VIEW, DEFAULT_SIDEBAR_VIEW_DEFAULTS, DEFAULT_SWITCHER_PREFS, INBOX_EARLIER_AFTER_MS, INBOX_PAGE, INBOX_PAGE_MORE, INBOX_RUN_HOLD_MS, INBOX_SHELVES, INBOX_SHELVES_FOLDED, INBOX_SHELVES_KEY, MAIN_SESSION_ICON_KEY, MAX_ROW_CHIPS, NO_SIDEBAR_CONTRIBUTIONS, PINNED_PROJECTS_KEY, PROJECT_ICONS_KEY, SESSION_HISTORY_LIMIT, SIDEBAR_SPACE_KEY, SIDEBAR_SWITCHER_KEY, SIDEBAR_VIEW_KEY, SIDEBAR_VIEW_VERSION, VIEW_CHOICE, activityLabel, applyInboxPatch, availableProjectsOf, buildHostSidebarRows, buildInboxRows, buildQuerySidebarRows, buildSidebarRows, claimChildSessions, clearedViewFilters, compareInboxSection, createCompactionProgress, createDecorator, createNotificationStore, createRunEstimates, createSessionActivity, createSessionBadges, createSessionDirectory, createSessionHistory, createSidebarViews, defaultSidebarLayout, deleteSessionPrompt, deriveDotState, environmentKindLabel, environmentSummaryText, extensionSpaceOf, filterDirectorySessions, filterQueryOf, filtersForSpace, firstGrapheme, groupsByFolder, inboxDockStart, inboxEarlierAfterMs, inboxFolderOf, inboxSectionOf, inboxSessionOrder, isProjectIcon, isProjectMember, isSettled, isSnoozed, itemRows, itemsForSpace, mergeSidebarSpaces, nestSidebarRows, nextInboxChangeAt, nextSavedViewName, nextWakeAt, parsePinnedProjects, parseProjectIcons, parseSessionHistory, parseSidebarView, parseSidebarViewPicks, parseSwitcherPrefs, partitionMainSession, pickRunEstimate, pinSession, pinnedSessions, projectKeyOf, projectPathOf, readSidebarViews, reduceActivity, reduceCompaction, repoGroups, resolveGrouping, resolveSidebarView, resolveSort, runsInRemoteSandbox, sessionRefsOf, sidebarContributionsOf, sidebarLayoutOf, sidebarViewDefaults, spaceMembership, switcherSpaces, viewFilterOf, viewFiltersOn, withPinnedProject };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SecretTimeLeft } from "../secrets.js";
|
|
2
|
-
import { u as AuthFailure } from "../../../dist/timeout-
|
|
2
|
+
import { u as AuthFailure } from "../../../dist/timeout-CmTx6V9y.js";
|
|
3
3
|
import "../../../dist/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { AM as TaskOutcomeCounts, kM as TaskOutcome, kR as SecretTtl, mN as McpJobView } from "../../../dist/index-C6-t1SS9.js";
|
|
5
5
|
import "../index.js";
|
|
6
6
|
/** The default English strings of the session sidebar, merged over the chat layer's. */
|
|
7
7
|
export declare const DEFAULT_SIDEBAR_LABELS: {
|
|
@@ -61,7 +61,15 @@ export declare const DEFAULT_SIDEBAR_LABELS: {
|
|
|
61
61
|
environmentSettingUp: (where: string) => string;
|
|
62
62
|
environmentSettingUpStep: (where: string, step: string) => string;
|
|
63
63
|
environmentSetupFailed: (where: string, error?: string) => string;
|
|
64
|
+
/** It stopped answering after setup, and the host is reconnecting. */
|
|
65
|
+
environmentReconnecting: (where: string) => string;
|
|
66
|
+
/** It broke after setup: gone for good (`lost`). */
|
|
67
|
+
environmentGone: (where: string, error?: string) => string;
|
|
68
|
+
/** It broke after setup: not answering, and the host stopped reconnecting (`unreachable`). */
|
|
69
|
+
environmentNotAnswering: (where: string, error?: string) => string;
|
|
64
70
|
environmentPaused: (where: string) => string;
|
|
71
|
+
environmentResuming: (where: string) => string;
|
|
72
|
+
environmentRemoved: (where: string) => string;
|
|
65
73
|
menuRename: string;
|
|
66
74
|
menuAddFavorite: string;
|
|
67
75
|
menuRemoveFavorite: string;
|
|
@@ -73,6 +81,7 @@ export declare const DEFAULT_SIDEBAR_LABELS: {
|
|
|
73
81
|
menuOpenChatWindow: string;
|
|
74
82
|
menuOpenPanelsWindow: string;
|
|
75
83
|
menuRetryEnvironment: string;
|
|
84
|
+
menuWakeEnvironment: string;
|
|
76
85
|
menuMoveTo: string;
|
|
77
86
|
menuMoveToSpace: string;
|
|
78
87
|
menuDelete: string;
|
|
@@ -108,6 +117,9 @@ export declare const DEFAULT_SIDEBAR_LABELS: {
|
|
|
108
117
|
moveProjectFailed: (message: string) => string;
|
|
109
118
|
environmentActionFailed: (action: string, message: string) => string;
|
|
110
119
|
retryEnvironmentFailed: (message: string) => string;
|
|
120
|
+
wakeEnvironmentFailed: (message: string) => string;
|
|
121
|
+
pauseEnvironmentFailed: (message: string) => string;
|
|
122
|
+
deleteEnvironmentFailed: (message: string) => string;
|
|
111
123
|
footerSettings: string;
|
|
112
124
|
footerSettingsWithNote: (note: string) => string;
|
|
113
125
|
footerSignIn: string;
|
|
@@ -119,6 +131,10 @@ export declare const DEFAULT_SIDEBAR_LABELS: {
|
|
|
119
131
|
useSpaces: string;
|
|
120
132
|
useSpacesDescription: string;
|
|
121
133
|
yourSpaces: string;
|
|
134
|
+
spacesHome: string;
|
|
135
|
+
spacesHomeDescription: string;
|
|
136
|
+
spacesHomeLocal: string;
|
|
137
|
+
spacesHomeOffline: (name: string) => string;
|
|
122
138
|
addSpace: string;
|
|
123
139
|
newSpaceName: (n: number) => string;
|
|
124
140
|
defaultSpaceName: string;
|
|
@@ -247,6 +263,15 @@ export declare const DEFAULT_SIDEBAR_LABELS: {
|
|
|
247
263
|
stoppedByYou: string;
|
|
248
264
|
retry: string;
|
|
249
265
|
retryHint: string;
|
|
266
|
+
retryEnvironmentHint: string;
|
|
267
|
+
environmentRepaired: {
|
|
268
|
+
lost: string;
|
|
269
|
+
unreachable: string;
|
|
270
|
+
};
|
|
271
|
+
retryEnvironmentLostTitle: string;
|
|
272
|
+
retryEnvironmentLostDetail: string;
|
|
273
|
+
retryEnvironmentLostSandboxDetail: string;
|
|
274
|
+
retryEnvironmentLostConfirm: string;
|
|
250
275
|
continueRun: string;
|
|
251
276
|
continueHint: string;
|
|
252
277
|
resetsAt: (time: string) => string;
|
|
@@ -285,6 +310,16 @@ export declare const DEFAULT_SIDEBAR_LABELS: {
|
|
|
285
310
|
modelVerdictTitle: (approved: boolean, model: string, confidence: string | null) => string;
|
|
286
311
|
loadFullOutput: string;
|
|
287
312
|
loadingFullOutput: string;
|
|
313
|
+
loadMoreOutput: string;
|
|
314
|
+
loadAllOutput: string;
|
|
315
|
+
loadingOutput: string;
|
|
316
|
+
outputLoaded: (loaded: string, total: string) => string;
|
|
317
|
+
outputLoadFailed: string;
|
|
318
|
+
loadFullInput: string;
|
|
319
|
+
loadingFullInput: string;
|
|
320
|
+
loadFullDiff: string;
|
|
321
|
+
loadingFullDiff: string;
|
|
322
|
+
diffNotShown: (hunks: number, size: string) => string;
|
|
288
323
|
showOutput: string;
|
|
289
324
|
inputCaption: string;
|
|
290
325
|
outputCaption: string;
|
|
@@ -688,6 +723,7 @@ export declare const DEFAULT_SIDEBAR_LABELS: {
|
|
|
688
723
|
selectTurnCopied: string;
|
|
689
724
|
selectTurnNothingToCopy: string;
|
|
690
725
|
selectTurnForkFailed: string;
|
|
726
|
+
promptRail: string;
|
|
691
727
|
copy: string;
|
|
692
728
|
copied: string;
|
|
693
729
|
copyCode: string;
|
|
@@ -70,7 +70,15 @@ const DEFAULT_SIDEBAR_LABELS = {
|
|
|
70
70
|
environmentSettingUp: (where) => `${where}. Setting up…`,
|
|
71
71
|
environmentSettingUpStep: (where, step) => `${where}. ${step}…`,
|
|
72
72
|
environmentSetupFailed: (where, error) => `${where}. Setup failed${error ? `: ${error}` : "."}`,
|
|
73
|
+
/** It stopped answering after setup, and the host is reconnecting. */
|
|
74
|
+
environmentReconnecting: (where) => `${where}. Reconnecting…`,
|
|
75
|
+
/** It broke after setup: gone for good (`lost`). */
|
|
76
|
+
environmentGone: (where, error) => `${where}. Gone${error ? `: ${error}` : "."}`,
|
|
77
|
+
/** It broke after setup: not answering, and the host stopped reconnecting (`unreachable`). */
|
|
78
|
+
environmentNotAnswering: (where, error) => `${where}. Not answering${error ? `: ${error}` : "."}`,
|
|
73
79
|
environmentPaused: (where) => `${where}. Paused while idle, resumes on your next prompt.`,
|
|
80
|
+
environmentResuming: (where) => `${where}. Resuming…`,
|
|
81
|
+
environmentRemoved: (where) => `${where}. Sandbox deleted, a new one is set up on your next prompt.`,
|
|
74
82
|
menuRename: "Rename",
|
|
75
83
|
menuAddFavorite: "Add to favorites",
|
|
76
84
|
menuRemoveFavorite: "Remove from favorites",
|
|
@@ -82,6 +90,7 @@ const DEFAULT_SIDEBAR_LABELS = {
|
|
|
82
90
|
menuOpenChatWindow: "Open conversation in new window",
|
|
83
91
|
menuOpenPanelsWindow: "Open side panels in new window",
|
|
84
92
|
menuRetryEnvironment: "Retry environment setup",
|
|
93
|
+
menuWakeEnvironment: "Wake up environment",
|
|
85
94
|
menuMoveTo: "Move to…",
|
|
86
95
|
menuMoveToSpace: "Move to space",
|
|
87
96
|
menuDelete: "Delete",
|
|
@@ -117,6 +126,9 @@ const DEFAULT_SIDEBAR_LABELS = {
|
|
|
117
126
|
moveProjectFailed: (message) => `Couldn't move the project: ${message}`,
|
|
118
127
|
environmentActionFailed: (action, message) => `${action} failed: ${message}`,
|
|
119
128
|
retryEnvironmentFailed: (message) => `Couldn't retry the environment: ${message}`,
|
|
129
|
+
wakeEnvironmentFailed: (message) => `Couldn't wake the environment: ${message}`,
|
|
130
|
+
pauseEnvironmentFailed: (message) => `Couldn't pause the environment: ${message}`,
|
|
131
|
+
deleteEnvironmentFailed: (message) => `Couldn't delete the sandbox: ${message}`,
|
|
120
132
|
footerSettings: "Settings",
|
|
121
133
|
footerSettingsWithNote: (note) => `Settings. ${note}`,
|
|
122
134
|
footerSignIn: "sign in",
|
|
@@ -128,6 +140,10 @@ const DEFAULT_SIDEBAR_LABELS = {
|
|
|
128
140
|
useSpaces: "Use spaces",
|
|
129
141
|
useSpacesDescription: "Group sessions into spaces, each with its own defaults for new sessions. Off shows every session in one list.",
|
|
130
142
|
yourSpaces: "Your spaces",
|
|
143
|
+
spacesHome: "Spaces come from",
|
|
144
|
+
spacesHomeDescription: "Every device with the same home server shows the same spaces.",
|
|
145
|
+
spacesHomeLocal: "This computer",
|
|
146
|
+
spacesHomeOffline: (name) => `${name} is offline. Spaces can't be changed until it is back.`,
|
|
131
147
|
addSpace: "Add space",
|
|
132
148
|
newSpaceName: (n) => `Space ${n}`,
|
|
133
149
|
defaultSpaceName: "Default",
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prewarm: the transcripts around the open session load in idle time, so
|
|
3
|
+
* opening the next one shows it at once.
|
|
4
|
+
*
|
|
5
|
+
* A load is a tail page (`loadEvents`, the page an open shows), but on a
|
|
6
|
+
* host's cache miss it costs a replay of the whole session. So the window
|
|
7
|
+
* reads ahead only when what it would read changes:
|
|
8
|
+
*
|
|
9
|
+
* - Only the open session and the order of the sessions around it count.
|
|
10
|
+
* A row's other fields (a title, a status, a count: every
|
|
11
|
+
* `sessions:changed`) leave the window as it is and read nothing.
|
|
12
|
+
* - A change waits {@link PREWARM_DELAY_MS} for the next: a burst of
|
|
13
|
+
* reorders or a run of selections reads once, for where it ended.
|
|
14
|
+
* - A load in flight is never asked again: a later window takes its page
|
|
15
|
+
* when it lands.
|
|
16
|
+
*
|
|
17
|
+
* What the window holds is bounded by bytes, not by sessions: nearest first,
|
|
18
|
+
* the prewarmed transcripts are kept while their rows fit in `maxBytes`
|
|
19
|
+
* (`eventBytes`), and the reading stops when one no longer fits. The open
|
|
20
|
+
* session and the pinned ones are always kept and never counted.
|
|
21
|
+
*/
|
|
22
|
+
/** The stream store as prewarm reads and fills it. */
|
|
23
|
+
export interface PrewarmStreams<K extends string, P> {
|
|
24
|
+
/** The session's transcript is cached. */
|
|
25
|
+
hasEvents: (sessionId: K) => boolean;
|
|
26
|
+
/** Cache a loaded transcript page. */
|
|
27
|
+
setEventsPage: (sessionId: K, page: P) => void;
|
|
28
|
+
/** Drop every cached transcript except these. */
|
|
29
|
+
evictExcept: (keep: ReadonlySet<K>) => void;
|
|
30
|
+
/** About how many bytes the session's cached rows hold. Absent: the window is bounded by its sessions only. */
|
|
31
|
+
eventBytes?: (sessionId: K) => number;
|
|
32
|
+
}
|
|
33
|
+
export interface PrewarmOptions<K extends string, P> {
|
|
34
|
+
streams: PrewarmStreams<K, P>;
|
|
35
|
+
/** Load a session's tail page, as a read ahead of the user. */
|
|
36
|
+
loadEvents: (sessionId: K, options: {
|
|
37
|
+
prewarm: true;
|
|
38
|
+
}) => Promise<P>;
|
|
39
|
+
/** Schedules one read in idle time. */
|
|
40
|
+
idle: {
|
|
41
|
+
request: (run: () => void) => number;
|
|
42
|
+
cancel: (handle: number) => void;
|
|
43
|
+
};
|
|
44
|
+
/** Sessions kept besides the window (side chats on screen). */
|
|
45
|
+
pinned?: () => Iterable<K>;
|
|
46
|
+
/** Wait for a change to settle before reading. Default {@link PREWARM_DELAY_MS}. */
|
|
47
|
+
delayMs?: number;
|
|
48
|
+
/** Bytes of prewarmed rows kept. Default {@link PREWARM_MAX_BYTES}. */
|
|
49
|
+
maxBytes?: number;
|
|
50
|
+
}
|
|
51
|
+
export interface Prewarmer<K extends string> {
|
|
52
|
+
/** The sessions as listed and the open one, after any change: reads ahead when the window moved. */
|
|
53
|
+
update: (sessions: readonly {
|
|
54
|
+
id: K;
|
|
55
|
+
}[], activeSessionId: K | null) => void;
|
|
56
|
+
stop: () => void;
|
|
57
|
+
}
|
|
58
|
+
/** Every session is in the window up to this many. */
|
|
59
|
+
export declare const PREWARM_FULL_THRESHOLD = 12;
|
|
60
|
+
/** Past it, this many on each side of the open session. */
|
|
61
|
+
export declare const PREWARM_WINDOW_RADIUS = 6;
|
|
62
|
+
export declare const PREWARM_DELAY_MS = 200;
|
|
63
|
+
export declare const PREWARM_MAX_BYTES: number;
|
|
64
|
+
/** The sessions around the open one (the first when none is open), nearest first, the one below before the one above. */
|
|
65
|
+
export declare function prewarmWindow<K extends string>(sessions: readonly {
|
|
66
|
+
id: K;
|
|
67
|
+
}[], activeSessionId: K | null): K[];
|
|
68
|
+
export declare function createPrewarmer<K extends string, P>(options: PrewarmOptions<K, P>): Prewarmer<K>;
|