@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@morlay/ui-conversation-message-actions",
3
- "version": "0.0.18",
3
+ "version": "0.0.19-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",
@@ -16,7 +16,7 @@
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
19
- "url": "https://github.com/morlay/better-session.git"
19
+ "url": "https://github.com/morlay/dsh-plugin.git"
20
20
  },
21
21
  "files": [
22
22
  "dist",
@@ -32,37 +32,43 @@
32
32
  "./testing": "./dist/testing.mjs",
33
33
  "./package.json": "./package.json",
34
34
  "./cordis.patch.yml": "./cordis.patch.yml",
35
- "./client": "./dist/client.js"
35
+ "./client": {
36
+ "types": "./dist/client.d.cts",
37
+ "default": "./dist/client.cjs"
38
+ }
36
39
  },
37
40
  "dependencies": {
38
- "@morlay/session-branch": "^0.0.8"
41
+ "@morlay/session-branch": "^0.0.9-alpha.0"
39
42
  },
40
43
  "devDependencies": {
41
- "@morlay/session-rdb": "^0.0.20",
42
- "@types/react": "^19.2.18",
43
- "@types/react-dom": "^19.2.5",
44
- "lightningcss": "^1.32.0",
45
- "react": "^19.2.8",
46
- "react-dom": "^19.2.8"
44
+ "@deepseek-ai/dsh-session-stats": "^0.1.6-alpha.2",
45
+ "@morlay/dsh-client-ui-primitives": "^0.0.2-alpha.0",
46
+ "@morlay/session-rdb": "^0.0.21-alpha.0",
47
+ "@types/react": "~18.3.1",
48
+ "@types/react-dom": "~18.3.0",
49
+ "react": "^18.2.0",
50
+ "react-dom": "^18.2.0"
47
51
  },
48
52
  "peerDependencies": {
49
53
  "@deepseek-ai/cordis": "^4.0.2",
50
- "@deepseek-ai/dsh-api-session-controller": "^0.1.5-rc.2",
51
- "@deepseek-ai/dsh-attachment": "^0.1.5-rc.2",
52
- "@deepseek-ai/dsh-client-connection": "^0.1.5-rc.2",
53
- "@deepseek-ai/dsh-client-store": "^0.1.5-rc.2",
54
- "@deepseek-ai/dsh-client-ui-attachment": "^0.1.5-rc.2",
55
- "@deepseek-ai/dsh-client-ui-chat": "^0.1.5-rc.2",
56
- "@deepseek-ai/dsh-client-ui-conversation": "^0.1.5-rc.2",
57
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.5-rc.2",
58
- "@deepseek-ai/dsh-client-ui-renderer": "^0.1.5-rc.2",
59
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.5-rc.2",
60
- "@deepseek-ai/dsh-invariants": "^0.1.5-rc.2",
61
- "@deepseek-ai/dsh-llm": "^0.1.5-rc.2",
62
- "@deepseek-ai/dsh-session": "^0.1.5-rc.2",
63
- "@deepseek-ai/dsh-session-persistence": "^0.1.5-rc.2",
64
- "@deepseek-ai/dsh-session-projection": "^0.1.5-rc.2",
65
- "@deepseek-ai/dsh-token-meter": "^0.1.5-rc.2"
54
+ "@deepseek-ai/dsh-api-session-controller": "^0.1.6-alpha.2",
55
+ "@deepseek-ai/dsh-attachment": "^0.1.6-alpha.2",
56
+ "@deepseek-ai/dsh-client-connection": "^0.1.6-alpha.2",
57
+ "@deepseek-ai/dsh-client-store": "^0.1.6-alpha.2",
58
+ "@deepseek-ai/dsh-client-ui-attachment": "^0.1.6-alpha.2",
59
+ "@deepseek-ai/dsh-client-ui-chat": "^0.1.6-alpha.2",
60
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.1.6-alpha.2",
61
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.1.6-alpha.2",
62
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.6-alpha.2",
63
+ "@deepseek-ai/dsh-client-ui-workspace": "^0.1.6-alpha.2",
64
+ "@deepseek-ai/dsh-invariants": "^0.1.6-alpha.2",
65
+ "@deepseek-ai/dsh-llm": "^0.1.6-alpha.2",
66
+ "@deepseek-ai/dsh-session": "^0.1.6-alpha.2",
67
+ "@deepseek-ai/dsh-session-persistence": "^0.1.6-alpha.2",
68
+ "@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.2",
69
+ "@deepseek-ai/dsh-token-meter": "^0.1.6-alpha.2",
70
+ "@morlay/dsh-client-ui-conversation": "^0.0.2-alpha.0",
71
+ "@morlay/dsh-client-ui-primitives": "^0.0.2-alpha.0"
66
72
  },
67
73
  "dsh": {
68
74
  "bundle": {
@@ -73,16 +79,14 @@
73
79
  "inject": [
74
80
  "@deepseek-ai/dsh-client-connection",
75
81
  "@deepseek-ai/dsh-client-store",
76
- "@deepseek-ai/dsh-client-ui-conversation",
82
+ "@deepseek-ai/dsh-client-ui-workspace",
83
+ "@morlay/dsh-client-ui-conversation",
77
84
  "@deepseek-ai/dsh-client-ui-chat"
78
85
  ]
79
86
  }
80
87
  },
81
88
  "inlinedDependencies": {
82
89
  "@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
90
  "drizzle-orm": "1.0.0-rc.5-ab785fc",
87
91
  "fflate": "0.8.3",
88
92
  "pg": "8.23.0",
@@ -98,7 +102,6 @@
98
102
  "postgres-date": "1.0.7",
99
103
  "postgres-interval": "1.2.0",
100
104
  "split2": "4.2.0",
101
- "tinyrainbow": "3.1.1",
102
105
  "xtend": "4.0.2",
103
106
  "zod": "4.6.5"
104
107
  },
@@ -0,0 +1,76 @@
1
+ import type { CSSProps } from "@morlay/dsh-client-ui-primitives/client";
2
+
3
+ export const styles = {
4
+ actions: {
5
+ display: "flex",
6
+ alignItems: "center",
7
+ gap: "10px",
8
+ height: "28px",
9
+ },
10
+ timeStart: {
11
+ paddingRight: "12px",
12
+ fontSize: "14px",
13
+ lineHeight: "24px",
14
+ color: "var(--dsw-alias-label-tertiary)",
15
+ whiteSpace: "nowrap",
16
+ },
17
+ timeEnd: {
18
+ paddingLeft: "12px",
19
+ fontSize: "14px",
20
+ lineHeight: "24px",
21
+ color: "var(--dsw-alias-label-tertiary)",
22
+ whiteSpace: "nowrap",
23
+ "&)": {
24
+ "@media (hover: hover)": {
25
+ opacity: "1",
26
+ },
27
+ },
28
+ },
29
+ runTimeDot: {
30
+ margin: "0 10px",
31
+ },
32
+ action: {
33
+ display: "inline-flex",
34
+ alignItems: "center",
35
+ justifyContent: "center",
36
+ width: "28px",
37
+ height: "28px",
38
+ padding: "6px",
39
+ border: "none",
40
+ borderRadius: "28px",
41
+ background: "transparent",
42
+ color: "var(--dsw-alias-label-tertiary)",
43
+ cursor: "pointer",
44
+ "&:hover": {
45
+ background: "var(--dsw-alias-interactive-bg-hover)",
46
+ color: "var(--dsw-alias-label-secondary)",
47
+ },
48
+ "&[data-unavailable]": {
49
+ cursor: "default",
50
+ opacity: "0.4",
51
+ },
52
+ "&[data-unavailable]:hover": {
53
+ background: "transparent",
54
+ color: "var(--dsw-alias-label-tertiary)",
55
+ },
56
+ },
57
+ visuallyHidden: {
58
+ position: "absolute",
59
+ width: "1px",
60
+ height: "1px",
61
+ overflow: "hidden",
62
+ clip: "rect(0 0 0 0)",
63
+ whiteSpace: "nowrap",
64
+ },
65
+ } satisfies Record<string, CSSProps>;
66
+
67
+ export const globals = {
68
+ "[data-time-hover-root] [data-time-label]": {
69
+ opacity: "0",
70
+ transition: "opacity 80ms ease",
71
+ },
72
+ "[data-time-hover-root]:hover :is(.timeStart, .timeEnd),\n [data-time-hover-root]:focus-within :is(.timeStart, .timeEnd)":
73
+ {
74
+ opacity: "1",
75
+ },
76
+ } satisfies Record<string, CSSProps>;
@@ -1,6 +1,7 @@
1
1
  // Shared IconActions chrome for user and assistant messages: copy
2
2
  // live, optional branch wiring, and an optional date-aware clock.
3
3
 
4
+ import { styling } from "@morlay/dsh-client-ui-primitives/client";
4
5
  import { useCallback, useEffect, useId, useRef, useState, type ReactNode } from "react";
5
6
  import {
6
7
  IconBranchOutline16,
@@ -19,7 +20,7 @@ import {
19
20
  formatTokensPerSecond,
20
21
  } from "./message-chrome.ts";
21
22
  import { useCalendarDay } from "./use-calendar-day.ts";
22
- import css from "./MessageIconActions.module.css";
23
+ import { styles } from "./MessageIconActions.styles.ts";
23
24
 
24
25
  export interface MessageIconActionsProps {
25
26
  text: string;
@@ -101,12 +102,15 @@ export function MessageIconActions({
101
102
  // instead of three facts.
102
103
  const clockEl =
103
104
  time === undefined ? null : (
104
- <span className={clock === "start" ? css.timeStart : css.timeEnd}>
105
+ <span
106
+ data-time-label=""
107
+ {...styling.props(clock === "start" ? styles.timeStart : styles.timeEnd)}
108
+ >
105
109
  {formatMessageClock(time, t, day)}
106
110
  {runMs !== undefined && (
107
111
  <>
108
112
  {" "}
109
- <span className={css.runTimeDot} aria-hidden>
113
+ <span {...styling.props(styles.runTimeDot)} aria-hidden>
110
114
  ·
111
115
  </span>{" "}
112
116
  {t("message.ranFor", { duration: formatRunDuration(runMs, t) })}
@@ -115,7 +119,7 @@ export function MessageIconActions({
115
119
  {ttftMs !== undefined && (
116
120
  <>
117
121
  {" "}
118
- <span className={css.runTimeDot} aria-hidden>
122
+ <span {...styling.props(styles.runTimeDot)} aria-hidden>
119
123
  ·
120
124
  </span>{" "}
121
125
  {t("message.turnTime.ttft")}{" "}
@@ -125,7 +129,7 @@ export function MessageIconActions({
125
129
  {tokensPerSecond !== undefined && (
126
130
  <>
127
131
  {" "}
128
- <span className={css.runTimeDot} aria-hidden>
132
+ <span {...styling.props(styles.runTimeDot)} aria-hidden>
129
133
  ·
130
134
  </span>{" "}
131
135
  {t("message.tokensPerSecond", { tps: formatTokensPerSecond(tokensPerSecond) })}
@@ -133,13 +137,18 @@ export function MessageIconActions({
133
137
  )}
134
138
  </span>
135
139
  );
140
+ // 外部 className 需要拼接:给 actions 一个真实类名(而不是 data-css 属性)。
141
+ const actionsClass = styling.className(styles.actions);
136
142
  return (
137
- <div className={className === undefined ? css.actions : `${css.actions} ${className}`}>
143
+ <div
144
+ data-time-hover-root=""
145
+ className={className === undefined ? actionsClass : `${actionsClass} ${className}`}
146
+ >
138
147
  {clock === "start" ? clockEl : null}
139
148
  <Tooltip label={copied ? t("copied" as never) : t("copy" as never)} side="bottom">
140
149
  <button
141
150
  type="button"
142
- className={css.action}
151
+ {...styling.props(styles.action)}
143
152
  aria-label={copied ? t("copied" as never) : t("copy" as never)}
144
153
  onClick={onCopy}
145
154
  >
@@ -149,14 +158,24 @@ export function MessageIconActions({
149
158
  {extraActions}
150
159
  {onEdit !== undefined && (
151
160
  <Tooltip label="编辑" side="bottom">
152
- <button type="button" className={css.action} aria-label="编辑" onClick={onEdit}>
161
+ <button
162
+ type="button"
163
+ {...styling.props(styles.action)}
164
+ aria-label="编辑"
165
+ onClick={onEdit}
166
+ >
153
167
  <IconEditOutline16 />
154
168
  </button>
155
169
  </Tooltip>
156
170
  )}
157
171
  {onRetry !== undefined && (
158
172
  <Tooltip label="重试此回合" side="bottom">
159
- <button type="button" className={css.action} aria-label="重试此回合" onClick={onRetry}>
173
+ <button
174
+ type="button"
175
+ {...styling.props(styles.action)}
176
+ aria-label="重试此回合"
177
+ onClick={onRetry}
178
+ >
160
179
  <IconRefreshOutline16 />
161
180
  </button>
162
181
  </Tooltip>
@@ -169,7 +188,7 @@ export function MessageIconActions({
169
188
  {/* Native disabled buttons do not deliver the hover/focus events Tooltip needs. */}
170
189
  <button
171
190
  type="button"
172
- className={css.action}
191
+ {...styling.props(styles.action)}
173
192
  aria-label={t("message.branch")}
174
193
  aria-disabled={branchUnavailable || undefined}
175
194
  aria-describedby={branchUnavailable ? reasonId : undefined}
@@ -181,7 +200,7 @@ export function MessageIconActions({
181
200
  </Tooltip>
182
201
  )}
183
202
  {onBranch !== undefined && branchUnavailable && (
184
- <span id={reasonId} className={css.visuallyHidden}>
203
+ <span id={reasonId} {...styling.props(styles.visuallyHidden)}>
185
204
  {t("message.branchUnavailable")}
186
205
  </span>
187
206
  )}
@@ -0,0 +1,247 @@
1
+ import type { CSSProps } from "@morlay/dsh-client-ui-primitives/client";
2
+
3
+ export const styles = {
4
+ userRow: {
5
+ display: "flex",
6
+ flexDirection: "column",
7
+ alignItems: "flex-end",
8
+ gap: "6px",
9
+ },
10
+ userStack: {
11
+ display: "flex",
12
+ flexDirection: "column",
13
+ alignItems: "flex-end",
14
+ gap: "8px",
15
+ minWidth: "0",
16
+ maxWidth: "min(525px, 82%)",
17
+ },
18
+ bubble: {
19
+ maxWidth: "100%",
20
+ background: "var(--dsw-specific-bubble)",
21
+ borderRadius: "22px",
22
+ padding: "10px 16px",
23
+ fontSize: "16px",
24
+ lineHeight: "24px",
25
+ color: "var(--dsw-alias-label-primary)",
26
+ },
27
+ contextRow: {
28
+ padding: "2px 0",
29
+ },
30
+ compactionRow: {
31
+ padding: "2px 0",
32
+ },
33
+ compactionButton: {
34
+ display: "flex",
35
+ alignItems: "center",
36
+ width: "100%",
37
+ height: "24px",
38
+ minWidth: "0",
39
+ padding: "0",
40
+ border: "none",
41
+ borderRadius: "6px",
42
+ background: "none",
43
+ color: "inherit",
44
+ font: "inherit",
45
+ textAlign: "left",
46
+ "&:not(:disabled)": {
47
+ cursor: "pointer",
48
+ },
49
+ "&:not(:disabled):hover": {
50
+ background: "var(--dsw-alias-interactive-bg-hover)",
51
+ },
52
+ "&:not(:disabled):hover .compactionContextIcon": {
53
+ opacity: "0",
54
+ },
55
+ "&:not(:disabled):focus-visible .compactionContextIcon": {
56
+ opacity: "0",
57
+ },
58
+ "&:not(:disabled):hover .compactionDisclosureIcon": {
59
+ opacity: "1",
60
+ },
61
+ "&:not(:disabled):focus-visible .compactionDisclosureIcon": {
62
+ opacity: "1",
63
+ },
64
+ },
65
+ compactionLeading: {
66
+ flex: "none",
67
+ display: "inline-grid",
68
+ placeItems: "center",
69
+ width: "16px",
70
+ height: "16px",
71
+ marginRight: "6px",
72
+ color: "var(--dsw-alias-label-secondary)",
73
+ },
74
+ compactionContextIcon: {
75
+ display: "inline-flex",
76
+ gridArea: "1 / 1",
77
+ alignItems: "center",
78
+ justifyContent: "center",
79
+ },
80
+ compactionDisclosureIcon: {
81
+ display: "inline-flex",
82
+ gridArea: "1 / 1",
83
+ alignItems: "center",
84
+ justifyContent: "center",
85
+ opacity: "0",
86
+ },
87
+ compactionTitle: {
88
+ flex: "none",
89
+ fontSize: "14px",
90
+ lineHeight: "24px",
91
+ color: "var(--dsw-alias-label-primary-dimmed)",
92
+ },
93
+ compactionSep: {
94
+ flex: "none",
95
+ width: "2px",
96
+ height: "2px",
97
+ margin: "0 8px",
98
+ borderRadius: "1px",
99
+ background: "var(--dsw-alias-label-caption)",
100
+ },
101
+ compactionSummary: {
102
+ flex: "1 1 auto",
103
+ minWidth: "0",
104
+ overflow: "hidden",
105
+ color: "var(--dsw-alias-label-tertiary)",
106
+ fontSize: "14px",
107
+ lineHeight: "24px",
108
+ textOverflow: "ellipsis",
109
+ whiteSpace: "nowrap",
110
+ },
111
+ compactionBody: {
112
+ padding: "4px 0 4px 22px",
113
+ color: "var(--dsw-alias-label-tertiary)",
114
+ fontSize: "14px",
115
+ lineHeight: "24px",
116
+ },
117
+ retryRow: {
118
+ color: "var(--dsw-alias-label-tertiary)",
119
+ fontSize: "13px",
120
+ lineHeight: "20px",
121
+ "&[data-active] .retryText": {
122
+ background:
123
+ "linear-gradient(\n 90deg,\n var(--dsw-alias-label-tertiary) 0%,\n var(--dsw-alias-label-tertiary) 40%,\n var(--dsw-alias-label-secondary) 50%,\n var(--dsw-alias-label-tertiary) 60%,\n var(--dsw-alias-label-tertiary) 100%\n )",
124
+ backgroundPosition: "100% 50%",
125
+ backgroundSize: "200% 100%",
126
+ backgroundClip: "text",
127
+ color: "transparent",
128
+ animation: "retry-shimmer 1.6s ease-in-out infinite",
129
+ "@media (prefers-reduced-motion: reduce)": {
130
+ background: "none",
131
+ color: "inherit",
132
+ animation: "none",
133
+ },
134
+ },
135
+ "&[open] .retrySummary::after": {
136
+ transform: "rotate(45deg)",
137
+ },
138
+ },
139
+ retrySummary: {
140
+ display: "inline-flex",
141
+ alignItems: "center",
142
+ width: "fit-content",
143
+ padding: "2px 0",
144
+ gap: "7px",
145
+ borderRadius: "3px",
146
+ color: "inherit",
147
+ cursor: "pointer",
148
+ listStyle: "none",
149
+ userSelect: "none",
150
+ "&::-webkit-details-marker": {
151
+ display: "none",
152
+ },
153
+ "&::after": {
154
+ width: "6px",
155
+ height: "6px",
156
+ borderRight: "1.5px solid currentcolor",
157
+ borderBottom: "1.5px solid currentcolor",
158
+ content: '""',
159
+ opacity: "0.8",
160
+ transform: "rotate(-45deg)",
161
+ transition: "transform 120ms ease",
162
+ },
163
+ "&:hover": {
164
+ color: "var(--dsw-alias-label-secondary)",
165
+ },
166
+ "&:focus-visible": {
167
+ outline: "1.5px solid var(--dsw-alias-button-info-fill)",
168
+ outlineOffset: "2px",
169
+ },
170
+ },
171
+ retryText: {
172
+ color: "inherit",
173
+ },
174
+ retryDetails: {
175
+ display: "grid",
176
+ gap: "2px",
177
+ marginTop: "3px",
178
+ paddingLeft: "14px",
179
+ overflowWrap: "anywhere",
180
+ fontSize: "12px",
181
+ lineHeight: "18px",
182
+ },
183
+ retryDetailLabel: {
184
+ color: "var(--dsw-alias-label-secondary)",
185
+ },
186
+ turnErrorRow: {
187
+ display: "grid",
188
+ gridTemplateColumns: "10px minmax(0, 1fr) auto",
189
+ gap: "8px",
190
+ alignItems: "start",
191
+ padding: "2px 0",
192
+ fontSize: "13px",
193
+ lineHeight: "20px",
194
+ },
195
+ turnErrorDot: {
196
+ marginTop: "5px",
197
+ },
198
+ turnErrorCopy: {
199
+ minWidth: "0",
200
+ overflowWrap: "anywhere",
201
+ },
202
+ turnErrorTitle: {
203
+ marginRight: "6px",
204
+ color: "var(--dsw-alias-state-error-primary)",
205
+ fontWeight: "600",
206
+ },
207
+ turnErrorMessage: {
208
+ color: "var(--dsw-alias-label-secondary)",
209
+ },
210
+ turnErrorCode: {
211
+ color: "var(--dsw-alias-label-tertiary)",
212
+ font: "var(--dsw-font-markdown-code-block-small)",
213
+ },
214
+ maxTokensTitle: {
215
+ marginRight: "6px",
216
+ color: "var(--dsw-alias-state-warn-primary)",
217
+ fontWeight: "600",
218
+ },
219
+ refChip: {
220
+ display: "inline-block",
221
+ margin: "0 2px",
222
+ padding: "0 8px",
223
+ borderRadius: "6px",
224
+ background: "rgba(97, 135, 216, 0.22)",
225
+ color: "var(--dsw-alias-label-primary)",
226
+ fontSize: "0.85em",
227
+ lineHeight: "1.6",
228
+ whiteSpace: "nowrap",
229
+ verticalAlign: "baseline",
230
+ },
231
+ confirmActions: {
232
+ display: "flex",
233
+ justifyContent: "flex-end",
234
+ gap: "8px",
235
+ },
236
+ } satisfies Record<string, CSSProps>;
237
+
238
+ export const animations = {
239
+ "retry-shimmer": {
240
+ from: {
241
+ backgroundPosition: "100% 50%",
242
+ },
243
+ to: {
244
+ backgroundPosition: "0 50%",
245
+ },
246
+ },
247
+ } satisfies Record<string, Record<string, CSSProps>>;