whatsapp-pi 1.0.38 → 1.0.39

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatsapp-pi",
3
- "version": "1.0.38",
3
+ "version": "1.0.39",
4
4
  "type": "module",
5
5
  "description": "WhatsApp integration extension for Pi",
6
6
  "main": "whatsapp-pi.ts",
@@ -3,7 +3,7 @@ import { SessionManager, type Contact } from '../services/session.manager.js';
3
3
  import { validatePhoneNumber, type RecentConversationSummary } from '../models/whatsapp.types.js';
4
4
  import { RecentsService } from '../services/recents.service.js';
5
5
  import * as qrcode from 'qrcode-terminal';
6
- import { copyToClipboard, type ExtensionCommandContext } from '@mariozechner/pi-coding-agent';
6
+ import type { ExtensionCommandContext } from '@mariozechner/pi-coding-agent';
7
7
 
8
8
  export class MenuHandler {
9
9
  constructor(
@@ -107,7 +107,7 @@ export class MenuHandler {
107
107
 
108
108
  private async manageAllowedContact(ctx: ExtensionCommandContext, contact: Contact) {
109
109
  const displayName = this.formatAllowedContactOption(contact);
110
- const options = ['Send Message', 'History', 'Copy Number'];
110
+ const options = ['Send Message', 'History', 'Print Number'];
111
111
  if (contact.name) {
112
112
  options.push('Remove Alias');
113
113
  } else {
@@ -129,8 +129,8 @@ export class MenuHandler {
129
129
  return;
130
130
  }
131
131
 
132
- if (choice === 'Copy Number') {
133
- await this.copyAllowedNumber(ctx, contact);
132
+ if (choice === 'Print Number') {
133
+ ctx.ui.notify(contact.number, 'info');
134
134
  await this.manageAllowedContact(ctx, contact);
135
135
  return;
136
136
  }
@@ -171,15 +171,6 @@ export class MenuHandler {
171
171
  await this.manageAllowList(ctx);
172
172
  }
173
173
 
174
- private async copyAllowedNumber(ctx: ExtensionCommandContext, contact: Contact) {
175
- try {
176
- await copyToClipboard(contact.number);
177
- ctx.ui.notify(`Copied ${contact.number} to clipboard`, 'info');
178
- } catch {
179
- ctx.ui.notify(`Failed to copy ${contact.number} to clipboard`, 'error');
180
- }
181
- }
182
-
183
174
  private async manageBlockList(ctx: ExtensionCommandContext) {
184
175
  const list = [...this.sessionManager.getIgnoredNumbers()].reverse();
185
176