@pi-unipi/input-shortcuts 2.3.0 → 2.4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-unipi/input-shortcuts",
3
- "version": "2.3.0",
3
+ "version": "2.4.1",
4
4
  "description": "Keyboard shortcuts for stash/restore, undo/redo, clipboard, and thinking toggle — chord-based overlay system",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -33,7 +33,7 @@
33
33
  "access": "public"
34
34
  },
35
35
  "dependencies": {
36
- "@pi-unipi/core": "2.3.0"
36
+ "@pi-unipi/core": "2.4.1"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@earendil-works/pi-coding-agent": "^0.80.0",
package/index.ts DELETED
@@ -1,5 +0,0 @@
1
- /**
2
- * @pi-unipi/input-shortcuts — Re-exports
3
- */
4
-
5
- export { default } from "./src/index.ts";
package/src/status.ts DELETED
@@ -1,35 +0,0 @@
1
- /**
2
- * Status bar feedback helper using ctx.ui.setStatus() with auto-clear.
3
- */
4
-
5
- import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
6
- import { STATUS_SUCCESS_MS, STATUS_ERROR_MS } from "./types.ts";
7
-
8
- const STATUS_KEY = "input-shortcuts";
9
-
10
- /** Show a success status message with auto-clear. */
11
- export function showSuccess(ctx: ExtensionContext, text: string, durationMs = STATUS_SUCCESS_MS): void {
12
- showStatus(ctx, text, durationMs);
13
- }
14
-
15
- /** Show an error status message with auto-clear. */
16
- export function showError(ctx: ExtensionContext, text: string, durationMs = STATUS_ERROR_MS): void {
17
- showStatus(ctx, text, durationMs);
18
- }
19
-
20
- /** Show status text with auto-clear after duration. */
21
- export function showStatus(ctx: ExtensionContext, text: string, durationMs: number): void {
22
- ctx.ui.setStatus(STATUS_KEY, text);
23
- setTimeout(() => {
24
- try {
25
- ctx.ui.setStatus(STATUS_KEY, undefined);
26
- } catch {
27
- // Context may be gone — ignore
28
- }
29
- }, durationMs);
30
- }
31
-
32
- /** Clear the status bar entry immediately. */
33
- export function clearStatus(ctx: ExtensionContext): void {
34
- ctx.ui.setStatus(STATUS_KEY, undefined);
35
- }