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.
Files changed (224) hide show
  1. package/dist/adapters/run-host.js +17 -20
  2. package/dist/adapters/server-files-host.js +3 -1
  3. package/dist/adapters/server-host.js +18 -11
  4. package/dist/adapters/server-machines-host.js +3 -1
  5. package/dist/adapters/server-session-host.js +2 -1
  6. package/dist/adapters/server-settings-accounts.js +2 -1
  7. package/dist/adapters/server-settings-host.js +3 -3
  8. package/dist/adapters/sse-host.js +9 -7
  9. package/dist/chat/SessionGroupHeader.js +2 -2
  10. package/dist/chat/SessionHostHeader.js +1 -1
  11. package/dist/chat/StatusDot.js +24 -20
  12. package/dist/chat/composer/Composer.d.ts +13 -8
  13. package/dist/chat/composer/Composer.js +14 -10
  14. package/dist/chat/composer/ComposerEditor.js +1 -1
  15. package/dist/chat/composer/HostComposer.d.ts +1 -1
  16. package/dist/chat/composer/HostComposer.js +7 -10
  17. package/dist/chat/composer/RunStatusChip.js +13 -1
  18. package/dist/chat/composer/attachment-ingest.d.ts +4 -1
  19. package/dist/chat/composer/attachment-ingest.js +27 -10
  20. package/dist/chat/composer/composer-bus.d.ts +9 -1
  21. package/dist/chat/composer/composer-bus.js +49 -6
  22. package/dist/chat/composer/index.d.ts +2 -2
  23. package/dist/chat/composer/index.js +2 -2
  24. package/dist/chat/composer/use-draft-target.d.ts +4 -0
  25. package/dist/chat/composer/use-draft-target.js +15 -4
  26. package/dist/chat/composer/use-send-prompt.d.ts +5 -1
  27. package/dist/chat/composer/use-send-prompt.js +2 -12
  28. package/dist/chat/headless/chip-labels.d.ts +2 -0
  29. package/dist/chat/headless/chip-labels.js +3 -1
  30. package/dist/chat/headless/composer/labels-editor.d.ts +2 -0
  31. package/dist/chat/headless/composer/labels-editor.js +2 -0
  32. package/dist/chat/headless/file-chip.d.ts +12 -13
  33. package/dist/chat/headless/file-chip.js +40 -2
  34. package/dist/chat/headless/fixture-host.js +14 -17
  35. package/dist/chat/headless/host.d.ts +24 -6
  36. package/dist/chat/headless/index.d.ts +4 -4
  37. package/dist/chat/headless/index.js +4 -4
  38. package/dist/chat/headless/labels.d.ts +16 -0
  39. package/dist/chat/headless/labels.js +15 -2
  40. package/dist/chat/headless/send-flow.d.ts +21 -4
  41. package/dist/chat/headless/send-flow.js +25 -6
  42. package/dist/chat/headless/session-list.d.ts +11 -0
  43. package/dist/chat/headless/sidebar/index.js +1 -1
  44. package/dist/chat/headless/sidebar/labels.d.ts +12 -1
  45. package/dist/chat/headless/transcript-host.d.ts +8 -1
  46. package/dist/chat/headless/transcript-labels.d.ts +2 -0
  47. package/dist/chat/index.d.ts +3 -3
  48. package/dist/chat/index.js +2 -2
  49. package/dist/chat/interactions/InboxPanel.js +2 -2
  50. package/dist/chat/interactions/QuestionField.js +2 -2
  51. package/dist/chat/rich-composer/RichComposer.d.ts +9 -2
  52. package/dist/chat/rich-composer/RichComposer.js +28 -7
  53. package/dist/chat/rich-composer/composer-extensions.d.ts +2 -0
  54. package/dist/chat/rich-composer/composer-extensions.js +2 -2
  55. package/dist/chat/rich-composer/composer-keys.js +1 -1
  56. package/dist/chat/rich-composer/use-composer-bus.js +2 -1
  57. package/dist/chat/rich-composer/use-composer-editor.d.ts +4 -1
  58. package/dist/chat/rich-composer/use-composer-editor.js +2 -1
  59. package/dist/chat/sidebar/SessionSidebar.js +1 -2
  60. package/dist/chat/sidebar/SidebarSearchRow.js +1 -1
  61. package/dist/chat/sidebar/useSidebarKeyboardNav.d.ts +0 -2
  62. package/dist/chat/sidebar/useSidebarKeyboardNav.js +7 -13
  63. package/dist/chat/testing/contract.d.ts +1 -1
  64. package/dist/chat/testing/contract.js +8 -7
  65. package/dist/chat/transcript/BadgeMenu.d.ts +12 -3
  66. package/dist/chat/transcript/BadgeMenu.js +20 -3
  67. package/dist/chat/transcript/CodemodeScript.js +147 -44
  68. package/dist/chat/transcript/EditDiffBlock.js +1 -4
  69. package/dist/chat/transcript/FileChip.js +60 -14
  70. package/dist/chat/transcript/LiveOutput.js +7 -3
  71. package/dist/chat/transcript/badges.js +2 -2
  72. package/dist/chat/transcript/index.d.ts +2 -2
  73. package/dist/chat/transcript/markdown-context.d.ts +4 -1
  74. package/dist/chat/transcript/rolling.d.ts +12 -0
  75. package/dist/chat/transcript/rolling.js +22 -0
  76. package/dist/chat/transcript/script-input.d.ts +1 -1
  77. package/dist/chat/transcript/shell-block.js +70 -60
  78. package/dist/chat/transcript/tool-row.js +21 -5
  79. package/dist/code/editor/FileTree.d.ts +3 -1
  80. package/dist/code/editor/FileTree.js +29 -1
  81. package/dist/components/Restricted.d.ts +25 -0
  82. package/dist/components/Restricted.js +32 -0
  83. package/dist/components/StepFrame.d.ts +1 -1
  84. package/dist/components/ZidaneMark.d.ts +28 -0
  85. package/dist/components/ZidaneMark.js +114 -0
  86. package/dist/components/palette/PalettePanel.d.ts +7 -1
  87. package/dist/components/palette/PalettePanel.js +37 -11
  88. package/dist/components/zidane-mark.d.ts +52 -0
  89. package/dist/components/zidane-mark.js +94 -0
  90. package/dist/core.css +59 -6
  91. package/dist/dist/{index-DqCio7Nd.d.ts → index-Bq87OcGy.d.ts} +19 -12
  92. package/dist/dist/index.d.ts +1 -1
  93. package/dist/extensions/ExtensionSettingsSection.d.ts +18 -0
  94. package/dist/extensions/ExtensionSettingsSection.js +227 -0
  95. package/dist/extensions/headless/host.d.ts +1 -1
  96. package/dist/extensions/headless/labels.d.ts +41 -1
  97. package/dist/extensions/headless/labels.js +57 -0
  98. package/dist/extensions/headless/select.js +1 -2
  99. package/dist/extensions/index.d.ts +2 -1
  100. package/dist/extensions/index.js +2 -1
  101. package/dist/files/FilesTab.js +2 -0
  102. package/dist/files/TreeColumn.d.ts +5 -1
  103. package/dist/files/TreeColumn.js +6 -0
  104. package/dist/files/headless/fixture-host.js +5 -3
  105. package/dist/files/headless/host.d.ts +24 -6
  106. package/dist/files/headless/index.d.ts +2 -2
  107. package/dist/files/headless/labels.d.ts +1 -0
  108. package/dist/files/headless/labels.js +1 -0
  109. package/dist/files/testing/contract.js +9 -2
  110. package/dist/files/useWorkspace.d.ts +14 -2
  111. package/dist/files/useWorkspace.js +87 -9
  112. package/dist/git/BranchMenu.js +1 -1
  113. package/dist/git/MoveSessionDialog.js +1 -1
  114. package/dist/git/RemoteFolderPicker.js +1 -1
  115. package/dist/git/WherePicker.js +1 -1
  116. package/dist/git/headless/index.js +1 -1
  117. package/dist/git/useEnvironmentChoices.js +1 -1
  118. package/dist/index.d.ts +4 -2
  119. package/dist/index.js +4 -2
  120. package/dist/keybindings/headless/catalog.js +1 -1
  121. package/dist/labels.d.ts +1 -0
  122. package/dist/labels.js +1 -0
  123. package/dist/machines/DaemonMenu.js +1 -1
  124. package/dist/machines/HostCapabilities.d.ts +23 -1
  125. package/dist/machines/HostCapabilities.js +149 -65
  126. package/dist/machines/HostSyncPanel.js +129 -123
  127. package/dist/machines/HostsSection.js +5 -1
  128. package/dist/machines/ServerCard.d.ts +4 -2
  129. package/dist/machines/ServerCard.js +222 -99
  130. package/dist/machines/ServerMachinesPanel.js +16 -13
  131. package/dist/machines/ServerUpdatePanel.js +31 -21
  132. package/dist/machines/TokensPanel.js +75 -53
  133. package/dist/machines/headless/fixture-host.d.ts +5 -0
  134. package/dist/machines/headless/fixture-host.js +13 -4
  135. package/dist/machines/headless/fixtures.js +1 -1
  136. package/dist/machines/headless/host.d.ts +22 -2
  137. package/dist/machines/headless/index.d.ts +2 -2
  138. package/dist/machines/headless/labels.d.ts +22 -1
  139. package/dist/machines/headless/labels.js +22 -2
  140. package/dist/machines/testing/contract.d.ts +3 -1
  141. package/dist/machines/testing/contract.js +9 -0
  142. package/dist/motion/size.d.ts +22 -1
  143. package/dist/motion/size.js +82 -4
  144. package/dist/onboarding/demos/delivery.d.ts +16 -0
  145. package/dist/onboarding/demos/delivery.js +132 -0
  146. package/dist/onboarding/demos/index.d.ts +2 -1
  147. package/dist/onboarding/demos/index.js +2 -1
  148. package/dist/onboarding/headless/labels.d.ts +8 -0
  149. package/dist/onboarding/headless/labels.js +7 -0
  150. package/dist/onboarding/index.d.ts +2 -1
  151. package/dist/onboarding/index.js +2 -1
  152. package/dist/onboarding/steps/ConversationStep.js +46 -4
  153. package/dist/palette/CommandPalette.js +3 -0
  154. package/dist/palette/PaletteDialog.js +7 -3
  155. package/dist/palette/usePaletteController.d.ts +10 -0
  156. package/dist/palette/usePaletteController.js +25 -3
  157. package/dist/server/sse-handler.js +6 -1
  158. package/dist/session/ArtifactsPanel.js +1 -1
  159. package/dist/session/SideChat.js +1 -2
  160. package/dist/session/UsagePanel.js +1 -1
  161. package/dist/session/headless/host.d.ts +3 -1
  162. package/dist/session/headless/index.js +2 -2
  163. package/dist/settings/SettingsRestricted.d.ts +25 -0
  164. package/dist/settings/SettingsRestricted.js +44 -0
  165. package/dist/settings/SettingsRowsPage.js +31 -37
  166. package/dist/settings/headless/catalog.js +7 -6
  167. package/dist/settings/headless/labels.d.ts +4 -2
  168. package/dist/settings/headless/labels.js +4 -2
  169. package/dist/settings/headless/layout.js +1 -1
  170. package/dist/settings/headless/providers.d.ts +2 -0
  171. package/dist/settings/headless/search.d.ts +1 -1
  172. package/dist/settings/index.d.ts +2 -2
  173. package/dist/settings/index.js +2 -2
  174. package/dist/settings/rows.d.ts +51 -8
  175. package/dist/settings/rows.js +81 -26
  176. package/dist/settings/sections/enabled-list/EnabledListSection.js +3 -2
  177. package/dist/settings/sections/environments/EnvironmentsSection.js +4 -3
  178. package/dist/settings/sections/extensions/ExtensionConfigRows.d.ts +2 -2
  179. package/dist/settings/sections/extensions/ExtensionConfigRows.js +22 -25
  180. package/dist/settings/sections/extensions/ExtensionOptionsSection.js +3 -2
  181. package/dist/settings/sections/extensions/options-labels.d.ts +2 -2
  182. package/dist/settings/sections/extensions/options-labels.js +2 -2
  183. package/dist/settings/sections/host-catalog/HostCatalogSection.d.ts +5 -3
  184. package/dist/settings/sections/host-catalog/HostCatalogSection.js +7 -4
  185. package/dist/settings/sections/instructions/InstructionsSection.js +24 -17
  186. package/dist/settings/sections/logs/LogsSection.d.ts +2 -1
  187. package/dist/settings/sections/logs/LogsSection.js +64 -56
  188. package/dist/settings/sections/mcp/McpSection.d.ts +1 -1
  189. package/dist/settings/sections/mcp/McpSection.js +18 -17
  190. package/dist/settings/sections/models/ModelRows.d.ts +3 -3
  191. package/dist/settings/sections/models/ModelRows.js +8 -7
  192. package/dist/settings/sections/performance/PerformanceSection.js +13 -4
  193. package/dist/settings/sections/performance/labels.d.ts +0 -1
  194. package/dist/settings/sections/performance/labels.js +0 -1
  195. package/dist/settings/sections/providers/CredentialSources.js +18 -8
  196. package/dist/settings/sections/providers/ProvidersSection.d.ts +2 -2
  197. package/dist/settings/sections/providers/ProvidersSection.js +20 -17
  198. package/dist/settings/sections/providers/ServerProvidersSection.d.ts +1 -1
  199. package/dist/settings/sections/providers/ServerProvidersSection.js +10 -14
  200. package/dist/settings/sections/shared/catalog.js +3 -2
  201. package/dist/settings/sections/skills/SkillList.js +3 -2
  202. package/dist/settings/testing/accounts-demo.js +1 -0
  203. package/dist/settings/testing/accounts.contract.js +2 -0
  204. package/dist/styles.css +160 -24
  205. package/dist/terminal/HostTerminalSurface.js +1 -1
  206. package/dist/terminal/headless/links.d.ts +19 -1
  207. package/dist/terminal/headless/links.js +26 -2
  208. package/dist/theme/css-vars.js +1 -0
  209. package/dist/theme/derive.d.ts +4 -0
  210. package/dist/theme/derive.js +2 -0
  211. package/dist/workspace/PanelContentView.js +1 -1
  212. package/dist/workspace/PanelHome.d.ts +3 -1
  213. package/dist/workspace/PanelHome.js +4 -3
  214. package/dist/workspace/SidePanel.d.ts +3 -1
  215. package/dist/workspace/SidePanel.js +3 -2
  216. package/dist/workspace/headless/open-target.d.ts +1 -1
  217. package/dist/workspace/headless/open-target.js +2 -2
  218. package/package.json +2 -2
  219. package/src/styles/chat.css +10 -10
  220. package/src/styles/motion.css +37 -0
  221. package/src/styles/primitives.css +11 -3
  222. package/src/styles/sidebar.css +12 -0
  223. package/src/styles/tokens.css +6 -0
  224. package/src/styles/transcript.css +69 -5
package/dist/index.js CHANGED
@@ -49,8 +49,10 @@ import { StepActions, StepFrame } from "./components/StepFrame.js";
49
49
  import { Stepper } from "./components/Stepper.js";
50
50
  import { SwatchPicker } from "./components/SwatchPicker.js";
51
51
  import { CountBadge, TabPill } from "./components/TabPill.js";
52
+ import { ZidaneMark } from "./components/ZidaneMark.js";
52
53
  import { ThemeThumb } from "./components/ThemeThumb.js";
53
54
  import { ToggleCard } from "./components/ToggleCard.js";
55
+ import { Restricted } from "./components/Restricted.js";
54
56
  import { MatchedTitle, PaletteIcon, PaletteList, PaletteOption, PaletteRow, defaultPaletteKeys } from "./components/palette/PaletteList.js";
55
57
  import { PalettePanel, paletteVerb } from "./components/palette/PalettePanel.js";
56
58
  import { HoverCard } from "./components/floating/HoverCard.js";
@@ -61,7 +63,7 @@ import { beginLayoutAnimation, isLayoutAnimating, pulseLayout, subscribeLayoutAn
61
63
  import { MotionProvider } from "./motion/provider.js";
62
64
  import { RollingText, readRollMs, rollCells } from "./motion/roll.js";
63
65
  import { SHIMMER_MS, syncShimmer } from "./motion/shimmer.js";
64
- import { HeldWidth, SmoothWidth } from "./motion/size.js";
66
+ import { HeldWidth, SmoothHeight, SmoothWidth } from "./motion/size.js";
65
67
  import { Crossfade, Presence, useCadencedValue } from "./motion/swap.js";
66
68
  import { createCodeHighlighter } from "./code/highlighter.js";
67
69
  import { defaultShikiTheme, shikiThemeFor } from "./code/shiki-theme.js";
@@ -84,4 +86,4 @@ import { watchRuntimeIcons } from "./theme/runtime-icons.js";
84
86
  import { BUILTIN_THEMES, DEFAULT_THEME, resolveTheme } from "./theme/themes.js";
85
87
  import { themeCssVars, themeStylesheet } from "./theme/stylesheet.js";
86
88
  import { withoutTransitions } from "./theme/without-transitions.js";
87
- export { ACCENT_PRESETS, AddressBar, BRAND_MARKS, BTN_DANGER, BTN_DANGER_CONFIRM, BTN_LG_DANGER, BTN_LG_PRIMARY, BTN_LG_SECONDARY, BTN_LG_SOLID, BTN_PRIMARY, BTN_SECONDARY, BUILTIN_THEMES, BrandMark, Breadcrumb, BrowserSignIn, CONFIRM_TITLE_ID, CONTRAST, Checkbox, ChoiceCards, CodeFrame, CodeHighlightProvider, CodePanel, CodeWrapProvider, ConfirmDialog, CopyButton, CountBadge, Crossfade, DARK_LUMINANCE_THRESHOLD, DEFAULT_EDITOR_SETTINGS, DEFAULT_LABELS, DEFAULT_PANEL_MS, DEFAULT_THEME, DiffCounts, EditableTitle, EditorEnvironmentProvider, EmptyState, ErrorBoundary, ErrorDetails, ErrorFallback, ErrorNote, FADE_KEYS, FIELD_LABEL_CLASS, FORM_CARD_CLASS, FloatingSurface, FormCard, FormSection, Grow, GrowPresence, HOVER_MOTION, HeldWidth, Highlighted, HighlightedCode, HostRow, HoverCard, HowItWorks, INPUT_CLASS, INSTANT, IconButton, IconToggle, KeyCombo, Keycap, LabelsProvider, LoadError, MAX_REAL_SCALE, MENU_FADE_RATIO, MOTIONS, MOTION_NAMES, MatchedTitle, MediaNav, Menu, MenuNote, MenuRow, MenuSection, MenuSeparator, MenuSwitch, Meta, MetaChip, MotionProvider, NavButton, NavRow, OpLine, Overlay, PANEL_ROW, PANEL_ROW_HOVER, PUNCTUATION_CODES, PaletteIcon, PaletteList, PaletteOption, PalettePanel, PaletteRow, PanelEmpty, PanelLoading, PathDisplayProvider, PathDisplayScope, Popover, Presence, PreviewWindow, REDUCED_FADE, ROW_BUTTON_CLASS, ROW_CLASS, ROW_HOST_CLASS, ROW_TRIGGER_CLASS, Raised, ReorderTabs, RollingText, RowActionsMenu, RowBadge, RowText, SHIMMER_MS, SectionLabel, SegmentSpinner, Segmented, SegmentedRow, SliderRow, SmoothWidth, StepActions, StepFrame, Stepper, SwapIcon, SwatchPicker, Switch, SwitchGlyph, SwitchRow, TEXTAREA_CLASS, TabPill, ThemeThumb, TitleText, ToggleCard, ToggleSwitch, Tooltip, Tray, ZoomableImage, _resetKeyboardLayout, anchorNudge, applyMotionVars, basename, beginLayoutAnimation, buttonClass, capChroma, clampWidth, compactPath, configureErrorReports, contrastRatio, contrastToCssVars, createCodeHighlighter, createKeyedStore, cssMotionVars, currentMotionPrefs, currentMotionTransition, currentWithFade, defaultPaletteKeys, defaultShikiTheme, depthToCssVars, derivePalette, ensureContrast, errorMessage, errorStacksShown, extendLabels, fadeTransition, focusMenuRow, formatColor, formatPathForCwd, handleMenuKeyDown, hasBrandMark, iconButtonClass, inferAppearance, installRendererErrorHandlers, isDark, isLayoutAnimating, layoutKeyLabel, luminance, menuTransition, mix, motionTransition, motionVars, moveId, oklch, oklchToRgb, oneOf, paletteToCssVars, paletteVerb, panelMotionVars, parseBoolean, parseColor, placeSurface, presetFor, pulseLayout, readDurationVar, readExitMs, readMenuExitMs, readMotionMs, readPanelMs, readPersisted, readRollMs, readableOn, reportRendererError, resetReportedErrors, resolveTheme, returnFocus, rgbToOklch, rollCells, scrollRootOf, seedFromTheme, shikiThemeFor, splitPath, subscribeLayoutAnimating, syncShimmer, themeCssVars, themeStylesheet, tildePath, tildeText, tintedNeutral, toOklch, transitionState, typesStandIn, useAnchoredPosition, useCadencedValue, useCodeHighlight, useDismiss, useDisplayPath, useDocumentAppearance, useEditorEnvironment, useKeyboardLayout, useKeyedValue, useLabels, useLayer, useLightbox, useMenuTransition, useMinuteTick, useMotionLevel, useMotionPrefs, useMotionTransition, useNearViewport, usePersistedState, usePopover, usePresence, useReducedMotion, useResizeDrag, useRowHint, useScrollLock, useSprings, useStaysMounted, useTabDrag, useTabExit, useWithFade, watchRuntimeIcons, withAlpha, withFade, withLightness, withoutTransitions, writePersisted };
89
+ export { ACCENT_PRESETS, AddressBar, BRAND_MARKS, BTN_DANGER, BTN_DANGER_CONFIRM, BTN_LG_DANGER, BTN_LG_PRIMARY, BTN_LG_SECONDARY, BTN_LG_SOLID, BTN_PRIMARY, BTN_SECONDARY, BUILTIN_THEMES, BrandMark, Breadcrumb, BrowserSignIn, CONFIRM_TITLE_ID, CONTRAST, Checkbox, ChoiceCards, CodeFrame, CodeHighlightProvider, CodePanel, CodeWrapProvider, ConfirmDialog, CopyButton, CountBadge, Crossfade, DARK_LUMINANCE_THRESHOLD, DEFAULT_EDITOR_SETTINGS, DEFAULT_LABELS, DEFAULT_PANEL_MS, DEFAULT_THEME, DiffCounts, EditableTitle, EditorEnvironmentProvider, EmptyState, ErrorBoundary, ErrorDetails, ErrorFallback, ErrorNote, FADE_KEYS, FIELD_LABEL_CLASS, FORM_CARD_CLASS, FloatingSurface, FormCard, FormSection, Grow, GrowPresence, HOVER_MOTION, HeldWidth, Highlighted, HighlightedCode, HostRow, HoverCard, HowItWorks, INPUT_CLASS, INSTANT, IconButton, IconToggle, KeyCombo, Keycap, LabelsProvider, LoadError, MAX_REAL_SCALE, MENU_FADE_RATIO, MOTIONS, MOTION_NAMES, MatchedTitle, MediaNav, Menu, MenuNote, MenuRow, MenuSection, MenuSeparator, MenuSwitch, Meta, MetaChip, MotionProvider, NavButton, NavRow, OpLine, Overlay, PANEL_ROW, PANEL_ROW_HOVER, PUNCTUATION_CODES, PaletteIcon, PaletteList, PaletteOption, PalettePanel, PaletteRow, PanelEmpty, PanelLoading, PathDisplayProvider, PathDisplayScope, Popover, Presence, PreviewWindow, REDUCED_FADE, ROW_BUTTON_CLASS, ROW_CLASS, ROW_HOST_CLASS, ROW_TRIGGER_CLASS, Raised, ReorderTabs, Restricted, RollingText, RowActionsMenu, RowBadge, RowText, SHIMMER_MS, SectionLabel, SegmentSpinner, Segmented, SegmentedRow, SliderRow, SmoothHeight, SmoothWidth, StepActions, StepFrame, Stepper, SwapIcon, SwatchPicker, Switch, SwitchGlyph, SwitchRow, TEXTAREA_CLASS, TabPill, ThemeThumb, TitleText, ToggleCard, ToggleSwitch, Tooltip, Tray, ZidaneMark, ZoomableImage, _resetKeyboardLayout, anchorNudge, applyMotionVars, basename, beginLayoutAnimation, buttonClass, capChroma, clampWidth, compactPath, configureErrorReports, contrastRatio, contrastToCssVars, createCodeHighlighter, createKeyedStore, cssMotionVars, currentMotionPrefs, currentMotionTransition, currentWithFade, defaultPaletteKeys, defaultShikiTheme, depthToCssVars, derivePalette, ensureContrast, errorMessage, errorStacksShown, extendLabels, fadeTransition, focusMenuRow, formatColor, formatPathForCwd, handleMenuKeyDown, hasBrandMark, iconButtonClass, inferAppearance, installRendererErrorHandlers, isDark, isLayoutAnimating, layoutKeyLabel, luminance, menuTransition, mix, motionTransition, motionVars, moveId, oklch, oklchToRgb, oneOf, paletteToCssVars, paletteVerb, panelMotionVars, parseBoolean, parseColor, placeSurface, presetFor, pulseLayout, readDurationVar, readExitMs, readMenuExitMs, readMotionMs, readPanelMs, readPersisted, readRollMs, readableOn, reportRendererError, resetReportedErrors, resolveTheme, returnFocus, rgbToOklch, rollCells, scrollRootOf, seedFromTheme, shikiThemeFor, splitPath, subscribeLayoutAnimating, syncShimmer, themeCssVars, themeStylesheet, tildePath, tildeText, tintedNeutral, toOklch, transitionState, typesStandIn, useAnchoredPosition, useCadencedValue, useCodeHighlight, useDismiss, useDisplayPath, useDocumentAppearance, useEditorEnvironment, useKeyboardLayout, useKeyedValue, useLabels, useLayer, useLightbox, useMenuTransition, useMinuteTick, useMotionLevel, useMotionPrefs, useMotionTransition, useNearViewport, usePersistedState, usePopover, usePresence, useReducedMotion, useResizeDrag, useRowHint, useScrollLock, useSprings, useStaysMounted, useTabDrag, useTabExit, useWithFade, watchRuntimeIcons, withAlpha, withFade, withLightness, withoutTransitions, writePersisted };
@@ -58,7 +58,7 @@ const KEYBINDING_DEFS = [
58
58
  },
59
59
  {
60
60
  action: "newSession",
61
- default: "ctrl+n",
61
+ default: "ctrl+n | cmd+n",
62
62
  label: "new session",
63
63
  description: "leave the active session and start a fresh one",
64
64
  urgent: true
package/dist/labels.d.ts CHANGED
@@ -48,6 +48,7 @@ declare const DEFAULT_LABELS: {
48
48
  paletteChoose: string;
49
49
  paletteTurnOn: string;
50
50
  paletteTurnOff: string;
51
+ paletteScopeHint: string;
51
52
  editorConflict: string;
52
53
  editorConflictDetail: string;
53
54
  editorReload: string;
package/dist/labels.js CHANGED
@@ -58,6 +58,7 @@ const DEFAULT_LABELS = {
58
58
  paletteChoose: "Choose",
59
59
  paletteTurnOn: "Turn on",
60
60
  paletteTurnOff: "Turn off",
61
+ paletteScopeHint: "Section",
61
62
  editorConflict: "Changed on disk while editing.",
62
63
  editorConflictDetail: "This file changed on disk while you were editing.",
63
64
  editorReload: "Reload",
@@ -21,7 +21,7 @@ import { DAEMON_HEALTH_STYLE } from "zidane/chat/pure";
21
21
  const POLL_MS = 2e3;
22
22
  function MenuHeading({ children }) {
23
23
  return /* @__PURE__ */ jsx("div", {
24
- className: "px-3 pt-1.5 pb-1 text-zg-badge font-semibold uppercase tracking-wide text-[var(--zg-text-muted)]",
24
+ className: "px-3 pt-1.5 pb-1 text-zg-badge font-semibold text-[var(--zg-text-muted)]",
25
25
  children
26
26
  });
27
27
  }
@@ -12,6 +12,16 @@ interface HostCapabilitiesState {
12
12
  checking: boolean;
13
13
  /** Probes again, bypassing the backend's cache. */
14
14
  recheck: () => Promise<void>;
15
+ /** Installs a missing tool there; absent without the host's `installTool`. */
16
+ install?: (name: string) => Promise<void>;
17
+ /** The tool being installed. */
18
+ installing: string | null;
19
+ /** How the last install went. */
20
+ installed: {
21
+ name: string;
22
+ ok: boolean;
23
+ output: string;
24
+ } | null;
15
25
  }
16
26
  /**
17
27
  * A host's capabilities. Nothing is asked while `enabled` is false (an unreachable server) or without the host's
@@ -44,6 +54,18 @@ interface CapabilitiesViewProps {
44
54
  onRecheck: () => void;
45
55
  /** This computer: it serves no clients, so what it allows is not listed. */
46
56
  local?: boolean;
57
+ /** Installs a missing tool there. Absent: a missing tool offers nothing. */
58
+ onInstall?: (name: string) => void;
59
+ /** This connection may not install (a chat token): Install shows, Admin only. */
60
+ installRestricted?: boolean;
61
+ /** The tool being installed. */
62
+ installing?: string | null;
63
+ /** How the last install went: its output shows under the tools when it failed. */
64
+ installed?: {
65
+ name: string;
66
+ ok: boolean;
67
+ output: string;
68
+ } | null;
47
69
  /** Classes merged on the root. */
48
70
  className?: string;
49
71
  /** Inline styles on the root. */
@@ -55,6 +77,6 @@ interface CapabilitiesViewProps {
55
77
  *
56
78
  * @param props - {@link CapabilitiesViewProps}.
57
79
  */
58
- declare function CapabilitiesView({ caps, error, checking, onRecheck, local, className, style }: CapabilitiesViewProps): import("react").JSX.Element;
80
+ declare function CapabilitiesView({ caps, error, checking, onRecheck, local, onInstall, installRestricted, installing, installed, className, style }: CapabilitiesViewProps): import("react").JSX.Element;
59
81
  //#endregion
60
82
  export { CapabilitiesView, CapabilitiesViewProps, CapabilityTags, CapabilityTagsProps, HostCapabilitiesState, useHostCapabilities };
@@ -1,15 +1,21 @@
1
1
  import { BTN_SECONDARY } from "../components/button.js";
2
- import { MetaChip } from "../components/Form.js";
2
+ import { CopyButton } from "../components/CopyButton.js";
3
+ import { MetaChip, OpLine } from "../components/Form.js";
4
+ import { Restricted } from "../components/Restricted.js";
3
5
  import { machinesError } from "./headless/host.js";
4
6
  import { useMachinesHost, useMachinesLabels } from "./MachinesProvider.js";
7
+ import { RoutedLink } from "../extensions/links.js";
5
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
9
  import { useCallback, useEffect, useState } from "react";
7
- import { HOST_TOOLS, capabilityTags } from "zidane/chat/pure";
10
+ import { HOST_TOOLS, capabilityTags, toolInstall } from "zidane/chat/pure";
8
11
  //#region src/machines/HostCapabilities.tsx
9
12
  /**
10
13
  * What a host can do (`MachinesHost.capabilities`), for a hosts page: a few
11
14
  * tags on its row in a list, and the full check on its page (OS, tools on
12
15
  * PATH, sandbox, environment kinds, what it allows, disk) with Re-check.
16
+ * On a server, a missing tool's row offers its install (`toolInstall`):
17
+ * Install runs it there (`MachinesHost.installTool`, Admin only), a command
18
+ * that needs root is offered to copy, else the tool's page.
13
19
  */
14
20
  /**
15
21
  * A host's capabilities. Nothing is asked while `enabled` is false (an unreachable server) or without the host's
@@ -19,10 +25,34 @@ import { HOST_TOOLS, capabilityTags } from "zidane/chat/pure";
19
25
  * @param enabled - Whether to ask. Default true.
20
26
  */
21
27
  function useHostCapabilities(hostId, enabled = true) {
22
- const read = useMachinesHost().capabilities;
28
+ const { capabilities: read, installTool } = useMachinesHost();
23
29
  const [caps, setCaps] = useState(null);
24
30
  const [error, setError] = useState(null);
25
31
  const [checking, setChecking] = useState(false);
32
+ const [installing, setInstalling] = useState(null);
33
+ const [installed, setInstalled] = useState(null);
34
+ const install = useCallback(async (name) => {
35
+ if (!installTool) return;
36
+ setInstalling(name);
37
+ setInstalled(null);
38
+ try {
39
+ const result = await installTool(hostId, name);
40
+ setCaps(result.capabilities);
41
+ setInstalled({
42
+ name,
43
+ ok: result.ok,
44
+ output: result.output
45
+ });
46
+ } catch (err) {
47
+ setInstalled({
48
+ name,
49
+ ok: false,
50
+ output: machinesError("install", err).detail
51
+ });
52
+ } finally {
53
+ setInstalling(null);
54
+ }
55
+ }, [installTool, hostId]);
26
56
  const load = useCallback(async (refresh = false) => {
27
57
  if (!enabled || !read) return;
28
58
  setChecking(true);
@@ -46,7 +76,10 @@ function useHostCapabilities(hostId, enabled = true) {
46
76
  caps,
47
77
  error,
48
78
  checking,
49
- recheck: () => load(true)
79
+ recheck: () => load(true),
80
+ ...installTool && enabled ? { install } : {},
81
+ installing,
82
+ installed
50
83
  };
51
84
  }
52
85
  /**
@@ -60,7 +93,7 @@ function CapabilityTags({ caps }) {
60
93
  const { tags, more } = capabilityTags(caps);
61
94
  return /* @__PURE__ */ jsxs(Fragment, { children: [tags.map((tag) => /* @__PURE__ */ jsx(MetaChip, { children: tag }, tag)), more > 0 && /* @__PURE__ */ jsx(MetaChip, { children: labels.machinesCapsMore(more) })] });
62
95
  }
63
- function Fact({ ok, icon, label, detail, title }) {
96
+ function Fact({ ok, icon, label, detail, title, action }) {
64
97
  const labels = useMachinesLabels();
65
98
  return /* @__PURE__ */ jsxs("li", {
66
99
  className: "flex items-center gap-2.5 min-w-0 px-2.5 py-2",
@@ -80,6 +113,7 @@ function Fact({ ok, icon, label, detail, title }) {
80
113
  children: detail ?? (ok ? labels.machinesCapsAvailable : labels.machinesCapsMissing)
81
114
  })]
82
115
  }),
116
+ action,
83
117
  /* @__PURE__ */ jsx("span", {
84
118
  role: "img",
85
119
  "aria-label": ok ? labels.machinesCapsAvailableA11y : labels.machinesCapsMissingA11y,
@@ -95,8 +129,40 @@ const GRID = "m-0 p-0 list-none grid grid-cols-2 gap-px rounded-zg-md overflow-h
95
129
  *
96
130
  * @param props - {@link CapabilitiesViewProps}.
97
131
  */
98
- function CapabilitiesView({ caps, error, checking, onRecheck, local = false, className = "", style }) {
132
+ function CapabilitiesView({ caps, error, checking, onRecheck, local = false, onInstall, installRestricted = false, installing = null, installed = null, className = "", style }) {
99
133
  const labels = useMachinesLabels();
134
+ const installAction = (name, label) => {
135
+ if (!onInstall || !caps || caps.partial) return void 0;
136
+ const how = toolInstall(name, caps);
137
+ if (!how) return void 0;
138
+ if (how.kind === "copy") return /* @__PURE__ */ jsx("span", {
139
+ title: labels.machinesCapsInstallCopy(how.command),
140
+ children: /* @__PURE__ */ jsx(CopyButton, {
141
+ text: how.command,
142
+ label: labels.machinesCapsInstallCopyLabel(label)
143
+ })
144
+ });
145
+ if (how.kind === "link") return /* @__PURE__ */ jsx(RoutedLink, {
146
+ href: how.url,
147
+ "aria-label": labels.machinesCapsInstallPageLabel(label),
148
+ className: "text-xs text-[var(--zg-text-muted)] hover:text-[var(--zg-text)] shrink-0",
149
+ children: labels.machinesCapsInstallPage
150
+ });
151
+ return /* @__PURE__ */ jsx(Restricted, {
152
+ restricted: installRestricted,
153
+ reason: labels.machinesAdminOnly,
154
+ inline: true,
155
+ children: /* @__PURE__ */ jsx("button", {
156
+ type: "button",
157
+ className: BTN_SECONDARY,
158
+ "aria-label": labels.machinesCapsInstallLabel(label),
159
+ disabled: installing !== null,
160
+ onClick: () => onInstall(name),
161
+ children: installing === name ? labels.machinesCapsInstalling : labels.machinesCapsInstall
162
+ })
163
+ });
164
+ };
165
+ const installedLabel = installed ? HOST_TOOLS.find((tool) => tool.name === installed.name)?.label ?? installed.name : "";
100
166
  return /* @__PURE__ */ jsxs("div", {
101
167
  className: `px-3 py-3 space-y-3 ${className}`,
102
168
  style,
@@ -128,66 +194,84 @@ function CapabilitiesView({ caps, error, checking, onRecheck, local = false, cla
128
194
  onClick: onRecheck,
129
195
  children: checking ? labels.machinesCapsChecking : labels.machinesCapsRecheck
130
196
  })]
131
- }), caps && /* @__PURE__ */ jsxs(Fragment, { children: [caps.tools.length > 0 && /* @__PURE__ */ jsx("ul", {
132
- className: GRID,
133
- "aria-label": labels.machinesCapsTools,
134
- children: HOST_TOOLS.map((tool) => {
135
- const found = caps.tools.find((t) => t.name === tool.name);
136
- return /* @__PURE__ */ jsx(Fact, {
137
- ok: found?.found === true,
138
- icon: tool.icon,
139
- label: tool.label,
140
- ...found?.version ? { detail: found.version } : {},
141
- title: tool.why
142
- }, tool.name);
143
- })
144
- }), /* @__PURE__ */ jsxs("ul", {
145
- className: GRID,
146
- "aria-label": labels.machinesCapsFeatures,
147
- children: [
148
- !caps.partial && /* @__PURE__ */ jsx(Fact, {
149
- ok: caps.sandbox.ok,
150
- icon: "i-ph-shield-check",
151
- label: labels.machinesCapsSandbox,
152
- detail: caps.sandbox.ok ? caps.sandbox.backend : labels.machinesCapsNotAvailable,
153
- ...caps.sandbox.reason ? { title: caps.sandbox.reason } : {}
154
- }),
155
- caps.environments.filter((env) => env.kind !== "local" && !env.kind.includes("@")).map((env) => /* @__PURE__ */ jsx(Fact, {
156
- ok: env.available,
157
- icon: env.kind === "worktree" ? "i-ph-git-branch" : env.kind === "docker" ? "i-ph-cube" : "i-ph-cloud",
158
- label: env.label,
159
- detail: env.available ? labels.machinesCapsEnvAvailable : labels.machinesCapsNotAvailable,
160
- ...env.reason ? { title: env.reason } : {}
161
- }, env.kind)),
162
- !local && /* @__PURE__ */ jsxs(Fragment, { children: [
163
- /* @__PURE__ */ jsx(Fact, {
164
- ok: caps.allows.remoteInstalls,
165
- icon: "i-ph-download-simple",
166
- label: labels.machinesCapsRemoteInstalls
167
- }),
168
- /* @__PURE__ */ jsx(Fact, {
169
- ok: caps.allows.asMachine,
170
- icon: "i-ph-hard-drives",
171
- label: labels.machinesCapsAsMachine
172
- }),
173
- /* @__PURE__ */ jsx(Fact, {
174
- ok: caps.allows.sync,
175
- icon: "i-ph-arrows-clockwise",
176
- label: labels.machinesCapsSync
177
- }),
178
- /* @__PURE__ */ jsx(Fact, {
179
- ok: caps.allows.clone,
180
- icon: "i-ph-git-branch",
181
- label: labels.machinesCapsClone
197
+ }), caps && /* @__PURE__ */ jsxs(Fragment, { children: [
198
+ caps.tools.length > 0 && /* @__PURE__ */ jsx("ul", {
199
+ className: GRID,
200
+ "aria-label": labels.machinesCapsTools,
201
+ children: HOST_TOOLS.map((tool) => {
202
+ const found = caps.tools.find((t) => t.name === tool.name);
203
+ const action = found?.found ? void 0 : installAction(tool.name, tool.label);
204
+ return /* @__PURE__ */ jsx(Fact, {
205
+ ok: found?.found === true,
206
+ icon: tool.icon,
207
+ label: tool.label,
208
+ ...found?.version ? { detail: found.version } : {},
209
+ title: tool.why,
210
+ ...action ? { action } : {}
211
+ }, tool.name);
212
+ })
213
+ }),
214
+ installed && (installed.ok ? /* @__PURE__ */ jsx(OpLine, {
215
+ kind: "notice",
216
+ children: labels.machinesCapsInstalled(installedLabel)
217
+ }) : /* @__PURE__ */ jsxs("div", {
218
+ className: "space-y-1",
219
+ children: [/* @__PURE__ */ jsx(OpLine, {
220
+ kind: "error",
221
+ children: labels.machinesCapsInstallFailed(installedLabel)
222
+ }), installed.output && /* @__PURE__ */ jsx("pre", {
223
+ className: "zg-well m-0 max-h-40 overflow-auto rounded-zg-md px-2.5 py-1.5 font-mono text-zg-meta whitespace-pre-wrap text-[var(--zg-text-muted)]",
224
+ children: installed.output
225
+ })]
226
+ })),
227
+ /* @__PURE__ */ jsxs("ul", {
228
+ className: GRID,
229
+ "aria-label": labels.machinesCapsFeatures,
230
+ children: [
231
+ !caps.partial && /* @__PURE__ */ jsx(Fact, {
232
+ ok: caps.sandbox.ok,
233
+ icon: "i-ph-shield-check",
234
+ label: labels.machinesCapsSandbox,
235
+ detail: caps.sandbox.ok ? caps.sandbox.backend : labels.machinesCapsNotAvailable,
236
+ ...caps.sandbox.reason ? { title: caps.sandbox.reason } : {}
182
237
  }),
183
- /* @__PURE__ */ jsx(Fact, {
184
- ok: caps.allows.createFolders,
185
- icon: "i-ph-folder-plus",
186
- label: labels.machinesCapsCreateFolders
187
- })
188
- ] })
189
- ]
190
- })] })]
238
+ caps.environments.filter((env) => env.kind !== "local" && !env.kind.includes("@")).map((env) => /* @__PURE__ */ jsx(Fact, {
239
+ ok: env.available,
240
+ icon: env.kind === "worktree" ? "i-ph-git-branch" : env.kind === "docker" ? "i-ph-cube" : "i-ph-cloud",
241
+ label: env.label,
242
+ detail: env.available ? labels.machinesCapsEnvAvailable : labels.machinesCapsNotAvailable,
243
+ ...env.reason ? { title: env.reason } : {}
244
+ }, env.kind)),
245
+ !local && /* @__PURE__ */ jsxs(Fragment, { children: [
246
+ /* @__PURE__ */ jsx(Fact, {
247
+ ok: caps.allows.remoteInstalls,
248
+ icon: "i-ph-download-simple",
249
+ label: labels.machinesCapsRemoteInstalls
250
+ }),
251
+ /* @__PURE__ */ jsx(Fact, {
252
+ ok: caps.allows.asMachine,
253
+ icon: "i-ph-hard-drives",
254
+ label: labels.machinesCapsAsMachine
255
+ }),
256
+ /* @__PURE__ */ jsx(Fact, {
257
+ ok: caps.allows.sync,
258
+ icon: "i-ph-arrows-clockwise",
259
+ label: labels.machinesCapsSync
260
+ }),
261
+ /* @__PURE__ */ jsx(Fact, {
262
+ ok: caps.allows.clone,
263
+ icon: "i-ph-git-branch",
264
+ label: labels.machinesCapsClone
265
+ }),
266
+ /* @__PURE__ */ jsx(Fact, {
267
+ ok: caps.allows.createFolders,
268
+ icon: "i-ph-folder-plus",
269
+ label: labels.machinesCapsCreateFolders
270
+ })
271
+ ] })
272
+ ]
273
+ })
274
+ ] })]
191
275
  });
192
276
  }
193
277
  //#endregion