@ai-matrx/rich-content 0.2.164 → 0.2.166

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,9 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.166
4
+ ### Unreleased
5
+
6
+ - The document's Alchemy menu hands Alchemy its text as data: the palette's tiles are Raw (the stored text exactly, reasoning left out — a chat answer's own response) · Markdown · Formatted · For AI, and its click copies Raw. "Copy including thinking" is now "Raw with thinking" under More. Needs `@ai-matrx/alchemy` with `data`. Consumer action: none.
7
+
3
8
  ## 0.2.164
4
9
 
5
- UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
6
- Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/rich-content/src`.
10
+ SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
11
+ so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
12
+ Diff: `git diff bd8cc634ac 1b4c21ab92 -- apps/shared/rich-content/src`
13
+
14
+ Changed shipped source files (2):
15
+ - `apps/shared/rich-content/src/display/chat-markdown/block-registry/BlockRenderer.tsx`
16
+ - `apps/shared/rich-content/src/display/chat-markdown/block-registry/render-ratchet.ts`
7
17
 
8
18
  ## 0.2.163
9
19
 
@@ -1,7 +1,6 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { useAlchemyDisclosure } from "../../../host/app-bindings.js";
4
- import * as React from "react";
5
4
  import { ContentTransferMenu } from "@ai-matrx/alchemy/react/workspace";
6
5
  import { unwrapKindEnvelopes } from "@ai-matrx/content-ir/source";
7
6
  import { directSource } from "@ai-matrx/alchemy/operate";
@@ -15,7 +14,6 @@ function AlchemyDocumentMenu({
15
14
  richCopy
16
15
  }) {
17
16
  useAlchemyDisclosure();
18
- const [hasThinking, setHasThinking] = React.useState(false);
19
17
  const source = {
20
18
  id: sourceId,
21
19
  label: "Document",
@@ -29,7 +27,6 @@ function AlchemyDocumentMenu({
29
27
  "The document changed. Reopen Alchemy Menu for the current document."
30
28
  );
31
29
  const unthought = removeThinkingContent(ctx.content);
32
- setHasThinking(unthought !== ctx.content);
33
30
  const text = unwrapKindEnvelopes(unthought);
34
31
  return directSource(
35
32
  { kind: "markdown", text },
@@ -42,33 +39,15 @@ function AlchemyDocumentMenu({
42
39
  );
43
40
  }
44
41
  };
45
- const includingThinkingSource = {
46
- id: `${sourceId}:including-thinking`,
47
- label: "Document",
48
- capture: async ({ signal }) => {
49
- signal.throwIfAborted();
50
- const ctx = getCtx();
51
- const capturedSourceId = ctx.instanceKey("alchemy");
52
- if (capturedSourceId !== sourceId)
53
- throw new Error(
54
- "The document changed. Reopen Alchemy Menu for the current document."
55
- );
56
- return directSource(
57
- { kind: "markdown", text: ctx.content },
58
- {
59
- id: `${capturedSourceId}:including-thinking`,
60
- sourceId: capturedSourceId,
61
- revision: ctx.content,
62
- label: "Document"
63
- }
64
- );
65
- }
66
- };
67
42
  return /* @__PURE__ */ jsx(
68
43
  ContentTransferMenu,
69
44
  {
70
45
  source,
71
46
  label: "Document",
47
+ data: () => {
48
+ const ctx = getCtx();
49
+ return { value: ctx.content, type: ctx.source?.type === "chat-message" ? "AI response" : "Document" };
50
+ },
72
51
  className: size === "xs" ? "matrx-alchemy-xs" : void 0,
73
52
  ...triggerHidden ? { triggerHidden: true } : {},
74
53
  ...controllerRef ? { controllerRef } : {},
@@ -76,16 +55,7 @@ function AlchemyDocumentMenu({
76
55
  // The split button carries the three ways to copy (COPY_LABELS); the palette keeps the rest.
77
56
  richCopy: (flavor) => richCopy(flavor === "default" ? "markdown" : flavor),
78
57
  richCopyFlavors: []
79
- } : {},
80
- variants: hasThinking ? [
81
- {
82
- id: "include-thinking",
83
- label: "Including thinking",
84
- copyLabel: "Copy including thinking",
85
- hint: "Includes the original reasoning content",
86
- source: includingThinkingSource
87
- }
88
- ] : []
58
+ } : {}
89
59
  },
90
60
  sourceId
91
61
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/rich-content",
3
- "version": "0.2.164",
3
+ "version": "0.2.166",
4
4
  "description": "The AI Matrx formatted-text engine: the one markdown renderer, streaming markdown, the block splitter and renderer, the generic blocks, <RichContent> levels, the rich-document action registry and menus, copy, and the selection toolbar — as portable React.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -139,12 +139,12 @@
139
139
  "@ai-matrx/data": "latest",
140
140
  "@ai-matrx/design-system": "latest",
141
141
  "@ai-matrx/icons": "latest",
142
+ "@ai-matrx/diff": "latest",
142
143
  "@ai-matrx/kit": "latest",
143
144
  "@ai-matrx/media": "latest",
144
- "@ai-matrx/print": "latest",
145
- "@ai-matrx/diff": "latest",
146
145
  "@ai-matrx/records": "latest",
147
- "@ai-matrx/records-ui": "latest"
146
+ "@ai-matrx/records-ui": "latest",
147
+ "@ai-matrx/print": "latest"
148
148
  },
149
149
  "peerDependencies": {
150
150
  "react": ">=19.0.0",
@@ -205,5 +205,5 @@
205
205
  "verify:modules-tarball": "node ./scripts/verify-modules-tarball.mjs",
206
206
  "verify:tarball": "node ./scripts/verify-tarball.mjs"
207
207
  },
208
- "gitHead": "1b4c21ab92d61a09b5d50abcdb456e52984b2b02"
208
+ "gitHead": "c3135c57b98f84d46943609589e08dbe8d9ca988"
209
209
  }