@deathbeam/pi-delegate 0.0.48 → 0.0.49
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/format.ts +2 -3
package/package.json
CHANGED
package/src/format.ts
CHANGED
|
@@ -159,9 +159,8 @@ export function toolCallDetail(toolName: string, args: unknown): string {
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
/** Caps a preview at `maxLines`; callers report the hidden count their own way. */
|
|
162
|
-
export function capLines<T>(lines: T[], maxLines: number): { shown: T[]; hidden: number } {
|
|
163
|
-
|
|
164
|
-
return { shown: lines.slice(0, maxLines), hidden: lines.length - maxLines };
|
|
162
|
+
export function capLines<T>(lines: readonly T[], maxLines: number): { shown: T[]; hidden: number } {
|
|
163
|
+
return { shown: lines.slice(0, maxLines), hidden: Math.max(0, lines.length - maxLines) };
|
|
165
164
|
}
|
|
166
165
|
|
|
167
166
|
/** Close dangling Markdown fences so collapsed previews render correctly. */
|