editprompt 0.8.0 → 0.8.1

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/dist/index.js +4 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import { join } from "node:path";
9
9
  import clipboardy from "clipboardy";
10
10
 
11
11
  //#region package.json
12
- var version = "0.8.0";
12
+ var version = "0.8.1";
13
13
 
14
14
  //#endregion
15
15
  //#region src/modules/tmux.ts
@@ -82,7 +82,8 @@ async function clearQuoteVariable(targetPaneId) {
82
82
  await execAsync$2(`tmux set-option -pt '${targetPaneId}' @editprompt_quote ""`);
83
83
  }
84
84
  async function sendKeyToTmuxPane(paneId, key) {
85
- await execAsync$2(`tmux send-keys -t '${paneId}' ${key}`);
85
+ await new Promise((resolve) => setTimeout(resolve, 100));
86
+ await execAsync$2(`tmux send-keys -t '${paneId}' '${key}'`);
86
87
  }
87
88
  async function sendContentToTmuxPaneNoFocus(paneId, content) {
88
89
  await execAsync$2(`tmux if-shell -t '${paneId}' '[ "#{pane_in_mode}" = "1" ]' "copy-mode -q -t '${paneId}'"`);
@@ -406,7 +407,7 @@ async function runSendOnlyMode(rawContent, autoSend, sendKey) {
406
407
  process.exit(1);
407
408
  }
408
409
  try {
409
- const key = sendKey || (config.mux === "wezterm" ? "\\r" : "Enter");
410
+ const key = sendKey || (config.mux === "wezterm" ? "\\r" : "C-m");
410
411
  await handleAutoSendDelivery(content, config.mux, config.targetPane, key);
411
412
  } catch (error) {
412
413
  console.error(`Error: ${error instanceof Error ? error.message : "Unknown error"}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "editprompt",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "author": "eetann",
5
5
  "description": "A CLI tool that lets you write prompts for CLI tools using your favorite text editor",
6
6
  "license": "MIT",