pi-edit-session-in-place 0.1.16 → 0.1.17

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/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## [0.1.17] - 2026-06-04
8
+
9
+ ### Fixed
10
+ - fixed the editor hotkey command dispatch when duplicate installs suffix the command as `/edit-turn:1`, `/edit-turn:2`, etc.
11
+ - removed the local project package setting accidentally left by release verification so the repo no longer loads a duplicate project copy during local reloads
12
+
7
13
  ## [0.1.16] - 2026-06-04
8
14
 
9
15
  ### Fixed
@@ -569,11 +569,27 @@ const handleEditTurn = async (ctx: ExtensionCommandContext) => {
569
569
  );
570
570
  };
571
571
 
572
+ export const getEditTurnCommandText = (commands: Array<{ name: string }>) => {
573
+ const candidates = commands
574
+ .map((command) => command.name)
575
+ .filter((name) => name === COMMAND_NAME || name.startsWith(`${COMMAND_NAME}:`));
576
+ return `/${candidates.at(-1) ?? COMMAND_NAME}`;
577
+ };
578
+
572
579
  class EditSessionInPlaceEditor extends CustomEditor {
580
+ constructor(
581
+ tui: TUI,
582
+ theme: EditorTheme,
583
+ keybindings: KeybindingsManager,
584
+ private readonly getCommandText: () => string,
585
+ ) {
586
+ super(tui, theme, keybindings);
587
+ }
588
+
573
589
  handleInput(data: string): void {
574
590
  if (matchesKey(data, HOTKEY)) {
575
591
  draftBeforeHotkey = this.getText();
576
- this.setText(COMMAND_TEXT);
592
+ this.setText(this.getCommandText());
577
593
  super.handleInput("\r");
578
594
  return;
579
595
  }
@@ -593,7 +609,9 @@ export default function editSessionInPlace(pi: ExtensionAPI) {
593
609
  pi.on("session_start", (_event, ctx) => {
594
610
  clearSavedDraft();
595
611
  if (ctx.mode === "tui") {
596
- ctx.ui.setEditorComponent((tui, theme, keybindings) => new EditSessionInPlaceEditor(tui, theme, keybindings));
612
+ ctx.ui.setEditorComponent((tui, theme, keybindings) =>
613
+ new EditSessionInPlaceEditor(tui, theme, keybindings, () => getEditTurnCommandText(pi.getCommands())),
614
+ );
597
615
  }
598
616
  });
599
617
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-edit-session-in-place",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "pi extension that lets you re-edit or delete an earlier user message in the current session branch",
5
5
  "author": "Mitch Fultz (https://github.com/fitchmultz)",
6
6
  "license": "MIT",