@pi-ohm/session-search 0.3.0-dev.22083116751.1.d12e548

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 ADDED
@@ -0,0 +1,7 @@
1
+ # @pi-ohm/session-search
2
+
3
+ Install only session/thread search support for Pi.
4
+
5
+ ```bash
6
+ pi install npm:@pi-ohm/session-search
7
+ ```
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@pi-ohm/session-search",
3
+ "version": "0.3.0-dev.22083116751.1.d12e548",
4
+ "type": "module",
5
+ "main": "src/extension.ts",
6
+ "types": "src/extension.ts",
7
+ "files": [
8
+ "src/",
9
+ "README.md"
10
+ ],
11
+ "pi": {
12
+ "extensions": [
13
+ "./src/extension.ts"
14
+ ]
15
+ },
16
+ "dependencies": {
17
+ "@mariozechner/pi-coding-agent": "^0.52.0",
18
+ "@pi-ohm/config": "0.3.0-dev.22083116751.1.d12e548"
19
+ },
20
+ "peerDependencies": {
21
+ "@mariozechner/pi-coding-agent": "*"
22
+ },
23
+ "publishConfig": {
24
+ "access": "public",
25
+ "provenance": true
26
+ }
27
+ }
@@ -0,0 +1,35 @@
1
+ import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
2
+ import { loadOhmRuntimeConfig, registerOhmSettings } from "@pi-ohm/config";
3
+
4
+ export default function registerSessionSearchExtension(pi: ExtensionAPI): void {
5
+ registerOhmSettings(pi);
6
+
7
+ pi.on("session_start", async (_event, ctx) => {
8
+ const { config } = await loadOhmRuntimeConfig(ctx.cwd);
9
+ if (!ctx.hasUI) return;
10
+
11
+ const enabled = config.features.sessionThreadSearch ? "on" : "off";
12
+ ctx.ui.setStatus("ohm-session-search", `session-search:${enabled}`);
13
+ });
14
+
15
+ pi.registerCommand("ohm-session-search", {
16
+ description: "Show session/thread search feature state",
17
+ handler: async (_args, ctx) => {
18
+ const { config } = await loadOhmRuntimeConfig(ctx.cwd);
19
+ const text = [
20
+ "Pi OHM: session/thread search",
21
+ "",
22
+ `enabled: ${config.features.sessionThreadSearch ? "yes" : "no"}`,
23
+ "",
24
+ "Scaffold note: connect this package to session_query + thread index tools.",
25
+ ].join("\n");
26
+
27
+ if (!ctx.hasUI) {
28
+ console.log(text);
29
+ return;
30
+ }
31
+
32
+ await ctx.ui.editor("pi-ohm session search", text);
33
+ },
34
+ });
35
+ }