channel-worker 1.1.6 → 1.1.7

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.
@@ -695,7 +695,7 @@ class CommandPoller {
695
695
  }
696
696
 
697
697
  async handleTypeText(command) {
698
- const { text, profile_id, url_match, focus_selector, press_enter } = command.payload || {};
698
+ const { text, profile_id, url_match, focus_selector, press_enter, select_all } = command.payload || {};
699
699
  console.log(`[commands] Typing text (${text?.length} chars) for profile: ${profile_id}`);
700
700
  try {
701
701
  const WebSocket = require('ws');
@@ -783,6 +783,17 @@ class CommandPoller {
783
783
  }
784
784
  // Small delay for focus to take effect
785
785
  await new Promise(r => setTimeout(r, 300));
786
+ // Select all existing text if requested (to clear/replace)
787
+ if (select_all) {
788
+ await send('Input.dispatchKeyEvent', { type: 'rawKeyDown', key: 'a', code: 'KeyA', windowsVirtualKeyCode: 65, nativeVirtualKeyCode: 65, modifiers: 2 }); // Ctrl+A
789
+ await send('Input.dispatchKeyEvent', { type: 'keyUp', key: 'a', code: 'KeyA', windowsVirtualKeyCode: 65, nativeVirtualKeyCode: 65, modifiers: 2 });
790
+ await new Promise(r => setTimeout(r, 200));
791
+ // Delete selected
792
+ await send('Input.dispatchKeyEvent', { type: 'rawKeyDown', key: 'Backspace', code: 'Backspace', windowsVirtualKeyCode: 8, nativeVirtualKeyCode: 8 });
793
+ await send('Input.dispatchKeyEvent', { type: 'keyUp', key: 'Backspace', code: 'Backspace', windowsVirtualKeyCode: 8, nativeVirtualKeyCode: 8 });
794
+ await new Promise(r => setTimeout(r, 200));
795
+ }
796
+
786
797
  // Type text — use char-by-char for inputs that need keystroke events (press_enter mode)
787
798
  if (press_enter) {
788
799
  // Type each character with delay so React processes keystrokes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "channel-worker",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "Channel Manager worker daemon — runs on remote machines to execute video pipeline jobs",
5
5
  "main": "lib/daemon.js",
6
6
  "bin": {