@morlay/ui-conversation-message-actions 0.1.2 → 0.1.4
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.cjs +16741 -40
- package/dist/client.d.cts +3 -4
- package/dist/client.d.mts +3 -4
- package/dist/index.d.cts +5 -5
- package/dist/index.d.mts +5 -5
- package/dist/invariant.d.cts +4 -5
- package/dist/invariant.d.mts +4 -5
- package/dist/rolldown-runtime-BMI-E3GI.mjs +44 -0
- package/dist/testing.d.cts +2033 -93
- package/dist/testing.d.mts +2032 -93
- package/dist/testing.mjs +4 -45
- package/package.json +24 -24
- package/src/client/chat-node/MessageItem.tsx +1 -1
- package/src/client/chat-node/register.ts +1 -1
- package/src/client/composer-stats/register.ts +1 -1
- package/src/client/controller.ts +3 -2
- package/src/client/index.ts +4 -2
package/dist/testing.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "./rolldown-runtime-BMI-E3GI.mjs";
|
|
1
2
|
import { t as SESSION_EDITOR_PATHS } from "./shared-DG86bLrc.mjs";
|
|
2
3
|
import { SessionEditor } from "./index.mjs";
|
|
3
|
-
import { createRequire } from "node:module";
|
|
4
4
|
import { Context, Service } from "@deepseek-ai/cordis";
|
|
5
5
|
import { KNOWN_SESSION_EVENT_TYPES, SESSION_FORMAT_VERSION, Session, Session as Session$1, SessionId, SessionId as SessionIdBrand, SessionLogOffset, SessionSeq, SessionSeq as SessionSeq$1, SessionStore, foldSurface, interruptedTurnClosers, isSurfaceEvent, snapshotSessionEvent } from "@deepseek-ai/dsh-session";
|
|
6
6
|
import { SessionBranch, SessionBranchError, balanceRewindPrefix, rewindKeepLength } from "@morlay/session-branch";
|
|
@@ -15,49 +15,7 @@ import { mkdir, open, readdir, stat } from "node:fs/promises";
|
|
|
15
15
|
import { fileURLToPath } from "node:url";
|
|
16
16
|
import { DatabaseSync } from "node:sqlite";
|
|
17
17
|
import fs, { existsSync, readdirSync } from "node:fs";
|
|
18
|
-
import { createRequire
|
|
19
|
-
//#region \0rolldown/runtime.js
|
|
20
|
-
var __create = Object.create;
|
|
21
|
-
var __defProp = Object.defineProperty;
|
|
22
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
23
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
24
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
25
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
26
|
-
var __esmMin = (fn, res, err) => () => {
|
|
27
|
-
if (err) throw err[0];
|
|
28
|
-
try {
|
|
29
|
-
return fn && (res = fn(fn = 0)), res;
|
|
30
|
-
} catch (e) {
|
|
31
|
-
throw err = [e], e;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
35
|
-
var __exportAll = (all, no_symbols) => {
|
|
36
|
-
let target = {};
|
|
37
|
-
for (var name in all) __defProp(target, name, {
|
|
38
|
-
get: all[name],
|
|
39
|
-
enumerable: true
|
|
40
|
-
});
|
|
41
|
-
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
42
|
-
return target;
|
|
43
|
-
};
|
|
44
|
-
var __copyProps = (to, from, except, desc) => {
|
|
45
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
46
|
-
key = keys[i];
|
|
47
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
48
|
-
get: ((k) => from[k]).bind(null, key),
|
|
49
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
return to;
|
|
53
|
-
};
|
|
54
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
55
|
-
value: mod,
|
|
56
|
-
enumerable: true
|
|
57
|
-
}) : target, mod));
|
|
58
|
-
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
59
|
-
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
60
|
-
//#endregion
|
|
18
|
+
import { createRequire } from "module";
|
|
61
19
|
//#region ../../../vendor/deepseek-harness/vendor/cosmokit/lib/index.js
|
|
62
20
|
/** Return true when a value is `null` or `undefined`. */
|
|
63
21
|
function isNullable(value) {
|
|
@@ -20734,6 +20692,7 @@ function rowToEvent(row) {
|
|
|
20734
20692
|
}
|
|
20735
20693
|
const SURFACE_EVENT_TYPES = /* @__PURE__ */ new Set([
|
|
20736
20694
|
"system/message",
|
|
20695
|
+
"developer/message",
|
|
20737
20696
|
"user/message",
|
|
20738
20697
|
"assistant/message",
|
|
20739
20698
|
"tool/result"
|
|
@@ -27538,7 +27497,7 @@ var SessionBranchRdb = class extends SessionBranch {
|
|
|
27538
27497
|
};
|
|
27539
27498
|
//#endregion
|
|
27540
27499
|
//#region ../../../node_modules/.pnpm/fflate@0.8.3/node_modules/fflate/esm/index.mjs
|
|
27541
|
-
var require$1 = createRequire
|
|
27500
|
+
var require$1 = createRequire("/");
|
|
27542
27501
|
var _a$2;
|
|
27543
27502
|
var Worker;
|
|
27544
27503
|
var isMarkedAsUntransferable;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morlay/ui-conversation-message-actions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Rewind / retry / recall / fork orchestration (host) plus the browser half — replaces the conversation.chat.node user / steering rendering and overrides the conversation.composer.dock stats row.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"conversation-chat-node",
|
|
@@ -38,12 +38,13 @@
|
|
|
38
38
|
"./locale/*.json": "./locale/*.json"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@morlay/session-branch": "0.1.
|
|
41
|
+
"@morlay/session-branch": "0.1.4"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@deepseek-ai/dsh-
|
|
45
|
-
"@
|
|
46
|
-
"@morlay/
|
|
44
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.2.0-rc.2",
|
|
45
|
+
"@deepseek-ai/dsh-session-stats": "0.2.0-rc.2",
|
|
46
|
+
"@morlay/dsh-client-ui-primitives": "0.0.7",
|
|
47
|
+
"@morlay/session-rdb": "0.1.4",
|
|
47
48
|
"@types/react": "~18.3.1",
|
|
48
49
|
"@types/react-dom": "~18.3.0",
|
|
49
50
|
"react": "^18.2.0",
|
|
@@ -51,24 +52,23 @@
|
|
|
51
52
|
},
|
|
52
53
|
"peerDependencies": {
|
|
53
54
|
"@deepseek-ai/cordis": "^4.0.4",
|
|
54
|
-
"@deepseek-ai/dsh-api-session-controller": "^0.2.0-rc.
|
|
55
|
-
"@deepseek-ai/dsh-attachment": "^0.2.0-rc.
|
|
56
|
-
"@deepseek-ai/dsh-client-connection": "^0.2.0-rc.
|
|
57
|
-
"@deepseek-ai/dsh-client-store": "^0.2.0-rc.
|
|
58
|
-
"@deepseek-ai/dsh-client-ui-attachment": "^0.2.0-rc.
|
|
59
|
-
"@deepseek-ai/dsh-client-ui-chat": "^0.2.0-rc.
|
|
60
|
-
"@deepseek-ai/dsh-client-ui-
|
|
61
|
-
"@deepseek-ai/dsh-client-ui-
|
|
62
|
-
"@deepseek-ai/dsh-client-ui-
|
|
63
|
-
"@deepseek-ai/dsh-client-ui-
|
|
64
|
-
"@deepseek-ai/dsh-
|
|
65
|
-
"@deepseek-ai/dsh-
|
|
66
|
-
"@deepseek-ai/dsh-
|
|
67
|
-
"@deepseek-ai/dsh-session
|
|
68
|
-
"@deepseek-ai/dsh-session-
|
|
69
|
-
"@deepseek-ai/dsh-
|
|
70
|
-
"@
|
|
71
|
-
"@morlay/dsh-client-ui-primitives": "0.0.5"
|
|
55
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.2.0-rc.2",
|
|
56
|
+
"@deepseek-ai/dsh-attachment": "^0.2.0-rc.2",
|
|
57
|
+
"@deepseek-ai/dsh-client-connection": "^0.2.0-rc.2",
|
|
58
|
+
"@deepseek-ai/dsh-client-store": "^0.2.0-rc.2",
|
|
59
|
+
"@deepseek-ai/dsh-client-ui-attachment": "^0.2.0-rc.2",
|
|
60
|
+
"@deepseek-ai/dsh-client-ui-chat": "^0.2.0-rc.2",
|
|
61
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.2.0-rc.2",
|
|
62
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.2.0-rc.2",
|
|
63
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.2.0-rc.2",
|
|
64
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.2.0-rc.2",
|
|
65
|
+
"@deepseek-ai/dsh-client-ui-workspace": "^0.2.0-rc.2",
|
|
66
|
+
"@deepseek-ai/dsh-invariants": "^0.2.0-rc.2",
|
|
67
|
+
"@deepseek-ai/dsh-llm": "^0.2.0-rc.2",
|
|
68
|
+
"@deepseek-ai/dsh-session": "^0.2.0-rc.2",
|
|
69
|
+
"@deepseek-ai/dsh-session-persistence": "^0.2.0-rc.2",
|
|
70
|
+
"@deepseek-ai/dsh-session-projection": "^0.2.0-rc.2",
|
|
71
|
+
"@deepseek-ai/dsh-token-meter": "^0.2.0-rc.2"
|
|
72
72
|
},
|
|
73
73
|
"dsh": {
|
|
74
74
|
"client": {
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@deepseek-ai/dsh-client-connection",
|
|
78
78
|
"@deepseek-ai/dsh-client-store",
|
|
79
79
|
"@deepseek-ai/dsh-client-ui-workspace",
|
|
80
|
-
"@
|
|
80
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
81
81
|
"@deepseek-ai/dsh-client-ui-chat"
|
|
82
82
|
]
|
|
83
83
|
}
|
|
@@ -14,7 +14,7 @@ import { Button, Modal } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
|
14
14
|
import type { UserMessageNode } from "@deepseek-ai/dsh-client-ui-chat/client";
|
|
15
15
|
import { JsonBlock } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
16
16
|
import type { ChatNodeViewProps, ChatViewSlotProps } from "@deepseek-ai/dsh-client-ui-chat/client";
|
|
17
|
-
import type { RenderMessageImages } from "@
|
|
17
|
+
import type { RenderMessageImages } from "@deepseek-ai/dsh-client-ui-conversation/client";
|
|
18
18
|
import { MessageIconActions } from "./MessageIconActions.tsx";
|
|
19
19
|
import { styles } from "./MessageItem.styles.ts";
|
|
20
20
|
import type { EditableMessageBlock } from "../../shared.ts";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Context } from "@deepseek-ai/cordis";
|
|
2
2
|
import type { SessionId } from "@deepseek-ai/dsh-session";
|
|
3
|
-
import "@
|
|
3
|
+
import type {} from "@deepseek-ai/dsh-client-ui-conversation/client";
|
|
4
4
|
import type {} from "@deepseek-ai/dsh-client-ui-chat/client";
|
|
5
5
|
import type {} from "@deepseek-ai/dsh-client-ui-renderer/client";
|
|
6
6
|
import { UserMessageNodeView } from "./MessageItem.tsx";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Context } from "@deepseek-ai/cordis";
|
|
2
2
|
import type {} from "@deepseek-ai/dsh-client-ui-chat/client";
|
|
3
|
-
import type {} from "@
|
|
3
|
+
import type {} from "@deepseek-ai/dsh-client-ui-conversation/client";
|
|
4
4
|
import { StatsPills } from "./StatsPills.tsx";
|
|
5
5
|
|
|
6
6
|
// 官方 ui-chat 的字典命名空间:文案沿用上游(`stats.*` / `message.turnUsage.*`)。
|
package/src/client/controller.ts
CHANGED
|
@@ -123,6 +123,7 @@ export class SessionEditorController {
|
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
// 撤回回填:写官方输入契约的草稿(`setDraft`)。拿不到输入面(会话没打开 / 面未就绪)就只撤回、不回填。
|
|
126
127
|
private setComposerDraft(text: string): void {
|
|
127
128
|
if (this.sessions.binding(this.sessionId) === undefined) return;
|
|
128
129
|
const scoped = this.sessions.scope(this.sessionId);
|
|
@@ -130,10 +131,10 @@ export class SessionEditorController {
|
|
|
130
131
|
const conversation = scoped.get("conversation") as
|
|
131
132
|
| {
|
|
132
133
|
input?: {
|
|
133
|
-
for(ctx: ClientContext): {
|
|
134
|
+
for(ctx: ClientContext): { setDraft(draft: string): void };
|
|
134
135
|
};
|
|
135
136
|
}
|
|
136
137
|
| undefined;
|
|
137
|
-
conversation?.input?.for(scoped).
|
|
138
|
+
conversation?.input?.for(scoped).setDraft(text);
|
|
138
139
|
}
|
|
139
140
|
}
|
package/src/client/index.ts
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import type { Context } from "@deepseek-ai/cordis";
|
|
2
|
-
import type {} from "@
|
|
2
|
+
import type {} from "@deepseek-ai/dsh-client-ui-conversation/client";
|
|
3
3
|
import type {} from "@deepseek-ai/dsh-client-ui-chat/client";
|
|
4
4
|
import type {} from "@deepseek-ai/dsh-client-ui-renderer/client";
|
|
5
5
|
import type { SessionId } from "@deepseek-ai/dsh-session";
|
|
6
6
|
import { SessionEditorController } from "./controller.ts";
|
|
7
7
|
import { registerChatNodeRenderers } from "./chat-node/register.ts";
|
|
8
8
|
import { registerComposerStats } from "./composer-stats/register.ts";
|
|
9
|
-
import { styling } from "@morlay/dsh-client-ui-primitives/client";
|
|
9
|
+
import { apply as installUiPrimitives, styling } from "@morlay/dsh-client-ui-primitives/client";
|
|
10
10
|
import { globals as messageIconGlobals } from "./chat-node/MessageIconActions.styles.ts";
|
|
11
11
|
|
|
12
12
|
export const inject = ["slots", "conversation", "connection", "sessions", "uiWorkspace"];
|
|
13
13
|
|
|
14
14
|
export function apply(ctx: Context): void {
|
|
15
|
+
// 基础面随本包 inline(不再是装配行):装上它提供的字典、字段槽与按行配置页;多份副本只装一次。
|
|
16
|
+
installUiPrimitives(ctx);
|
|
15
17
|
styling.injectGlobals(messageIconGlobals);
|
|
16
18
|
|
|
17
19
|
const controllers = new Map<SessionId, SessionEditorController>();
|