@morlay/ui-conversation-message-actions 0.0.12 → 0.0.14-alpha.0
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/dist/client.js +31 -31
- package/dist/index.d.mts +21 -69
- package/dist/index.mjs +2 -606
- package/dist/invariant.d.mts +1 -2
- package/dist/invariant.mjs +0 -2
- package/dist/plan-Bw4zoI4N.d.mts +86 -0
- package/dist/plan.d.mts +2 -0
- package/dist/plan.mjs +225 -0
- package/dist/src-Da2ZVKlq.mjs +417 -0
- package/dist/testing.d.mts +709 -0
- package/dist/testing.mjs +28317 -0
- package/package.json +48 -28
- package/src/client/chat-node/MessageItem.tsx +4 -5
- package/src/index.ts +115 -378
- package/src/plan.ts +325 -0
- package/src/testing.ts +151 -0
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/invariant.d.mts.map +0 -1
- package/dist/invariant.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morlay/ui-conversation-message-actions",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14-alpha.0",
|
|
4
4
|
"description": "Rewind / retry / fork orchestration (host) plus conversation.chat.node renderer replacement (browser) — message edit / retry actions on user bubbles.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"conversation-chat-node",
|
|
@@ -26,22 +26,19 @@
|
|
|
26
26
|
],
|
|
27
27
|
"type": "module",
|
|
28
28
|
"exports": {
|
|
29
|
-
".":
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"./client": "./dist/client.js",
|
|
34
|
-
"./invariant": {
|
|
35
|
-
"types": "./dist/invariant.d.mts",
|
|
36
|
-
"default": "./dist/invariant.mjs"
|
|
37
|
-
},
|
|
29
|
+
".": "./dist/index.mjs",
|
|
30
|
+
"./invariant": "./dist/invariant.mjs",
|
|
31
|
+
"./plan": "./dist/plan.mjs",
|
|
32
|
+
"./testing": "./dist/testing.mjs",
|
|
38
33
|
"./package.json": "./package.json",
|
|
39
|
-
"./cordis.patch.yml": "./cordis.patch.yml"
|
|
34
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
35
|
+
"./client": "./dist/client.js"
|
|
40
36
|
},
|
|
41
37
|
"dependencies": {
|
|
42
|
-
"@morlay/session-branch": "^0.0.
|
|
38
|
+
"@morlay/session-branch": "^0.0.4-alpha.0"
|
|
43
39
|
},
|
|
44
40
|
"devDependencies": {
|
|
41
|
+
"@morlay/session-rdb": "^0.0.16-alpha.0",
|
|
45
42
|
"@types/react": "^19.2.18",
|
|
46
43
|
"@types/react-dom": "^19.2.5",
|
|
47
44
|
"lightningcss": "^1.32.0",
|
|
@@ -50,22 +47,22 @@
|
|
|
50
47
|
},
|
|
51
48
|
"peerDependencies": {
|
|
52
49
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
53
|
-
"@deepseek-ai/dsh-api-session-controller": "^0.1.
|
|
54
|
-
"@deepseek-ai/dsh-attachment": "^0.1.
|
|
55
|
-
"@deepseek-ai/dsh-client-connection": "^0.1.
|
|
56
|
-
"@deepseek-ai/dsh-client-store": "^0.1.
|
|
57
|
-
"@deepseek-ai/dsh-client-ui-attachment": "^0.1.
|
|
58
|
-
"@deepseek-ai/dsh-client-ui-chat": "^0.1.
|
|
59
|
-
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.
|
|
60
|
-
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.
|
|
61
|
-
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.
|
|
62
|
-
"@deepseek-ai/dsh-client-ui-slots": "^0.1.
|
|
63
|
-
"@deepseek-ai/dsh-invariants": "^0.1.
|
|
64
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
65
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
66
|
-
"@deepseek-ai/dsh-session-persistence": "^0.1.
|
|
67
|
-
"@deepseek-ai/dsh-session-projection": "^0.1.
|
|
68
|
-
"@deepseek-ai/dsh-token-meter": "^0.1.
|
|
50
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.1.3-alpha.2",
|
|
51
|
+
"@deepseek-ai/dsh-attachment": "^0.1.3-alpha.2",
|
|
52
|
+
"@deepseek-ai/dsh-client-connection": "^0.1.3-alpha.2",
|
|
53
|
+
"@deepseek-ai/dsh-client-store": "^0.1.3-alpha.2",
|
|
54
|
+
"@deepseek-ai/dsh-client-ui-attachment": "^0.1.3-alpha.2",
|
|
55
|
+
"@deepseek-ai/dsh-client-ui-chat": "^0.1.3-alpha.2",
|
|
56
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.3-alpha.2",
|
|
57
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.3-alpha.2",
|
|
58
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.3-alpha.2",
|
|
59
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.3-alpha.2",
|
|
60
|
+
"@deepseek-ai/dsh-invariants": "^0.1.3-alpha.2",
|
|
61
|
+
"@deepseek-ai/dsh-llm": "^0.1.3-alpha.2",
|
|
62
|
+
"@deepseek-ai/dsh-session": "^0.1.3-alpha.2",
|
|
63
|
+
"@deepseek-ai/dsh-session-persistence": "^0.1.3-alpha.2",
|
|
64
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.3-alpha.2",
|
|
65
|
+
"@deepseek-ai/dsh-token-meter": "^0.1.3-alpha.2"
|
|
69
66
|
},
|
|
70
67
|
"dsh": {
|
|
71
68
|
"bundle": {
|
|
@@ -81,6 +78,29 @@
|
|
|
81
78
|
]
|
|
82
79
|
}
|
|
83
80
|
},
|
|
81
|
+
"inlinedDependencies": {
|
|
82
|
+
"@standard-schema/spec": "1.1.0",
|
|
83
|
+
"@vitest/pretty-format": "4.1.11",
|
|
84
|
+
"@vitest/runner": "4.1.11",
|
|
85
|
+
"@vitest/utils": "4.1.11",
|
|
86
|
+
"drizzle-orm": "1.0.0-rc.5-ab785fc",
|
|
87
|
+
"fflate": "0.8.3",
|
|
88
|
+
"pg": "8.23.0",
|
|
89
|
+
"pg-cloudflare": "1.4.0",
|
|
90
|
+
"pg-connection-string": "2.14.0",
|
|
91
|
+
"pg-int8": "1.0.1",
|
|
92
|
+
"pg-pool": "3.14.0",
|
|
93
|
+
"pg-protocol": "1.16.0",
|
|
94
|
+
"pg-types": "2.2.0",
|
|
95
|
+
"pgpass": "1.0.5",
|
|
96
|
+
"postgres-array": "2.0.0",
|
|
97
|
+
"postgres-bytea": "1.0.1",
|
|
98
|
+
"postgres-date": "1.0.7",
|
|
99
|
+
"postgres-interval": "1.2.0",
|
|
100
|
+
"split2": "4.2.0",
|
|
101
|
+
"tinyrainbow": "3.1.1",
|
|
102
|
+
"xtend": "4.0.2"
|
|
103
|
+
},
|
|
84
104
|
"scripts": {
|
|
85
105
|
"build": "pnpm exec tsdown"
|
|
86
106
|
}
|
|
@@ -8,7 +8,7 @@ import type { ReactNode } from "react";
|
|
|
8
8
|
import type { InjectFace } from "@deepseek-ai/dsh-client-ui-slots";
|
|
9
9
|
import { Button, Modal } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
10
10
|
import type { UserMessageNode } from "@deepseek-ai/dsh-client-ui-chat/client";
|
|
11
|
-
import { JsonBlock
|
|
11
|
+
import { JsonBlock } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
12
12
|
import type { ChatNodeViewProps, ChatViewSlotProps } from "@deepseek-ai/dsh-client-ui-chat/client";
|
|
13
13
|
import type { RenderMessageImages } from "@deepseek-ai/dsh-client-ui-conversation/client";
|
|
14
14
|
import { MessageIconActions } from "./MessageIconActions.tsx";
|
|
@@ -45,8 +45,7 @@ function projectUserText(text: string): ReactNode {
|
|
|
45
45
|
while ((m = re.exec(text)) !== null) {
|
|
46
46
|
const tokenStart = m.index + (m[1]?.length ?? 0);
|
|
47
47
|
const label = m[2] ?? "";
|
|
48
|
-
if (tokenStart > cursor)
|
|
49
|
-
parts.push(<MessageText key={cursor} text={text.slice(cursor, tokenStart)} />);
|
|
48
|
+
if (tokenStart > cursor) parts.push(<span key={cursor}>{text.slice(cursor, tokenStart)}</span>);
|
|
50
49
|
parts.push(
|
|
51
50
|
<span
|
|
52
51
|
key={tokenStart}
|
|
@@ -58,8 +57,8 @@ function projectUserText(text: string): ReactNode {
|
|
|
58
57
|
);
|
|
59
58
|
cursor = tokenStart + label.length;
|
|
60
59
|
}
|
|
61
|
-
if (parts.length === 0) return <
|
|
62
|
-
if (cursor < text.length) parts.push(<
|
|
60
|
+
if (parts.length === 0) return <span>{text}</span>;
|
|
61
|
+
if (cursor < text.length) parts.push(<span key={cursor}>{text.slice(cursor)}</span>);
|
|
63
62
|
return <>{parts}</>;
|
|
64
63
|
}
|
|
65
64
|
|