@ai-matrx/chat 0.4.26 → 0.4.27

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
@@ -1,5 +1,13 @@
1
1
  # @ai-matrx/chat
2
2
 
3
+ ## 0.4.27 — the error card and the stale-data notice are the real ones in any host
4
+
5
+ - `ErrorNotice` and `StaleDataNotice` slots default to `@ai-matrx/design-system`'s components (the
6
+ website's, moved whole); the package's plain stand-ins are gone. Guard:
7
+ `slots-draw-their-package-default.test.tsx`.
8
+
9
+ Consumer action: none.
10
+
3
11
  ## 0.4.26
4
12
 
5
13
  - `RichCopySplit` renders the content action set (`ContentActions` from rich-content 0.2.52): Copy, Plain (with the new `viewKey` prop), Export, Print and Transform (the host's Alchemy palette) each one click. New `exportTitle` prop names exported files.
@@ -452,7 +452,7 @@ export declare const InfoHint: AnyComponent;
452
452
  export declare const AnswerValueView: AnyComponent;
453
453
  /** A host with no error menu draws one labelled line; the error sentence itself is already on screen. */
454
454
  export declare const ErrorAlchemyMenu: AnyComponent;
455
- /** A host with no error card draws the plain sentence, its actions and children, marked as the stand-in. */
455
+ /** THE inline error card is design-system's ErrorNotice (moved from matrx-frontend, host-slot batch 2). */
456
456
  export declare const ErrorNotice: AnyComponent;
457
457
  export declare const EntityRef: AnyComponent;
458
458
  export declare const AdvancedMenu: AnyComponent;
@@ -13,7 +13,9 @@ import { DefaultResourcePickerMenu } from "./defaults/resource-picker-menu.js";
13
13
  import { captureReactRenderError } from "./diagnostics.js";
14
14
  import {
15
15
  ConfirmDialog as PackageConfirmDialog,
16
+ ErrorNotice as PackageErrorNotice,
16
17
  FloatingSheet as PackageFloatingSheet,
18
+ StaleDataNotice as PackageStaleDataNotice,
17
19
  ReadFailure as PackageReadFailure,
18
20
  TextInputDialog as PackageTextInputDialog,
19
21
  UntrustedCount as PackageUntrustedCount
@@ -211,17 +213,7 @@ const CopyButtons = slotComponent("CopyButtons");
211
213
  const InfoHint = slotComponent("InfoHint");
212
214
  const AnswerValueView = slotComponent("AnswerValueView");
213
215
  const ErrorAlchemyMenu = slotComponent("ErrorAlchemyMenu", optionalWidget("ErrorAlchemyMenu"));
214
- const ErrorNotice = slotComponent(
215
- "ErrorNotice",
216
- ({ title, message, error, actions, children, className }) => createElement(
217
- "div",
218
- { className: `rounded-md border border-destructive/40 p-2 text-sm ${className ?? ""}`, "data-chat-slot-fallback": "ErrorNotice" },
219
- title ? createElement("div", { className: "font-medium" }, title) : null,
220
- createElement("div", null, message || (error instanceof Error ? error.message : typeof error === "string" ? error : "")),
221
- children ?? null,
222
- actions ?? null
223
- )
224
- );
216
+ const ErrorNotice = slotComponent("ErrorNotice", withPackageDefault(PackageErrorNotice));
225
217
  const EntityRef = slotComponent("EntityRef");
226
218
  const AdvancedMenu = slotComponent("AdvancedMenu");
227
219
  const AuthGateDialog = slotComponent("AuthGateDialog");
@@ -334,22 +326,7 @@ const readListRpc = slotFn("readListRpc");
334
326
  const ReadFailure = slotComponent("ReadFailure", withPackageDefault(PackageReadFailure));
335
327
  const ItemRow = slotComponent("ItemRow", unregisteredWidget("ItemRow"));
336
328
  const UntrustedCount = slotComponent("UntrustedCount", withPackageDefault(PackageUntrustedCount));
337
- function PlainStaleDataNotice(props) {
338
- const what = props.what ?? "this";
339
- const sentence = props.hasData ? `Showing what was last read; ${what} could not be refreshed.` : `Could not read ${what}.`;
340
- return createElement(
341
- "div",
342
- { role: "status", className: "text-xs text-muted-foreground", "data-stale-data-notice": "" },
343
- sentence,
344
- props.detail ? ` ${props.detail}` : null,
345
- props.onRetry ? createElement(
346
- "button",
347
- { type: "button", className: "ml-2 underline", onClick: () => props.onRetry?.() },
348
- "Try again"
349
- ) : null
350
- );
351
- }
352
- const StaleDataNotice = slotComponent("StaleDataNotice", PlainStaleDataNotice);
329
+ const StaleDataNotice = slotComponent("StaleDataNotice", withPackageDefault(PackageStaleDataNotice));
353
330
  const WorkspaceGate = slotComponent("WorkspaceGate", DefaultWorkspaceGate);
354
331
  const OrganizationContextNotice = slotComponent("OrganizationContextNotice", unregisteredWidget("OrganizationContextNotice"));
355
332
  const JsonInspector = slotComponent("JsonInspector", unregisteredWidget("JsonInspector"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/chat",
3
- "version": "0.4.26",
3
+ "version": "0.4.27",
4
4
  "description": "THE one AI Matrx person-to-agent chat system: the full chat (running agents, conversations, tool calls, streaming, context, surfaces, voice) as per-module subpaths @ai-matrx/chat/<domain>/<module> over a host contract (/host, /host/react) whose only required value is a db; plus the kernel compatibility entries (., /external-store, /matrx, /react, /tools, styles.css, tokens.css) until P28.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -237,15 +237,15 @@
237
237
  "@ai-matrx/design-system": "latest",
238
238
  "@ai-matrx/diff": "latest",
239
239
  "@ai-matrx/icons": "latest",
240
+ "@ai-matrx/kit": "latest",
240
241
  "@ai-matrx/media": "latest",
241
242
  "@ai-matrx/print": "latest",
242
- "@ai-matrx/kit": "latest",
243
243
  "@ai-matrx/realtime": "latest",
244
244
  "@ai-matrx/records": "latest",
245
245
  "@ai-matrx/records-ui": "latest",
246
246
  "@ai-matrx/rich-content": "latest",
247
- "@ai-matrx/rich-editor": "latest",
248
- "@ai-matrx/tap-target": "latest"
247
+ "@ai-matrx/tap-target": "latest",
248
+ "@ai-matrx/rich-editor": "latest"
249
249
  },
250
250
  "devDependencies": {
251
251
  "@arethetypeswrong/cli": "^0.18.5",