@smoose/pi-beautify 0.1.7 → 0.1.9

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smoose/pi-beautify",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Small visual polish extensions for pi coding agent",
5
5
  "type": "module",
6
6
  "files": [
package/src/index.ts CHANGED
@@ -184,8 +184,8 @@ class ImageTokenController {
184
184
 
185
185
  formatClipboardFilePaths(paths: string[], existingText = ""): string {
186
186
  const usedIds = this.collectUsedIds(existingText);
187
- const pieces = paths.map((path) => (IMAGE_FILE_RE.test(path) ? this.createImageToken(path, usedIds).trimEnd() : path));
188
- return pieces.length > 0 ? `${pieces.join(paths.length > 1 ? "\n" : "")} ` : "";
187
+ const pieces = paths.map((path) => (IMAGE_FILE_RE.test(path) ? this.createImageToken(path, usedIds) : path));
188
+ return pieces.join(paths.length > 1 ? "\n" : "");
189
189
  }
190
190
 
191
191
  replaceClipboardPathsInEditor(editor: EditorComponent, tui: TUI): void {
@@ -253,7 +253,7 @@ class ImageTokenController {
253
253
  usedIds.add(id);
254
254
  const token = imageChip(id);
255
255
  this.attachments.set(token, { token, path });
256
- return `${token} `;
256
+ return token;
257
257
  }
258
258
  }
259
259