zidane-ui 9.1.6 → 9.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/run-host.js +17 -20
- package/dist/adapters/server-files-host.js +3 -1
- package/dist/adapters/server-host.js +18 -11
- package/dist/adapters/server-machines-host.js +3 -1
- package/dist/adapters/server-session-host.js +2 -1
- package/dist/adapters/server-settings-accounts.js +2 -1
- package/dist/adapters/server-settings-host.js +3 -3
- package/dist/adapters/sse-host.js +9 -7
- package/dist/chat/SessionGroupHeader.js +2 -2
- package/dist/chat/SessionHostHeader.js +1 -1
- package/dist/chat/StatusDot.js +24 -20
- package/dist/chat/composer/Composer.d.ts +13 -8
- package/dist/chat/composer/Composer.js +14 -10
- package/dist/chat/composer/ComposerEditor.js +1 -1
- package/dist/chat/composer/HostComposer.d.ts +1 -1
- package/dist/chat/composer/HostComposer.js +7 -10
- package/dist/chat/composer/RunStatusChip.js +13 -1
- package/dist/chat/composer/attachment-ingest.d.ts +4 -1
- package/dist/chat/composer/attachment-ingest.js +27 -10
- package/dist/chat/composer/composer-bus.d.ts +9 -1
- package/dist/chat/composer/composer-bus.js +49 -6
- package/dist/chat/composer/index.d.ts +2 -2
- package/dist/chat/composer/index.js +2 -2
- package/dist/chat/composer/use-draft-target.d.ts +4 -0
- package/dist/chat/composer/use-draft-target.js +15 -4
- package/dist/chat/composer/use-send-prompt.d.ts +5 -1
- package/dist/chat/composer/use-send-prompt.js +2 -12
- package/dist/chat/headless/chip-labels.d.ts +2 -0
- package/dist/chat/headless/chip-labels.js +3 -1
- package/dist/chat/headless/composer/labels-editor.d.ts +2 -0
- package/dist/chat/headless/composer/labels-editor.js +2 -0
- package/dist/chat/headless/file-chip.d.ts +12 -13
- package/dist/chat/headless/file-chip.js +40 -2
- package/dist/chat/headless/fixture-host.js +14 -17
- package/dist/chat/headless/host.d.ts +24 -6
- package/dist/chat/headless/index.d.ts +4 -4
- package/dist/chat/headless/index.js +4 -4
- package/dist/chat/headless/labels.d.ts +16 -0
- package/dist/chat/headless/labels.js +15 -2
- package/dist/chat/headless/send-flow.d.ts +21 -4
- package/dist/chat/headless/send-flow.js +25 -6
- package/dist/chat/headless/session-list.d.ts +11 -0
- package/dist/chat/headless/sidebar/index.js +1 -1
- package/dist/chat/headless/sidebar/labels.d.ts +12 -1
- package/dist/chat/headless/transcript-host.d.ts +8 -1
- package/dist/chat/headless/transcript-labels.d.ts +2 -0
- package/dist/chat/index.d.ts +3 -3
- package/dist/chat/index.js +2 -2
- package/dist/chat/interactions/InboxPanel.js +2 -2
- package/dist/chat/interactions/QuestionField.js +2 -2
- package/dist/chat/rich-composer/RichComposer.d.ts +9 -2
- package/dist/chat/rich-composer/RichComposer.js +28 -7
- package/dist/chat/rich-composer/composer-extensions.d.ts +2 -0
- package/dist/chat/rich-composer/composer-extensions.js +2 -2
- package/dist/chat/rich-composer/composer-keys.js +1 -1
- package/dist/chat/rich-composer/use-composer-bus.js +2 -1
- package/dist/chat/rich-composer/use-composer-editor.d.ts +4 -1
- package/dist/chat/rich-composer/use-composer-editor.js +2 -1
- package/dist/chat/sidebar/SessionSidebar.js +1 -2
- package/dist/chat/sidebar/SidebarSearchRow.js +1 -1
- package/dist/chat/sidebar/useSidebarKeyboardNav.d.ts +0 -2
- package/dist/chat/sidebar/useSidebarKeyboardNav.js +7 -13
- package/dist/chat/testing/contract.d.ts +1 -1
- package/dist/chat/testing/contract.js +8 -7
- package/dist/chat/transcript/BadgeMenu.d.ts +12 -3
- package/dist/chat/transcript/BadgeMenu.js +20 -3
- package/dist/chat/transcript/CodemodeScript.js +147 -44
- package/dist/chat/transcript/EditDiffBlock.js +1 -4
- package/dist/chat/transcript/FileChip.js +60 -14
- package/dist/chat/transcript/LiveOutput.js +7 -3
- package/dist/chat/transcript/badges.js +2 -2
- package/dist/chat/transcript/index.d.ts +2 -2
- package/dist/chat/transcript/markdown-context.d.ts +4 -1
- package/dist/chat/transcript/rolling.d.ts +12 -0
- package/dist/chat/transcript/rolling.js +22 -0
- package/dist/chat/transcript/script-input.d.ts +1 -1
- package/dist/chat/transcript/shell-block.js +70 -60
- package/dist/chat/transcript/tool-row.js +21 -5
- package/dist/code/editor/FileTree.d.ts +3 -1
- package/dist/code/editor/FileTree.js +29 -1
- package/dist/components/Restricted.d.ts +25 -0
- package/dist/components/Restricted.js +32 -0
- package/dist/components/StepFrame.d.ts +1 -1
- package/dist/components/ZidaneMark.d.ts +28 -0
- package/dist/components/ZidaneMark.js +114 -0
- package/dist/components/palette/PalettePanel.d.ts +7 -1
- package/dist/components/palette/PalettePanel.js +37 -11
- package/dist/components/zidane-mark.d.ts +52 -0
- package/dist/components/zidane-mark.js +94 -0
- package/dist/core.css +59 -6
- package/dist/dist/{index-DqCio7Nd.d.ts → index-Bq87OcGy.d.ts} +19 -12
- package/dist/dist/index.d.ts +1 -1
- package/dist/extensions/ExtensionSettingsSection.d.ts +18 -0
- package/dist/extensions/ExtensionSettingsSection.js +227 -0
- package/dist/extensions/headless/host.d.ts +1 -1
- package/dist/extensions/headless/labels.d.ts +41 -1
- package/dist/extensions/headless/labels.js +57 -0
- package/dist/extensions/headless/select.js +1 -2
- package/dist/extensions/index.d.ts +2 -1
- package/dist/extensions/index.js +2 -1
- package/dist/files/FilesTab.js +2 -0
- package/dist/files/TreeColumn.d.ts +5 -1
- package/dist/files/TreeColumn.js +6 -0
- package/dist/files/headless/fixture-host.js +5 -3
- package/dist/files/headless/host.d.ts +24 -6
- package/dist/files/headless/index.d.ts +2 -2
- package/dist/files/headless/labels.d.ts +1 -0
- package/dist/files/headless/labels.js +1 -0
- package/dist/files/testing/contract.js +9 -2
- package/dist/files/useWorkspace.d.ts +14 -2
- package/dist/files/useWorkspace.js +87 -9
- package/dist/git/BranchMenu.js +1 -1
- package/dist/git/MoveSessionDialog.js +1 -1
- package/dist/git/RemoteFolderPicker.js +1 -1
- package/dist/git/WherePicker.js +1 -1
- package/dist/git/headless/index.js +1 -1
- package/dist/git/useEnvironmentChoices.js +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/dist/keybindings/headless/catalog.js +1 -1
- package/dist/labels.d.ts +1 -0
- package/dist/labels.js +1 -0
- package/dist/machines/DaemonMenu.js +1 -1
- package/dist/machines/HostCapabilities.d.ts +23 -1
- package/dist/machines/HostCapabilities.js +149 -65
- package/dist/machines/HostSyncPanel.js +129 -123
- package/dist/machines/HostsSection.js +5 -1
- package/dist/machines/ServerCard.d.ts +4 -2
- package/dist/machines/ServerCard.js +222 -99
- package/dist/machines/ServerMachinesPanel.js +16 -13
- package/dist/machines/ServerUpdatePanel.js +31 -21
- package/dist/machines/TokensPanel.js +75 -53
- package/dist/machines/headless/fixture-host.d.ts +5 -0
- package/dist/machines/headless/fixture-host.js +13 -4
- package/dist/machines/headless/fixtures.js +1 -1
- package/dist/machines/headless/host.d.ts +22 -2
- package/dist/machines/headless/index.d.ts +2 -2
- package/dist/machines/headless/labels.d.ts +22 -1
- package/dist/machines/headless/labels.js +22 -2
- package/dist/machines/testing/contract.d.ts +3 -1
- package/dist/machines/testing/contract.js +9 -0
- package/dist/motion/size.d.ts +22 -1
- package/dist/motion/size.js +82 -4
- package/dist/onboarding/demos/delivery.d.ts +16 -0
- package/dist/onboarding/demos/delivery.js +132 -0
- package/dist/onboarding/demos/index.d.ts +2 -1
- package/dist/onboarding/demos/index.js +2 -1
- package/dist/onboarding/headless/labels.d.ts +8 -0
- package/dist/onboarding/headless/labels.js +7 -0
- package/dist/onboarding/index.d.ts +2 -1
- package/dist/onboarding/index.js +2 -1
- package/dist/onboarding/steps/ConversationStep.js +46 -4
- package/dist/palette/CommandPalette.js +3 -0
- package/dist/palette/PaletteDialog.js +7 -3
- package/dist/palette/usePaletteController.d.ts +10 -0
- package/dist/palette/usePaletteController.js +25 -3
- package/dist/server/sse-handler.js +6 -1
- package/dist/session/ArtifactsPanel.js +1 -1
- package/dist/session/SideChat.js +1 -2
- package/dist/session/UsagePanel.js +1 -1
- package/dist/session/headless/host.d.ts +3 -1
- package/dist/session/headless/index.js +2 -2
- package/dist/settings/SettingsRestricted.d.ts +25 -0
- package/dist/settings/SettingsRestricted.js +44 -0
- package/dist/settings/SettingsRowsPage.js +31 -37
- package/dist/settings/headless/catalog.js +7 -6
- package/dist/settings/headless/labels.d.ts +4 -2
- package/dist/settings/headless/labels.js +4 -2
- package/dist/settings/headless/layout.js +1 -1
- package/dist/settings/headless/providers.d.ts +2 -0
- package/dist/settings/headless/search.d.ts +1 -1
- package/dist/settings/index.d.ts +2 -2
- package/dist/settings/index.js +2 -2
- package/dist/settings/rows.d.ts +51 -8
- package/dist/settings/rows.js +81 -26
- package/dist/settings/sections/enabled-list/EnabledListSection.js +3 -2
- package/dist/settings/sections/environments/EnvironmentsSection.js +4 -3
- package/dist/settings/sections/extensions/ExtensionConfigRows.d.ts +2 -2
- package/dist/settings/sections/extensions/ExtensionConfigRows.js +22 -25
- package/dist/settings/sections/extensions/ExtensionOptionsSection.js +3 -2
- package/dist/settings/sections/extensions/options-labels.d.ts +2 -2
- package/dist/settings/sections/extensions/options-labels.js +2 -2
- package/dist/settings/sections/host-catalog/HostCatalogSection.d.ts +5 -3
- package/dist/settings/sections/host-catalog/HostCatalogSection.js +7 -4
- package/dist/settings/sections/instructions/InstructionsSection.js +24 -17
- package/dist/settings/sections/logs/LogsSection.d.ts +2 -1
- package/dist/settings/sections/logs/LogsSection.js +64 -56
- package/dist/settings/sections/mcp/McpSection.d.ts +1 -1
- package/dist/settings/sections/mcp/McpSection.js +18 -17
- package/dist/settings/sections/models/ModelRows.d.ts +3 -3
- package/dist/settings/sections/models/ModelRows.js +8 -7
- package/dist/settings/sections/performance/PerformanceSection.js +13 -4
- package/dist/settings/sections/performance/labels.d.ts +0 -1
- package/dist/settings/sections/performance/labels.js +0 -1
- package/dist/settings/sections/providers/CredentialSources.js +18 -8
- package/dist/settings/sections/providers/ProvidersSection.d.ts +2 -2
- package/dist/settings/sections/providers/ProvidersSection.js +20 -17
- package/dist/settings/sections/providers/ServerProvidersSection.d.ts +1 -1
- package/dist/settings/sections/providers/ServerProvidersSection.js +10 -14
- package/dist/settings/sections/shared/catalog.js +3 -2
- package/dist/settings/sections/skills/SkillList.js +3 -2
- package/dist/settings/testing/accounts-demo.js +1 -0
- package/dist/settings/testing/accounts.contract.js +2 -0
- package/dist/styles.css +160 -24
- package/dist/terminal/HostTerminalSurface.js +1 -1
- package/dist/terminal/headless/links.d.ts +19 -1
- package/dist/terminal/headless/links.js +26 -2
- package/dist/theme/css-vars.js +1 -0
- package/dist/theme/derive.d.ts +4 -0
- package/dist/theme/derive.js +2 -0
- package/dist/workspace/PanelContentView.js +1 -1
- package/dist/workspace/PanelHome.d.ts +3 -1
- package/dist/workspace/PanelHome.js +4 -3
- package/dist/workspace/SidePanel.d.ts +3 -1
- package/dist/workspace/SidePanel.js +3 -2
- package/dist/workspace/headless/open-target.d.ts +1 -1
- package/dist/workspace/headless/open-target.js +2 -2
- package/package.json +2 -2
- package/src/styles/chat.css +10 -10
- package/src/styles/motion.css +37 -0
- package/src/styles/primitives.css +11 -3
- package/src/styles/sidebar.css +12 -0
- package/src/styles/tokens.css +6 -0
- package/src/styles/transcript.css +69 -5
|
@@ -100,6 +100,14 @@ declare function onComposerInsert(scopeKey: string | null, handler: (text: strin
|
|
|
100
100
|
* @param target - The composer it is for; without one, the window's.
|
|
101
101
|
*/
|
|
102
102
|
declare function focusComposer(target?: ComposerTarget): void;
|
|
103
|
+
/**
|
|
104
|
+
* Move keyboard focus to the window's composer, or, while none takes it (a
|
|
105
|
+
* conversation switch is still mounting it, or re-keying it to a scope that
|
|
106
|
+
* resolves later), to the next composer to subscribe.
|
|
107
|
+
*/
|
|
108
|
+
declare function focusComposerWhenReady(): void;
|
|
109
|
+
/** Whether a {@link focusComposerWhenReady} request waits for a composer; taking it clears it. */
|
|
110
|
+
declare function takePendingComposerFocus(): boolean;
|
|
103
111
|
/**
|
|
104
112
|
* Takes the focus requests pushed to a composer.
|
|
105
113
|
*
|
|
@@ -153,4 +161,4 @@ declare function onComposerDraft(scopeKey: string | null, handler: (draft: Compo
|
|
|
153
161
|
*/
|
|
154
162
|
declare function textAttachment(name: string, text: string): ComposerAttachment;
|
|
155
163
|
//#endregion
|
|
156
|
-
export { ComposerDraft, ComposerTarget, NO_COMPOSER_HINT, __resetComposerScopesForTests, claimComposerFocus, focusComposer, hasComposerFor, hasFocusedComposer, isFocusedComposer, onComposerAttachment, onComposerDraft, onComposerFocus, onComposerInsert, onComposerMention, onComposerPrompt, pushComposerAttachment, pushComposerDraft, pushComposerInsert, pushComposerMention, pushComposerPrompt, registerComposerScope, textAttachment, useComposerFor, useHasFocusedComposer };
|
|
164
|
+
export { ComposerDraft, ComposerTarget, NO_COMPOSER_HINT, __resetComposerScopesForTests, claimComposerFocus, focusComposer, focusComposerWhenReady, hasComposerFor, hasFocusedComposer, isFocusedComposer, onComposerAttachment, onComposerDraft, onComposerFocus, onComposerInsert, onComposerMention, onComposerPrompt, pushComposerAttachment, pushComposerDraft, pushComposerInsert, pushComposerMention, pushComposerPrompt, registerComposerScope, takePendingComposerFocus, textAttachment, useComposerFor, useHasFocusedComposer };
|
|
@@ -99,21 +99,28 @@ function claimComposerFocus(scopeKey) {
|
|
|
99
99
|
function __resetComposerScopesForTests() {
|
|
100
100
|
composerScopes.clear();
|
|
101
101
|
focusedClaim = null;
|
|
102
|
+
setFocusPending(false);
|
|
102
103
|
scopesChanged();
|
|
103
104
|
}
|
|
105
|
+
/** Whether a composer took the event. */
|
|
104
106
|
function dispatch(type, payload, target) {
|
|
105
107
|
const scopeKey = target?.scopeKey ?? focusedClaim?.scopeKey;
|
|
106
|
-
window.dispatchEvent(new CustomEvent(type, {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
return !window.dispatchEvent(new CustomEvent(type, {
|
|
109
|
+
detail: {
|
|
110
|
+
payload,
|
|
111
|
+
scopeKey
|
|
112
|
+
},
|
|
113
|
+
cancelable: true
|
|
114
|
+
}));
|
|
110
115
|
}
|
|
111
116
|
/** A composer receiving `scopeKey` (`null`: a folderless draft) takes the events resolved to it. */
|
|
112
117
|
function listen(type, scopeKey, handler) {
|
|
113
118
|
const own = scopeKey ?? NO_SCOPE;
|
|
114
119
|
const listener = (e) => {
|
|
115
120
|
const detail = e.detail;
|
|
116
|
-
if (detail.scopeKey
|
|
121
|
+
if (detail.scopeKey !== own) return;
|
|
122
|
+
e.preventDefault();
|
|
123
|
+
handler(detail.payload);
|
|
117
124
|
};
|
|
118
125
|
window.addEventListener(type, listener);
|
|
119
126
|
return () => window.removeEventListener(type, listener);
|
|
@@ -188,8 +195,44 @@ const FOCUS_EVENT = "zg:composer:focus";
|
|
|
188
195
|
* @param target - The composer it is for; without one, the window's.
|
|
189
196
|
*/
|
|
190
197
|
function focusComposer(target) {
|
|
198
|
+
setFocusPending(false);
|
|
191
199
|
dispatch(FOCUS_EVENT, void 0, target);
|
|
192
200
|
}
|
|
201
|
+
/** A focus request no composer took yet: the next one to subscribe takes it. */
|
|
202
|
+
let focusPending = false;
|
|
203
|
+
let stopDropping = null;
|
|
204
|
+
/**
|
|
205
|
+
* Sets the pending request. While one waits, the user's next click or key
|
|
206
|
+
* drops it: they moved on, so a composer mounting later (another session
|
|
207
|
+
* opened minutes after) must not take focus.
|
|
208
|
+
*/
|
|
209
|
+
function setFocusPending(on) {
|
|
210
|
+
stopDropping?.();
|
|
211
|
+
stopDropping = null;
|
|
212
|
+
focusPending = on;
|
|
213
|
+
if (!on || typeof window === "undefined") return;
|
|
214
|
+
const drop = () => setFocusPending(false);
|
|
215
|
+
window.addEventListener("pointerdown", drop, true);
|
|
216
|
+
window.addEventListener("keydown", drop, true);
|
|
217
|
+
stopDropping = () => {
|
|
218
|
+
window.removeEventListener("pointerdown", drop, true);
|
|
219
|
+
window.removeEventListener("keydown", drop, true);
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Move keyboard focus to the window's composer, or, while none takes it (a
|
|
224
|
+
* conversation switch is still mounting it, or re-keying it to a scope that
|
|
225
|
+
* resolves later), to the next composer to subscribe.
|
|
226
|
+
*/
|
|
227
|
+
function focusComposerWhenReady() {
|
|
228
|
+
setFocusPending(!dispatch(FOCUS_EVENT, void 0));
|
|
229
|
+
}
|
|
230
|
+
/** Whether a {@link focusComposerWhenReady} request waits for a composer; taking it clears it. */
|
|
231
|
+
function takePendingComposerFocus() {
|
|
232
|
+
const pending = focusPending;
|
|
233
|
+
setFocusPending(false);
|
|
234
|
+
return pending;
|
|
235
|
+
}
|
|
193
236
|
/**
|
|
194
237
|
* Takes the focus requests pushed to a composer.
|
|
195
238
|
*
|
|
@@ -260,4 +303,4 @@ function textAttachment(name, text) {
|
|
|
260
303
|
};
|
|
261
304
|
}
|
|
262
305
|
//#endregion
|
|
263
|
-
export { NO_COMPOSER_HINT, __resetComposerScopesForTests, claimComposerFocus, focusComposer, hasComposerFor, hasFocusedComposer, isFocusedComposer, onComposerAttachment, onComposerDraft, onComposerFocus, onComposerInsert, onComposerMention, onComposerPrompt, pushComposerAttachment, pushComposerDraft, pushComposerInsert, pushComposerMention, pushComposerPrompt, registerComposerScope, textAttachment, useComposerFor, useHasFocusedComposer };
|
|
306
|
+
export { NO_COMPOSER_HINT, __resetComposerScopesForTests, claimComposerFocus, focusComposer, focusComposerWhenReady, hasComposerFor, hasFocusedComposer, isFocusedComposer, onComposerAttachment, onComposerDraft, onComposerFocus, onComposerInsert, onComposerMention, onComposerPrompt, pushComposerAttachment, pushComposerDraft, pushComposerInsert, pushComposerMention, pushComposerPrompt, registerComposerScope, takePendingComposerFocus, textAttachment, useComposerFor, useHasFocusedComposer };
|
|
@@ -44,7 +44,7 @@ import { SendButton, SendButtonProps, SendRoute } from "./SendButton.js";
|
|
|
44
44
|
import { ServerScopeToggle, ServerScopeToggleProps } from "./ServerScopeToggle.js";
|
|
45
45
|
import { AttachmentNotices, AttachmentNoticesProps, AttachmentTiles, AttachmentTilesProps, attachmentLightboxItems } from "./attachments.js";
|
|
46
46
|
import { DEFAULT_BADGE_ORDER, OrderedBadge, mergeBadgeOrder, orderComposerBadges } from "./badge-order.js";
|
|
47
|
-
import { ComposerDraft, ComposerTarget, NO_COMPOSER_HINT, __resetComposerScopesForTests, claimComposerFocus, focusComposer, hasComposerFor, hasFocusedComposer, isFocusedComposer, onComposerAttachment, onComposerDraft, onComposerFocus, onComposerInsert, onComposerMention, onComposerPrompt, pushComposerAttachment, pushComposerDraft, pushComposerInsert, pushComposerMention, pushComposerPrompt, registerComposerScope, textAttachment, useComposerFor, useHasFocusedComposer } from "./composer-bus.js";
|
|
47
|
+
import { ComposerDraft, ComposerTarget, NO_COMPOSER_HINT, __resetComposerScopesForTests, claimComposerFocus, focusComposer, focusComposerWhenReady, hasComposerFor, hasFocusedComposer, isFocusedComposer, onComposerAttachment, onComposerDraft, onComposerFocus, onComposerInsert, onComposerMention, onComposerPrompt, pushComposerAttachment, pushComposerDraft, pushComposerInsert, pushComposerMention, pushComposerPrompt, registerComposerScope, takePendingComposerFocus, textAttachment, useComposerFor, useHasFocusedComposer } from "./composer-bus.js";
|
|
48
48
|
import { isCaretAtEnd, isCaretAtStart, plainTextToDocJson } from "./prompt-history-nav.js";
|
|
49
49
|
import { suggestionExtension } from "./suggestion-extension.js";
|
|
50
50
|
import { ATTACHMENT_NOTICE_MS, useAttachmentIngest, useAttachmentNotices } from "./useAttachmentIngest.js";
|
|
@@ -58,4 +58,4 @@ import { SessionMeters, SessionMetersTarget, useSessionContextStatus, useSession
|
|
|
58
58
|
import { NewSessionDefaults, NewSessionModelSource, useNewSessionDefaults } from "./use-new-session-defaults.js";
|
|
59
59
|
import { useProviderReadyPoll } from "./use-provider-ready-poll.js";
|
|
60
60
|
import { WORK_HOLD_MS, WORK_SHOW_MS, useSustainedWork, workShowDelay } from "./use-sustained-work.js";
|
|
61
|
-
export { ATTACHMENT_NOTICE_MS, AgentPicker, AgentPickerDialog, AgentPickerDialogProps, AgentPickerProps, AgentProfile, ApprovalDock, ApprovalDockProps, ArchivedBanner, ArchivedBannerProps, AttachmentLabelFn, AttachmentNotices, AttachmentNoticesProps, AttachmentRefusedError, AttachmentRow, AttachmentRowProps, AttachmentTiles, AttachmentTilesProps, Composer, type ComposerAttachment, ComposerBadge, ComposerBadgeTone, ComposerBadges, ComposerBadgesProps, ComposerControls, ComposerControlsProps, ComposerDefaults, ComposerDock, ComposerDockProps, ComposerDraft, ComposerHandle, ComposerHostProvider, ComposerHostProviderProps, ComposerProps, ComposerResult, ComposerRetry, ComposerStatusPills, ComposerStatusPillsProps, ComposerSubmit, ComposerTarget, ContextBreakdown, type ContextBreakdownData, ContextBreakdownProps, ContextCost, ContextGauge, ContextOrb, ContextOrbProps, ContextUsage, ConversationBadges, ConversationBadgesProps, Cursor, CycleAgentOptions, DEFAULT_BADGE_ORDER, DockCard, DockCardProps, DockRow, DockRowProps, DraftServer, DraftTarget, DraftTargetOptions, DraftTargetRequest, EFFORT_LEVELS, EffortLevel, EffortPickerDialog, EffortPickerDialogProps, HostAgentPicker, HostAgentPickerProps, HostComposer, HostComposerProps, HostContextOrb, HostContextOrbProps, HostModelChainList, HostModelChainListProps, HostModelImages, HostModelOptionsPicker, HostModelOptionsPickerProps, HostModelPicker, HostModelPickerProps, HostPicker, HostPickerProps, ImageModelList, ImageModelListProps, type ImageModelRow, MAX_FILE_ATTACHMENT_BYTES, MAX_IMAGE_ATTACHMENT_BYTES, MentionItem, 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, ModelWindow, ModelWindowProps, NO_COMPOSER_HINT, NewSessionDefaults, NewSessionModelSource, OPTION_ICON, OrderedBadge, PASTE_FOLD_CHAR_THRESHOLD, PASTE_FOLD_LINE_THRESHOLD, PickerGroup, PickerPill, PickerPillProps, ProjectMenu, ProjectMenuProps, PromptHistoryProvider, PromptHistoryProviderProps, PromptHistoryValue, RetryPill, RetryPillProps, RunStatusChip, RunStatusChipProps, ScopeToggle, ScopeToggleProps, SelectTurnHint, type SelectTurnHintProps, SendButton, SendButtonProps, SendPromptControls, SendPromptOptions, SendRoute, ServerScopeToggle, ServerScopeToggleProps, SessionMeters, SessionMetersTarget, SuggestionKind, SuggestionPopup, SuggestionPopupProps, SuggestionSource, SuggestionState, THINKING_LEVELS, TRIGGER, ThinkingLevel, WORK_HOLD_MS, WORK_SHOW_MS, __resetComposerScopesForTests, attachmentErrorText, attachmentLightboxItems, canJoinChain, catalogFromProviders, claimComposerFocus, colorForCategory, compactWindow, contextGauge, decodeDataUrlAsText, defaultAttachmentTileLabel, detectLanguage, effectiveImageModel, findModel, focusComposer, formatBytes, groupKeyOf, hasComposerFor, hasFocusedComposer, imageCatalogRows, imageModelKey, isCaretAtEnd, isCaretAtStart, isFocusedComposer, isPdfAttachment, isTextLike, lineupKeyOf, mergeBadgeOrder, modelKey, modelLineup, modelNameOf, modelSearchScore, nextProfileId, offCatalogRows, onComposerAttachment, onComposerDraft, onComposerFocus, onComposerInsert, onComposerMention, onComposerPrompt, orderComposerBadges, pastedTextFilename, pickRefOf, pickerGroups, plainTextToDocJson, providerAccountLabel, pushComposerAttachment, pushComposerDraft, pushComposerInsert, pushComposerMention, pushComposerPrompt, readAttachment, refKey, registerComposerScope, resolveChain, resolvePick, resourceErrorText, rowKey, shouldFoldPasteToAttachment, suggestionExtension, textAttachment, unresolveChain, useAgentProfiles, useAttachmentIngest, useAttachmentNotices, useAttachmentRemoval, useCacheHints, useComposerFor, useComposerHost, useComposerLabels, useComposerModelName, useComposerProviderLabel, useCycleAgent, useDraftKnobs, useDraftTarget, useHasFocusedComposer, useHostResource, useJoinedRunProgress, useModelCatalog, useModelKnobs, useModelPickerPrefs, useModelPickerPrefsStore, useNewSessionDefaults, usePromptHistory, useProviderReadyPoll, useRememberedKnobs, useRunAccruedCost, useRunElapsedSec, useRunMeterValue, useRunOutputTokens, useRunProgress, useRunStartedAt, useSendPrompt, useSessionContextStatus, useSessionMeters, useSustainedWork, withPrimary, workShowDelay };
|
|
61
|
+
export { ATTACHMENT_NOTICE_MS, AgentPicker, AgentPickerDialog, AgentPickerDialogProps, AgentPickerProps, AgentProfile, ApprovalDock, ApprovalDockProps, ArchivedBanner, ArchivedBannerProps, AttachmentLabelFn, AttachmentNotices, AttachmentNoticesProps, AttachmentRefusedError, AttachmentRow, AttachmentRowProps, AttachmentTiles, AttachmentTilesProps, Composer, type ComposerAttachment, ComposerBadge, ComposerBadgeTone, ComposerBadges, ComposerBadgesProps, ComposerControls, ComposerControlsProps, ComposerDefaults, ComposerDock, ComposerDockProps, ComposerDraft, ComposerHandle, ComposerHostProvider, ComposerHostProviderProps, ComposerProps, ComposerResult, ComposerRetry, ComposerStatusPills, ComposerStatusPillsProps, ComposerSubmit, ComposerTarget, ContextBreakdown, type ContextBreakdownData, ContextBreakdownProps, ContextCost, ContextGauge, ContextOrb, ContextOrbProps, ContextUsage, ConversationBadges, ConversationBadgesProps, Cursor, CycleAgentOptions, DEFAULT_BADGE_ORDER, DockCard, DockCardProps, DockRow, DockRowProps, DraftServer, DraftTarget, DraftTargetOptions, DraftTargetRequest, EFFORT_LEVELS, EffortLevel, EffortPickerDialog, EffortPickerDialogProps, HostAgentPicker, HostAgentPickerProps, HostComposer, HostComposerProps, HostContextOrb, HostContextOrbProps, HostModelChainList, HostModelChainListProps, HostModelImages, HostModelOptionsPicker, HostModelOptionsPickerProps, HostModelPicker, HostModelPickerProps, HostPicker, HostPickerProps, ImageModelList, ImageModelListProps, type ImageModelRow, MAX_FILE_ATTACHMENT_BYTES, MAX_IMAGE_ATTACHMENT_BYTES, MentionItem, 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, ModelWindow, ModelWindowProps, NO_COMPOSER_HINT, NewSessionDefaults, NewSessionModelSource, OPTION_ICON, OrderedBadge, PASTE_FOLD_CHAR_THRESHOLD, PASTE_FOLD_LINE_THRESHOLD, PickerGroup, PickerPill, PickerPillProps, ProjectMenu, ProjectMenuProps, PromptHistoryProvider, PromptHistoryProviderProps, PromptHistoryValue, RetryPill, RetryPillProps, RunStatusChip, RunStatusChipProps, ScopeToggle, ScopeToggleProps, SelectTurnHint, type SelectTurnHintProps, SendButton, SendButtonProps, SendPromptControls, SendPromptOptions, SendRoute, ServerScopeToggle, ServerScopeToggleProps, SessionMeters, SessionMetersTarget, SuggestionKind, SuggestionPopup, SuggestionPopupProps, SuggestionSource, SuggestionState, THINKING_LEVELS, TRIGGER, ThinkingLevel, WORK_HOLD_MS, WORK_SHOW_MS, __resetComposerScopesForTests, attachmentErrorText, attachmentLightboxItems, canJoinChain, catalogFromProviders, claimComposerFocus, colorForCategory, compactWindow, contextGauge, decodeDataUrlAsText, defaultAttachmentTileLabel, detectLanguage, effectiveImageModel, findModel, focusComposer, focusComposerWhenReady, formatBytes, groupKeyOf, hasComposerFor, hasFocusedComposer, imageCatalogRows, imageModelKey, isCaretAtEnd, isCaretAtStart, isFocusedComposer, isPdfAttachment, isTextLike, lineupKeyOf, mergeBadgeOrder, modelKey, modelLineup, modelNameOf, modelSearchScore, nextProfileId, offCatalogRows, onComposerAttachment, onComposerDraft, onComposerFocus, onComposerInsert, onComposerMention, onComposerPrompt, orderComposerBadges, pastedTextFilename, pickRefOf, pickerGroups, plainTextToDocJson, providerAccountLabel, pushComposerAttachment, pushComposerDraft, pushComposerInsert, pushComposerMention, pushComposerPrompt, readAttachment, refKey, registerComposerScope, resolveChain, resolvePick, resourceErrorText, rowKey, shouldFoldPasteToAttachment, suggestionExtension, takePendingComposerFocus, textAttachment, unresolveChain, useAgentProfiles, useAttachmentIngest, useAttachmentNotices, useAttachmentRemoval, useCacheHints, useComposerFor, useComposerHost, useComposerLabels, useComposerModelName, useComposerProviderLabel, useCycleAgent, useDraftKnobs, useDraftTarget, useHasFocusedComposer, useHostResource, useJoinedRunProgress, useModelCatalog, useModelKnobs, useModelPickerPrefs, useModelPickerPrefsStore, useNewSessionDefaults, usePromptHistory, useProviderReadyPoll, useRememberedKnobs, useRunAccruedCost, useRunElapsedSec, useRunMeterValue, useRunOutputTokens, useRunProgress, useRunStartedAt, useSendPrompt, useSessionContextStatus, useSessionMeters, useSustainedWork, withPrimary, workShowDelay };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComposerHostProvider, useComposerHost, useComposerLabels } from "./ComposerHostProvider.js";
|
|
2
2
|
import { AttachmentRefusedError, MAX_FILE_ATTACHMENT_BYTES, MAX_IMAGE_ATTACHMENT_BYTES, PASTE_FOLD_CHAR_THRESHOLD, PASTE_FOLD_LINE_THRESHOLD, attachmentErrorText, decodeDataUrlAsText, detectLanguage, formatBytes, isPdfAttachment, isTextLike, pastedTextFilename, readAttachment, shouldFoldPasteToAttachment } from "./attachment-ingest.js";
|
|
3
|
-
import { NO_COMPOSER_HINT, __resetComposerScopesForTests, claimComposerFocus, focusComposer, hasComposerFor, hasFocusedComposer, isFocusedComposer, onComposerAttachment, onComposerDraft, onComposerFocus, onComposerInsert, onComposerMention, onComposerPrompt, pushComposerAttachment, pushComposerDraft, pushComposerInsert, pushComposerMention, pushComposerPrompt, registerComposerScope, textAttachment, useComposerFor, useHasFocusedComposer } from "./composer-bus.js";
|
|
3
|
+
import { NO_COMPOSER_HINT, __resetComposerScopesForTests, claimComposerFocus, focusComposer, focusComposerWhenReady, hasComposerFor, hasFocusedComposer, isFocusedComposer, onComposerAttachment, onComposerDraft, onComposerFocus, onComposerInsert, onComposerMention, onComposerPrompt, pushComposerAttachment, pushComposerDraft, pushComposerInsert, pushComposerMention, pushComposerPrompt, registerComposerScope, takePendingComposerFocus, textAttachment, useComposerFor, useHasFocusedComposer } from "./composer-bus.js";
|
|
4
4
|
import { PickerPill } from "./PickerPill.js";
|
|
5
5
|
import { AgentPicker } from "./AgentPicker.js";
|
|
6
6
|
import { AttachmentNotices, AttachmentTiles, attachmentLightboxItems } from "./attachments.js";
|
|
@@ -56,4 +56,4 @@ import { useSendPrompt } from "./use-send-prompt.js";
|
|
|
56
56
|
import { useSessionContextStatus, useSessionMeters } from "./use-session-meters.js";
|
|
57
57
|
import { useNewSessionDefaults } from "./use-new-session-defaults.js";
|
|
58
58
|
import { useProviderReadyPoll } from "./use-provider-ready-poll.js";
|
|
59
|
-
export { ATTACHMENT_NOTICE_MS, AgentPicker, AgentPickerDialog, ApprovalDock, ArchivedBanner, AttachmentNotices, AttachmentRefusedError, AttachmentRow, AttachmentTiles, Composer, ComposerBadges, ComposerControls, ComposerDock, ComposerHostProvider, ComposerStatusPills, ContextBreakdown, ContextOrb, ConversationBadges, DEFAULT_BADGE_ORDER, DockCard, DockRow, EFFORT_LEVELS, EffortPickerDialog, HostAgentPicker, HostComposer, HostContextOrb, HostModelChainList, HostModelOptionsPicker, HostModelPicker, HostPicker, ImageModelList, MAX_FILE_ATTACHMENT_BYTES, MAX_IMAGE_ATTACHMENT_BYTES, ModelChainFooter, ModelChainHeader, ModelChainList, ModelChainPopover, ModelChainRow, ModelChainRows, ModelChainTooltip, ModelFlag, ModelGroupHeader, ModelMeta, ModelOptionsPicker, ModelPicker, ModelPickerDialog, ModelPickerFrame, ModelProviderChip, ModelProviderPills, ModelReasoning, ModelWindow, NO_COMPOSER_HINT, OPTION_ICON, PASTE_FOLD_CHAR_THRESHOLD, PASTE_FOLD_LINE_THRESHOLD, PickerPill, ProjectMenu, PromptHistoryProvider, RetryPill, RunStatusChip, ScopeToggle, SelectTurnHint, SendButton, ServerScopeToggle, SuggestionPopup, THINKING_LEVELS, TRIGGER, WORK_HOLD_MS, WORK_SHOW_MS, __resetComposerScopesForTests, attachmentErrorText, attachmentLightboxItems, canJoinChain, catalogFromProviders, claimComposerFocus, colorForCategory, compactWindow, contextGauge, decodeDataUrlAsText, defaultAttachmentTileLabel, detectLanguage, effectiveImageModel, findModel, focusComposer, formatBytes, groupKeyOf, hasComposerFor, hasFocusedComposer, imageCatalogRows, imageModelKey, isCaretAtEnd, isCaretAtStart, isFocusedComposer, isPdfAttachment, isTextLike, lineupKeyOf, mergeBadgeOrder, modelKey, modelLineup, modelNameOf, modelSearchScore, nextProfileId, offCatalogRows, onComposerAttachment, onComposerDraft, onComposerFocus, onComposerInsert, onComposerMention, onComposerPrompt, orderComposerBadges, pastedTextFilename, pickRefOf, pickerGroups, plainTextToDocJson, providerAccountLabel, pushComposerAttachment, pushComposerDraft, pushComposerInsert, pushComposerMention, pushComposerPrompt, readAttachment, refKey, registerComposerScope, resolveChain, resolvePick, resourceErrorText, rowKey, shouldFoldPasteToAttachment, suggestionExtension, textAttachment, unresolveChain, useAgentProfiles, useAttachmentIngest, useAttachmentNotices, useAttachmentRemoval, useCacheHints, useComposerFor, useComposerHost, useComposerLabels, useComposerModelName, useComposerProviderLabel, useCycleAgent, useDraftKnobs, useDraftTarget, useHasFocusedComposer, useHostResource, useJoinedRunProgress, useModelCatalog, useModelKnobs, useModelPickerPrefs, useModelPickerPrefsStore, useNewSessionDefaults, usePromptHistory, useProviderReadyPoll, useRememberedKnobs, useRunAccruedCost, useRunElapsedSec, useRunMeterValue, useRunOutputTokens, useRunProgress, useRunStartedAt, useSendPrompt, useSessionContextStatus, useSessionMeters, useSustainedWork, withPrimary, workShowDelay };
|
|
59
|
+
export { ATTACHMENT_NOTICE_MS, AgentPicker, AgentPickerDialog, ApprovalDock, ArchivedBanner, AttachmentNotices, AttachmentRefusedError, AttachmentRow, AttachmentTiles, Composer, ComposerBadges, ComposerControls, ComposerDock, ComposerHostProvider, ComposerStatusPills, ContextBreakdown, ContextOrb, ConversationBadges, DEFAULT_BADGE_ORDER, DockCard, DockRow, EFFORT_LEVELS, EffortPickerDialog, HostAgentPicker, HostComposer, HostContextOrb, HostModelChainList, HostModelOptionsPicker, HostModelPicker, HostPicker, ImageModelList, MAX_FILE_ATTACHMENT_BYTES, MAX_IMAGE_ATTACHMENT_BYTES, ModelChainFooter, ModelChainHeader, ModelChainList, ModelChainPopover, ModelChainRow, ModelChainRows, ModelChainTooltip, ModelFlag, ModelGroupHeader, ModelMeta, ModelOptionsPicker, ModelPicker, ModelPickerDialog, ModelPickerFrame, ModelProviderChip, ModelProviderPills, ModelReasoning, ModelWindow, NO_COMPOSER_HINT, OPTION_ICON, PASTE_FOLD_CHAR_THRESHOLD, PASTE_FOLD_LINE_THRESHOLD, PickerPill, ProjectMenu, PromptHistoryProvider, RetryPill, RunStatusChip, ScopeToggle, SelectTurnHint, SendButton, ServerScopeToggle, SuggestionPopup, THINKING_LEVELS, TRIGGER, WORK_HOLD_MS, WORK_SHOW_MS, __resetComposerScopesForTests, attachmentErrorText, attachmentLightboxItems, canJoinChain, catalogFromProviders, claimComposerFocus, colorForCategory, compactWindow, contextGauge, decodeDataUrlAsText, defaultAttachmentTileLabel, detectLanguage, effectiveImageModel, findModel, focusComposer, focusComposerWhenReady, formatBytes, groupKeyOf, hasComposerFor, hasFocusedComposer, imageCatalogRows, imageModelKey, isCaretAtEnd, isCaretAtStart, isFocusedComposer, isPdfAttachment, isTextLike, lineupKeyOf, mergeBadgeOrder, modelKey, modelLineup, modelNameOf, modelSearchScore, nextProfileId, offCatalogRows, onComposerAttachment, onComposerDraft, onComposerFocus, onComposerInsert, onComposerMention, onComposerPrompt, orderComposerBadges, pastedTextFilename, pickRefOf, pickerGroups, plainTextToDocJson, providerAccountLabel, pushComposerAttachment, pushComposerDraft, pushComposerInsert, pushComposerMention, pushComposerPrompt, readAttachment, refKey, registerComposerScope, resolveChain, resolvePick, resourceErrorText, rowKey, shouldFoldPasteToAttachment, suggestionExtension, takePendingComposerFocus, textAttachment, unresolveChain, useAgentProfiles, useAttachmentIngest, useAttachmentNotices, useAttachmentRemoval, useCacheHints, useComposerFor, useComposerHost, useComposerLabels, useComposerModelName, useComposerProviderLabel, useCycleAgent, useDraftKnobs, useDraftTarget, useHasFocusedComposer, useHostResource, useJoinedRunProgress, useModelCatalog, useModelKnobs, useModelPickerPrefs, useModelPickerPrefsStore, useNewSessionDefaults, usePromptHistory, useProviderReadyPoll, useRememberedKnobs, useRunAccruedCost, useRunElapsedSec, useRunMeterValue, useRunOutputTokens, useRunProgress, useRunStartedAt, useSendPrompt, useSessionContextStatus, useSessionMeters, useSustainedWork, withPrimary, workShowDelay };
|
|
@@ -45,6 +45,10 @@ interface DraftTargetRequest {
|
|
|
45
45
|
folder: string | null;
|
|
46
46
|
/** A chat with no folder, on the request's host ("Start without a folder"); `folder` is ignored. */
|
|
47
47
|
folderless?: boolean;
|
|
48
|
+
/** The environment kind to pick (a machine's: `local@<name>`); absent: the default. */
|
|
49
|
+
environment?: string;
|
|
50
|
+
/** The folder on the machine {@link DraftTargetRequest.environment} names, once that machine resolves. */
|
|
51
|
+
machineFolder?: string;
|
|
48
52
|
}
|
|
49
53
|
/** The draft's target and its picks, as the composer's where menu and folder pickers read them. */
|
|
50
54
|
interface DraftTarget {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useGitHost } from "../../git/GitProvider.js";
|
|
2
1
|
import { resolveDraftDescriptor } from "../../git/headless/environment.js";
|
|
2
|
+
import { useGitHost } from "../../git/GitProvider.js";
|
|
3
3
|
import { resolveRemoteClone } from "../../git/headless/remote-clone.js";
|
|
4
4
|
import { useImportRepo } from "../../git/ImportRepoDialog.js";
|
|
5
5
|
import { useEnvironmentChoices } from "../../git/useEnvironmentChoices.js";
|
|
@@ -44,6 +44,7 @@ function useDraftTarget(options) {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
const [appliedRequest, setAppliedRequest] = useState(0);
|
|
47
|
+
const [requestedMachineFolder, setRequestedMachineFolder] = useState(null);
|
|
47
48
|
if (isNewSession && request && request.seq !== appliedRequest) {
|
|
48
49
|
setAppliedRequest(request.seq);
|
|
49
50
|
setHostId(request.hostId);
|
|
@@ -53,7 +54,14 @@ function useDraftTarget(options) {
|
|
|
53
54
|
}));
|
|
54
55
|
setRemoteFolder(request.folderless ? null : request.folder);
|
|
55
56
|
setFolderlessDraft(request.folderless === true);
|
|
56
|
-
setEnvironment(
|
|
57
|
+
setEnvironment(request.environment ? {
|
|
58
|
+
kind: request.environment,
|
|
59
|
+
branch: ""
|
|
60
|
+
} : null);
|
|
61
|
+
setRequestedMachineFolder(request.environment && request.machineFolder ? {
|
|
62
|
+
kind: request.environment,
|
|
63
|
+
folder: request.machineFolder
|
|
64
|
+
} : null);
|
|
57
65
|
setError(null);
|
|
58
66
|
}
|
|
59
67
|
if (hostId !== LOCAL_HOST_KEY && !servers.some((host) => host.id === hostId)) setHostId(LOCAL_HOST_KEY);
|
|
@@ -65,14 +73,17 @@ function useDraftTarget(options) {
|
|
|
65
73
|
};
|
|
66
74
|
const folderPath = draftFolderPath(folderState);
|
|
67
75
|
const environmentChoices = useEnvironmentChoices(isNewSession ? server ? remoteFolder ?? "" : folderPath ?? "" : null, server?.id);
|
|
68
|
-
const
|
|
76
|
+
const descriptor = isNewSession ? resolveDraftDescriptor(environmentChoices, environment) : void 0;
|
|
77
|
+
const machine = descriptor?.machine;
|
|
69
78
|
const [machineFolder, setMachineFolder] = useState(null);
|
|
70
79
|
const machineHost = server?.id ?? LOCAL_HOST_KEY;
|
|
71
80
|
const machineKey = `${machine?.id ?? ""}\u0000${machineHost}`;
|
|
72
81
|
const [folderMachine, setFolderMachine] = useState(machineKey);
|
|
73
82
|
if (folderMachine !== machineKey) {
|
|
74
83
|
setFolderMachine(machineKey);
|
|
75
|
-
|
|
84
|
+
const requested = machine && requestedMachineFolder?.kind === descriptor?.kind ? requestedMachineFolder : null;
|
|
85
|
+
setMachineFolder(requested?.folder ?? null);
|
|
86
|
+
if (requested) setRequestedMachineFolder(null);
|
|
76
87
|
}
|
|
77
88
|
const localFolder = draftLocalFolder({
|
|
78
89
|
...folderState,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Writable } from "../headless/store.js";
|
|
2
2
|
import { NewSessionDefaults, NewSessionRequest, SendAttachment } from "../headless/send-flow.js";
|
|
3
3
|
import { DraftTarget } from "./use-draft-target.js";
|
|
4
|
+
import { MessageDelivery } from "zidane/chat";
|
|
4
5
|
//#region src/chat/composer/use-send-prompt.d.ts
|
|
5
6
|
/** What {@link useSendPrompt} sends from and through. */
|
|
6
7
|
interface SendPromptOptions {
|
|
@@ -33,8 +34,11 @@ interface SendPromptOptions {
|
|
|
33
34
|
/** The composer's send and stop. */
|
|
34
35
|
interface SendPromptControls {
|
|
35
36
|
/** Sends one prompt; rejects (the composer keeps the text) when it could not go. */
|
|
36
|
-
send(text: string, attachments: readonly SendAttachment[], activatedSkills?: readonly string[],
|
|
37
|
+
send(text: string, attachments: readonly SendAttachment[], activatedSkills?: readonly string[],
|
|
38
|
+
/** `delivery`: while a run works, steer the prompt into it or queue it (default: the host's setting). */
|
|
39
|
+
options?: {
|
|
37
40
|
keepDraft?: boolean;
|
|
41
|
+
delivery?: MessageDelivery;
|
|
38
42
|
}): Promise<void>;
|
|
39
43
|
/** Stops the conversation's run. */
|
|
40
44
|
stop(): void;
|
|
@@ -1,24 +1,13 @@
|
|
|
1
|
+
import { newSessionRequest, sendPrompt } from "../headless/send-flow.js";
|
|
1
2
|
import { useChatHost } from "../ChatProvider.js";
|
|
2
3
|
import { useComposerHost, useComposerLabels } from "./ComposerHostProvider.js";
|
|
3
4
|
import { useGitHost } from "../../git/GitProvider.js";
|
|
4
5
|
import { useSessionHost } from "../../session/SessionProvider.js";
|
|
5
6
|
import { useSessionStreamActions } from "../SessionStreamsProvider.js";
|
|
6
7
|
import { usePromptHistory } from "./PromptHistoryProvider.js";
|
|
7
|
-
import { newSessionRequest, sendPrompt } from "../headless/send-flow.js";
|
|
8
8
|
import { useState, useSyncExternalStore } from "react";
|
|
9
9
|
import { parseCommandInvocation } from "zidane/chat/pure";
|
|
10
10
|
//#region src/chat/composer/use-send-prompt.ts
|
|
11
|
-
/**
|
|
12
|
-
* The composer's send and stop, bound to the hosts: the send flow
|
|
13
|
-
* (`sendPrompt`, `zidane-ui/chat/headless`: draft → session, `!` shell, queue
|
|
14
|
-
* while running, `/side`, the provider check, echo and send) over the
|
|
15
|
-
* `ChatHost`, the session host's queue, the composer host's `/` commands, the
|
|
16
|
-
* git host's machine folders and clone on send (`cloneOnServer`: a server
|
|
17
|
-
* draft started from a local project runs in a clone of its repository
|
|
18
|
-
* there), and the prompt history. The app gives what only it holds: how a
|
|
19
|
-
* session is created, the picks a new one starts with, the side panel's
|
|
20
|
-
* hand-over and the provider flag it keeps.
|
|
21
|
-
*/
|
|
22
11
|
const UNKNOWN = {
|
|
23
12
|
get: () => null,
|
|
24
13
|
subscribe: () => () => {}
|
|
@@ -101,6 +90,7 @@ function useSendPrompt(options) {
|
|
|
101
90
|
attachments,
|
|
102
91
|
activatedSkills,
|
|
103
92
|
keepDraft: opts.keepDraft,
|
|
93
|
+
...opts.delivery ? { delivery: opts.delivery } : {},
|
|
104
94
|
running,
|
|
105
95
|
cwd,
|
|
106
96
|
remote: Boolean(hostId || draft.server)
|
|
@@ -33,7 +33,9 @@ const CHIP_LABELS = {
|
|
|
33
33
|
interactionAnsweredBy: (who) => `Answered by ${who}`,
|
|
34
34
|
badgePathUnavailable: "Path unavailable.",
|
|
35
35
|
badgeNoComposer: "No chat to add to here",
|
|
36
|
-
badgeCopied: "Copied"
|
|
36
|
+
badgeCopied: "Copied",
|
|
37
|
+
badgeOpenIn: (app) => `Open in ${app}`,
|
|
38
|
+
badgeOpenInBrowserPane: "Open in browser pane"
|
|
37
39
|
};
|
|
38
40
|
//#endregion
|
|
39
41
|
export { CHIP_LABELS };
|
|
@@ -18,6 +18,8 @@ declare const DEFAULT_COMPOSER_EDITOR_LABELS: {
|
|
|
18
18
|
placeholderShell: string;
|
|
19
19
|
placeholderSearch: string;
|
|
20
20
|
placeholderChat: string;
|
|
21
|
+
placeholderSteer: string;
|
|
22
|
+
placeholderQueue: string;
|
|
21
23
|
/** The `#` popover's scope (its Tab hint). */
|
|
22
24
|
chatScopeProject: string;
|
|
23
25
|
chatScopeAll: string;
|
|
@@ -18,6 +18,8 @@ const DEFAULT_COMPOSER_EDITOR_LABELS = {
|
|
|
18
18
|
placeholderShell: "Run a shell command…",
|
|
19
19
|
placeholderSearch: "Search this conversation…",
|
|
20
20
|
placeholderChat: "Chat with Zidane…",
|
|
21
|
+
placeholderSteer: "Enter adds it to the run. Alt+Enter sends it when the run ends.",
|
|
22
|
+
placeholderQueue: "Enter sends it when the run ends. Alt+Enter adds it to the run.",
|
|
21
23
|
/** The `#` popover's scope (its Tab hint). */
|
|
22
24
|
chatScopeProject: "This project",
|
|
23
25
|
chatScopeAll: "All projects",
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
+
import { PathPosition } from "../../terminal/headless/links.js";
|
|
1
2
|
//#region src/chat/headless/file-chip.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Inline-code → file chip classification. Pure so it can be unit-tested.
|
|
4
|
-
*
|
|
5
|
-
* Markdown inline code that names a file or directory (`src/a.ts`,
|
|
6
|
-
* `README.md`, `packages/gui/`) renders as a chip with a type icon instead
|
|
7
|
-
* of a plain code span. The rule is deliberately conservative: a bare word
|
|
8
|
-
* with no extension and no separator (`MapIR`, `useState`) stays code.
|
|
9
|
-
*
|
|
10
|
-
* Icons are static class names (UnoCSS scans this file), so keep every
|
|
11
|
-
* icon literal here rather than composing names at runtime.
|
|
12
|
-
*/
|
|
3
|
+
/** What a path in prose names: a folder or a file. */
|
|
13
4
|
type FileChipKind = 'dir' | 'file';
|
|
14
5
|
/** A path in prose, as a chip shows it: its kind, name, icon or language letters, and tone. */
|
|
15
6
|
interface FileChip {
|
|
@@ -17,8 +8,10 @@ interface FileChip {
|
|
|
17
8
|
kind: FileChipKind;
|
|
18
9
|
/** What the chip shows: the last path segment (with trailing `/` stripped). */
|
|
19
10
|
name: string;
|
|
20
|
-
/** Full text as written, for the tooltip and for opening. */
|
|
11
|
+
/** Full text as written, without its position: for the tooltip and for opening. */
|
|
21
12
|
path: string;
|
|
13
|
+
/** The line (and column, range) the text points at. */
|
|
14
|
+
at?: PathPosition;
|
|
22
15
|
/** Iconify class, e.g. `i-ph-folder`. */
|
|
23
16
|
icon: string;
|
|
24
17
|
/** Two-letter text badge used instead of an icon for languages that read better as text. */
|
|
@@ -32,6 +25,12 @@ interface FileChip {
|
|
|
32
25
|
* @param raw - The inline code's text.
|
|
33
26
|
*/
|
|
34
27
|
declare function classifyInlineCode(raw: string): FileChip | null;
|
|
28
|
+
/**
|
|
29
|
+
* How a chip writes its position after the name: `:12`, `:12:5`, `:12-20`. Empty without one.
|
|
30
|
+
*
|
|
31
|
+
* @param at - The chip's position.
|
|
32
|
+
*/
|
|
33
|
+
declare function positionSuffix(at: PathPosition | undefined): string;
|
|
35
34
|
/**
|
|
36
35
|
* The chip of a path known to be a file or folder (a mention): never plain code.
|
|
37
36
|
*
|
|
@@ -46,4 +45,4 @@ declare function chipForPath(path: string): FileChip;
|
|
|
46
45
|
*/
|
|
47
46
|
declare function resolveChipPath(chip: FileChip, cwd: string | null): string | null;
|
|
48
47
|
//#endregion
|
|
49
|
-
export { FileChip, FileChipKind, chipForPath, classifyInlineCode, resolveChipPath };
|
|
48
|
+
export { FileChip, FileChipKind, chipForPath, classifyInlineCode, positionSuffix, resolveChipPath };
|
|
@@ -1,4 +1,21 @@
|
|
|
1
|
+
import { splitPathPosition } from "../../terminal/headless/links.js";
|
|
1
2
|
//#region src/chat/headless/file-chip.ts
|
|
3
|
+
/**
|
|
4
|
+
* Inline-code → file chip classification. Pure so it can be unit-tested.
|
|
5
|
+
*
|
|
6
|
+
* Markdown inline code that names a file or directory (`src/a.ts`,
|
|
7
|
+
* `README.md`, `packages/gui/`) renders as a chip with a type icon instead
|
|
8
|
+
* of a plain code span. The rule is deliberately conservative: a bare word
|
|
9
|
+
* with no extension and no separator (`MapIR`, `useState`) stays code.
|
|
10
|
+
*
|
|
11
|
+
* Icons are static class names (UnoCSS scans this file), so keep every
|
|
12
|
+
* icon literal here rather than composing names at runtime.
|
|
13
|
+
*
|
|
14
|
+
* A file may carry a position (`schema.ts:258`, `a.ts:12:5`, `a.ts#L12`),
|
|
15
|
+
* read with the terminal's grammar (`splitPathPosition`) so both surfaces
|
|
16
|
+
* agree. Only a file takes one: `12:30`, `localhost:5173`, `src/chat:4` and
|
|
17
|
+
* URLs stay code.
|
|
18
|
+
*/
|
|
2
19
|
const EXT_INDEX = new Map([
|
|
3
20
|
{
|
|
4
21
|
exts: ["tsx", "jsx"],
|
|
@@ -225,6 +242,27 @@ const PATH_SHAPE = /^(?:\.{1,2}\/|\/|~\/)?[\w@.-]+(?:\/[\w@.-]+)*\/?$/;
|
|
|
225
242
|
*/
|
|
226
243
|
function classifyInlineCode(raw) {
|
|
227
244
|
const text = raw.trim();
|
|
245
|
+
const positioned = text.length <= 200 ? splitPathPosition(text) : null;
|
|
246
|
+
if (!positioned) return classifyPath(text);
|
|
247
|
+
const { path, ...at } = positioned;
|
|
248
|
+
const chip = classifyPath(path);
|
|
249
|
+
if (!chip || chip.kind !== "file" || /\.\d+$/.test(chip.name)) return null;
|
|
250
|
+
return {
|
|
251
|
+
...chip,
|
|
252
|
+
at
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* How a chip writes its position after the name: `:12`, `:12:5`, `:12-20`. Empty without one.
|
|
257
|
+
*
|
|
258
|
+
* @param at - The chip's position.
|
|
259
|
+
*/
|
|
260
|
+
function positionSuffix(at) {
|
|
261
|
+
if (!at) return "";
|
|
262
|
+
if (at.endLine) return `:${at.line}-${at.endLine}`;
|
|
263
|
+
return at.column ? `:${at.line}:${at.column}` : `:${at.line}`;
|
|
264
|
+
}
|
|
265
|
+
function classifyPath(text) {
|
|
228
266
|
if (text.length === 0 || text.length > 200 || !PATH_SHAPE.test(text)) return null;
|
|
229
267
|
if (/^\d[\d.]*$/.test(text)) return null;
|
|
230
268
|
const isDir = text.endsWith("/");
|
|
@@ -278,7 +316,7 @@ function classifyInlineCode(raw) {
|
|
|
278
316
|
* @param path - The file's path, as written.
|
|
279
317
|
*/
|
|
280
318
|
function chipForPath(path) {
|
|
281
|
-
const chip =
|
|
319
|
+
const chip = classifyPath(path.trim());
|
|
282
320
|
if (chip) return chip;
|
|
283
321
|
const name = path.replace(/\/$/, "").split("/").pop() || path;
|
|
284
322
|
return path.endsWith("/") ? {
|
|
@@ -307,4 +345,4 @@ function resolveChipPath(chip, cwd) {
|
|
|
307
345
|
return `${cwd.replace(/\/$/, "")}/${p.replace(/^\.\//, "")}`;
|
|
308
346
|
}
|
|
309
347
|
//#endregion
|
|
310
|
-
export { chipForPath, classifyInlineCode, resolveChipPath };
|
|
348
|
+
export { chipForPath, classifyInlineCode, positionSuffix, resolveChipPath };
|
|
@@ -212,8 +212,21 @@ function createFixtureHost(fixture, options = {}) {
|
|
|
212
212
|
}
|
|
213
213
|
return live();
|
|
214
214
|
};
|
|
215
|
-
host.send = async ({ sessionId, prompt, attachments }) => {
|
|
215
|
+
host.send = async ({ sessionId, prompt, attachments, delivery }) => {
|
|
216
216
|
const t = transcriptOf(sessionId);
|
|
217
|
+
if (delivery && runs.has(sessionId)) {
|
|
218
|
+
const echo = {
|
|
219
|
+
kind: "user-prompt",
|
|
220
|
+
text: prompt,
|
|
221
|
+
...attachments?.length ? { attachments } : {}
|
|
222
|
+
};
|
|
223
|
+
if (delivery === "steer") t.set((s) => ({
|
|
224
|
+
...s,
|
|
225
|
+
events: [...s.events, echo]
|
|
226
|
+
}));
|
|
227
|
+
else queued.set(sessionId, [...queued.get(sessionId) ?? [], prompt]);
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
217
230
|
const run = Symbol(sessionId);
|
|
218
231
|
runs.set(sessionId, run);
|
|
219
232
|
const echo = {
|
|
@@ -259,22 +272,6 @@ function createFixtureHost(fixture, options = {}) {
|
|
|
259
272
|
updatedAt: Date.now()
|
|
260
273
|
});
|
|
261
274
|
};
|
|
262
|
-
host.steer = async (sessionId, message) => {
|
|
263
|
-
if (!runs.has(sessionId)) return false;
|
|
264
|
-
transcriptOf(sessionId).set((s) => ({
|
|
265
|
-
...s,
|
|
266
|
-
events: [...s.events, {
|
|
267
|
-
kind: "user-prompt",
|
|
268
|
-
text: message
|
|
269
|
-
}]
|
|
270
|
-
}));
|
|
271
|
-
return true;
|
|
272
|
-
};
|
|
273
|
-
host.followUp = async (sessionId, message) => {
|
|
274
|
-
if (!runs.has(sessionId)) return false;
|
|
275
|
-
queued.set(sessionId, [...queued.get(sessionId) ?? [], message]);
|
|
276
|
-
return true;
|
|
277
|
-
};
|
|
278
275
|
}
|
|
279
276
|
return host;
|
|
280
277
|
}
|
|
@@ -5,7 +5,7 @@ import { SessionRemoval } from "./sidebar/directory.js";
|
|
|
5
5
|
import { ChatBadgeActions, ChatChipDetails, ChatPaths, ChatReferences, ChatSearchSync, ChatSiteIcons } from "./transcript-host.js";
|
|
6
6
|
import { ChatBlockRuns } from "./block-runs.js";
|
|
7
7
|
import { PromptSegmentRef } from "zidane/chat/pure";
|
|
8
|
-
import { InteractionRequest, InteractionResponse, StreamEvent } from "zidane/chat";
|
|
8
|
+
import { InteractionRequest, InteractionResponse, MessageDelivery, StreamEvent } from "zidane/chat";
|
|
9
9
|
//#region src/chat/headless/host.d.ts
|
|
10
10
|
/** An attachment on a prompt, as the components can show it. */
|
|
11
11
|
interface ChatAttachment {
|
|
@@ -17,6 +17,23 @@ interface ChatAttachment {
|
|
|
17
17
|
size: number;
|
|
18
18
|
/** Where a preview loads the bytes from (images and PDFs): a `data:` URL, an object URL, or any URL the page can load. */
|
|
19
19
|
dataUrl?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The file as the user picked it, when the composer converted it to send
|
|
22
|
+
* (an image re-encoded to fit the cap). The host saves these bytes where
|
|
23
|
+
* the agent's tools can reach them; the model gets the converted copy.
|
|
24
|
+
*/
|
|
25
|
+
original?: ChatAttachmentOriginal;
|
|
26
|
+
}
|
|
27
|
+
/** The file a composer converted before sending ({@link ChatAttachment.original}). */
|
|
28
|
+
interface ChatAttachmentOriginal {
|
|
29
|
+
/** The file's own name. */
|
|
30
|
+
name: string;
|
|
31
|
+
/** Its MIME type, for example `image/gif`. */
|
|
32
|
+
mediaType: string;
|
|
33
|
+
/** Size in bytes. */
|
|
34
|
+
size: number;
|
|
35
|
+
/** The bytes, as a `data:` URL. */
|
|
36
|
+
dataUrl: string;
|
|
20
37
|
}
|
|
21
38
|
/**
|
|
22
39
|
* zidane's canonical transcript event, plus what a live client knows and a
|
|
@@ -142,6 +159,11 @@ interface SendInput {
|
|
|
142
159
|
echo?: boolean;
|
|
143
160
|
/** Sent from outside the composer (a retry, a palette prompt): the shared draft stays. */
|
|
144
161
|
keepDraft?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Set when a run works in the session: `steer` hands the prompt to the run (the model reads it after its
|
|
164
|
+
* current step), `queue` holds it until the run ends. A run that ends first gets it as a new prompt.
|
|
165
|
+
*/
|
|
166
|
+
delivery?: MessageDelivery;
|
|
145
167
|
}
|
|
146
168
|
/** A conversation whose content matched a search. */
|
|
147
169
|
interface SessionSearchHit {
|
|
@@ -214,10 +236,6 @@ interface ChatHost {
|
|
|
214
236
|
shell?(sessionId: string, command: string): Promise<void>;
|
|
215
237
|
/** Whether a model provider can answer a prompt sent from `cwd`. Absent: a send is never refused for want of one. */
|
|
216
238
|
providerReady?(cwd?: string): Promise<boolean>;
|
|
217
|
-
/** Add guidance to the run in flight. Resolves false when nothing was running. */
|
|
218
|
-
steer?(sessionId: string, message: string): Promise<boolean>;
|
|
219
|
-
/** Queue a prompt for when the run in flight ends. Resolves false when nothing was running. */
|
|
220
|
-
followUp?(sessionId: string, message: string): Promise<boolean>;
|
|
221
239
|
/** Pending questions, plans, and approvals, and the way to answer or dismiss them. */
|
|
222
240
|
interactions?: {
|
|
223
241
|
pending(sessionId: string): Readable<readonly ChatInteraction[]>;
|
|
@@ -249,4 +267,4 @@ interface ChatHost {
|
|
|
249
267
|
blockRuns?: ChatBlockRuns;
|
|
250
268
|
}
|
|
251
269
|
//#endregion
|
|
252
|
-
export { ChatAttachment, ChatEvent, ChatHost, ChatInteraction, ChatModel, ChatModelProvider, ChatSession, ChatSessionStatus, SendInput, SessionSearchHit, Transcript, TranscriptState };
|
|
270
|
+
export { ChatAttachment, ChatAttachmentOriginal, ChatEvent, ChatHost, ChatInteraction, ChatModel, ChatModelProvider, ChatSession, ChatSessionStatus, SendInput, SessionSearchHit, Transcript, TranscriptState };
|
|
@@ -6,7 +6,7 @@ import { AGENT_GROUPING, MAX_ROW_CHIPS, NO_SIDEBAR_CONTRIBUTIONS, SidebarContrib
|
|
|
6
6
|
import { DirectoryServer, DirectorySettings, ProjectInSpace, SessionDirectory, SessionDirectoryOptions, SessionDirectorySource, SessionDirectoryState, SessionDirectoryStreams, SessionRef, SessionRemoval, availableProjectsOf, createSessionDirectory, filterDirectorySessions, projectKeyOf, sessionRefsOf } from "./sidebar/directory.js";
|
|
7
7
|
import { ChatBadgeActions, ChatChipDetails, ChatCommandFacts, ChatCommit, ChatContextFacts, ChatPaths, ChatReferences, ChatReferencesChange, ChatResolvedPath, ChatSearchState, ChatSearchSync, ChatSessionFacts, ChatSiteIcons, ChatSkillFacts } from "./transcript-host.js";
|
|
8
8
|
import { ChatBlockRunOptions, ChatBlockRunTransport, ChatBlockRuns, LIVE_BLOCK_RUN_LINES, LiveBlockRun, createChatBlockRuns } from "./block-runs.js";
|
|
9
|
-
import { ChatAttachment, ChatEvent, ChatHost, ChatInteraction, ChatModel, ChatModelProvider, ChatSession, ChatSessionStatus, SendInput, SessionSearchHit, Transcript, TranscriptState } from "./host.js";
|
|
9
|
+
import { ChatAttachment, ChatAttachmentOriginal, ChatEvent, ChatHost, ChatInteraction, ChatModel, ChatModelProvider, ChatSession, ChatSessionStatus, SendInput, SessionSearchHit, Transcript, TranscriptState } from "./host.js";
|
|
10
10
|
import { ResourceSnapshot } from "../../app/headless/resource.js";
|
|
11
11
|
import { ComposerModelEntry, ComposerModelOption, ImageModelRow, ModelCatalogRow, ModelPickRef } from "./composer/models.js";
|
|
12
12
|
import { LiveCostStatus, LiveStreamProgress, composeLiveCost, formatSessionCostLabel } from "./composer/live-cost.js";
|
|
@@ -22,7 +22,7 @@ import { SessionWindowMode, SidebarEnvironmentHost, SidebarHost } from "./sideba
|
|
|
22
22
|
import { ComposerMode, caretEffectivelyAtStart, composeSubmitText, decodeHistoryEntry, encodeHistoryDraft, exitsModeOnKey, modeForTypedChar, unsentDraft } from "./composer-modes.js";
|
|
23
23
|
import { beginChipWork, chipWorkBusy, resetChipWorkForTests, whenChipsSettle } from "./chip-settle.js";
|
|
24
24
|
import { commandRef, shortUrl, urlRefs } from "./badge-refs.js";
|
|
25
|
-
import { FileChip, FileChipKind, chipForPath, classifyInlineCode, resolveChipPath } from "./file-chip.js";
|
|
25
|
+
import { FileChip, FileChipKind, chipForPath, classifyInlineCode, positionSuffix, resolveChipPath } from "./file-chip.js";
|
|
26
26
|
import { REFERENCES_STORAGE_KEY, ReferenceStore, ReferenceStoreOptions, ReferenceViewEntry, createReferenceStore } from "./reference-store.js";
|
|
27
27
|
import { ChipResolution, PathResolver, PathResolverOptions, createPathResolver } from "./path-resolver.js";
|
|
28
28
|
import { ChipViewLabels, commandName, commandView, commitView, sessionForToken, sessionView, skillName, skillView } from "./chip-views.js";
|
|
@@ -52,7 +52,7 @@ import { mergePromptPreviews, missingPreviewData } from "./streams/prompt-previe
|
|
|
52
52
|
import { SessionStreamActions, createSessionStreamActions } from "./streams/actions.js";
|
|
53
53
|
import { selectEditEvents, stableSelection } from "./streams/selectors.js";
|
|
54
54
|
import "./streams/index.js";
|
|
55
|
-
import { NO_PROVIDER_ERROR, NewSessionDefaults, NewSessionRequest, SendAttachment, SendDraft, SendFlowDeps, SendPromptAttachment, SendRequest, newSessionRequest, promptAttachments, promptRefs, sendPrompt, shellCommandOf } from "./send-flow.js";
|
|
55
|
+
import { NO_PROVIDER_ERROR, NewSessionDefaults, NewSessionRequest, SendAttachment, SendDraft, SendFlowDeps, SendPromptAttachment, SendRequest, newSessionRequest, promptAttachments, promptRefs, sendPrompt, shellCommandOf, wireOriginal } from "./send-flow.js";
|
|
56
56
|
import { DraftFolderSource, DraftFolderState, draftFolderPath, draftLocalFolder, recentHostFolders, recentLocalFolders } from "./draft-target.js";
|
|
57
57
|
import { DraftScope, DraftScopeState, DraftScopeStore, DraftScopeStoreOptions, createDraftScopeStore, draftScopeOf } from "./draft-scope.js";
|
|
58
58
|
import { TurnPromptDraft, promptDraftOf } from "./turn-prompt.js";
|
|
@@ -79,4 +79,4 @@ import { EffortPickerTarget, defaultModelPatch, effortPickerTarget, rememberedDe
|
|
|
79
79
|
import { ConversationBadge, ConversationBadgeData, ConversationBadgeInput, InboxSummary, MAX_EXTENSION_COMPOSER_BADGES, conversationBadges, resolveBadgePanel } from "./composer/conversation-badges.js";
|
|
80
80
|
import { ModelNames, ModelNamesProvider, ModelNamesStore, createModelNames, modelNamesOf, namerFor } from "./composer/model-names.js";
|
|
81
81
|
import "./composer/index.js";
|
|
82
|
-
export { AGENT_GROUPING, type AuthCardPlan, type AuthFixes, type AuthSettingsTarget, type BashExitMeta, BuildQuerySidebarRowsOptions, BuildSidebarRowsOptions, CHATS_BUCKET, CHUNK_THRESHOLD, COMMON_EMOJI, CalendarOptions, ChatAttachment, ChatBadgeActions, ChatBlockRunOptions, ChatBlockRunTransport, ChatBlockRuns, ChatChipDetails, ChatCommandFacts, ChatCommit, ChatContextFacts, ChatEvent, ChatHost, ChatInteraction, ChatLabels, ChatModel, ChatModelProvider, ChatPaths, ChatReferences, ChatReferencesChange, ChatResolvedPath, ChatSearchState, ChatSearchSync, ChatSession, ChatSessionFacts, ChatSessionStatus, ChatSiteIcons, ChatSkillFacts, ChipResolution, ChipViewLabels, type Cluster, type CommandArgSuggestionSummary, type CommandSummary, CompactionProgress, CompactionProgressStore, CompactionSignal, ComposerAgentProfile, ComposerAgents, ComposerAttachment, ComposerAutocomplete, ComposerCacheImpact, ComposerCacheImpactChange, ComposerChromeLabels, ComposerCommandArgs, ComposerCompletions, ComposerContext, ComposerContextBreakdown, ComposerContextStatus, ComposerControls, ComposerCostStatus, ComposerDraftAttachmentsListener, ComposerDrafts, ComposerEffort, ComposerExtensionItem, ComposerExtensionProvider, ComposerFolderLocation, ComposerFolders, ComposerHost, ComposerLabels, type ComposerListScope, type ComposerLists, ComposerMode, ComposerModelEntry, ComposerModelOption, ComposerModels, ComposerPrefs, ComposerPrefsState, ComposerPromptSuggestion, ComposerRememberedModel, ComposerRunProgress, ComposerRuns, ComposerScope, ComposerSessionView, ComposerSharedGhost, ComposerSuggestions, ConversationBadge, ConversationBadgeData, ConversationBadgeInput, DEFAULT_CHAT_LABELS, DEFAULT_COMPOSER_CHROME_LABELS, DEFAULT_COMPOSER_LABELS, DEFAULT_MODEL_PICKER_PREFS, DEFAULT_SIDEBAR_LABELS, DEFAULT_SIDEBAR_VIEW, DEFAULT_SWITCHER_PREFS, DeltaBucket, DirectoryServer, DirectorySettings, DotStateInput, type DotVariant, DraftFolderSource, DraftFolderState, DraftScope, DraftScopeState, DraftScopeStore, DraftScopeStoreOptions, type DrainPlan, EMPTY_RUN_METER, EffortPickerTarget, type ExchangeFoldStats, FileChip, FileChipKind, type FileEntry, type FoldActionItem, type FoldActionState, type FrameScheduler, type GroupCluster, HostStatus, HostView, ImageModelRow, InboxSummary, LIVE_BLOCK_RUN_LINES, type LazyList, ListableSession, LiveBlockRun, LiveCostStatus, LiveStreamProgress, type LoadEarlierOptions, MAIN_SESSION_ICON_KEY, MAX_EXTENSION_COMPOSER_BADGES, MAX_ROW_CHIPS, MODEL_PICKER_STORAGE_KEY, ModelCatalogRow, ModelKnobs, ModelKnobsMemory, ModelKnobsStore, ModelNames, ModelNamesProvider, ModelNamesStore, ModelPickRef, ModelPickerPrefs, ModelPickerPrefsStorage, ModelPickerPrefsStore, NO_PROVIDER_ERROR, NO_SIDEBAR_CONTRIBUTIONS, NewSessionDefaults, NewSessionRequest, OpenFence, type OtherStreamSignal, type Owned, PINNED_PROJECTS_KEY, PROJECT_GROUP_CAP, PROJECT_ICONS_KEY, type PairingResult, PathResolver, PathResolverOptions, PinsBySpace, ProjectIcon, ProjectIconMap, ProjectInSpace, type PromptAttachment, type PromptOrigin, REFERENCES_STORAGE_KEY, RELATIVE_TIME_DATE_AFTER_DAYS, Readable, ReferenceStore, ReferenceStoreOptions, ReferenceViewEntry, type ResourceSnapshot, type Row, RunEstimatesRow, RunEstimatesSignal, RunEstimatesStore, type RunFailure, RunMeter, RunMeterRow, RunMeterSignal, RunMeterState, SESSION_HISTORY_LIMIT, SIDEBAR_SPACE_KEY, SIDEBAR_SWITCHER_KEY, SIDEBAR_VIEW_KEY, SMOOTH_TICK_MS, SecretTimeLeft, type SelectStops, SendAttachment, SendDraft, SendFlowDeps, SendInput, SendPromptAttachment, SendRequest, SessionActivity, SessionActivityFilter, SessionActivitySignal, SessionActivityStore, SessionArchiveFilter, SessionBadgesEntry, SessionBadgesSource, SessionBadgesStore, SessionDirectory, SessionDirectoryOptions, SessionDirectorySource, SessionDirectoryState, SessionDirectoryStreams, type SessionFallbackModel, SessionGroupBy, SessionHistory, SessionHistoryDirection, SessionHistoryOptions, SessionHistoryPage, SessionHistoryState, SessionHistoryStore, SessionListOptions, SessionListRow, SessionNotification, SessionNotificationStore, type SessionPageState, SessionRef, SessionRemoval, type SessionRetryState, SessionSearchHit, SessionSortBy, type SessionStreamActions, type SessionStreamPage, type SessionStreamSignal, SessionStreamStore, type SessionStreamStoreOptions, type SessionStreamWrite, type SessionStreams, type SessionStreamsOptions, SessionWindowMode, SetDefaultModel, SharedDraft, SharedDraftAttachmentsChange, SharedDraftChange, SidebarContributionStores, SidebarContributions, SidebarDotState, SidebarEnvironmentHost, SidebarExtensionView, SidebarGroupBy, SidebarGrouping, SidebarHost, SidebarItemEntry, SidebarLabels, SidebarLastSessions, SidebarListRow, SidebarListSession, SidebarNode, SidebarOrigin, SidebarQueryLayer, SidebarRowChip, SidebarRowDecoration, SidebarSortBy, SidebarSpace, SidebarView, SidebarViewMap, SidebarViewRecord, SidebarViews, SidebarViewsHost, SidebarViewsOptions, SidebarViewsStorage, type SkillConfig, SpaceSwitcherPrefs, type SpawnMeta, type ToolPairing, type ToolRowModel, Transcript, TranscriptState, TurnPromptDraft, VIEW_CHOICE, Writable, activityLabel, authFailureDetails, availableProjectsOf, batchThinkingRuns, batchToolRuns, beginChipWork, buildHostSidebarRows, buildQuerySidebarRows, buildSessionRows, buildSidebarRows, caretEffectivelyAtStart, chipForPath, chipWorkBusy, claimChildSessions, classifyInlineCode, clearedViewFilters, clusterByOwner, collapseEvents, commandName, commandRef, commandView, commitModelPick, commitView, compareSessions, composeLiveCost, composeSubmitText, computeSelectStops, constant, conversationBadges, createAuthFixes, createChatBlockRuns, createCompactionProgress, createComposerLists, createDecorator, createDraftScopeStore, createModelKnobs, createModelNames, createModelPickerPrefs, createNotificationStore, createPathResolver, createReferenceStore, createRunEstimates, createRunMeter, createSessionActivity, createSessionBadges, createSessionDirectory, createSessionHistory, createSessionStreamActions, createSessionStreams, createSidebarViews, createSiteIcons, dateBucket, decodeHistoryEntry, defaultFrameScheduler, defaultModelPatch, deleteSessionPrompt, deriveDotState, dockRunReceipts, dotVariantFor, draftFolderPath, draftLocalFolder, draftScopeOf, drainBucket, effortPickerTarget, encodeHistoryDraft, environmentKindLabel, environmentSummaryText, exitsModeOnKey, extensionSpaceOf, failureTooltip, filterDirectorySessions, filterQueryOf, filterSessions, filtersForSpace, findCommand, findLastStreamingRow, firstGrapheme, firstRowId, foldActionItems, foldExchanges, foldWorkerRows, formatElapsedShort, formatSessionCostLabel, groupsByFolder, hostReachable, hostStatusLabel, inheritRowIdentity, isAuthFixed, isProjectIcon, isProjectMember, itemRows, itemsForSpace, lastModelChainOf, markRunFailures, mergeLiveTail, mergePromptPreviews, mergeSidebarSpaces, missingPreviewData, modeForTypedChar, modelKnobsOf, modelNamesOf, namerFor, nestSidebarRows, nestToolCalls, nestedCallVisible, newSessionRequest, nextSavedViewName, openFenceOf, pairToolEvents, parseBashExitMeta, parseModelPickerPrefs, parsePinnedProjects, parseProjectIcons, parseSessionHistory, parseSidebarView, parseSwitcherPrefs, partitionMainSession, pickRunEstimate, pinSession, pinnedSessions, planAuthCard, projectKeyOf, projectPathOf, promptAttachments, promptDraftOf, promptRefs, readSidebarViews, recentHostFolders, recentLocalFolders, reduceActivity, reduceCompaction, refusedSpawn, relativeTime, rememberableChain, rememberedDefaultModel, rememberedPick, repoGroups, resetChipWorkForTests, resolveBadgePanel, resolveChipPath, resolveGrouping, resolveSort, rowTurnIds, runsInRemoteSandbox, safeSurrogateSlice, secretExpiryWords, secretTimeLeft, secretTimeLeftIso, selectEditEvents, sendPrompt, sessionForToken, sessionRefsOf, sessionView, settledResource, shellCommandOf, shortUrl, sidebarContributionsOf, siteOrigin, skillName, skillView, spaceMembership, splitMarkdown, stableSelection, stopForRow, switcherSpaces, tickBucket, toolAction, toolFailed, unsentDraft, urlRefs, useReadable, viewFilterOf, viewFiltersOn, whenChipsSettle, wireAttachmentsToChat, withPinnedProject, withoutPartialFence, writable };
|
|
82
|
+
export { AGENT_GROUPING, type AuthCardPlan, type AuthFixes, type AuthSettingsTarget, type BashExitMeta, BuildQuerySidebarRowsOptions, BuildSidebarRowsOptions, CHATS_BUCKET, CHUNK_THRESHOLD, COMMON_EMOJI, CalendarOptions, ChatAttachment, ChatAttachmentOriginal, ChatBadgeActions, ChatBlockRunOptions, ChatBlockRunTransport, ChatBlockRuns, ChatChipDetails, ChatCommandFacts, ChatCommit, ChatContextFacts, ChatEvent, ChatHost, ChatInteraction, ChatLabels, ChatModel, ChatModelProvider, ChatPaths, ChatReferences, ChatReferencesChange, ChatResolvedPath, ChatSearchState, ChatSearchSync, ChatSession, ChatSessionFacts, ChatSessionStatus, ChatSiteIcons, ChatSkillFacts, ChipResolution, ChipViewLabels, type Cluster, type CommandArgSuggestionSummary, type CommandSummary, CompactionProgress, CompactionProgressStore, CompactionSignal, ComposerAgentProfile, ComposerAgents, ComposerAttachment, ComposerAutocomplete, ComposerCacheImpact, ComposerCacheImpactChange, ComposerChromeLabels, ComposerCommandArgs, ComposerCompletions, ComposerContext, ComposerContextBreakdown, ComposerContextStatus, ComposerControls, ComposerCostStatus, ComposerDraftAttachmentsListener, ComposerDrafts, ComposerEffort, ComposerExtensionItem, ComposerExtensionProvider, ComposerFolderLocation, ComposerFolders, ComposerHost, ComposerLabels, type ComposerListScope, type ComposerLists, ComposerMode, ComposerModelEntry, ComposerModelOption, ComposerModels, ComposerPrefs, ComposerPrefsState, ComposerPromptSuggestion, ComposerRememberedModel, ComposerRunProgress, ComposerRuns, ComposerScope, ComposerSessionView, ComposerSharedGhost, ComposerSuggestions, ConversationBadge, ConversationBadgeData, ConversationBadgeInput, DEFAULT_CHAT_LABELS, DEFAULT_COMPOSER_CHROME_LABELS, DEFAULT_COMPOSER_LABELS, DEFAULT_MODEL_PICKER_PREFS, DEFAULT_SIDEBAR_LABELS, DEFAULT_SIDEBAR_VIEW, DEFAULT_SWITCHER_PREFS, DeltaBucket, DirectoryServer, DirectorySettings, DotStateInput, type DotVariant, DraftFolderSource, DraftFolderState, DraftScope, DraftScopeState, DraftScopeStore, DraftScopeStoreOptions, type DrainPlan, EMPTY_RUN_METER, EffortPickerTarget, type ExchangeFoldStats, FileChip, FileChipKind, type FileEntry, type FoldActionItem, type FoldActionState, type FrameScheduler, type GroupCluster, HostStatus, HostView, ImageModelRow, InboxSummary, LIVE_BLOCK_RUN_LINES, type LazyList, ListableSession, LiveBlockRun, LiveCostStatus, LiveStreamProgress, type LoadEarlierOptions, MAIN_SESSION_ICON_KEY, MAX_EXTENSION_COMPOSER_BADGES, MAX_ROW_CHIPS, MODEL_PICKER_STORAGE_KEY, ModelCatalogRow, ModelKnobs, ModelKnobsMemory, ModelKnobsStore, ModelNames, ModelNamesProvider, ModelNamesStore, ModelPickRef, ModelPickerPrefs, ModelPickerPrefsStorage, ModelPickerPrefsStore, NO_PROVIDER_ERROR, NO_SIDEBAR_CONTRIBUTIONS, NewSessionDefaults, NewSessionRequest, OpenFence, type OtherStreamSignal, type Owned, PINNED_PROJECTS_KEY, PROJECT_GROUP_CAP, PROJECT_ICONS_KEY, type PairingResult, PathResolver, PathResolverOptions, PinsBySpace, ProjectIcon, ProjectIconMap, ProjectInSpace, type PromptAttachment, type PromptOrigin, REFERENCES_STORAGE_KEY, RELATIVE_TIME_DATE_AFTER_DAYS, Readable, ReferenceStore, ReferenceStoreOptions, ReferenceViewEntry, type ResourceSnapshot, type Row, RunEstimatesRow, RunEstimatesSignal, RunEstimatesStore, type RunFailure, RunMeter, RunMeterRow, RunMeterSignal, RunMeterState, SESSION_HISTORY_LIMIT, SIDEBAR_SPACE_KEY, SIDEBAR_SWITCHER_KEY, SIDEBAR_VIEW_KEY, SMOOTH_TICK_MS, SecretTimeLeft, type SelectStops, SendAttachment, SendDraft, SendFlowDeps, SendInput, SendPromptAttachment, SendRequest, SessionActivity, SessionActivityFilter, SessionActivitySignal, SessionActivityStore, SessionArchiveFilter, SessionBadgesEntry, SessionBadgesSource, SessionBadgesStore, SessionDirectory, SessionDirectoryOptions, SessionDirectorySource, SessionDirectoryState, SessionDirectoryStreams, type SessionFallbackModel, SessionGroupBy, SessionHistory, SessionHistoryDirection, SessionHistoryOptions, SessionHistoryPage, SessionHistoryState, SessionHistoryStore, SessionListOptions, SessionListRow, SessionNotification, SessionNotificationStore, type SessionPageState, SessionRef, SessionRemoval, type SessionRetryState, SessionSearchHit, SessionSortBy, type SessionStreamActions, type SessionStreamPage, type SessionStreamSignal, SessionStreamStore, type SessionStreamStoreOptions, type SessionStreamWrite, type SessionStreams, type SessionStreamsOptions, SessionWindowMode, SetDefaultModel, SharedDraft, SharedDraftAttachmentsChange, SharedDraftChange, SidebarContributionStores, SidebarContributions, SidebarDotState, SidebarEnvironmentHost, SidebarExtensionView, SidebarGroupBy, SidebarGrouping, SidebarHost, SidebarItemEntry, SidebarLabels, SidebarLastSessions, SidebarListRow, SidebarListSession, SidebarNode, SidebarOrigin, SidebarQueryLayer, SidebarRowChip, SidebarRowDecoration, SidebarSortBy, SidebarSpace, SidebarView, SidebarViewMap, SidebarViewRecord, SidebarViews, SidebarViewsHost, SidebarViewsOptions, SidebarViewsStorage, type SkillConfig, SpaceSwitcherPrefs, type SpawnMeta, type ToolPairing, type ToolRowModel, Transcript, TranscriptState, TurnPromptDraft, VIEW_CHOICE, Writable, activityLabel, authFailureDetails, availableProjectsOf, batchThinkingRuns, batchToolRuns, beginChipWork, buildHostSidebarRows, buildQuerySidebarRows, buildSessionRows, buildSidebarRows, caretEffectivelyAtStart, chipForPath, chipWorkBusy, claimChildSessions, classifyInlineCode, clearedViewFilters, clusterByOwner, collapseEvents, commandName, commandRef, commandView, commitModelPick, commitView, compareSessions, composeLiveCost, composeSubmitText, computeSelectStops, constant, conversationBadges, createAuthFixes, createChatBlockRuns, createCompactionProgress, createComposerLists, createDecorator, createDraftScopeStore, createModelKnobs, createModelNames, createModelPickerPrefs, createNotificationStore, createPathResolver, createReferenceStore, createRunEstimates, createRunMeter, createSessionActivity, createSessionBadges, createSessionDirectory, createSessionHistory, createSessionStreamActions, createSessionStreams, createSidebarViews, createSiteIcons, dateBucket, decodeHistoryEntry, defaultFrameScheduler, defaultModelPatch, deleteSessionPrompt, deriveDotState, dockRunReceipts, dotVariantFor, draftFolderPath, draftLocalFolder, draftScopeOf, drainBucket, effortPickerTarget, encodeHistoryDraft, environmentKindLabel, environmentSummaryText, exitsModeOnKey, extensionSpaceOf, failureTooltip, filterDirectorySessions, filterQueryOf, filterSessions, filtersForSpace, findCommand, findLastStreamingRow, firstGrapheme, firstRowId, foldActionItems, foldExchanges, foldWorkerRows, formatElapsedShort, formatSessionCostLabel, groupsByFolder, hostReachable, hostStatusLabel, inheritRowIdentity, isAuthFixed, isProjectIcon, isProjectMember, itemRows, itemsForSpace, lastModelChainOf, markRunFailures, mergeLiveTail, mergePromptPreviews, mergeSidebarSpaces, missingPreviewData, modeForTypedChar, modelKnobsOf, modelNamesOf, namerFor, nestSidebarRows, nestToolCalls, nestedCallVisible, newSessionRequest, nextSavedViewName, openFenceOf, pairToolEvents, parseBashExitMeta, parseModelPickerPrefs, parsePinnedProjects, parseProjectIcons, parseSessionHistory, parseSidebarView, parseSwitcherPrefs, partitionMainSession, pickRunEstimate, pinSession, pinnedSessions, planAuthCard, positionSuffix, projectKeyOf, projectPathOf, promptAttachments, promptDraftOf, promptRefs, readSidebarViews, recentHostFolders, recentLocalFolders, reduceActivity, reduceCompaction, refusedSpawn, relativeTime, rememberableChain, rememberedDefaultModel, rememberedPick, repoGroups, resetChipWorkForTests, resolveBadgePanel, resolveChipPath, resolveGrouping, resolveSort, rowTurnIds, runsInRemoteSandbox, safeSurrogateSlice, secretExpiryWords, secretTimeLeft, secretTimeLeftIso, selectEditEvents, sendPrompt, sessionForToken, sessionRefsOf, sessionView, settledResource, shellCommandOf, shortUrl, sidebarContributionsOf, siteOrigin, skillName, skillView, spaceMembership, splitMarkdown, stableSelection, stopForRow, switcherSpaces, tickBucket, toolAction, toolFailed, unsentDraft, urlRefs, useReadable, viewFilterOf, viewFiltersOn, whenChipsSettle, wireAttachmentsToChat, wireOriginal, withPinnedProject, withoutPartialFence, writable };
|