@henryqw/pi-open-in 2.0.0 → 2.0.2

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/README.md +10 -15
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,11 +1,6 @@
1
1
  # `@henryqw/pi-open-in`
2
2
 
3
- Open the current Pi working directory in your editor with one command. The default editor is VS Code.
4
-
5
- ## Why
6
-
7
- - **Created for**: Pi users who move between terminal work and an editor.
8
- - **Advantage**: `/open` works while the agent is busy and supports any simple editor command.
3
+ Open the current Pi working directory in your editor with one command. Move from terminal work while the agent is busy, using VS Code by default or any simple editor command.
9
4
 
10
5
  ## Install
11
6
 
@@ -37,12 +32,9 @@ Run `/set-open-in` when you want another command.
37
32
  - A missing file silently uses the default command, `"code"`.
38
33
  - Reads do not create or write the config home.
39
34
  - When the file exists, `command` is required. It must be a non-empty string.
40
- - The command splits on whitespace into an executable and arguments. Tokens cannot contain spaces, and quoting is unsupported. Use a wrapper script for executables in spaced paths.
41
- - An existing file must be a JSON object with exactly one non-empty string `command` property. Otherwise `/open` fails with a visible error and offers no open URI.
42
- - Malformed files remain unchanged.
43
35
  - Only `/set-open-in` writes the file. Its write is atomic.
44
36
 
45
- ## Owner API
37
+ ## API
46
38
 
47
39
  Consumers use the owner API instead of reading this file.
48
40
 
@@ -52,11 +44,14 @@ import { loadOpenInConfig } from "@henryqw/pi-open-in/open-uri";
52
44
  const { source, value } = loadOpenInConfig();
53
45
  ```
54
46
 
55
- `source` is `"missing"` or `"file"`. `value.command` is validated.
56
- Pass an agent directory to `loadOpenInConfig(agentDir)` when needed.
47
+ `source` is `"missing"` or `"file"`. `value.command` is validated. Pass an agent directory to `loadOpenInConfig(agentDir)` when needed.
57
48
 
58
- `configuredOpenUri(path)` returns a VS Code URI when the executable is `code`.
59
- For `code -n` and `code --new-window`, it adds `windowId=_blank` so the link opens a new window.
60
- It returns `undefined` for other commands or invalid config.
49
+ `configuredOpenUri(path)` returns a VS Code URI when the executable is `code`. For `code -n` and `code --new-window`, it adds `windowId=_blank` so the link opens a new window. It returns `undefined` for other commands or invalid config.
61
50
 
62
51
  This extension owns command validation. `@henryqw/pi-config-store` owns the config home and storage.
52
+
53
+ ## Limits and recovery
54
+
55
+ The command splits on whitespace into an executable and arguments. Tokens cannot contain spaces, and quoting is unsupported. Use a wrapper script for executables in spaced paths.
56
+
57
+ An existing file must be a JSON object with exactly one non-empty string `command` property. Otherwise `/open` fails with a visible error and offers no open URI. Malformed files remain unchanged.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-open-in",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Open the current Pi working directory with a configurable command.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -28,7 +28,7 @@
28
28
  "pack:check": "npm pack --dry-run"
29
29
  },
30
30
  "peerDependencies": {
31
- "@earendil-works/pi-coding-agent": "^0.85.0"
31
+ "@earendil-works/pi-coding-agent": "^0.85.1"
32
32
  },
33
33
  "repository": {
34
34
  "type": "git",