@codexstar/pi-listen 1.0.5 → 1.0.7
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/extensions/voice.ts +2 -3
- package/package.json +1 -1
- package/scripts/setup-macos.sh +18 -3
package/extensions/voice.ts
CHANGED
|
@@ -27,12 +27,11 @@ import type {
|
|
|
27
27
|
ExtensionCommandContext,
|
|
28
28
|
MessageRenderOptions,
|
|
29
29
|
} from "@mariozechner/pi-coding-agent";
|
|
30
|
-
import
|
|
30
|
+
import { Theme } from "@mariozechner/pi-coding-agent";
|
|
31
31
|
import { streamSimple } from "@mariozechner/pi-ai";
|
|
32
32
|
import type { AssistantMessageEvent } from "@mariozechner/pi-ai";
|
|
33
33
|
import { isKeyRelease, isKeyRepeat, matchesKey } from "@mariozechner/pi-tui";
|
|
34
34
|
import type { Component } from "@mariozechner/pi-tui";
|
|
35
|
-
import type { Theme } from "@mariozechner/pi-coding-agent/dist/modes/interactive/theme/theme.js";
|
|
36
35
|
import { spawn, spawnSync, type ChildProcess } from "node:child_process";
|
|
37
36
|
import * as fs from "node:fs";
|
|
38
37
|
import * as net from "node:net";
|
|
@@ -756,7 +755,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
756
755
|
|
|
757
756
|
// ─── BTW Message Renderer ────────────────────────────────────────────────
|
|
758
757
|
|
|
759
|
-
pi.registerMessageRenderer("btw", (message
|
|
758
|
+
pi.registerMessageRenderer<BtwExchange>("btw", (message, _options: MessageRenderOptions, _theme: Theme): Component | undefined => {
|
|
760
759
|
const ex = message.details;
|
|
761
760
|
if (!ex) return undefined;
|
|
762
761
|
return {
|
package/package.json
CHANGED
package/scripts/setup-macos.sh
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
set -
|
|
2
|
+
set -eo pipefail
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
# When piped from curl, BASH_SOURCE is empty — detect and handle gracefully
|
|
5
|
+
if [[ -n "${BASH_SOURCE[0]:-}" && "${BASH_SOURCE[0]}" != "bash" ]]; then
|
|
6
|
+
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
PACKAGE_ROOT="$(cd -- "$SCRIPT_DIR/.." && pwd)"
|
|
8
|
+
else
|
|
9
|
+
SCRIPT_DIR=""
|
|
10
|
+
PACKAGE_ROOT=""
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
# Enable nounset after handling BASH_SOURCE
|
|
14
|
+
set -u
|
|
6
15
|
|
|
7
16
|
MODE="local"
|
|
8
17
|
BACKEND="faster-whisper"
|
|
@@ -171,6 +180,12 @@ PY
|
|
|
171
180
|
}
|
|
172
181
|
|
|
173
182
|
smoke_test() {
|
|
183
|
+
if [[ -z "$PACKAGE_ROOT" ]]; then
|
|
184
|
+
log "Skipping daemon smoke test (running via curl pipe — daemon.py not available locally)"
|
|
185
|
+
log "Run '/voice test' inside pi to verify the full pipeline"
|
|
186
|
+
return 0
|
|
187
|
+
fi
|
|
188
|
+
|
|
174
189
|
local backend model socket log_file err_file
|
|
175
190
|
backend="$(selected_backend)"
|
|
176
191
|
model="$(selected_model)"
|