@spenceriam/impulse 0.15.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.
- package/README.md +194 -0
- package/dist/api/client.d.ts +53 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +271 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/index.d.ts +6 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +7 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/stream.d.ts +98 -0
- package/dist/api/stream.d.ts.map +1 -0
- package/dist/api/stream.js +202 -0
- package/dist/api/stream.js.map +1 -0
- package/dist/api/types.d.ts +1353 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +143 -0
- package/dist/api/types.js.map +1 -0
- package/dist/bash.txt +28 -0
- package/dist/bus/bus.d.ts +21 -0
- package/dist/bus/bus.d.ts.map +1 -0
- package/dist/bus/bus.js +22 -0
- package/dist/bus/bus.js.map +1 -0
- package/dist/bus/events.d.ts +100 -0
- package/dist/bus/events.d.ts.map +1 -0
- package/dist/bus/events.js +45 -0
- package/dist/bus/events.js.map +1 -0
- package/dist/bus/index.d.ts +3 -0
- package/dist/bus/index.d.ts.map +1 -0
- package/dist/bus/index.js +3 -0
- package/dist/bus/index.js.map +1 -0
- package/dist/file-edit.txt +21 -0
- package/dist/file-read.txt +18 -0
- package/dist/file-write.txt +16 -0
- package/dist/glob.txt +19 -0
- package/dist/global.d.ts +8 -0
- package/dist/global.d.ts.map +1 -0
- package/dist/global.js +14 -0
- package/dist/global.js.map +1 -0
- package/dist/grep.txt +20 -0
- package/dist/highlights-eq9cgrbb.scm +604 -0
- package/dist/highlights-ghv9g403.scm +205 -0
- package/dist/highlights-hk7bwhj4.scm +284 -0
- package/dist/highlights-r812a2qc.scm +150 -0
- package/dist/highlights-x6tmsnaa.scm +115 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +62122 -0
- package/dist/index.js.map +1 -0
- package/dist/index.jsx +5 -0
- package/dist/index.jsx.map +1 -0
- package/dist/injections-73j83es3.scm +27 -0
- package/dist/input/at-refs.d.ts +42 -0
- package/dist/input/at-refs.d.ts.map +1 -0
- package/dist/input/at-refs.js +154 -0
- package/dist/input/at-refs.js.map +1 -0
- package/dist/input/history.d.ts +26 -0
- package/dist/input/history.d.ts.map +1 -0
- package/dist/input/history.js +109 -0
- package/dist/input/history.js.map +1 -0
- package/dist/input/index.d.ts +5 -0
- package/dist/input/index.d.ts.map +1 -0
- package/dist/input/index.js +5 -0
- package/dist/input/index.js.map +1 -0
- package/dist/input/paste.d.ts +19 -0
- package/dist/input/paste.d.ts.map +1 -0
- package/dist/input/paste.js +75 -0
- package/dist/input/paste.js.map +1 -0
- package/dist/input/shortcuts.d.ts +6 -0
- package/dist/input/shortcuts.d.ts.map +1 -0
- package/dist/input/shortcuts.js +84 -0
- package/dist/input/shortcuts.js.map +1 -0
- package/dist/mcp/index.d.ts +3 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +3 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/manager.d.ts +51 -0
- package/dist/mcp/manager.d.ts.map +1 -0
- package/dist/mcp/manager.js +158 -0
- package/dist/mcp/manager.js.map +1 -0
- package/dist/mcp/types.d.ts +18 -0
- package/dist/mcp/types.d.ts.map +1 -0
- package/dist/mcp/types.js +5 -0
- package/dist/mcp/types.js.map +1 -0
- package/dist/session/todo.d.ts +24 -0
- package/dist/session/todo.d.ts.map +1 -0
- package/dist/session/todo.js +39 -0
- package/dist/session/todo.js.map +1 -0
- package/dist/storage/index.d.ts +2 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +2 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/storage.d.ts +13 -0
- package/dist/storage/storage.d.ts.map +1 -0
- package/dist/storage/storage.js +84 -0
- package/dist/storage/storage.js.map +1 -0
- package/dist/task.txt +26 -0
- package/dist/todo-read.txt +14 -0
- package/dist/todo-write.txt +166 -0
- package/dist/tools/bash.d.ts +22 -0
- package/dist/tools/bash.d.ts.map +1 -0
- package/dist/tools/bash.js +70 -0
- package/dist/tools/bash.js.map +1 -0
- package/dist/tools/file-edit.d.ts +22 -0
- package/dist/tools/file-edit.d.ts.map +1 -0
- package/dist/tools/file-edit.js +67 -0
- package/dist/tools/file-edit.js.map +1 -0
- package/dist/tools/file-read.d.ts +19 -0
- package/dist/tools/file-read.d.ts.map +1 -0
- package/dist/tools/file-read.js +70 -0
- package/dist/tools/file-read.js.map +1 -0
- package/dist/tools/file-write.d.ts +16 -0
- package/dist/tools/file-write.d.ts.map +1 -0
- package/dist/tools/file-write.js +45 -0
- package/dist/tools/file-write.js.map +1 -0
- package/dist/tools/glob.d.ts +16 -0
- package/dist/tools/glob.d.ts.map +1 -0
- package/dist/tools/glob.js +45 -0
- package/dist/tools/glob.js.map +1 -0
- package/dist/tools/grep.d.ts +19 -0
- package/dist/tools/grep.d.ts.map +1 -0
- package/dist/tools/grep.js +65 -0
- package/dist/tools/grep.js.map +1 -0
- package/dist/tools/index.d.ts +11 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +11 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/registry.d.ts +22 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +75 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/task.d.ts +19 -0
- package/dist/tools/task.d.ts.map +1 -0
- package/dist/tools/task.js +51 -0
- package/dist/tools/task.js.map +1 -0
- package/dist/tools/todo-read.d.ts +7 -0
- package/dist/tools/todo-read.d.ts.map +1 -0
- package/dist/tools/todo-read.js +56 -0
- package/dist/tools/todo-read.js.map +1 -0
- package/dist/tools/todo-write.d.ts +38 -0
- package/dist/tools/todo-write.d.ts.map +1 -0
- package/dist/tools/todo-write.js +40 -0
- package/dist/tools/todo-write.js.map +1 -0
- package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
- package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
- package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
- package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
- package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
- package/dist/ui/App.d.ts +6 -0
- package/dist/ui/App.d.ts.map +1 -0
- package/dist/ui/App.jsx +37 -0
- package/dist/ui/App.jsx.map +1 -0
- package/dist/ui/components/Autocomplete.d.ts +24 -0
- package/dist/ui/components/Autocomplete.d.ts.map +1 -0
- package/dist/ui/components/Autocomplete.jsx +67 -0
- package/dist/ui/components/Autocomplete.jsx.map +1 -0
- package/dist/ui/components/ChatView.d.ts +14 -0
- package/dist/ui/components/ChatView.d.ts.map +1 -0
- package/dist/ui/components/ChatView.jsx +11 -0
- package/dist/ui/components/ChatView.jsx.map +1 -0
- package/dist/ui/components/InputArea.d.ts +18 -0
- package/dist/ui/components/InputArea.d.ts.map +1 -0
- package/dist/ui/components/InputArea.jsx +35 -0
- package/dist/ui/components/InputArea.jsx.map +1 -0
- package/dist/ui/components/MessageBlock.d.ts +21 -0
- package/dist/ui/components/MessageBlock.d.ts.map +1 -0
- package/dist/ui/components/MessageBlock.jsx +94 -0
- package/dist/ui/components/MessageBlock.jsx.map +1 -0
- package/dist/ui/components/Overlay.d.ts +28 -0
- package/dist/ui/components/Overlay.d.ts.map +1 -0
- package/dist/ui/components/Overlay.jsx +102 -0
- package/dist/ui/components/Overlay.jsx.map +1 -0
- package/dist/ui/components/ProgressBar.d.ts +9 -0
- package/dist/ui/components/ProgressBar.d.ts.map +1 -0
- package/dist/ui/components/ProgressBar.jsx +17 -0
- package/dist/ui/components/ProgressBar.jsx.map +1 -0
- package/dist/ui/components/Sidebar.d.ts +22 -0
- package/dist/ui/components/Sidebar.d.ts.map +1 -0
- package/dist/ui/components/Sidebar.jsx +96 -0
- package/dist/ui/components/Sidebar.jsx.map +1 -0
- package/dist/ui/components/StatusLine.d.ts +6 -0
- package/dist/ui/components/StatusLine.d.ts.map +1 -0
- package/dist/ui/components/StatusLine.jsx +32 -0
- package/dist/ui/components/StatusLine.jsx.map +1 -0
- package/dist/ui/components/ThinkingBlock.d.ts +15 -0
- package/dist/ui/components/ThinkingBlock.d.ts.map +1 -0
- package/dist/ui/components/ThinkingBlock.jsx +33 -0
- package/dist/ui/components/ThinkingBlock.jsx.map +1 -0
- package/dist/ui/components/TodoItem.d.ts +22 -0
- package/dist/ui/components/TodoItem.d.ts.map +1 -0
- package/dist/ui/components/TodoItem.jsx +11 -0
- package/dist/ui/components/TodoItem.jsx.map +1 -0
- package/dist/ui/components/ToolBlock.d.ts +27 -0
- package/dist/ui/components/ToolBlock.d.ts.map +1 -0
- package/dist/ui/components/ToolBlock.jsx +76 -0
- package/dist/ui/components/ToolBlock.jsx.map +1 -0
- package/dist/ui/components/index.d.ts +12 -0
- package/dist/ui/components/index.d.ts.map +1 -0
- package/dist/ui/components/index.js +12 -0
- package/dist/ui/components/index.js.map +1 -0
- package/dist/ui/context/index.d.ts +4 -0
- package/dist/ui/context/index.d.ts.map +1 -0
- package/dist/ui/context/index.js +4 -0
- package/dist/ui/context/index.js.map +1 -0
- package/dist/ui/context/mode.d.ts +24 -0
- package/dist/ui/context/mode.d.ts.map +1 -0
- package/dist/ui/context/mode.jsx +53 -0
- package/dist/ui/context/mode.jsx.map +1 -0
- package/dist/ui/context/session.d.ts +43 -0
- package/dist/ui/context/session.d.ts.map +1 -0
- package/dist/ui/context/session.jsx +63 -0
- package/dist/ui/context/session.jsx.map +1 -0
- package/dist/ui/context/todo.d.ts +32 -0
- package/dist/ui/context/todo.d.ts.map +1 -0
- package/dist/ui/context/todo.jsx +75 -0
- package/dist/ui/context/todo.jsx.map +1 -0
- package/dist/ui/design.d.ts +182 -0
- package/dist/ui/design.d.ts.map +1 -0
- package/dist/ui/design.js +189 -0
- package/dist/ui/design.js.map +1 -0
- package/dist/ui/index.d.ts +4 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +3 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/util/config.d.ts +22 -0
- package/dist/util/config.d.ts.map +1 -0
- package/dist/util/config.js +55 -0
- package/dist/util/config.js.map +1 -0
- package/dist/util/instructions.d.ts +39 -0
- package/dist/util/instructions.d.ts.map +1 -0
- package/dist/util/instructions.js +96 -0
- package/dist/util/instructions.js.map +1 -0
- package/dist/util/lock.d.ts +18 -0
- package/dist/util/lock.d.ts.map +1 -0
- package/dist/util/lock.js +65 -0
- package/dist/util/lock.js.map +1 -0
- package/dist/util/logger.d.ts +8 -0
- package/dist/util/logger.d.ts.map +1 -0
- package/dist/util/logger.js +81 -0
- package/dist/util/logger.js.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a new stream state
|
|
3
|
+
*/
|
|
4
|
+
export function createStreamState() {
|
|
5
|
+
return {
|
|
6
|
+
content: "",
|
|
7
|
+
reasoningContent: "",
|
|
8
|
+
role: null,
|
|
9
|
+
toolCalls: new Map(),
|
|
10
|
+
finishReason: null,
|
|
11
|
+
usage: null,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Process a single chunk and update state
|
|
16
|
+
* Returns events generated from this chunk
|
|
17
|
+
*/
|
|
18
|
+
export function processChunk(chunk, state) {
|
|
19
|
+
const events = [];
|
|
20
|
+
for (const choice of chunk.choices) {
|
|
21
|
+
const delta = choice.delta;
|
|
22
|
+
// Update role if present
|
|
23
|
+
if (delta.role) {
|
|
24
|
+
state.role = delta.role;
|
|
25
|
+
}
|
|
26
|
+
// Process content delta
|
|
27
|
+
if (delta.content) {
|
|
28
|
+
state.content += delta.content;
|
|
29
|
+
events.push({ type: "content", delta: delta.content });
|
|
30
|
+
}
|
|
31
|
+
// Process reasoning content (GLM thinking mode)
|
|
32
|
+
if (delta.reasoning_content) {
|
|
33
|
+
state.reasoningContent += delta.reasoning_content;
|
|
34
|
+
events.push({ type: "reasoning", delta: delta.reasoning_content });
|
|
35
|
+
}
|
|
36
|
+
// Process tool calls
|
|
37
|
+
if (delta.tool_calls) {
|
|
38
|
+
for (const tc of delta.tool_calls) {
|
|
39
|
+
const existing = state.toolCalls.get(tc.index);
|
|
40
|
+
if (!existing) {
|
|
41
|
+
// New tool call
|
|
42
|
+
const partial = {
|
|
43
|
+
id: tc.id ?? "",
|
|
44
|
+
functionName: tc.function?.name ?? "",
|
|
45
|
+
functionArguments: tc.function?.arguments ?? "",
|
|
46
|
+
};
|
|
47
|
+
state.toolCalls.set(tc.index, partial);
|
|
48
|
+
if (tc.id && tc.function?.name) {
|
|
49
|
+
events.push({
|
|
50
|
+
type: "tool_call_start",
|
|
51
|
+
index: tc.index,
|
|
52
|
+
id: tc.id,
|
|
53
|
+
name: tc.function.name,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
// Accumulate to existing tool call
|
|
59
|
+
if (tc.id)
|
|
60
|
+
existing.id = tc.id;
|
|
61
|
+
if (tc.function?.name)
|
|
62
|
+
existing.functionName = tc.function.name;
|
|
63
|
+
if (tc.function?.arguments) {
|
|
64
|
+
existing.functionArguments += tc.function.arguments;
|
|
65
|
+
events.push({
|
|
66
|
+
type: "tool_call_delta",
|
|
67
|
+
index: tc.index,
|
|
68
|
+
arguments: tc.function.arguments,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
// Update finish reason
|
|
75
|
+
if (choice.finish_reason) {
|
|
76
|
+
state.finishReason = choice.finish_reason;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
// Update usage if present (usually only on final chunk)
|
|
80
|
+
if (chunk.usage) {
|
|
81
|
+
state.usage = {
|
|
82
|
+
promptTokens: chunk.usage.prompt_tokens,
|
|
83
|
+
completionTokens: chunk.usage.completion_tokens,
|
|
84
|
+
totalTokens: chunk.usage.total_tokens,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
return events;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Convert accumulated tool calls to final format
|
|
91
|
+
*/
|
|
92
|
+
export function getToolCalls(state) {
|
|
93
|
+
const calls = [];
|
|
94
|
+
// Sort by index to maintain order
|
|
95
|
+
const sortedEntries = [...state.toolCalls.entries()].sort((a, b) => a[0] - b[0]);
|
|
96
|
+
for (const [_, partial] of sortedEntries) {
|
|
97
|
+
if (partial.id && partial.functionName) {
|
|
98
|
+
calls.push({
|
|
99
|
+
id: partial.id,
|
|
100
|
+
type: "function",
|
|
101
|
+
function: {
|
|
102
|
+
name: partial.functionName,
|
|
103
|
+
arguments: partial.functionArguments,
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return calls;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Convert stream state to a complete ChatMessage
|
|
112
|
+
*/
|
|
113
|
+
export function stateToMessage(state) {
|
|
114
|
+
const toolCalls = getToolCalls(state);
|
|
115
|
+
return {
|
|
116
|
+
role: state.role ?? "assistant",
|
|
117
|
+
content: state.content || null,
|
|
118
|
+
reasoning_content: state.reasoningContent || undefined,
|
|
119
|
+
tool_calls: toolCalls.length > 0 ? toolCalls : undefined,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* High-level stream processor that handles async iteration
|
|
124
|
+
*/
|
|
125
|
+
export class StreamProcessor {
|
|
126
|
+
state;
|
|
127
|
+
eventHandler = null;
|
|
128
|
+
abortController = null;
|
|
129
|
+
constructor() {
|
|
130
|
+
this.state = createStreamState();
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Set event handler for real-time updates
|
|
134
|
+
*/
|
|
135
|
+
onEvent(handler) {
|
|
136
|
+
this.eventHandler = handler;
|
|
137
|
+
return this;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Get the current accumulated state
|
|
141
|
+
*/
|
|
142
|
+
getState() {
|
|
143
|
+
return this.state;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Get abort signal for cancellation
|
|
147
|
+
*/
|
|
148
|
+
getAbortSignal() {
|
|
149
|
+
if (!this.abortController) {
|
|
150
|
+
this.abortController = new AbortController();
|
|
151
|
+
}
|
|
152
|
+
return this.abortController.signal;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Abort the stream
|
|
156
|
+
*/
|
|
157
|
+
abort() {
|
|
158
|
+
this.abortController?.abort();
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Process an async iterable of chunks
|
|
162
|
+
*/
|
|
163
|
+
async process(chunks) {
|
|
164
|
+
for await (const chunk of chunks) {
|
|
165
|
+
// Check for abort
|
|
166
|
+
if (this.abortController?.signal.aborted) {
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
const events = processChunk(chunk, this.state);
|
|
170
|
+
// Emit events
|
|
171
|
+
if (this.eventHandler) {
|
|
172
|
+
for (const event of events) {
|
|
173
|
+
this.eventHandler(event);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
// Emit done event
|
|
178
|
+
if (this.eventHandler) {
|
|
179
|
+
this.eventHandler({ type: "done", state: this.state });
|
|
180
|
+
}
|
|
181
|
+
return this.state;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Reset for reuse
|
|
185
|
+
*/
|
|
186
|
+
reset() {
|
|
187
|
+
this.state = createStreamState();
|
|
188
|
+
this.abortController = null;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Convenience function to process a stream and return the final message
|
|
193
|
+
*/
|
|
194
|
+
export async function processStream(chunks, onEvent) {
|
|
195
|
+
const processor = new StreamProcessor();
|
|
196
|
+
if (onEvent) {
|
|
197
|
+
processor.onEvent(onEvent);
|
|
198
|
+
}
|
|
199
|
+
const state = await processor.process(chunks);
|
|
200
|
+
return stateToMessage(state);
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=stream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.js","sourceRoot":"","sources":["../../src/api/stream.ts"],"names":[],"mappings":"AA6CA;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO;QACL,OAAO,EAAE,EAAE;QACX,gBAAgB,EAAE,EAAE;QACpB,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,IAAI,GAAG,EAAE;QACpB,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,IAAI;KACZ,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAC1B,KAA0B,EAC1B,KAAkB;IAElB,MAAM,MAAM,GAAkB,EAAE,CAAC;IAEjC,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;QACnC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAE3B,yBAAyB;QACzB,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;YACf,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QAC1B,CAAC;QAED,wBAAwB;QACxB,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;YAClB,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC;YAC/B,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACzD,CAAC;QAED,gDAAgD;QAChD,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,iBAAiB,CAAC;YAClD,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,CAAC,iBAAiB,EAAE,CAAC,CAAC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