pi-hide-providers 0.1.0 → 0.1.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/README.md CHANGED
@@ -76,10 +76,18 @@ Project config (`.pi/hide-providers.json`) takes priority over global config (`~
76
76
 
77
77
  ## Installation
78
78
 
79
+ **With `pi install`** (recommended):
80
+
79
81
  ```bash
80
82
  pi install https://github.com/monotykamary/pi-hide-providers
81
83
  ```
82
84
 
85
+ **With npm**:
86
+
87
+ ```bash
88
+ npm install pi-hide-providers
89
+ ```
90
+
83
91
  Or in `~/.pi/agent/settings.json`:
84
92
 
85
93
  ```json
package/hide-providers.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type { ExtensionAPI, ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
2
+ import { getAgentDir } from "@earendil-works/pi-coding-agent";
2
3
  import {
3
4
  HIDE_COMMAND_DESCRIPTION,
4
5
  CONFIG_FILENAME,
@@ -12,7 +13,6 @@ import {
12
13
  import { HideProviderSelectorComponent, type HideProviderSelectorResult } from "./src/provider-selector.js";
13
14
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "node:fs";
14
15
  import { join } from "node:path";
15
- import { homedir } from "node:os";
16
16
 
17
17
  /**
18
18
  * pi-hide-providers — hide providers and models from pi's model selector.
@@ -27,7 +27,7 @@ import { homedir } from "node:os";
27
27
  */
28
28
 
29
29
  // Config paths
30
- const globalConfigDir = join(homedir(), ".pi", "agent");
30
+ const globalConfigDir = getAgentDir();
31
31
  const globalConfigPath = join(globalConfigDir, CONFIG_FILENAME);
32
32
 
33
33
  function getProjectConfigPath(cwd: string): string {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-hide-providers",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Hide providers and models from pi's model selector — filter the /model list and Ctrl+P cycling via a configurable blocklist",
5
5
  "type": "module",
6
6
  "author": "Tom X Nguyen",