@ai-matrx/rich-content 0.2.165 → 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,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## 0.2.165
3
+ ## 0.2.166
4
4
  ### Unreleased
5
5
 
6
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.
@@ -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,28 +39,6 @@ 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
  {
@@ -80,17 +55,7 @@ function AlchemyDocumentMenu({
80
55
  // The split button carries the three ways to copy (COPY_LABELS); the palette keeps the rest.
81
56
  richCopy: (flavor) => richCopy(flavor === "default" ? "markdown" : flavor),
82
57
  richCopyFlavors: []
83
- } : {},
84
- variants: hasThinking ? [
85
- {
86
- id: "include-thinking",
87
- label: "Raw with thinking",
88
- copyLabel: "Raw with thinking",
89
- section: "copy",
90
- hint: "Includes the original reasoning content",
91
- source: includingThinkingSource
92
- }
93
- ] : []
58
+ } : {}
94
59
  },
95
60
  sourceId
96
61
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/rich-content",
3
- "version": "0.2.165",
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",
@@ -131,20 +131,20 @@
131
131
  "unist-util-visit-parents": "^6.0.2",
132
132
  "yaml": "^2.9.1",
133
133
  "@ai-matrx/agents": "latest",
134
+ "@ai-matrx/alchemy": "latest",
135
+ "@ai-matrx/api": "latest",
136
+ "@ai-matrx/canvas": "latest",
134
137
  "@ai-matrx/content-ir": "latest",
135
138
  "@ai-matrx/content-ir-react": "latest",
136
139
  "@ai-matrx/data": "latest",
137
- "@ai-matrx/alchemy": "latest",
138
- "@ai-matrx/diff": "latest",
139
140
  "@ai-matrx/design-system": "latest",
140
- "@ai-matrx/print": "latest",
141
- "@ai-matrx/api": "latest",
142
- "@ai-matrx/records": "latest",
143
- "@ai-matrx/records-ui": "latest",
144
141
  "@ai-matrx/icons": "latest",
145
- "@ai-matrx/canvas": "latest",
142
+ "@ai-matrx/diff": "latest",
143
+ "@ai-matrx/kit": "latest",
146
144
  "@ai-matrx/media": "latest",
147
- "@ai-matrx/kit": "latest"
145
+ "@ai-matrx/records": "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": "6a0868df3e9f82a0f02d077c67e206a003dc3a0e"
208
+ "gitHead": "c3135c57b98f84d46943609589e08dbe8d9ca988"
209
209
  }