@ibealec/create-zed-bridge 1.0.8 → 1.0.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibealec/create-zed-bridge",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "Setup script for @zed-controller/react-bridge and LocatorJS integration",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1728,6 +1728,7 @@ function TaskStatusToast({
1728
1728
  const [expanded, setExpanded] = (0, import_react5.useState)(false);
1729
1729
  const [size, setSize] = (0, import_react5.useState)({ width: DEFAULT_WIDTH, height: DEFAULT_HEIGHT });
1730
1730
  const [isResizing, setIsResizing] = (0, import_react5.useState)(false);
1731
+ const [isSaving, setIsSaving] = (0, import_react5.useState)(false);
1731
1732
  const resizeRef = (0, import_react5.useRef)(null);
1732
1733
  (0, import_react5.useEffect)(() => {
1733
1734
  if (task) {
@@ -1819,12 +1820,17 @@ function TaskStatusToast({
1819
1820
  resolve();
1820
1821
  }
1821
1822
  };
1822
- setTimeout(cleanup, 1e4);
1823
+ setTimeout(cleanup, 35e3);
1823
1824
  });
1824
1825
  }, [serverUrl, token]);
1825
1826
  const handleDismiss = (0, import_react5.useCallback)(async () => {
1826
1827
  if (killOnClose && task?.sessionId) {
1827
- await killSession(task.sessionId, task.prompt);
1828
+ setIsSaving(true);
1829
+ try {
1830
+ await killSession(task.sessionId, task.prompt);
1831
+ } finally {
1832
+ setIsSaving(false);
1833
+ }
1828
1834
  }
1829
1835
  setVisible(false);
1830
1836
  setExpanded(false);
@@ -1839,9 +1845,10 @@ function TaskStatusToast({
1839
1845
  starting: { bg: "#f59e0b", text: "Starting..." },
1840
1846
  running: { bg: "#22c55e", text: "Running" },
1841
1847
  completed: { bg: "#22c55e", text: "Completed" },
1842
- failed: { bg: "#ef4444", text: "Failed" }
1848
+ failed: { bg: "#ef4444", text: "Failed" },
1849
+ saving: { bg: "#f59e0b", text: "Saving..." }
1843
1850
  };
1844
- const status = statusColors[task.status] || statusColors.queued;
1851
+ const status = isSaving ? statusColors.saving : statusColors[task.status] || statusColors.queued;
1845
1852
  const zedUrl = task.sessionId ? `${serverUrl}?token=${encodeURIComponent(token)}&session=${task.sessionId}` : `${serverUrl}?token=${encodeURIComponent(token)}`;
1846
1853
  const handleOpenZed = () => {
1847
1854
  window.open(zedUrl, "_blank");
@@ -1908,16 +1915,17 @@ function TaskStatusToast({
1908
1915
  "button",
1909
1916
  {
1910
1917
  onClick: handleDismiss,
1918
+ disabled: isSaving,
1911
1919
  style: {
1912
1920
  background: "transparent",
1913
1921
  border: "none",
1914
- color: "rgba(255, 255, 255, 0.5)",
1915
- cursor: "pointer",
1922
+ color: isSaving ? "rgba(255, 255, 255, 0.3)" : "rgba(255, 255, 255, 0.5)",
1923
+ cursor: isSaving ? "not-allowed" : "pointer",
1916
1924
  padding: 4,
1917
1925
  fontSize: 18,
1918
1926
  lineHeight: 1
1919
1927
  },
1920
- children: "\xD7"
1928
+ children: isSaving ? "..." : "\xD7"
1921
1929
  }
1922
1930
  )
1923
1931
  ]
@@ -2172,17 +2180,61 @@ function TaskStatusToast({
2172
2180
  "button",
2173
2181
  {
2174
2182
  onClick: handleDismiss,
2175
- title: "Close",
2183
+ disabled: isSaving,
2184
+ title: isSaving ? "Saving changes..." : "Close",
2176
2185
  style: {
2177
2186
  background: "transparent",
2178
2187
  border: "none",
2179
- color: "rgba(255, 255, 255, 0.5)",
2180
- cursor: "pointer",
2188
+ color: isSaving ? "rgba(255, 255, 255, 0.3)" : "rgba(255, 255, 255, 0.5)",
2189
+ cursor: isSaving ? "not-allowed" : "pointer",
2181
2190
  padding: 4,
2182
2191
  fontSize: 18,
2183
2192
  lineHeight: 1
2184
2193
  },
2185
- children: "\xD7"
2194
+ children: isSaving ? "..." : "\xD7"
2195
+ }
2196
+ )
2197
+ ]
2198
+ }
2199
+ ),
2200
+ isSaving && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2201
+ "div",
2202
+ {
2203
+ style: {
2204
+ position: "absolute",
2205
+ top: 0,
2206
+ left: 0,
2207
+ right: 0,
2208
+ bottom: 0,
2209
+ background: "rgba(0, 0, 0, 0.7)",
2210
+ display: "flex",
2211
+ flexDirection: "column",
2212
+ alignItems: "center",
2213
+ justifyContent: "center",
2214
+ zIndex: 10,
2215
+ borderRadius: 12
2216
+ },
2217
+ children: [
2218
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2219
+ "div",
2220
+ {
2221
+ style: {
2222
+ color: "#f59e0b",
2223
+ fontSize: 14,
2224
+ fontWeight: 500,
2225
+ marginBottom: 8
2226
+ },
2227
+ children: "Saving changes..."
2228
+ }
2229
+ ),
2230
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2231
+ "div",
2232
+ {
2233
+ style: {
2234
+ color: "rgba(255, 255, 255, 0.6)",
2235
+ fontSize: 12
2236
+ },
2237
+ children: "Generating commit message with AI"
2186
2238
  }
2187
2239
  )
2188
2240
  ]