@hachej/boring-workspace 0.1.63 → 0.1.64

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.
@@ -1,9 +1,9 @@
1
1
  import { jsx as a, jsxs as h, Fragment as Pe } from "react/jsx-runtime";
2
2
  import { useState as j, useMemo as R, useCallback as k, useRef as H, useEffect as y, useSyncExternalStore as _e, Suspense as Ne } from "react";
3
3
  import { IconButton as te, LoadingState as We, ResizeHandle as Oe, Button as ze, Kbd as Ie } from "@hachej/boring-ui-kit";
4
- import { Minimize2 as Re, Maximize2 as Be, PanelRightClose as Me, PanelRightOpen as Ae, MessageSquare as Le, Search as De, Plus as Ee } from "lucide-react";
4
+ import { Minimize2 as Re, Maximize2 as Be, PanelRightClose as Ae, PanelRightOpen as Me, MessageSquare as Le, Search as De, Plus as Ee } from "lucide-react";
5
5
  import { c as b } from "./utils-B6yFEsav.js";
6
- import { b4 as pe, az as Te, aJ as Ke, ag as He, ar as je, Z as Fe, aM as ge, b0 as Ve, al as $e, b5 as qe, u as Ue, aC as Xe } from "./WorkspaceProvider-U4izhS84.js";
6
+ import { b4 as pe, az as Te, aJ as Ke, ag as He, ar as je, Z as Fe, aM as ge, b0 as Ve, al as $e, b5 as qe, u as Ue, aC as Xe } from "./WorkspaceProvider-CEZUOy1M.js";
7
7
  function lt(e, t, r = !0) {
8
8
  if (!r || typeof window > "u") return t;
9
9
  try {
@@ -140,7 +140,7 @@ function ht(e) {
140
140
  ), Se = R(
141
141
  () => W.some((o) => !!o.sessionId && !!Ke(o)),
142
142
  [W]
143
- ), v = He(), F = _(f, 200, 360), V = _(ye, 200, Math.max(240, Math.floor(i * 0.5))), re = Math.max(480, Math.floor(i * 0.72)), $ = _(ne, 480, re), q = N(e.centerParams, "getSurface"), U = N(e.centerParams, "isWorkbenchOpen"), X = N(e.centerParams, "openWorkbench"), oe = N(e.centerParams, "openWorkbenchSources"), ie = N(e.centerParams, "closeWorkbench"), se = et(e.centerParams, "surfaceDispatch"), p = K(e.navParams, "onClose"), x = K(e.surfaceParams, "onClose"), P = K(e.sidebarParams, "onClose"), Z = K(e.navParams, "onCreate"), M = ((he = e.chatPanes) == null ? void 0 : he.filter((o) => o.id.length > 0)) ?? [], ce = M.length > 0, g = !!e.sidebar, A = t ? !!p : !!e.onOpenNav, O = n ? !!x : !!e.onOpenSurface, L = g ? !!P : !!e.onOpenSidebar, D = k(() => {
143
+ ), v = He(), F = _(f, 200, 360), V = _(ye, 200, Math.max(240, Math.floor(i * 0.5))), re = Math.max(480, Math.floor(i * 0.72)), $ = _(ne, 480, re), q = N(e.centerParams, "getSurface"), U = N(e.centerParams, "isWorkbenchOpen"), X = N(e.centerParams, "openWorkbench"), oe = N(e.centerParams, "openWorkbenchSources"), ie = N(e.centerParams, "closeWorkbench"), se = et(e.centerParams, "surfaceDispatch"), p = K(e.navParams, "onClose"), x = K(e.surfaceParams, "onClose"), P = K(e.sidebarParams, "onClose"), Z = K(e.navParams, "onCreate"), A = ((he = e.chatPanes) == null ? void 0 : he.filter((o) => o.id.length > 0)) ?? [], ce = A.length > 0, g = !!e.sidebar, M = t ? !!p : !!e.onOpenNav, O = n ? !!x : !!e.onOpenSurface, L = g ? !!P : !!e.onOpenSidebar, D = k(() => {
144
144
  var o;
145
145
  if (t) {
146
146
  p == null || p();
@@ -173,8 +173,8 @@ function ht(e) {
173
173
  je({
174
174
  shortcuts: R(() => {
175
175
  const o = [];
176
- return A && o.push({ key: "1", mod: !0, handler: D }), O && o.push({ key: "2", mod: !0, handler: z }), L && o.push({ key: "3", mod: !0, allowInEditable: !0, handler: E }), s === "chat" && (o.push({ key: "Escape", allowInEditable: !0, handler: T }), o.push({ key: "\\", mod: !0, allowInEditable: !0, handler: Y })), o;
177
- }, [A, L, O, s, T, Y, D, E, z])
176
+ return M && o.push({ key: "1", mod: !0, handler: D }), O && o.push({ key: "2", mod: !0, handler: z }), L && o.push({ key: "3", mod: !0, allowInEditable: !0, handler: E }), s === "chat" && (o.push({ key: "Escape", allowInEditable: !0, handler: T }), o.push({ key: "\\", mod: !0, allowInEditable: !0, handler: Y })), o;
177
+ }, [M, L, O, s, T, Y, D, E, z])
178
178
  }), y(() => {
179
179
  const o = "workspace:chat-layout", u = "agent:chat-layout";
180
180
  return v.unregisterByPluginId(o), v.unregisterByPluginId(u), v.registerCommand({
@@ -183,7 +183,7 @@ function ht(e) {
183
183
  keywords: ["sessions", "history", "drawer", t ? "close" : "open"],
184
184
  shortcut: "⌘1",
185
185
  pluginId: o,
186
- when: () => A,
186
+ when: () => M,
187
187
  run: D
188
188
  }), v.registerCommand({
189
189
  id: "workspace:open-workbench",
@@ -227,7 +227,7 @@ function ht(e) {
227
227
  e.onOpenNav,
228
228
  e.onOpenSurface,
229
229
  e.onOpenSidebar,
230
- A,
230
+ M,
231
231
  O,
232
232
  L,
233
233
  p,
@@ -403,7 +403,8 @@ function ht(e) {
403
403
  children: ce ? /* @__PURE__ */ a(
404
404
  qe,
405
405
  {
406
- panes: M,
406
+ panes: A,
407
+ topActions: e.chatTopActions,
407
408
  activePaneId: e.activeChatPaneId,
408
409
  onActivePaneChange: e.onActiveChatPaneChange,
409
410
  onClosePane: e.onCloseChatPane,
@@ -509,7 +510,7 @@ function ht(e) {
509
510
  icon: "plus",
510
511
  onClick: () => {
511
512
  var u, S;
512
- const o = e.activeChatPaneId ?? ((u = M[M.length - 1]) == null ? void 0 : u.id);
513
+ const o = e.activeChatPaneId ?? ((u = A[A.length - 1]) == null ? void 0 : u.id);
513
514
  o && ((S = e.onCreateChatPaneAfter) == null || S.call(e, o));
514
515
  },
515
516
  label: "New chat",
@@ -705,7 +706,7 @@ function nt({
705
706
  hint: "⌘2",
706
707
  onClick: r,
707
708
  pressed: e,
708
- children: e ? /* @__PURE__ */ a(Me, { className: "size-3", strokeWidth: 1.75 }) : /* @__PURE__ */ a(Ae, { className: "size-3", strokeWidth: 1.75 })
709
+ children: e ? /* @__PURE__ */ a(Ae, { className: "size-3", strokeWidth: 1.75 }) : /* @__PURE__ */ a(Me, { className: "size-3", strokeWidth: 1.75 })
709
710
  }
710
711
  ) : null
711
712
  ] });