@locusgraph/loop 0.3.1 → 0.4.1

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 (119) hide show
  1. package/dist/agent/index.d.ts +1 -1
  2. package/dist/agent/pulse/gradient-label.js +6 -5
  3. package/dist/agent/pulse/marks/bars-mark.js +1 -1
  4. package/dist/agent/pulse/marks/glyph-mark.js +2 -2
  5. package/dist/agent/pulse/marks/locus-mark.js +1 -1
  6. package/dist/agent/pulse/pulse.js +1 -1
  7. package/dist/agent/pulse/use-loop-animation.d.ts +0 -1
  8. package/dist/agent/pulse/use-loop-animation.js +1 -3
  9. package/dist/agent/steps/step-icon.js +20 -13
  10. package/dist/agent/steps/steps.js +39 -37
  11. package/dist/agent/thinking/thinking.js +65 -62
  12. package/dist/agent/tool/json-block.js +10 -7
  13. package/dist/agent/tool/tool-status.d.ts +2 -0
  14. package/dist/agent/tool/tool-status.js +16 -13
  15. package/dist/agent/tool/tool.d.ts +8 -1
  16. package/dist/agent/tool/tool.js +238 -119
  17. package/dist/approval/inbox/inbox-row.d.ts +3 -3
  18. package/dist/approval/inbox/inbox-row.js +135 -200
  19. package/dist/approval/inbox/inbox.d.ts +3 -3
  20. package/dist/approval/inbox/inbox.js +180 -139
  21. package/dist/approval/inbox/virtual-inbox-list.d.ts +3 -3
  22. package/dist/approval/inbox/virtual-inbox-list.js +20 -21
  23. package/dist/approval/memory/memory-review.js +155 -154
  24. package/dist/approval/memory/memory-row.js +86 -87
  25. package/dist/approval/plan/plan-review.js +110 -129
  26. package/dist/approval/plan/plan-step-row.js +7 -6
  27. package/dist/approval/plan/plan-steps.d.ts +1 -1
  28. package/dist/approval/plan/plan-steps.js +2 -2
  29. package/dist/approval/plan/question-choices.js +10 -7
  30. package/dist/approval/plan/question.js +116 -112
  31. package/dist/approval/run/run-bar.js +43 -40
  32. package/dist/approval/shared/approval-line.d.ts +27 -0
  33. package/dist/approval/shared/approval-line.js +85 -0
  34. package/dist/approval/shared/risk-badge.d.ts +3 -5
  35. package/dist/approval/shared/risk-badge.js +11 -19
  36. package/dist/approval/shared/time.d.ts +0 -1
  37. package/dist/approval/shared/time.js +0 -1
  38. package/dist/approval/shared/use-focus-when-settled.d.ts +2 -0
  39. package/dist/approval/shared/use-focus-when-settled.js +18 -0
  40. package/dist/approval/spend/raise-cap-form.d.ts +2 -2
  41. package/dist/approval/spend/raise-cap-form.js +134 -126
  42. package/dist/approval/spend/spend-gate.js +133 -156
  43. package/dist/approval/spend/spend-math.d.ts +1 -0
  44. package/dist/approval/spend/spend-math.js +5 -2
  45. package/dist/approval/spend/spend-meter.js +5 -5
  46. package/dist/approval/tool/approval.js +114 -214
  47. package/dist/approval/tool/args/args-editor.js +147 -156
  48. package/dist/approval/tool/args/args-field.js +197 -109
  49. package/dist/approval/tool/deny-form.js +59 -66
  50. package/dist/approval/tool/tool-inputs.js +38 -45
  51. package/dist/chat/chat/chat.js +5 -4
  52. package/dist/chat/chat/use-stick-to-bottom.js +1 -3
  53. package/dist/chat/composer/composer-actions.js +4 -1
  54. package/dist/chat/composer/composer.js +4 -3
  55. package/dist/chat/composer/use-auto-grow.js +14 -10
  56. package/dist/chat/files/files.js +12 -10
  57. package/dist/chat/reply/fenced-code.js +1 -1
  58. package/dist/chat/reply/markdown-components.js +9 -116
  59. package/dist/chat/reply/reply.js +2 -2
  60. package/dist/chat/turn/group-parts.d.ts +1 -0
  61. package/dist/chat/turn/group-parts.js +6 -3
  62. package/dist/chat/turn/turn.js +13 -4
  63. package/dist/cost/context.js +3 -3
  64. package/dist/cost/cost-steps.js +31 -30
  65. package/dist/cost/cost.js +39 -39
  66. package/dist/cost/model-picker.js +5 -4
  67. package/dist/cost/shared/context-breakdown.js +10 -11
  68. package/dist/cost/shared/model-option-row.js +4 -3
  69. package/dist/cost/shared/step-cost-row.js +11 -12
  70. package/dist/cost/shared/usage-totals.d.ts +1 -0
  71. package/dist/cost/shared/usage-totals.js +19 -1
  72. package/dist/memory/cite.js +55 -47
  73. package/dist/memory/memorized.js +123 -108
  74. package/dist/memory/recall.js +136 -146
  75. package/dist/memory/shared/host-label.d.ts +1 -1
  76. package/dist/memory/shared/host-label.js +2 -2
  77. package/dist/memory/shared/source-mark.js +1 -1
  78. package/dist/memory/sources.d.ts +2 -1
  79. package/dist/memory/sources.js +135 -100
  80. package/dist/shared/decision-summary.js +2 -1
  81. package/dist/shared/line.d.ts +10 -0
  82. package/dist/shared/line.js +11 -0
  83. package/dist/shared/live-status.d.ts +3 -0
  84. package/dist/shared/live-status.js +11 -0
  85. package/dist/shared/reduced-motion.d.ts +1 -0
  86. package/dist/shared/reduced-motion.js +3 -0
  87. package/dist/thread/actions/action-button.js +1 -1
  88. package/dist/thread/actions/actions.d.ts +3 -1
  89. package/dist/thread/actions/actions.js +100 -81
  90. package/dist/thread/actions/branch-switcher.js +67 -37
  91. package/dist/thread/canvas/canvas-meta.d.ts +9 -0
  92. package/dist/thread/canvas/canvas-meta.js +35 -0
  93. package/dist/thread/canvas/canvas.d.ts +1 -1
  94. package/dist/thread/canvas/canvas.js +64 -74
  95. package/dist/thread/canvas/version-switcher.d.ts +1 -0
  96. package/dist/thread/canvas/version-switcher.js +106 -87
  97. package/dist/thread/code/code.js +4 -6
  98. package/dist/thread/code/copy-code-button.d.ts +2 -1
  99. package/dist/thread/code/copy-code-button.js +56 -25
  100. package/dist/thread/history/history.d.ts +1 -1
  101. package/dist/thread/history/history.js +104 -104
  102. package/dist/thread/history/row/history-row.js +8 -5
  103. package/dist/thread/history/row/thread-item-menu.js +13 -4
  104. package/dist/thread/history/row/thread-title-editor.js +1 -1
  105. package/dist/thread/history/virtual-history-list.js +1 -2
  106. package/dist/thread/index.d.ts +1 -0
  107. package/dist/thread/index.js +1 -0
  108. package/dist/thread/starters/starters.js +5 -4
  109. package/package.json +6 -6
  110. package/dist/agent/shared/status-dot.d.ts +0 -1
  111. package/dist/agent/shared/status-dot.js +0 -1
  112. package/dist/approval/shared/decision-line.d.ts +0 -1
  113. package/dist/approval/shared/decision-line.js +0 -1
  114. package/dist/memory/shared/disclosure.d.ts +0 -6
  115. package/dist/memory/shared/disclosure.js +0 -6
  116. package/dist/shared/panel.d.ts +0 -19
  117. package/dist/shared/panel.js +0 -77
  118. package/dist/shared/status-dot.d.ts +0 -6
  119. package/dist/shared/status-dot.js +0 -20
@@ -1,36 +1,79 @@
1
1
  "use client";
2
2
 
3
3
  import { c as _c } from "react/compiler-runtime";
4
- import { Idea as BrainIcon } from "@carbon/icons-react";
5
- import { Button } from "@locusgraph/components";
4
+ import { Button, cn } from "@locusgraph/components";
6
5
  import { pluralize } from "@locusgraph/utils";
6
+ import { Lightbulb as BrainIcon } from "@phosphor-icons/react/ssr";
7
7
  import { useMemo, useState } from "react";
8
- import { ApprovalPanel, LiveStatus, PanelBody, PanelFooter, PanelHeader, PanelTitle } from "../../shared/panel.js";
9
- import { PanelEmpty } from "../../shared/panel-empty.js";
10
- import { DecisionSummary } from "../shared/decision-line.js";
8
+ import { DecisionSummary } from "../../shared/decision-summary.js";
9
+ import { lineMemoryIconClass, lineMemoryObjectClass, lineRowClass } from "../../shared/line.js";
10
+ import { LiveStatus } from "../../shared/live-status.js";
11
+ import { PendingLine } from "../shared/approval-line.js";
11
12
  import { useFocusOnMount } from "../shared/use-focus-on-mount.js";
13
+ import { useFocusWhenSettled } from "../shared/use-focus-when-settled.js";
12
14
  import { hasBlankEdit, initialDrafts, reviewResult, submitLabel } from "./memory-choices.js";
13
15
  import { MemoryRow } from "./memory-row.js";
14
16
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
15
17
  function resultSummary(result) {
16
18
  return `${result.kept.length} kept, ${result.edited.length} edited, ${result.discarded.length} discarded`;
17
19
  }
18
- function headerStatus(decision, empty) {
19
- if (decision) return {
20
- status: "Reviewed",
21
- tone: "done"
22
- };
23
- if (empty) return {
24
- status: "Nothing new",
25
- tone: "idle"
26
- };
27
- return {
28
- status: "Waiting for you",
29
- tone: "waiting"
30
- };
20
+ function Headline(t0) {
21
+ const $ = _c(9);
22
+ const {
23
+ count,
24
+ decided
25
+ } = t0;
26
+ let t1;
27
+ if ($[0] !== count) {
28
+ t1 = pluralize(count, "memory", "memories");
29
+ $[0] = count;
30
+ $[1] = t1;
31
+ } else {
32
+ t1 = $[1];
33
+ }
34
+ const object = t1;
35
+ let t2;
36
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
37
+ t2 = /*#__PURE__*/_jsx(BrainIcon, {
38
+ weight: "bold",
39
+ "aria-hidden": true
40
+ });
41
+ $[2] = t2;
42
+ } else {
43
+ t2 = $[2];
44
+ }
45
+ const t3 = decided ? null : undefined;
46
+ const t4 = decided ? "Reviewed" : "to remember";
47
+ let t5;
48
+ if ($[3] !== object) {
49
+ t5 = /*#__PURE__*/_jsx("span", {
50
+ className: lineMemoryObjectClass,
51
+ children: object
52
+ });
53
+ $[3] = object;
54
+ $[4] = t5;
55
+ } else {
56
+ t5 = $[4];
57
+ }
58
+ let t6;
59
+ if ($[5] !== t3 || $[6] !== t4 || $[7] !== t5) {
60
+ t6 = /*#__PURE__*/_jsxs(PendingLine, {
61
+ icon: t2,
62
+ iconClassName: "text-memory",
63
+ status: t3,
64
+ children: [t4, " ", t5]
65
+ });
66
+ $[5] = t3;
67
+ $[6] = t4;
68
+ $[7] = t5;
69
+ $[8] = t6;
70
+ } else {
71
+ t6 = $[8];
72
+ }
73
+ return t6;
31
74
  }
32
75
  export function MemoryReview(t0) {
33
- const $ = _c(46);
76
+ const $ = _c(33);
34
77
  const {
35
78
  memories,
36
79
  title: t1,
@@ -82,176 +125,134 @@ export function MemoryReview(t0) {
82
125
  }
83
126
  const sensitiveCount = t7.length;
84
127
  const submitRef = useFocusOnMount(autoFocus && !decision && !empty);
128
+ const settleRef = useFocusWhenSettled(!decision);
85
129
  let t8;
86
- if ($[9] !== decision || $[10] !== empty) {
87
- t8 = headerStatus(decision, empty);
88
- $[9] = decision;
89
- $[10] = empty;
90
- $[11] = t8;
130
+ if ($[9] !== className) {
131
+ t8 = cn("flex min-w-0 flex-col outline-none gap-3", className);
132
+ $[9] = className;
133
+ $[10] = t8;
91
134
  } else {
92
- t8 = $[11];
135
+ t8 = $[10];
93
136
  }
94
- const {
95
- status,
96
- tone
97
- } = t8;
98
137
  let t9;
99
- if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
100
- t9 = /*#__PURE__*/_jsx(BrainIcon, {
101
- "aria-hidden": true
102
- });
103
- $[12] = t9;
104
- } else {
105
- t9 = $[12];
106
- }
107
- let t10;
108
- if ($[13] !== empty || $[14] !== memories.length) {
109
- t10 = empty ? undefined : pluralize(memories.length, "proposed", "proposed");
110
- $[13] = empty;
111
- $[14] = memories.length;
112
- $[15] = t10;
113
- } else {
114
- t10 = $[15];
115
- }
116
- let t11;
117
- if ($[16] !== status || $[17] !== t10 || $[18] !== tone) {
118
- t11 = /*#__PURE__*/_jsx(PanelHeader, {
119
- icon: t9,
120
- eyebrow: "Memory",
121
- status: status,
122
- tone: tone,
123
- aside: t10
124
- });
125
- $[16] = status;
126
- $[17] = t10;
127
- $[18] = tone;
128
- $[19] = t11;
129
- } else {
130
- t11 = $[19];
131
- }
132
- const t12 = decision ? "text-muted-foreground" : undefined;
133
- let t13;
134
- if ($[20] !== t12 || $[21] !== title) {
135
- t13 = /*#__PURE__*/_jsx(PanelTitle, {
136
- className: t12,
137
- children: title
138
- });
139
- $[20] = t12;
140
- $[21] = title;
141
- $[22] = t13;
142
- } else {
143
- t13 = $[22];
144
- }
145
- let t14;
146
- if ($[23] !== blankEdit || $[24] !== decision || $[25] !== description || $[26] !== drafts || $[27] !== empty || $[28] !== memories || $[29] !== onSubmit || $[30] !== result || $[31] !== sensitiveCount || $[32] !== submitRef) {
147
- t14 = empty ? /*#__PURE__*/_jsx(PanelEmpty, {
148
- icon: /*#__PURE__*/_jsx(BrainIcon, {
149
- "aria-hidden": true
150
- }),
151
- title: "No new memories to review.",
152
- description: "When an agent wants to remember something in LocusGraph, it shows up here."
153
- }) : decision ? /*#__PURE__*/_jsx(PanelBody, {
154
- children: /*#__PURE__*/_jsx(DecisionSummary, {
138
+ if ($[11] !== blankEdit || $[12] !== decision || $[13] !== description || $[14] !== drafts || $[15] !== empty || $[16] !== memories || $[17] !== onSubmit || $[18] !== result || $[19] !== sensitiveCount || $[20] !== submitRef) {
139
+ t9 = empty ? /*#__PURE__*/_jsxs("div", {
140
+ className: lineRowClass,
141
+ children: [/*#__PURE__*/_jsx("span", {
142
+ "aria-hidden": true,
143
+ className: lineMemoryIconClass,
144
+ children: /*#__PURE__*/_jsx(BrainIcon, {
145
+ weight: "bold",
146
+ "aria-hidden": true
147
+ })
148
+ }), /*#__PURE__*/_jsx("span", {
149
+ children: "No new memories to review."
150
+ })]
151
+ }) : decision ? /*#__PURE__*/_jsxs(_Fragment, {
152
+ children: [/*#__PURE__*/_jsx(Headline, {
153
+ count: memories.length,
154
+ decided: true
155
+ }), /*#__PURE__*/_jsx(DecisionSummary, {
155
156
  decision: decision,
156
157
  approvedVerb: "Reviewed",
157
158
  deniedVerb: "Discarded",
158
159
  result: decision.approved ? "Memories reviewed" : "All memories discarded"
159
- })
160
+ })]
160
161
  }) : /*#__PURE__*/_jsxs(_Fragment, {
161
- children: [/*#__PURE__*/_jsxs("p", {
162
- className: "px-5 pt-1 text-sm text-muted-foreground",
162
+ children: [/*#__PURE__*/_jsx(Headline, {
163
+ count: memories.length,
164
+ decided: false
165
+ }), /*#__PURE__*/_jsxs("p", {
166
+ className: "-mt-2 text-sm text-faint",
163
167
  children: [description, sensitiveCount > 0 && /*#__PURE__*/_jsxs("span", {
164
168
  className: "text-warn",
165
169
  children: [" ", pluralize(sensitiveCount, "memory", "memories"), " flagged as sensitive, set to discard."]
166
170
  })]
167
- }), /*#__PURE__*/_jsx(PanelBody, {
168
- className: "pb-0",
169
- children: /*#__PURE__*/_jsx("ul", {
170
- className: "-mx-5 flex flex-col divide-y border-t",
171
- children: memories.map(memory_0 => /*#__PURE__*/_jsx(MemoryRow, {
172
- memory: memory_0,
173
- draft: drafts[memory_0.id] ?? {
174
- choice: "keep",
175
- text: memory_0.text
176
- },
177
- onChange: draft => setDrafts(current => ({
178
- ...current,
179
- [memory_0.id]: draft
180
- }))
181
- }, memory_0.id))
182
- })
183
- }), /*#__PURE__*/_jsxs(PanelFooter, {
184
- className: "justify-between",
185
- children: [blankEdit ? /*#__PURE__*/_jsx("span", {
186
- className: "text-xs text-destructive",
187
- children: "An edited memory can't be empty."
188
- }) : /*#__PURE__*/_jsxs("span", {
189
- className: "hidden font-mono text-[11px] text-muted-foreground tabular-nums sm:inline",
190
- children: [result.kept.length, " kept \xB7 ", result.edited.length, " edited \xB7", " ", result.discarded.length, " discarded"]
191
- }), /*#__PURE__*/_jsx(Button, {
171
+ }), /*#__PURE__*/_jsx("ul", {
172
+ className: "flex flex-col gap-1",
173
+ children: memories.map(memory_0 => /*#__PURE__*/_jsx(MemoryRow, {
174
+ memory: memory_0,
175
+ draft: drafts[memory_0.id] ?? {
176
+ choice: "keep",
177
+ text: memory_0.text
178
+ },
179
+ onChange: draft => setDrafts(current => ({
180
+ ...current,
181
+ [memory_0.id]: draft
182
+ }))
183
+ }, memory_0.id))
184
+ }), /*#__PURE__*/_jsxs("div", {
185
+ className: "flex flex-wrap items-center gap-3 pt-1",
186
+ children: [/*#__PURE__*/_jsx(Button, {
192
187
  ref: submitRef,
193
188
  type: "button",
194
189
  size: "sm",
195
- className: "ml-auto",
196
190
  variant: result.kept.length + result.edited.length === 0 ? "destructive" : "default",
197
191
  disabled: blankEdit,
198
192
  onClick: () => onSubmit(result),
199
193
  children: submitLabel(result)
194
+ }), blankEdit ? /*#__PURE__*/_jsx("span", {
195
+ className: "text-xs text-destructive",
196
+ children: "An edited memory can't be empty."
197
+ }) : /*#__PURE__*/_jsxs("span", {
198
+ className: "text-xs text-faint tabular-nums",
199
+ children: [result.kept.length, " kept \xB7 ", result.edited.length, " edited \xB7", " ", result.discarded.length, " discarded"]
200
200
  })]
201
201
  })]
202
202
  });
203
- $[23] = blankEdit;
204
- $[24] = decision;
205
- $[25] = description;
206
- $[26] = drafts;
207
- $[27] = empty;
208
- $[28] = memories;
209
- $[29] = onSubmit;
210
- $[30] = result;
211
- $[31] = sensitiveCount;
212
- $[32] = submitRef;
213
- $[33] = t14;
203
+ $[11] = blankEdit;
204
+ $[12] = decision;
205
+ $[13] = description;
206
+ $[14] = drafts;
207
+ $[15] = empty;
208
+ $[16] = memories;
209
+ $[17] = onSubmit;
210
+ $[18] = result;
211
+ $[19] = sensitiveCount;
212
+ $[20] = submitRef;
213
+ $[21] = t9;
214
214
  } else {
215
- t14 = $[33];
215
+ t9 = $[21];
216
216
  }
217
- let t15;
218
- if ($[34] !== decision || $[35] !== result) {
219
- t15 = decision ? "Memories reviewed" : resultSummary(result);
220
- $[34] = decision;
221
- $[35] = result;
222
- $[36] = t15;
217
+ let t10;
218
+ if ($[22] !== decision || $[23] !== result) {
219
+ t10 = decision ? "Memories reviewed" : resultSummary(result);
220
+ $[22] = decision;
221
+ $[23] = result;
222
+ $[24] = t10;
223
223
  } else {
224
- t15 = $[36];
224
+ t10 = $[24];
225
225
  }
226
- let t16;
227
- if ($[37] !== t15) {
228
- t16 = /*#__PURE__*/_jsx(LiveStatus, {
229
- message: t15
226
+ let t11;
227
+ if ($[25] !== t10) {
228
+ t11 = /*#__PURE__*/_jsx(LiveStatus, {
229
+ message: t10
230
230
  });
231
- $[37] = t15;
232
- $[38] = t16;
231
+ $[25] = t10;
232
+ $[26] = t11;
233
233
  } else {
234
- t16 = $[38];
234
+ t11 = $[26];
235
235
  }
236
- let t17;
237
- if ($[39] !== className || $[40] !== t11 || $[41] !== t13 || $[42] !== t14 || $[43] !== t16 || $[44] !== title) {
238
- t17 = /*#__PURE__*/_jsxs(ApprovalPanel, {
236
+ let t12;
237
+ if ($[27] !== settleRef || $[28] !== t11 || $[29] !== t8 || $[30] !== t9 || $[31] !== title) {
238
+ t12 = /*#__PURE__*/_jsxs("section", {
239
+ ref: settleRef,
240
+ tabIndex: -1,
239
241
  "data-slot": "memory-review",
240
242
  "aria-label": title,
241
- className: className,
242
- children: [t11, t13, t14, t16]
243
+ className: t8,
244
+ children: [t9, t11]
243
245
  });
244
- $[39] = className;
245
- $[40] = t11;
246
- $[41] = t13;
247
- $[42] = t14;
248
- $[43] = t16;
249
- $[44] = title;
250
- $[45] = t17;
246
+ $[27] = settleRef;
247
+ $[28] = t11;
248
+ $[29] = t8;
249
+ $[30] = t9;
250
+ $[31] = title;
251
+ $[32] = t12;
251
252
  } else {
252
- t17 = $[45];
253
+ t12 = $[32];
253
254
  }
254
- return t17;
255
+ return t12;
255
256
  }
256
257
  function _temp(memory) {
257
258
  return memory.sensitive;
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
3
  import { c as _c } from "react/compiler-runtime";
4
- import { ShieldAlert as ShieldAlertIcon } from "@carbon/icons-react";
5
4
  import { cn, Textarea } from "@locusgraph/components";
5
+ import { ShieldWarning as ShieldAlertIcon } from "@phosphor-icons/react/ssr";
6
6
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
7
  const choiceLabels = {
8
8
  keep: "Keep",
@@ -11,9 +11,9 @@ const choiceLabels = {
11
11
  };
12
12
  const choices = ["keep", "edit", "discard"];
13
13
  const selectedChoiceClass = {
14
- keep: "text-foreground shadow-[inset_0_-2px_0_var(--color-primary)]",
15
- edit: "text-foreground shadow-[inset_0_-2px_0_var(--color-primary)]",
16
- discard: "text-destructive shadow-[inset_0_-2px_0_var(--color-destructive)]"
14
+ keep: "text-memory",
15
+ edit: "text-foreground",
16
+ discard: "text-destructive"
17
17
  };
18
18
  function ChoiceSegments(t0) {
19
19
  const $ = _c(6);
@@ -39,7 +39,7 @@ function ChoiceSegments(t0) {
39
39
  type: "button",
40
40
  "aria-pressed": pressed,
41
41
  onClick: () => onChange(choice),
42
- className: cn("h-7 px-2 text-xs outline-none motion-safe:transition-colors focus-visible:z-10 focus-visible:ring-2 focus-visible:ring-ring/70", pressed ? cn("font-medium", selectedChoiceClass[choice]) : "text-muted-foreground hover:text-foreground"),
42
+ className: cn("text-xs locus-focus-ring motion-safe:transition-colors", pressed ? cn("font-medium", selectedChoiceClass[choice]) : "text-faint hover:text-interactive"),
43
43
  children: choiceLabels[choice]
44
44
  }, choice);
45
45
  });
@@ -52,7 +52,7 @@ function ChoiceSegments(t0) {
52
52
  let t3;
53
53
  if ($[4] !== t2) {
54
54
  t3 = /*#__PURE__*/_jsxs("fieldset", {
55
- className: "flex shrink-0 gap-1 self-start",
55
+ className: "flex shrink-0 gap-3 self-start pt-0.5",
56
56
  children: [t1, t2]
57
57
  });
58
58
  $[4] = t2;
@@ -69,6 +69,7 @@ function SensitiveMarker() {
69
69
  t0 = /*#__PURE__*/_jsxs("span", {
70
70
  className: "flex items-center gap-1 text-warn",
71
71
  children: [/*#__PURE__*/_jsx(ShieldAlertIcon, {
72
+ weight: "bold",
72
73
  "aria-hidden": true,
73
74
  className: "size-3"
74
75
  }), "Sensitive"]
@@ -80,7 +81,7 @@ function SensitiveMarker() {
80
81
  return t0;
81
82
  }
82
83
  export function MemoryRow(t0) {
83
- const $ = _c(35);
84
+ const $ = _c(33);
84
85
  const {
85
86
  memory,
86
87
  draft,
@@ -90,93 +91,92 @@ export function MemoryRow(t0) {
90
91
  const editing = draft.choice === "edit";
91
92
  const t1 = draft.choice;
92
93
  const t2 = memory.sensitive || undefined;
93
- const t3 = editing ? "bg-accent/30" : "hover:bg-accent/30";
94
- let t4;
95
- if ($[0] !== t3) {
96
- t4 = cn("flex flex-col gap-2 px-5 py-2.5 motion-safe:transition-colors", t3);
94
+ let t3;
95
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
96
+ t3 = cn("flex flex-col gap-2 py-1.5");
97
97
  $[0] = t3;
98
- $[1] = t4;
99
98
  } else {
100
- t4 = $[1];
99
+ t3 = $[0];
101
100
  }
102
- let t5;
103
- if ($[2] !== memory.kind || $[3] !== memory.sensitive) {
104
- t5 = (memory.kind || memory.sensitive) && /*#__PURE__*/_jsxs("span", {
105
- className: "locus-eyebrow flex items-center gap-2",
101
+ let t4;
102
+ if ($[1] !== memory.kind || $[2] !== memory.sensitive) {
103
+ t4 = (memory.kind || memory.sensitive) && /*#__PURE__*/_jsxs("span", {
104
+ className: "flex items-center gap-2 text-xs text-faint",
106
105
  children: [memory.kind && /*#__PURE__*/_jsx("span", {
106
+ className: "capitalize",
107
107
  children: memory.kind
108
108
  }), memory.sensitive && /*#__PURE__*/_jsx(SensitiveMarker, {})]
109
109
  });
110
- $[2] = memory.kind;
111
- $[3] = memory.sensitive;
112
- $[4] = t5;
110
+ $[1] = memory.kind;
111
+ $[2] = memory.sensitive;
112
+ $[3] = t4;
113
113
  } else {
114
- t5 = $[4];
114
+ t4 = $[3];
115
115
  }
116
- let t6;
117
- if ($[5] !== discarded || $[6] !== editing || $[7] !== memory.text) {
118
- t6 = !editing && /*#__PURE__*/_jsx("p", {
119
- className: cn("text-sm", discarded && "text-muted-foreground line-through decoration-muted-foreground/60"),
116
+ let t5;
117
+ if ($[4] !== discarded || $[5] !== editing || $[6] !== memory.text) {
118
+ t5 = !editing && /*#__PURE__*/_jsx("p", {
119
+ className: cn("text-sm text-foreground", discarded && "text-faint line-through decoration-faint"),
120
120
  children: memory.text
121
121
  });
122
- $[5] = discarded;
123
- $[6] = editing;
124
- $[7] = memory.text;
125
- $[8] = t6;
122
+ $[4] = discarded;
123
+ $[5] = editing;
124
+ $[6] = memory.text;
125
+ $[7] = t5;
126
126
  } else {
127
- t6 = $[8];
127
+ t5 = $[7];
128
128
  }
129
- let t7;
130
- if ($[9] !== t5 || $[10] !== t6) {
131
- t7 = /*#__PURE__*/_jsxs("div", {
129
+ let t6;
130
+ if ($[8] !== t4 || $[9] !== t5) {
131
+ t6 = /*#__PURE__*/_jsxs("div", {
132
132
  className: "flex min-w-0 flex-1 flex-col gap-1",
133
- children: [t5, t6]
133
+ children: [t4, t5]
134
134
  });
135
+ $[8] = t4;
135
136
  $[9] = t5;
136
137
  $[10] = t6;
137
- $[11] = t7;
138
138
  } else {
139
- t7 = $[11];
139
+ t6 = $[10];
140
140
  }
141
- let t8;
142
- if ($[12] !== draft || $[13] !== onChange) {
143
- t8 = choice => onChange({
141
+ let t7;
142
+ if ($[11] !== draft || $[12] !== onChange) {
143
+ t7 = choice => onChange({
144
144
  ...draft,
145
145
  choice
146
146
  });
147
- $[12] = draft;
148
- $[13] = onChange;
149
- $[14] = t8;
147
+ $[11] = draft;
148
+ $[12] = onChange;
149
+ $[13] = t7;
150
150
  } else {
151
- t8 = $[14];
151
+ t7 = $[13];
152
152
  }
153
- let t9;
154
- if ($[15] !== draft.choice || $[16] !== t8) {
155
- t9 = /*#__PURE__*/_jsx(ChoiceSegments, {
153
+ let t8;
154
+ if ($[14] !== draft.choice || $[15] !== t7) {
155
+ t8 = /*#__PURE__*/_jsx(ChoiceSegments, {
156
156
  value: draft.choice,
157
- onChange: t8
157
+ onChange: t7
158
158
  });
159
- $[15] = draft.choice;
159
+ $[14] = draft.choice;
160
+ $[15] = t7;
160
161
  $[16] = t8;
161
- $[17] = t9;
162
162
  } else {
163
- t9 = $[17];
163
+ t8 = $[16];
164
164
  }
165
- let t10;
166
- if ($[18] !== t7 || $[19] !== t9) {
167
- t10 = /*#__PURE__*/_jsxs("div", {
165
+ let t9;
166
+ if ($[17] !== t6 || $[18] !== t8) {
167
+ t9 = /*#__PURE__*/_jsxs("div", {
168
168
  className: "flex items-start gap-3",
169
- children: [t7, t9]
169
+ children: [t6, t8]
170
170
  });
171
- $[18] = t7;
171
+ $[17] = t6;
172
+ $[18] = t8;
172
173
  $[19] = t9;
173
- $[20] = t10;
174
174
  } else {
175
- t10 = $[20];
175
+ t9 = $[19];
176
176
  }
177
- let t11;
178
- if ($[21] !== draft || $[22] !== editing || $[23] !== onChange) {
179
- t11 = editing && /*#__PURE__*/_jsx(Textarea, {
177
+ let t10;
178
+ if ($[20] !== draft || $[21] !== editing || $[22] !== onChange) {
179
+ t10 = editing && /*#__PURE__*/_jsx(Textarea, {
180
180
  "aria-label": "Memory text",
181
181
  value: draft.text,
182
182
  "aria-invalid": draft.text.trim() === "" || undefined,
@@ -184,45 +184,44 @@ export function MemoryRow(t0) {
184
184
  ...draft,
185
185
  text: event.target.value
186
186
  }),
187
- className: "min-h-16 text-sm"
187
+ className: "min-h-16 border-transparent bg-muted text-sm shadow-none dark:bg-muted"
188
188
  });
189
- $[21] = draft;
190
- $[22] = editing;
191
- $[23] = onChange;
192
- $[24] = t11;
189
+ $[20] = draft;
190
+ $[21] = editing;
191
+ $[22] = onChange;
192
+ $[23] = t10;
193
193
  } else {
194
- t11 = $[24];
194
+ t10 = $[23];
195
195
  }
196
- let t12;
197
- if ($[25] !== discarded || $[26] !== memory.sensitive) {
198
- t12 = memory.sensitive && !discarded && /*#__PURE__*/_jsx("p", {
196
+ let t11;
197
+ if ($[24] !== discarded || $[25] !== memory.sensitive) {
198
+ t11 = memory.sensitive && !discarded && /*#__PURE__*/_jsx("p", {
199
199
  className: "text-xs text-warn",
200
200
  children: "This looks like personal or secret data. Keep it only if the agent should remember it."
201
201
  });
202
- $[25] = discarded;
203
- $[26] = memory.sensitive;
204
- $[27] = t12;
202
+ $[24] = discarded;
203
+ $[25] = memory.sensitive;
204
+ $[26] = t11;
205
205
  } else {
206
- t12 = $[27];
206
+ t11 = $[26];
207
207
  }
208
- let t13;
209
- if ($[28] !== draft.choice || $[29] !== t10 || $[30] !== t11 || $[31] !== t12 || $[32] !== t2 || $[33] !== t4) {
210
- t13 = /*#__PURE__*/_jsxs("li", {
208
+ let t12;
209
+ if ($[27] !== draft.choice || $[28] !== t10 || $[29] !== t11 || $[30] !== t2 || $[31] !== t9) {
210
+ t12 = /*#__PURE__*/_jsxs("li", {
211
211
  "data-slot": "memory-review-item",
212
212
  "data-choice": t1,
213
213
  "data-sensitive": t2,
214
- className: t4,
215
- children: [t10, t11, t12]
214
+ className: t3,
215
+ children: [t9, t10, t11]
216
216
  });
217
- $[28] = draft.choice;
218
- $[29] = t10;
219
- $[30] = t11;
220
- $[31] = t12;
221
- $[32] = t2;
222
- $[33] = t4;
223
- $[34] = t13;
217
+ $[27] = draft.choice;
218
+ $[28] = t10;
219
+ $[29] = t11;
220
+ $[30] = t2;
221
+ $[31] = t9;
222
+ $[32] = t12;
224
223
  } else {
225
- t13 = $[34];
224
+ t12 = $[32];
226
225
  }
227
- return t13;
226
+ return t12;
228
227
  }