@narumitw/pi-sync 0.49.12 → 0.49.13

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.
@@ -2,7 +2,7 @@
2
2
  // @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
3
3
  import {
4
4
  showRemoteSelectionReview
5
- } from "./chunk-D3S54OXI.ts";
5
+ } from "./chunk-5WJNWFTG.ts";
6
6
  import "./chunk-4F3W4CSC.ts";
7
7
  import "./chunk-FR6CVXAL.ts";
8
8
  import "./chunk-W64NEHXT.ts";
@@ -14,4 +14,4 @@ import "./chunk-YQ6UW7IF.ts";
14
14
  export {
15
15
  showRemoteSelectionReview
16
16
  };
17
- //# sourceMappingURL=remote-selection-ui-J6OW5DKZ.ts.map
17
+ //# sourceMappingURL=remote-selection-ui-LHSAGKGA.ts.map
package/dist/index.ts CHANGED
@@ -185,7 +185,7 @@ async function startSession(ctx, signal, loaders) {
185
185
  async function handleCommand(rawArgs, ctx, sessionSignal, loaders, attention) {
186
186
  if (!rawArgs.trim()) {
187
187
  try {
188
- const { showSyncManager } = await import("./chunks/manager-ui-7E25VWUP.ts");
188
+ const { showSyncManager } = await import("./chunks/manager-ui-QO2P4V3Z.ts");
189
189
  if (sessionSignal.aborted) return;
190
190
  await showSyncManager(
191
191
  ctx,
@@ -269,7 +269,7 @@ function directSelectionOrigin(rawArgs) {
269
269
  async function resolveSelectionAttention(ctx, attention, signal, loaders, options = {}) {
270
270
  const current = attention.current();
271
271
  if (!current || signal.aborted) return;
272
- const { dispatchManagerResult } = await import("./chunks/manager-result-dispatcher-YKBLZ7KL.ts");
272
+ const { dispatchManagerResult } = await import("./chunks/manager-result-dispatcher-RNRQA3PW.ts");
273
273
  if (signal.aborted || attention.current() !== current) return;
274
274
  await dispatchManagerResult(
275
275
  ctx,
@@ -540,7 +540,7 @@ async function initConfig(ctx, signal) {
540
540
  return;
541
541
  }
542
542
  if (ctx.mode === "tui") {
543
- const { showSetupWizard } = await import("./chunks/manager-ui-7E25VWUP.ts");
543
+ const { showSetupWizard } = await import("./chunks/manager-ui-QO2P4V3Z.ts");
544
544
  throwIfAborted(signal);
545
545
  await showSetupWizard(ctx, signal);
546
546
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narumitw/pi-sync",
3
- "version": "0.49.12",
3
+ "version": "0.49.13",
4
4
  "description": "Pi extension that syncs Pi configuration through Git, WebDAV, Cloudflare R2, or S3-compatible storage.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -42,14 +42,14 @@
42
42
  "typecheck": "tsc --noEmit"
43
43
  },
44
44
  "dependencies": {
45
- "@narumitw/pi-tui-kit": "^0.52.0",
45
+ "@narumitw/pi-tui-kit": "^0.58.1",
46
46
  "fast-xml-parser": "^5.11.0",
47
47
  "proper-lockfile": "^4.1.2"
48
48
  },
49
49
  "devDependencies": {
50
- "@biomejs/biome": "2.5.9",
51
- "@earendil-works/pi-coding-agent": "0.84.2",
52
- "@earendil-works/pi-tui": "0.84.2",
50
+ "@biomejs/biome": "2.5.10",
51
+ "@earendil-works/pi-coding-agent": "0.84.3",
52
+ "@earendil-works/pi-tui": "0.84.3",
53
53
  "@types/proper-lockfile": "^4.1.4",
54
54
  "esbuild": "0.28.2",
55
55
  "typescript": "7.0.2"
@@ -3,7 +3,7 @@ import {
3
3
  type ExtensionContext,
4
4
  type KeybindingsManager,
5
5
  } from "@earendil-works/pi-coding-agent";
6
- import { truncateToWidth } from "@earendil-works/pi-tui";
6
+ import { Key, matchesKey, truncateToWidth } from "@earendil-works/pi-tui";
7
7
  import { runCustomInteraction } from "@narumitw/pi-tui-kit";
8
8
  import { safeTerminalText } from "./manager-helpers.js";
9
9
  import type { SetupPullOutcome } from "./setup-switch.js";
@@ -87,7 +87,9 @@ export async function runCancellableOperation(
87
87
  },
88
88
  invalidate: () => loader.invalidate(),
89
89
  handleInput(data: string) {
90
- if (!keybindings.matches(data, "tui.select.cancel")) return;
90
+ if (!matchesKey(data, Key.ctrl("c")) && !keybindings.matches(data, "tui.select.cancel")) {
91
+ return;
92
+ }
91
93
  if (commitStarted) {
92
94
  ctx.ui.notify(
93
95
  "Applying or publishing has started and cannot be cancelled safely.",
@@ -117,8 +119,7 @@ function keybindingText(
117
119
  binding: Parameters<KeybindingsManager["getKeys"]>[0],
118
120
  fallback: string,
119
121
  ) {
120
- const keys = keybindings
121
- .getKeys(binding)
122
+ const keys = [...new Set([...keybindings.getKeys(binding), "ctrl+c"])]
122
123
  .map(String)
123
124
  .map((key) => {
124
125
  if (key === "return") return "enter";
@@ -3,7 +3,9 @@ import {
3
3
  CURSOR_MARKER,
4
4
  decodeKittyPrintable,
5
5
  type Focusable,
6
+ Key,
6
7
  type KeybindingsManager,
8
+ matchesKey,
7
9
  Text,
8
10
  truncateToWidth,
9
11
  } from "@earendil-works/pi-tui";
@@ -24,7 +26,7 @@ export async function promptSecret(
24
26
  const heading = new Text("", 0, 0);
25
27
  const hint = new Text("", 0, 0);
26
28
  const submitKey = keybindingText(keybindings, "tui.input.submit", "enter");
27
- const cancelKey = keybindingText(keybindings, "tui.select.cancel", "esc");
29
+ const cancelKey = keybindingText(keybindings, "tui.select.cancel", "esc", ["ctrl+c"]);
28
30
  const applyTheme = () => {
29
31
  heading.setText(theme.fg("accent", theme.bold(title)));
30
32
  hint.setText(theme.fg("dim", `${submitKey} save • ${cancelKey} cancel • Input is hidden`));
@@ -58,8 +60,9 @@ export async function promptSecret(
58
60
  hint.invalidate();
59
61
  },
60
62
  handleInput(data: string) {
61
- if (keybindings.matches(data, "tui.select.cancel")) complete(undefined);
62
- else if (keybindings.matches(data, "tui.input.submit")) complete(input.getValue());
63
+ if (matchesKey(data, Key.ctrl("c")) || keybindings.matches(data, "tui.select.cancel")) {
64
+ complete(undefined);
65
+ } else if (keybindings.matches(data, "tui.input.submit")) complete(input.getValue());
63
66
  else input.handleInput(data);
64
67
  tui.requestRender();
65
68
  },
@@ -195,9 +198,9 @@ function keybindingText(
195
198
  keybindings: Pick<KeybindingsManager, "getKeys">,
196
199
  binding: Parameters<KeybindingsManager["getKeys"]>[0],
197
200
  fallback: string,
201
+ additionalKeys: readonly string[] = [],
198
202
  ) {
199
- const keys = keybindings
200
- .getKeys(binding)
203
+ const keys = [...new Set([...keybindings.getKeys(binding), ...additionalKeys])]
201
204
  .map(String)
202
205
  .map((key) => {
203
206
  if (key === "return") return "enter";