pi-context-map 0.4.1 → 0.4.3

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.
@@ -194,10 +194,14 @@ export default async function piContextMap(pi: ExtensionAPI): Promise<void> {
194
194
  liveServer.stop();
195
195
  });
196
196
 
197
- if (serverUrl) {
198
- console.log(`[pi-context-map] Live server running at ${serverUrl}`);
199
- console.log(
200
- `[pi-context-map] Run /context-map to generate a report, or /context-map stop to terminate.`,
201
- );
202
- }
197
+ // Kill server when process exits
198
+ process.on("exit", () => liveServer.stop());
199
+ process.on("SIGINT", () => {
200
+ liveServer.stop();
201
+ process.exit(0);
202
+ });
203
+ process.on("SIGTERM", () => {
204
+ liveServer.stop();
205
+ process.exit(0);
206
+ });
203
207
  }
@@ -69,7 +69,6 @@ export class LiveReportServer {
69
69
  const addr = this.server?.address() as AddressInfo | null;
70
70
  if (addr) {
71
71
  this.port = addr.port;
72
- console.log(`[pi-context-map] Live server: ${this.url}`);
73
72
  resolve(this.url);
74
73
  } else {
75
74
  resolve(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-context-map",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "Professional context profiler for Pi that visualizes the session context window, token distribution, and integrates with Nexus packages for actionable insights.",
5
5
  "keywords": [
6
6
  "pi-package",