pi-subagents-j0k3r 1.1.2 → 1.1.3
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/package.json +1 -1
- package/src/thread-view.ts +5 -1
package/package.json
CHANGED
package/src/thread-view.ts
CHANGED
|
@@ -217,7 +217,11 @@ function debugLog(context: Pick<SubagentThreadRenderContext, 'cwd'> | undefined,
|
|
|
217
217
|
function renderComponent(component: unknown, width: number): string[] | undefined {
|
|
218
218
|
if (!component || typeof (component as any).render !== 'function') return undefined;
|
|
219
219
|
const lines = (component as any).render(width);
|
|
220
|
-
return Array.isArray(lines)
|
|
220
|
+
return Array.isArray(lines)
|
|
221
|
+
? lines
|
|
222
|
+
.filter((line): line is string => typeof line === 'string')
|
|
223
|
+
.flatMap((line) => line.replace(/\r\n?/g, '\n').split('\n'))
|
|
224
|
+
: undefined;
|
|
221
225
|
}
|
|
222
226
|
|
|
223
227
|
const TERMINAL_ESCAPE_RE = /\u001b\][^\u001b\u0007]*(?:\u001b\\|\u0007)|\u001b\[[0-?]*[ -/]*[@-~]/g;
|