opencode-backlog 0.1.3 → 0.1.5

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/tui.js CHANGED
@@ -1,243 +1,367 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@opentui/solid/jsx-runtime";
1
+ import { insert as _$insert } from "@opentui/solid";
2
+ import { setProp as _$setProp } from "@opentui/solid";
3
+ import { effect as _$effect } from "@opentui/solid";
4
+ import { memo as _$memo } from "@opentui/solid";
5
+ import { createComponent as _$createComponent } from "@opentui/solid";
6
+ import { createTextNode as _$createTextNode } from "@opentui/solid";
7
+ import { insertNode as _$insertNode } from "@opentui/solid";
8
+ import { createElement as _$createElement } from "@opentui/solid";
2
9
  import { randomUUID } from "node:crypto";
3
10
  import { watch } from "node:fs";
4
11
  import { join } from "node:path";
5
12
  import { Plugin } from "@opencode-ai/plugin/tui";
6
13
  import { createMemo, createSignal, For, onCleanup, Show } from "solid-js";
7
- import { BACKLOG_FILE, EMPTY_BACKLOG, STATUSES, moveItem, } from "./backlog.js";
14
+ import { BACKLOG_FILE, EMPTY_BACKLOG, STATUSES, moveItem } from "./backlog.js";
8
15
  import { readBacklog, readBacklogSync, updateBacklog } from "./store.js";
9
16
  function statusLabel(status) {
10
- if (status === "todo")
11
- return "Todo";
12
- if (status === "doing")
13
- return "Doing";
14
- return "Done";
17
+ if (status === "todo") return "Todo";
18
+ if (status === "doing") return "Doing";
19
+ return "Done";
15
20
  }
16
21
  function readSnapshot(directory) {
17
- try {
18
- return { backlog: readBacklogSync(join(directory, BACKLOG_FILE)) };
19
- }
20
- catch (cause) {
21
- return {
22
- backlog: EMPTY_BACKLOG,
23
- error: cause instanceof Error ? cause.message : String(cause),
24
- };
25
- }
22
+ try {
23
+ return {
24
+ backlog: readBacklogSync(join(directory, BACKLOG_FILE))
25
+ };
26
+ } catch (cause) {
27
+ return {
28
+ backlog: EMPTY_BACKLOG,
29
+ error: cause instanceof Error ? cause.message : String(cause)
30
+ };
31
+ }
26
32
  }
27
33
  function BacklogView(props) {
28
- const theme = props.context.theme;
29
- const [snapshot, setSnapshot] = createSignal(readSnapshot(props.directory));
30
- const backlog = createMemo(() => snapshot().backlog);
31
- const error = createMemo(() => snapshot().error);
32
- let refresh;
33
- const watcher = watch(props.directory, { persistent: false }, () => {
34
- clearTimeout(refresh);
35
- refresh = setTimeout(() => setSnapshot(readSnapshot(props.directory)), 50);
36
- });
37
- onCleanup(() => {
38
- clearTimeout(refresh);
39
- watcher.close();
40
- });
41
- const color = (status) => {
42
- if (status === "doing")
43
- return theme.text.feedback.warning.default;
44
- if (status === "done")
45
- return theme.text.feedback.success.default;
46
- return theme.text.subdued;
47
- };
48
- return (_jsxs("box", { children: [_jsx("text", { fg: theme.text.default, children: _jsx("b", { children: "Backlog" }) }), _jsx(Show, { when: error(), children: (message) => _jsx("text", { fg: theme.text.feedback.error.default, children: message() }) }), _jsx(Show, { when: !error() && backlog().items.length === 0, children: _jsx("text", { fg: theme.text.subdued, children: "No tasks" }) }), _jsx(For, { each: STATUSES, children: (status) => {
49
- const items = createMemo(() => backlog().items.filter((item) => item.status === status));
50
- return (_jsx(Show, { when: items().length > 0, children: _jsxs("box", { marginTop: 1, children: [_jsxs("text", { fg: color(status), children: [_jsx("b", { children: statusLabel(status) }), " (", items().length, ")"] }), _jsx(For, { each: items(), children: (item) => (_jsxs("box", { flexDirection: "row", gap: 1, minWidth: 0, children: [_jsx("text", { fg: color(status), flexShrink: 0, children: status === "done" ? "✓" : status === "doing" ? "●" : "○" }), _jsx("text", { fg: theme.text.default, wrapMode: "none", truncate: true, flexGrow: 1, minWidth: 0, children: item.title })] })) })] }) }));
51
- } })] }));
34
+ const theme = props.context.theme;
35
+ const [snapshot, setSnapshot] = createSignal(readSnapshot(props.directory));
36
+ const backlog = createMemo(() => snapshot().backlog);
37
+ const error = createMemo(() => snapshot().error);
38
+ let refresh;
39
+ const watcher = watch(props.directory, {
40
+ persistent: false
41
+ }, () => {
42
+ clearTimeout(refresh);
43
+ refresh = setTimeout(() => {
44
+ setSnapshot(readSnapshot(props.directory));
45
+ }, 50);
46
+ });
47
+ onCleanup(() => {
48
+ clearTimeout(refresh);
49
+ watcher.close();
50
+ });
51
+ const color = status => {
52
+ if (status === "doing") return theme.text.feedback.warning.default;
53
+ if (status === "done") return theme.text.feedback.success.default;
54
+ return theme.text.subdued;
55
+ };
56
+ return (() => {
57
+ var _el$ = _$createElement("box"),
58
+ _el$2 = _$createElement("text"),
59
+ _el$3 = _$createElement("b");
60
+ _$insertNode(_el$, _el$2);
61
+ _$insertNode(_el$2, _el$3);
62
+ _$insertNode(_el$3, _$createTextNode(`Backlog`));
63
+ _$insert(_el$, _$createComponent(Show, {
64
+ get when() {
65
+ return error();
66
+ },
67
+ children: message => (() => {
68
+ var _el$7 = _$createElement("text");
69
+ _$insert(_el$7, message);
70
+ _$effect(_$p => _$setProp(_el$7, "fg", theme.text.feedback.error.default, _$p));
71
+ return _el$7;
72
+ })()
73
+ }), null);
74
+ _$insert(_el$, _$createComponent(Show, {
75
+ get when() {
76
+ return _$memo(() => !!!error())() && backlog().items.length === 0;
77
+ },
78
+ get children() {
79
+ var _el$5 = _$createElement("text");
80
+ _$insertNode(_el$5, _$createTextNode(`No tasks`));
81
+ _$effect(_$p => _$setProp(_el$5, "fg", theme.text.subdued, _$p));
82
+ return _el$5;
83
+ }
84
+ }), null);
85
+ _$insert(_el$, _$createComponent(For, {
86
+ each: STATUSES,
87
+ children: status => {
88
+ const items = createMemo(() => backlog().items.filter(item => item.status === status));
89
+ return _$createComponent(Show, {
90
+ get when() {
91
+ return items().length > 0;
92
+ },
93
+ get children() {
94
+ var _el$8 = _$createElement("box"),
95
+ _el$9 = _$createElement("text"),
96
+ _el$0 = _$createElement("b"),
97
+ _el$1 = _$createTextNode(` (`),
98
+ _el$10 = _$createTextNode(`)`);
99
+ _$insertNode(_el$8, _el$9);
100
+ _$setProp(_el$8, "marginTop", 1);
101
+ _$insertNode(_el$9, _el$0);
102
+ _$insertNode(_el$9, _el$1);
103
+ _$insertNode(_el$9, _el$10);
104
+ _$insert(_el$0, () => statusLabel(status));
105
+ _$insert(_el$9, () => items().length, _el$10);
106
+ _$insert(_el$8, _$createComponent(For, {
107
+ get each() {
108
+ return items();
109
+ },
110
+ children: item => (() => {
111
+ var _el$11 = _$createElement("box"),
112
+ _el$12 = _$createElement("text"),
113
+ _el$13 = _$createElement("text");
114
+ _$insertNode(_el$11, _el$12);
115
+ _$insertNode(_el$11, _el$13);
116
+ _$setProp(_el$11, "flexDirection", "row");
117
+ _$setProp(_el$11, "gap", 1);
118
+ _$setProp(_el$11, "minWidth", 0);
119
+ _$setProp(_el$12, "flexShrink", 0);
120
+ _$insert(_el$12, status === "done" ? "✓" : status === "doing" ? "●" : "○");
121
+ _$setProp(_el$13, "wrapMode", "none");
122
+ _$setProp(_el$13, "truncate", true);
123
+ _$setProp(_el$13, "flexGrow", 1);
124
+ _$setProp(_el$13, "minWidth", 0);
125
+ _$insert(_el$13, () => item.title);
126
+ _$effect(_p$ => {
127
+ var _v$ = color(status),
128
+ _v$2 = theme.text.default;
129
+ _v$ !== _p$.e && (_p$.e = _$setProp(_el$12, "fg", _v$, _p$.e));
130
+ _v$2 !== _p$.t && (_p$.t = _$setProp(_el$13, "fg", _v$2, _p$.t));
131
+ return _p$;
132
+ }, {
133
+ e: undefined,
134
+ t: undefined
135
+ });
136
+ return _el$11;
137
+ })()
138
+ }), null);
139
+ _$effect(_$p => _$setProp(_el$9, "fg", color(status), _$p));
140
+ return _el$8;
141
+ }
142
+ });
143
+ }
144
+ }), null);
145
+ _$effect(_$p => _$setProp(_el$2, "fg", theme.text.default, _$p));
146
+ return _el$;
147
+ })();
52
148
  }
53
149
  function taskDetails(item) {
54
- return [`Status: ${statusLabel(item.status)}`, `ID: ${item.id}`, "", item.notes ?? "No notes"].join("\n");
150
+ return [`Status: ${statusLabel(item.status)}`, `ID: ${item.id}`, "", item.notes ?? "No notes"].join("\n");
55
151
  }
56
152
  async function browseBacklog(context) {
57
- return browseBacklogWithState(context, () => { });
153
+ return browseBacklogWithState(context, () => {});
58
154
  }
59
155
  function backlogLocation(context) {
60
- const route = context.ui.router.current();
61
- const location = route.type === "session" ? context.data.session.get(route.sessionID)?.location : context.location;
62
- const directory = location?.directory ?? context.data.location.default().directory;
63
- return { directory, path: join(directory, BACKLOG_FILE) };
156
+ const route = context.ui.router.current();
157
+ const location = route.type === "session" ? context.data.session.get(route.sessionID)?.location : context.location;
158
+ const directory = location?.directory ?? context.data.location.default().directory;
159
+ return {
160
+ directory,
161
+ path: join(directory, BACKLOG_FILE)
162
+ };
64
163
  }
65
164
  async function addBacklogItem(context) {
66
- const title = await context.ui.dialog.prompt({
67
- title: "New backlog task",
68
- placeholder: "Task title",
69
- });
70
- if (!title?.trim())
71
- return;
72
- const notes = await context.ui.dialog.prompt({
73
- title: title.trim(),
74
- description: "Optional notes",
75
- placeholder: "Leave empty for no notes",
76
- });
77
- if (notes === undefined)
78
- return;
79
- const item = {
80
- id: randomUUID(),
81
- title: title.trim(),
82
- ...(notes.trim() ? { notes: notes.trim() } : {}),
83
- status: "todo",
84
- };
85
- const { path } = backlogLocation(context);
86
- await updateBacklog(path, (current) => ({
87
- version: 1,
88
- items: moveItem([...current.items, item], item.id, "todo", 0),
89
- }));
90
- context.ui.toast.show({ message: `Added "${item.title}".`, variant: "success" });
165
+ const title = await context.ui.dialog.prompt({
166
+ title: "New backlog task",
167
+ placeholder: "Task title"
168
+ });
169
+ if (!title?.trim()) return;
170
+ const notes = await context.ui.dialog.prompt({
171
+ title: title.trim(),
172
+ description: "Optional notes",
173
+ placeholder: "Leave empty for no notes"
174
+ });
175
+ if (notes === undefined) return;
176
+ const item = {
177
+ id: randomUUID(),
178
+ title: title.trim(),
179
+ ...(notes.trim() ? {
180
+ notes: notes.trim()
181
+ } : {}),
182
+ status: "todo"
183
+ };
184
+ const {
185
+ path
186
+ } = backlogLocation(context);
187
+ await updateBacklog(path, current => ({
188
+ version: 1,
189
+ items: moveItem([...current.items, item], item.id, "todo", 0)
190
+ }));
191
+ context.ui.toast.show({
192
+ message: `Added "${item.title}".`,
193
+ variant: "success"
194
+ });
91
195
  }
92
196
  async function moveBacklogItem(context) {
93
- const { path } = backlogLocation(context);
94
- const backlog = await readBacklog(path);
95
- if (backlog.items.length === 0) {
96
- await context.ui.dialog.alert({ title: "Backlog", message: "No tasks" });
97
- return;
98
- }
99
- const id = await context.ui.dialog.select({
100
- title: "Move backlog task",
101
- placeholder: "Select a task to move",
102
- options: backlog.items.map((item) => ({
103
- title: item.title,
104
- value: item.id,
105
- ...(item.notes === undefined ? {} : { description: item.notes }),
106
- category: statusLabel(item.status),
107
- })),
108
- });
109
- if (!id)
110
- return;
111
- const item = backlog.items.find((candidate) => candidate.id === id);
112
- if (!item)
113
- return;
114
- const status = await context.ui.dialog.select({
115
- title: `Change status: ${item.title}`,
116
- current: item.status,
117
- options: STATUSES.map((candidate) => ({
118
- title: statusLabel(candidate),
119
- value: candidate,
120
- ...(candidate === item.status ? { description: "Current status" } : {}),
121
- })),
197
+ const {
198
+ path
199
+ } = backlogLocation(context);
200
+ const backlog = await readBacklog(path);
201
+ if (backlog.items.length === 0) {
202
+ await context.ui.dialog.alert({
203
+ title: "Backlog",
204
+ message: "No tasks"
122
205
  });
123
- if (!status || status === item.status)
124
- return;
125
- await updateBacklog(path, (current) => ({
126
- version: 1,
127
- items: moveItem(current.items, item.id, status, undefined),
128
- }));
129
- context.ui.toast.show({ message: `Moved "${item.title}" to ${statusLabel(status)}.`, variant: "success" });
206
+ return;
207
+ }
208
+ const id = await context.ui.dialog.select({
209
+ title: "Move backlog task",
210
+ placeholder: "Select a task to move",
211
+ options: backlog.items.map(item => ({
212
+ title: item.title,
213
+ value: item.id,
214
+ ...(item.notes === undefined ? {} : {
215
+ description: item.notes
216
+ }),
217
+ category: statusLabel(item.status)
218
+ }))
219
+ });
220
+ if (!id) return;
221
+ const item = backlog.items.find(candidate => candidate.id === id);
222
+ if (!item) return;
223
+ const status = await context.ui.dialog.select({
224
+ title: `Change status: ${item.title}`,
225
+ current: item.status,
226
+ options: STATUSES.map(candidate => ({
227
+ title: statusLabel(candidate),
228
+ value: candidate,
229
+ ...(candidate === item.status ? {
230
+ description: "Current status"
231
+ } : {})
232
+ }))
233
+ });
234
+ if (!status || status === item.status) return;
235
+ await updateBacklog(path, current => ({
236
+ version: 1,
237
+ items: moveItem(current.items, item.id, status, undefined)
238
+ }));
239
+ context.ui.toast.show({
240
+ message: `Moved "${item.title}" to ${statusLabel(status)}.`,
241
+ variant: "success"
242
+ });
130
243
  }
131
244
  async function browseBacklogWithState(context, setOpen) {
132
- const { path } = backlogLocation(context);
133
- const backlog = await readBacklog(path);
134
- if (backlog.items.length === 0) {
135
- await context.ui.dialog.alert({ title: "Backlog", message: "No tasks" });
136
- return;
137
- }
138
- setOpen(true);
139
- const id = await context.ui.dialog
140
- .select({
141
- title: "Backlog (n: new task)",
142
- placeholder: "Select a task",
143
- options: backlog.items.map((item) => ({
144
- title: item.title,
145
- value: item.id,
146
- ...(item.notes === undefined ? {} : { description: item.notes }),
147
- category: statusLabel(item.status),
148
- })),
149
- })
150
- .finally(() => setOpen(false));
151
- if (!id)
152
- return;
153
- const item = backlog.items.find((candidate) => candidate.id === id);
154
- if (!item)
155
- return;
156
- await context.ui.dialog.alert({ title: item.title, message: taskDetails(item) });
245
+ const {
246
+ path
247
+ } = backlogLocation(context);
248
+ const backlog = await readBacklog(path);
249
+ if (backlog.items.length === 0) {
250
+ await context.ui.dialog.alert({
251
+ title: "Backlog",
252
+ message: "No tasks"
253
+ });
254
+ return;
255
+ }
256
+ setOpen(true);
257
+ const id = await context.ui.dialog.select({
258
+ title: "Backlog (n: new task)",
259
+ placeholder: "Select a task",
260
+ options: backlog.items.map(item => ({
261
+ title: item.title,
262
+ value: item.id,
263
+ ...(item.notes === undefined ? {} : {
264
+ description: item.notes
265
+ }),
266
+ category: statusLabel(item.status)
267
+ }))
268
+ }).finally(() => setOpen(false));
269
+ if (!id) return;
270
+ const item = backlog.items.find(candidate => candidate.id === id);
271
+ if (!item) return;
272
+ await context.ui.dialog.alert({
273
+ title: item.title,
274
+ message: taskDetails(item)
275
+ });
157
276
  }
158
277
  function Commands(props) {
159
- const [browseOpen, setBrowseOpen] = createSignal(false);
160
- const run = async (operation) => {
161
- try {
162
- await operation();
163
- }
164
- catch (cause) {
165
- props.context.ui.toast.show({
166
- message: cause instanceof Error ? cause.message : String(cause),
167
- variant: "error",
168
- });
169
- }
170
- };
171
- props.context.keymap.layer(() => ({
172
- mode: "global",
173
- commands: [
174
- {
175
- id: "backlog.browse",
176
- title: "Browse backlog",
177
- description: "View backlog tasks and change their status",
178
- group: "Backlog",
179
- palette: true,
180
- slash: { name: "backlog", aliases: ["tasks"] },
181
- run: () => run(() => browseBacklogWithState(props.context, setBrowseOpen)),
182
- },
183
- {
184
- id: "backlog.add",
185
- title: "Add backlog task",
186
- description: "Create a Todo task at the top of the backlog",
187
- group: "Backlog",
188
- palette: true,
189
- slash: { name: "backlog-add", aliases: ["task-add"] },
190
- run: () => run(() => addBacklogItem(props.context)),
191
- },
192
- {
193
- id: "backlog.move",
194
- title: "Move backlog task",
195
- description: "Change a backlog task state",
196
- group: "Backlog",
197
- palette: true,
198
- slash: { name: "backlog-move", aliases: ["task-move"] },
199
- run: () => run(() => moveBacklogItem(props.context)),
200
- },
201
- ],
202
- }));
203
- props.context.keymap.layer(() => ({
204
- mode: "modal",
205
- enabled: browseOpen,
206
- priority: 100,
207
- commands: [
208
- {
209
- bind: "n",
210
- title: "New backlog task",
211
- group: "Backlog",
212
- run() {
213
- setBrowseOpen(false);
214
- return run(() => addBacklogItem(props.context));
215
- },
216
- },
217
- ],
218
- }));
219
- return null;
278
+ const [browseOpen, setBrowseOpen] = createSignal(false);
279
+ const run = async operation => {
280
+ try {
281
+ await operation();
282
+ } catch (cause) {
283
+ props.context.ui.toast.show({
284
+ message: cause instanceof Error ? cause.message : String(cause),
285
+ variant: "error"
286
+ });
287
+ }
288
+ };
289
+ props.context.keymap.layer(() => ({
290
+ mode: "global",
291
+ commands: [{
292
+ id: "backlog.browse",
293
+ title: "Browse backlog",
294
+ description: "View backlog tasks and change their status",
295
+ group: "Backlog",
296
+ palette: true,
297
+ slash: {
298
+ name: "backlog",
299
+ aliases: ["tasks"]
300
+ },
301
+ run: () => run(() => browseBacklogWithState(props.context, setBrowseOpen))
302
+ }, {
303
+ id: "backlog.add",
304
+ title: "Add backlog task",
305
+ description: "Create a Todo task at the top of the backlog",
306
+ group: "Backlog",
307
+ palette: true,
308
+ slash: {
309
+ name: "backlog-add",
310
+ aliases: ["task-add"]
311
+ },
312
+ run: () => run(() => addBacklogItem(props.context))
313
+ }, {
314
+ id: "backlog.move",
315
+ title: "Move backlog task",
316
+ description: "Change a backlog task state",
317
+ group: "Backlog",
318
+ palette: true,
319
+ slash: {
320
+ name: "backlog-move",
321
+ aliases: ["task-move"]
322
+ },
323
+ run: () => run(() => moveBacklogItem(props.context))
324
+ }]
325
+ }));
326
+ props.context.keymap.layer(() => ({
327
+ mode: "modal",
328
+ enabled: browseOpen,
329
+ priority: 100,
330
+ commands: [{
331
+ bind: "n",
332
+ title: "New backlog task",
333
+ group: "Backlog",
334
+ run() {
335
+ setBrowseOpen(false);
336
+ return run(() => addBacklogItem(props.context));
337
+ }
338
+ }]
339
+ }));
340
+ return null;
220
341
  }
221
342
  export default Plugin.define({
222
- id: "opencode.backlog.tui",
223
- setup(context) {
224
- const releaseCommands = context.ui.slot({
225
- append: "app",
226
- render: () => _jsx(Commands, { context: context }),
227
- });
228
- const releaseSlot = context.ui.slot({
229
- append: "sidebar.content",
230
- render: (props) => {
231
- const directory = context.data.session.get(props.sessionID)?.location.directory;
232
- if (!directory)
233
- return null;
234
- return _jsx(BacklogView, { context: context, directory: directory });
235
- },
343
+ id: "opencode.backlog.tui",
344
+ setup(context) {
345
+ const releaseCommands = context.ui.slot({
346
+ append: "app",
347
+ render: () => _$createComponent(Commands, {
348
+ context: context
349
+ })
350
+ });
351
+ const releaseSlot = context.ui.slot({
352
+ append: "sidebar.content",
353
+ render: props => {
354
+ const directory = context.data.session.get(props.sessionID)?.location.directory;
355
+ if (!directory) return null;
356
+ return _$createComponent(BacklogView, {
357
+ context: context,
358
+ directory: directory
236
359
  });
237
- return () => {
238
- releaseSlot();
239
- releaseCommands();
240
- };
241
- },
242
- });
243
- //# sourceMappingURL=tui.js.map
360
+ }
361
+ });
362
+ return () => {
363
+ releaseSlot();
364
+ releaseCommands();
365
+ };
366
+ }
367
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-backlog",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Project backlog tools and sidebar for OpenCode 2",
5
5
  "type": "module",
6
6
  "repository": {
@@ -27,7 +27,7 @@
27
27
  "LICENSE"
28
28
  ],
29
29
  "scripts": {
30
- "build": "tsc -p tsconfig.build.json",
30
+ "build": "tsc -p tsconfig.build.json && node script/build-tui.mjs",
31
31
  "check": "tsc -p tsconfig.json --noEmit",
32
32
  "prepack": "npm run build",
33
33
  "test": "npm run build && tsc -p tsconfig.test.json && node --test .test-dist/test/*.test.js"
package/dist/tui.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"tui.js","sourceRoot":"","sources":["../src/tui.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AACzE,OAAO,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,QAAQ,GAIT,MAAM,cAAc,CAAA;AACrB,OAAO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