pi-anycopy 0.1.0 → 0.1.2

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.
@@ -120,7 +120,7 @@ const getTextContent = (content: unknown): string => {
120
120
  .join("");
121
121
  };
122
122
 
123
- const clipText = (text: string): string => {
123
+ const clipTextForPreview = (text: string): string => {
124
124
  if (text.length <= MAX_PREVIEW_CHARS) return text;
125
125
  return `${text.slice(0, MAX_PREVIEW_CHARS)}\n… [truncated]`;
126
126
  };
@@ -309,12 +309,14 @@ const buildNodeOrder = (roots: SessionTreeNode[]): Map<string, number> => {
309
309
  return order;
310
310
  };
311
311
 
312
- /** Clipboard text: role:\n\ncontent\n\n---\n\nrole:\n\ncontent */
312
+ /** Clipboard text: role:\n\ncontent\n\n---\n\nrole:\n\ncontent
313
+ * The preview pane is truncated for performance, while the clipboard copy is not
314
+ */
313
315
  const buildClipboardText = (nodes: SessionTreeNode[]): string => {
314
316
  return nodes
315
317
  .map((node) => {
316
318
  const label = getEntryRoleLabel(node.entry);
317
- const content = clipText(getEntryContent(node.entry));
319
+ const content = getEntryContent(node.entry);
318
320
  return `${label}:\n\n${content}`;
319
321
  })
320
322
  .join("\n\n---\n\n");
@@ -537,7 +539,7 @@ class anycopyOverlay implements Focusable {
537
539
  ({ bodyLines, truncatedToMaxLines } = this.previewCache);
538
540
  } else {
539
541
  const content = getEntryContent(focused.entry);
540
- const clipped = clipText(content);
542
+ const clipped = clipTextForPreview(content);
541
543
  const rendered = renderPreviewBodyLines(clipped, focused.entry, width, this.theme, this.nodeById);
542
544
 
543
545
  truncatedToMaxLines = rendered.length > MAX_PREVIEW_LINES;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-anycopy",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Copy any single message, or multiple selected messages, from the session tree, with scrollable message preview",
5
5
  "keywords": ["pi-package", "pi", "pi-coding-agent"],
6
6
  "license": "MIT",