@codexstar/pi-listen 1.0.7 → 1.0.9
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 +6 -37
- package/package.json +1 -1
package/extensions/voice.ts
CHANGED
|
@@ -27,7 +27,7 @@ import type {
|
|
|
27
27
|
ExtensionCommandContext,
|
|
28
28
|
MessageRenderOptions,
|
|
29
29
|
} from "@mariozechner/pi-coding-agent";
|
|
30
|
-
import { Theme } from "@mariozechner/pi-coding-agent";
|
|
30
|
+
import type { 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";
|
|
@@ -693,43 +693,12 @@ export default function (pi: ExtensionAPI) {
|
|
|
693
693
|
config = loaded.config;
|
|
694
694
|
configSource = loaded.source;
|
|
695
695
|
updateSocketPath(config, currentCwd);
|
|
696
|
-
updateVoiceStatus();
|
|
697
|
-
setupHoldToTalk();
|
|
698
|
-
|
|
699
|
-
if (needsOnboarding(config, configSource) && startCtx.hasUI) {
|
|
700
|
-
const decision = await promptFirstRunOnboarding(startCtx);
|
|
701
|
-
if (decision.action === "start") {
|
|
702
|
-
const diagnostics = scanEnvironment(TRANSCRIBE_SCRIPT);
|
|
703
|
-
const result = await runVoiceOnboarding(startCtx, config, diagnostics);
|
|
704
|
-
if (result) {
|
|
705
|
-
await finalizeAndSaveSetup(startCtx, result.config, result.selectedScope, result.summaryLines, "first-run");
|
|
706
|
-
} else {
|
|
707
|
-
config = {
|
|
708
|
-
...config,
|
|
709
|
-
onboarding: {
|
|
710
|
-
...config.onboarding,
|
|
711
|
-
skippedAt: new Date().toISOString(),
|
|
712
|
-
},
|
|
713
|
-
};
|
|
714
|
-
saveConfig(config, config.scope, currentCwd);
|
|
715
|
-
startCtx.ui.notify("Voice setup skipped. Run /voice setup anytime.", "warning");
|
|
716
|
-
}
|
|
717
|
-
} else {
|
|
718
|
-
config = {
|
|
719
|
-
...config,
|
|
720
|
-
onboarding: {
|
|
721
|
-
...config.onboarding,
|
|
722
|
-
skippedAt: new Date().toISOString(),
|
|
723
|
-
},
|
|
724
|
-
};
|
|
725
|
-
saveConfig(config, config.scope, currentCwd);
|
|
726
|
-
startCtx.ui.notify("Voice setup skipped. Run /voice setup anytime.", "warning");
|
|
727
|
-
}
|
|
728
|
-
return;
|
|
729
|
-
}
|
|
730
696
|
|
|
731
|
-
//
|
|
732
|
-
|
|
697
|
+
// No auto-popup on startup. Users run `/voice setup` to configure.
|
|
698
|
+
// Only activate voice features if setup has been completed previously.
|
|
699
|
+
if (config.enabled && config.onboarding.completed) {
|
|
700
|
+
updateVoiceStatus();
|
|
701
|
+
setupHoldToTalk();
|
|
733
702
|
ensureDaemon(config).catch(() => {});
|
|
734
703
|
}
|
|
735
704
|
});
|