skydive-cli 0.3.0-beta.869 → 0.3.0-beta.871
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/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Billing-blocked sends and runs now surface the server-authored recovery
|
|
13
|
+
guidance from the typed billing outcome. The chat TUI renders it as a
|
|
14
|
+
warning-toned system-notice row — live when a send is refused or a run is
|
|
15
|
+
stopped at the billing boundary, and again when reopening a conversation
|
|
16
|
+
that holds a persisted billing notice — instead of a generic error.
|
|
17
|
+
Headless `chat -p` and `messages get` print the guidance (state, recovery
|
|
18
|
+
step, and manage-billing URL) on stderr, keep any partial output already
|
|
19
|
+
streamed on stdout, and exit with code `5` (distinct from the generic `1`)
|
|
20
|
+
so scripted callers can tell a billing pause from a failure.
|
|
21
|
+
|
|
10
22
|
## [0.3.0] - 2026-08-04
|
|
11
23
|
|
|
12
24
|
### Added
|
package/dist/js/bin.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as setActiveWorkspace, S as listWorkspaces, T as version, _ as themes, b as getActiveWorkspaceId, o as brandHelpArt, t as installCrashHandler, w as name, x as getSessionIdentity, y as ensureActiveOrganization } from "./install-
|
|
2
|
+
import { C as setActiveWorkspace, S as listWorkspaces, T as version, _ as themes, b as getActiveWorkspaceId, o as brandHelpArt, t as installCrashHandler, w as name, x as getSessionIdentity, y as ensureActiveOrganization } from "./install-9_6Qf79C.mjs";
|
|
3
3
|
import { A as getStoredApiKeyWorkspaceName, C as getLastSeenVersion, F as resolveManagementAuth, I as resolveSession, M as resolveAppUrl, N as resolveChatAuth, O as getShareMachineDefault, P as resolveConfig, R as saveConfig, S as getConfigPath, T as getPromptHistoryPath, V as setLastSeenVersion, _ as API_KEY_PREFIX, b as PREFERENCES, g as API_KEY_FAMILY_PREFIX, h as API_KEYS_URL, i as resolveAgent, j as getUpdateCheckDisabled, k as getStoredApiKeyId, v as DEFAULT_API_URL, w as getPreference, x as deleteConfig, z as saveSession } from "./print-X2N5wJ5l.mjs";
|
|
4
4
|
import { n as printError, r as printTable, t as output } from "./output-DYzzdXYV.mjs";
|
|
5
5
|
import { n as createRestClient, t as HttpError } from "./rest-imDZZGQA.mjs";
|
|
@@ -1505,7 +1505,7 @@ const importCommand = {
|
|
|
1505
1505
|
process.exit(1);
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
|
-
const { runChat } = await import("./boot-
|
|
1508
|
+
const { runChat } = await import("./boot-CZZGdpUT.mjs");
|
|
1509
1509
|
await runChat({
|
|
1510
1510
|
appUrl,
|
|
1511
1511
|
sessionToken: session.value.sessionToken,
|
|
@@ -1917,7 +1917,7 @@ const chatCommand = {
|
|
|
1917
1917
|
sessionToken: auth.value.token,
|
|
1918
1918
|
agentSelector: argv.agent ?? null
|
|
1919
1919
|
});
|
|
1920
|
-
const { runChat } = await import("./boot-
|
|
1920
|
+
const { runChat } = await import("./boot-CZZGdpUT.mjs");
|
|
1921
1921
|
await runChat({
|
|
1922
1922
|
appUrl: auth.value.appUrl,
|
|
1923
1923
|
sessionToken: auth.value.token,
|
|
@@ -2276,7 +2276,7 @@ const switchCommand = {
|
|
|
2276
2276
|
printError("The workspace picker needs the Bun runtime and it could not be set up automatically. Pass a workspace slug instead, or install Bun and retry.");
|
|
2277
2277
|
process.exit(1);
|
|
2278
2278
|
}
|
|
2279
|
-
const { runWorkspacePicker } = await import("./boot-
|
|
2279
|
+
const { runWorkspacePicker } = await import("./boot-CZZGdpUT.mjs");
|
|
2280
2280
|
await runWorkspacePicker(session);
|
|
2281
2281
|
return;
|
|
2282
2282
|
}
|
|
@@ -3744,7 +3744,7 @@ function setupUpdateCheck(argv) {
|
|
|
3744
3744
|
|
|
3745
3745
|
//#endregion
|
|
3746
3746
|
//#region src/changelog.generated.ts
|
|
3747
|
-
const CHANGELOG_MD = "# Changelog\n\nAll notable changes to the Skydive CLI are documented here.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [Unreleased]\n\n## [0.3.0] - 2026-08-04\n\n### Added\n\n**Chat TUI**\n\n- `/fork` slash command to fork a conversation at any point and continue in a new thread.\n- `/conversation` switches threads from inside a live session.\n- `/compact` triggers manual conversation compaction.\n- `/portal` and `/copy` slash commands.\n- Archive the current conversation from the chat TUI.\n- `--new` flag on `skydive chat` to start a fresh conversation.\n- Debounced server-side conversation search in the picker, with title matches ranked first.\n- File review pane orientation toggle, and review comments in the file pane.\n- Pinned plan card controls and a jump-to-latest hint.\n- Terminal title (OSC) follows the live conversation title on every screen; inside cmux the workspace is renamed too, and linked PRs are pushed to the cmux sidebar.\n- Every participating agent shows in the conversation list; connect cards each have their own identity, and ctrl+r asks which connect card to act on.\n- Colored Skydive splash art in `skydive --help` and the TUI pickers.\n- New-agent name prefilled from the server's suggestion.\n\n**CLI & platform**\n\n- `skydive update` self-updater, with an update notice when a new version is available.\n- Shell completions for bash, zsh, and fish via `completion install`.\n- Portal daemon: one connection per host with per-conversation working directories.\n- Agent-led coding-agent import (`skydive import`).\n- Per-workspace scoping on the REST client, and cross-org `--agent <uuid>` auto-switches workspace.\n- `skydive-beta` wrapper for the canary channel.\n- `skydive config` command to view and set the safe, hand-editable CLI preferences (`shareMachineDefault`, `updateCheck`) without opening `config.json`. `config`/`config list` shows each key, its effective value, and whether it comes from the file or the built-in default; `config get`/`set`/`unset` read and change one key; `config path` prints the config file location. It only ever touches those preference keys, never credentials or flow-managed state.\n\n### Fixed\n\n- `skydive update` no longer claims an update is available on every npm install.\n- Chat memory is bounded (payload clamps + windowed rows) with a memory watchdog and OOM diagnostic report; transcript rows are memoized so streaming stops re-rendering the whole chat.\n- Chat-send failures map to real error messages.\n- Notification and sidebar previews use the last text block of the reply and strip inline markdown.\n- Picker rows no longer overlap when a conversation title contains a newline, tab, or control character.\n- Sending to non-web channel conversations is blocked in the TUI.\n- GitHub bot connect opens on the web front door, not api.skydive.com.\n- TUI activity counter times from the run, not the screen.\n\n## [0.2.0] - 2026-07-29\n\n### Added\n\n**Sandbox & machine access**\n\n- Standalone `skydive sandbox` command for direct access to an agent's sandbox.\n- `/sandbox` in the chat TUI — live PTY session and one-shot command execution.\n- Headless machine sharing via `skydive portal`, with self-registering portal grants.\n- `shareMachineDefault` config key for always-on portal sharing.\n\n**Chat TUI**\n\n- File pane (`ctrl+g`) with Changes and Files tabs: a shared file tree plus source viewer and a workspace browser, mouse-resizable and responsive to terminal size.\n- Agent todo list rendered in the chat TUI, above the composer, mirroring the web chat's todo card.\n- Fuzzy finder in the conversation and agent pickers.\n- Slash-command autocomplete menu.\n- Paste or drag-and-drop any file into the composer; paste clipboard images with Cmd+V.\n- Run local shell commands with `!` in the composer.\n- Conversation recaps, streamed live title updates, and per-agent attribution on assistant turns.\n- Working timer rolls up into minutes and hours.\n- Conversation picker paginates past 50 conversations and shows only your own conversations.\n- Esc leaves a live run; typing `exit` quits the chat.\n- Cursor Dark theme.\n- Picker rows no longer overlap when a conversation title contains a newline, tab, or control character.\n\n**Headless & scripting**\n\n- Resume a conversation by id.\n- `conversations list` and `conversations show` for transcript reads.\n- `messages get`, with run recovery keyed on message id.\n- Connect cards surface in headless `-p` mode so a driving agent never gets stuck.\n\n**Authentication**\n\n- `skydive auth login` via the browser now auto-mints an API key, so one login yields both a chat session and a usable management credential. Management commands announce the key's pinned workspace when it drives them, so a workspace mismatch is visible at use time.\n- Workspace picker on the device authorization page.\n- Account and workspace identity shown in `auth status`.\n\n**Platform**\n\n- Standalone binary builds compiling the CLI into a per-target executable.\n- Interactive workspace switcher; management commands follow the active workspace.\n- Terminal host integrations and agent notifications.\n\n### Fixed\n\n- Transcript errors collapse to one line, click to expand (REST and portal errors keep their full body).\n- Dragged/pasted image file paths attach the file instead of inserting path text, including macOS paths with literal parentheses.\n- Bare URLs in chat markdown are hyperlinked so they survive text wrap.\n- Composer draft is preserved across TUI overlays.\n- Relative connect links resolve before opening the browser.\n- Numbered markdown headings render colored in the TUI.\n- Chat transcript pages by 75% of a screen; picker rows stay on one line.\n- Run starts push to the TUI over the conversation stream.\n- Security: remediated high-severity dependency findings and cleared tar/shell-quote CVEs.\n\n## [0.1.0] - 2026-07-21\n\nInitial public release: `skydive chat` TUI, agent and conversation management,\ndevice authorization, and headless `-p` mode.\n";
|
|
3747
|
+
const CHANGELOG_MD = "# Changelog\n\nAll notable changes to the Skydive CLI are documented here.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [Unreleased]\n\n### Added\n\n- Billing-blocked sends and runs now surface the server-authored recovery\n guidance from the typed billing outcome. The chat TUI renders it as a\n warning-toned system-notice row — live when a send is refused or a run is\n stopped at the billing boundary, and again when reopening a conversation\n that holds a persisted billing notice — instead of a generic error.\n Headless `chat -p` and `messages get` print the guidance (state, recovery\n step, and manage-billing URL) on stderr, keep any partial output already\n streamed on stdout, and exit with code `5` (distinct from the generic `1`)\n so scripted callers can tell a billing pause from a failure.\n\n## [0.3.0] - 2026-08-04\n\n### Added\n\n**Chat TUI**\n\n- `/fork` slash command to fork a conversation at any point and continue in a new thread.\n- `/conversation` switches threads from inside a live session.\n- `/compact` triggers manual conversation compaction.\n- `/portal` and `/copy` slash commands.\n- Archive the current conversation from the chat TUI.\n- `--new` flag on `skydive chat` to start a fresh conversation.\n- Debounced server-side conversation search in the picker, with title matches ranked first.\n- File review pane orientation toggle, and review comments in the file pane.\n- Pinned plan card controls and a jump-to-latest hint.\n- Terminal title (OSC) follows the live conversation title on every screen; inside cmux the workspace is renamed too, and linked PRs are pushed to the cmux sidebar.\n- Every participating agent shows in the conversation list; connect cards each have their own identity, and ctrl+r asks which connect card to act on.\n- Colored Skydive splash art in `skydive --help` and the TUI pickers.\n- New-agent name prefilled from the server's suggestion.\n\n**CLI & platform**\n\n- `skydive update` self-updater, with an update notice when a new version is available.\n- Shell completions for bash, zsh, and fish via `completion install`.\n- Portal daemon: one connection per host with per-conversation working directories.\n- Agent-led coding-agent import (`skydive import`).\n- Per-workspace scoping on the REST client, and cross-org `--agent <uuid>` auto-switches workspace.\n- `skydive-beta` wrapper for the canary channel.\n- `skydive config` command to view and set the safe, hand-editable CLI preferences (`shareMachineDefault`, `updateCheck`) without opening `config.json`. `config`/`config list` shows each key, its effective value, and whether it comes from the file or the built-in default; `config get`/`set`/`unset` read and change one key; `config path` prints the config file location. It only ever touches those preference keys, never credentials or flow-managed state.\n\n### Fixed\n\n- `skydive update` no longer claims an update is available on every npm install.\n- Chat memory is bounded (payload clamps + windowed rows) with a memory watchdog and OOM diagnostic report; transcript rows are memoized so streaming stops re-rendering the whole chat.\n- Chat-send failures map to real error messages.\n- Notification and sidebar previews use the last text block of the reply and strip inline markdown.\n- Picker rows no longer overlap when a conversation title contains a newline, tab, or control character.\n- Sending to non-web channel conversations is blocked in the TUI.\n- GitHub bot connect opens on the web front door, not api.skydive.com.\n- TUI activity counter times from the run, not the screen.\n\n## [0.2.0] - 2026-07-29\n\n### Added\n\n**Sandbox & machine access**\n\n- Standalone `skydive sandbox` command for direct access to an agent's sandbox.\n- `/sandbox` in the chat TUI — live PTY session and one-shot command execution.\n- Headless machine sharing via `skydive portal`, with self-registering portal grants.\n- `shareMachineDefault` config key for always-on portal sharing.\n\n**Chat TUI**\n\n- File pane (`ctrl+g`) with Changes and Files tabs: a shared file tree plus source viewer and a workspace browser, mouse-resizable and responsive to terminal size.\n- Agent todo list rendered in the chat TUI, above the composer, mirroring the web chat's todo card.\n- Fuzzy finder in the conversation and agent pickers.\n- Slash-command autocomplete menu.\n- Paste or drag-and-drop any file into the composer; paste clipboard images with Cmd+V.\n- Run local shell commands with `!` in the composer.\n- Conversation recaps, streamed live title updates, and per-agent attribution on assistant turns.\n- Working timer rolls up into minutes and hours.\n- Conversation picker paginates past 50 conversations and shows only your own conversations.\n- Esc leaves a live run; typing `exit` quits the chat.\n- Cursor Dark theme.\n- Picker rows no longer overlap when a conversation title contains a newline, tab, or control character.\n\n**Headless & scripting**\n\n- Resume a conversation by id.\n- `conversations list` and `conversations show` for transcript reads.\n- `messages get`, with run recovery keyed on message id.\n- Connect cards surface in headless `-p` mode so a driving agent never gets stuck.\n\n**Authentication**\n\n- `skydive auth login` via the browser now auto-mints an API key, so one login yields both a chat session and a usable management credential. Management commands announce the key's pinned workspace when it drives them, so a workspace mismatch is visible at use time.\n- Workspace picker on the device authorization page.\n- Account and workspace identity shown in `auth status`.\n\n**Platform**\n\n- Standalone binary builds compiling the CLI into a per-target executable.\n- Interactive workspace switcher; management commands follow the active workspace.\n- Terminal host integrations and agent notifications.\n\n### Fixed\n\n- Transcript errors collapse to one line, click to expand (REST and portal errors keep their full body).\n- Dragged/pasted image file paths attach the file instead of inserting path text, including macOS paths with literal parentheses.\n- Bare URLs in chat markdown are hyperlinked so they survive text wrap.\n- Composer draft is preserved across TUI overlays.\n- Relative connect links resolve before opening the browser.\n- Numbered markdown headings render colored in the TUI.\n- Chat transcript pages by 75% of a screen; picker rows stay on one line.\n- Run starts push to the TUI over the conversation stream.\n- Security: remediated high-severity dependency findings and cleared tar/shell-quote CVEs.\n\n## [0.1.0] - 2026-07-21\n\nInitial public release: `skydive chat` TUI, agent and conversation management,\ndevice authorization, and headless `-p` mode.\n";
|
|
3748
3748
|
|
|
3749
3749
|
//#endregion
|
|
3750
3750
|
//#region src/whats-new.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as setActiveWorkspace, S as listWorkspaces, a as WORDMARK, b as getActiveWorkspaceId, c as applyTheme, d as noColorRequested, f as theme, g as themeVersion, h as themeModeFromColorFgBg, i as MARK_CELLS, l as findTheme, m as themeMode, n as buildCrashReport, p as themeForMode, r as writeCrashReport, s as DEFAULT_THEME_ID, t as installCrashHandler, u as monoTheme, v as themesForMode } from "./install-
|
|
2
|
+
import { C as setActiveWorkspace, S as listWorkspaces, a as WORDMARK, b as getActiveWorkspaceId, c as applyTheme, d as noColorRequested, f as theme, g as themeVersion, h as themeModeFromColorFgBg, i as MARK_CELLS, l as findTheme, m as themeMode, n as buildCrashReport, p as themeForMode, r as writeCrashReport, s as DEFAULT_THEME_ID, t as installCrashHandler, u as monoTheme, v as themesForMode } from "./install-9_6Qf79C.mjs";
|
|
3
3
|
import { B as saveTheme, D as getSavedTheme, E as getReviewStateDir, L as resolveWebUrl, S as getConfigPath, c as cardActionErrorMessage, d as reconcileMaskedInput, f as resolveConnectUrl, i as resolveAgent, l as parseExternalOauthConnectParams, m as specKeyFor, p as parseConnectCard, s as MASK_CHAR, u as parseOauthConnectParams, v as DEFAULT_API_URL, y as DEFAULT_APP_URL } from "./print-X2N5wJ5l.mjs";
|
|
4
4
|
import { a as errorMessage, i as sendErrorMessage, n as createRestClient, o as isRecord, r as errorDetail, t as HttpError } from "./rest-imDZZGQA.mjs";
|
|
5
|
-
import "./billing-blocked-CwfG1BTR.mjs";
|
|
5
|
+
import { i as billingBlockedOutcomeFromSendResponse } from "./billing-blocked-CwfG1BTR.mjs";
|
|
6
6
|
import { t as PortalClient } from "./client-CKzK-12y.mjs";
|
|
7
7
|
import { d as makeLineParser, f as parseDaemonMessage, l as daemonPaths, n as ensureDaemonRunning, s as LOCAL_PROTOCOL_VERSION, u as encodeLine } from "./daemon-CaFz7Wtw.mjs";
|
|
8
8
|
import { t as SandboxStream } from "./client-D8s9vY4p.mjs";
|
|
@@ -3217,6 +3217,22 @@ function StatusLine({ item }) {
|
|
|
3217
3217
|
}
|
|
3218
3218
|
}
|
|
3219
3219
|
|
|
3220
|
+
//#endregion
|
|
3221
|
+
//#region src/chat/tui/chunks/system-notice-item.tsx
|
|
3222
|
+
/**
|
|
3223
|
+
* Platform system-notice row: the server stopped or refused work for a
|
|
3224
|
+
* platform reason (today: billing-blocked), so it reads as a warning-toned
|
|
3225
|
+
* notice — visually distinct from the ✗ transport/agent error row. The text
|
|
3226
|
+
* already carries the full guidance, produced server-side or derived from a
|
|
3227
|
+
* typed outcome by the producer that pushed the item.
|
|
3228
|
+
*/
|
|
3229
|
+
function SystemNoticeItem({ item }) {
|
|
3230
|
+
return /* @__PURE__ */ jsxs("text", {
|
|
3231
|
+
fg: theme.warning,
|
|
3232
|
+
children: ["◆ ", item.text.trim()]
|
|
3233
|
+
});
|
|
3234
|
+
}
|
|
3235
|
+
|
|
3220
3236
|
//#endregion
|
|
3221
3237
|
//#region src/chat/tui/chunks/error-item.tsx
|
|
3222
3238
|
/**
|
|
@@ -4216,6 +4232,10 @@ function RenderItem({ item }) {
|
|
|
4216
4232
|
barColor: null,
|
|
4217
4233
|
children: /* @__PURE__ */ jsx(ErrorItem, { item })
|
|
4218
4234
|
});
|
|
4235
|
+
case "system-notice": return /* @__PURE__ */ jsx(Row, {
|
|
4236
|
+
barColor: null,
|
|
4237
|
+
children: /* @__PURE__ */ jsx(SystemNoticeItem, { item })
|
|
4238
|
+
});
|
|
4219
4239
|
case "card": return /* @__PURE__ */ jsx(Row, {
|
|
4220
4240
|
barColor: null,
|
|
4221
4241
|
children: /* @__PURE__ */ jsx(CardItem, { item })
|
|
@@ -4855,6 +4875,15 @@ function uiMessagesToItems(messages) {
|
|
|
4855
4875
|
const out = [];
|
|
4856
4876
|
for (const m of messages) {
|
|
4857
4877
|
if (m.role === "user") {
|
|
4878
|
+
const billingNotice = billingBlockedNoticeText(m.parts);
|
|
4879
|
+
if (billingNotice) {
|
|
4880
|
+
out.push({
|
|
4881
|
+
kind: "system-notice",
|
|
4882
|
+
id: m.id,
|
|
4883
|
+
text: billingNotice
|
|
4884
|
+
});
|
|
4885
|
+
continue;
|
|
4886
|
+
}
|
|
4858
4887
|
const text = m.parts.map((p) => p.type === "text" ? p.text : "").join("").trim();
|
|
4859
4888
|
const attachments = m.parts.filter((p) => p.type === "data-anyone-attachment").map((p) => {
|
|
4860
4889
|
const data = isRecord(p) && "data" in p && isRecord(p.data) ? p.data : null;
|
|
@@ -4949,6 +4978,14 @@ function uiMessagesToItems(messages) {
|
|
|
4949
4978
|
}
|
|
4950
4979
|
return out.map(clampItem);
|
|
4951
4980
|
}
|
|
4981
|
+
function billingBlockedNoticeText(parts) {
|
|
4982
|
+
for (const part of parts) {
|
|
4983
|
+
if (part.type !== "data-anyone-system-notification") continue;
|
|
4984
|
+
const data = isRecord(part) && isRecord(part.data) ? part.data : null;
|
|
4985
|
+
if (data && data.kind === "billing-blocked" && typeof data.text === "string" && data.text.trim()) return data.text;
|
|
4986
|
+
}
|
|
4987
|
+
return null;
|
|
4988
|
+
}
|
|
4952
4989
|
function mapToolState(raw) {
|
|
4953
4990
|
switch (raw) {
|
|
4954
4991
|
case "output-error": return "error";
|
|
@@ -9702,8 +9739,14 @@ function ChatScreen({ agent, conversation }) {
|
|
|
9702
9739
|
setItems((prev) => applyChunk(prev, event.chunk, streamAgentName));
|
|
9703
9740
|
return;
|
|
9704
9741
|
}
|
|
9742
|
+
const billingOutcome = event.outcome;
|
|
9705
9743
|
const errorText = event.error;
|
|
9706
|
-
if (
|
|
9744
|
+
if (billingOutcome) setItems((prev) => [...prev, {
|
|
9745
|
+
kind: "system-notice",
|
|
9746
|
+
id: crypto.randomUUID(),
|
|
9747
|
+
text: billingOutcome.message
|
|
9748
|
+
}]);
|
|
9749
|
+
else if (event.status !== "ok" && errorText) setItems((prev) => [...prev, {
|
|
9707
9750
|
kind: "error",
|
|
9708
9751
|
id: crypto.randomUUID(),
|
|
9709
9752
|
text: errorText
|
|
@@ -9838,7 +9881,15 @@ function ChatScreen({ agent, conversation }) {
|
|
|
9838
9881
|
}
|
|
9839
9882
|
attachToRun(result.runId, result.agentName ?? null);
|
|
9840
9883
|
} catch (err) {
|
|
9841
|
-
|
|
9884
|
+
const billing = err instanceof HttpError ? billingBlockedOutcomeFromSendResponse({
|
|
9885
|
+
status: err.status,
|
|
9886
|
+
body: err.body
|
|
9887
|
+
}) : null;
|
|
9888
|
+
setItems((prev) => [...prev.filter((m) => m.id !== optimisticId), billing ? {
|
|
9889
|
+
kind: "system-notice",
|
|
9890
|
+
id: crypto.randomUUID(),
|
|
9891
|
+
text: billing.message
|
|
9892
|
+
} : {
|
|
9842
9893
|
kind: "error",
|
|
9843
9894
|
id: crypto.randomUUID(),
|
|
9844
9895
|
text: sendErrorMessage(err)
|