@morlay/ui-conversation-message-actions 0.0.18 → 0.0.19-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.
Files changed (45) hide show
  1. package/README.md +29 -98
  2. package/dist/client.cjs +1380 -0
  3. package/dist/client.d.cts +6 -0
  4. package/dist/client.d.mts +6 -0
  5. package/dist/index.d.cts +98 -0
  6. package/dist/index.d.mts +3 -10
  7. package/dist/index.mjs +460 -2
  8. package/dist/invariant.d.cts +7 -0
  9. package/dist/{plan-BSa7k9HO.d.mts → plan-CT_6Y1fD.d.cts} +11 -9
  10. package/dist/plan-Cm9hCord.d.mts +101 -0
  11. package/dist/plan.d.cts +2 -0
  12. package/dist/plan.d.mts +2 -2
  13. package/dist/plan.mjs +145 -11
  14. package/dist/shared-LK3nImWW.mjs +55 -0
  15. package/dist/testing.d.cts +3242 -0
  16. package/dist/testing.d.mts +11 -5
  17. package/dist/testing.mjs +1976 -3775
  18. package/package.json +34 -31
  19. package/src/client/chat-node/MessageIconActions.styles.ts +76 -0
  20. package/src/client/chat-node/MessageIconActions.tsx +30 -11
  21. package/src/client/chat-node/MessageItem.styles.ts +247 -0
  22. package/src/client/chat-node/MessageItem.tsx +32 -39
  23. package/src/client/chat-node/message-chrome.ts +0 -2
  24. package/src/client/chat-node/register.ts +3 -4
  25. package/src/client/chat-node/use-calendar-day.ts +0 -4
  26. package/src/client/composer-stats/StatsPills.styles.ts +57 -0
  27. package/src/client/composer-stats/StatsPills.tsx +384 -0
  28. package/src/client/composer-stats/register.ts +17 -0
  29. package/src/client/composer-stats/stat-dialog.styles.ts +70 -0
  30. package/src/client/composer-stats/stat-dialog.ts +52 -0
  31. package/src/client/composer-stats/token-format.ts +85 -0
  32. package/src/client/composer-stats/turn-reading.ts +35 -0
  33. package/src/client/controller.ts +32 -114
  34. package/src/client/index.ts +8 -24
  35. package/src/index.ts +102 -111
  36. package/src/plan.ts +189 -24
  37. package/src/shared.ts +1 -1
  38. package/src/testing.ts +1 -5
  39. package/src/types.ts +1 -1
  40. package/dist/client.js +0 -806
  41. package/dist/src-B4HwXsob.mjs +0 -499
  42. package/src/client/chat-node/MessageIconActions.module.css +0 -86
  43. package/src/client/chat-node/MessageItem.module.css +0 -290
  44. package/src/client/css-modules.d.ts +0 -4
  45. package/src/client/import-action.tsx +0 -74
package/src/shared.ts CHANGED
@@ -63,7 +63,7 @@ export interface SessionEditorOperationResult {
63
63
 
64
64
  export interface EditableMessageBlock {
65
65
  key: string;
66
- // 消息所属轮号;轮外消息(无 turn 归属)缺省。
66
+
67
67
  turn?: number;
68
68
  eventSeq: number;
69
69
  blockIndex: number;
package/src/testing.ts CHANGED
@@ -43,8 +43,7 @@ export async function harness(provide?: (ctx: Context) => void): Promise<Harness
43
43
  await ctx.plugin(SessionStore);
44
44
  new SessionProjectionRegistry(ctx);
45
45
  const fiber = await ctx.plugin(SessionPersistenceSqlite, { type: "sqlite", path: ":memory:" });
46
- // 额外服务(如 HTTP 面测试的 webServer 替身)必须在 SessionEditor 构造前
47
- // 就绪:构造函数内的 effect 只在服务可解析时注册路由。
46
+
48
47
  provide?.(ctx);
49
48
  await ctx.plugin(SessionEditor);
50
49
  return { ctx, editor: ctx.sessionEditor, dispose: () => fiber.dispose() };
@@ -78,7 +77,6 @@ export async function createPersisted(
78
77
  }
79
78
  }
80
79
 
81
- /** 构造一条 user/message 事件。 */
82
80
  export function userMessage(seq: number, id: string, text: string, time = seq): SessionEvent {
83
81
  return {
84
82
  type: "user/message",
@@ -94,7 +92,6 @@ export function userMessage(seq: number, id: string, text: string, time = seq):
94
92
  } as SessionEvent;
95
93
  }
96
94
 
97
- /** 构造一条 assistant/message 事件(纯文本回复)。 */
98
95
  export function assistantMessage(
99
96
  seq: number,
100
97
  turn: number,
@@ -122,7 +119,6 @@ export function assistantMessage(
122
119
  } as unknown as SessionEvent;
123
120
  }
124
121
 
125
- /** 真实 agent-loop 形状的一轮:轮首输入 + 可选 followup,可闭合。 */
126
122
  export function turnLog(
127
123
  base: number,
128
124
  turn: number,
package/src/types.ts CHANGED
@@ -65,7 +65,7 @@ export type SessionEditorTimeline = BranchTimeline;
65
65
 
66
66
  export interface EditableMessageBlock {
67
67
  key: string;
68
- // 消息所属轮号;轮外消息(无 turn 归属)缺省。
68
+
69
69
  turn?: number;
70
70
  eventSeq: number;
71
71
  blockIndex: number;