@codexstar/pi-listen 1.0.8 → 1.0.10

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.
Files changed (2) hide show
  1. package/extensions/voice.ts +21 -36
  2. package/package.json +1 -1
@@ -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
- // Start daemon in background only after the user has completed onboarding.
732
- if (config.enabled && config.onboarding.completed && !needsOnboarding(config, configSource)) {
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
  });
@@ -1021,6 +990,22 @@ export default function (pi: ExtensionAPI) {
1021
990
  },
1022
991
  });
1023
992
 
993
+ // ─── Dedicated setup command (discoverable in /command list) ──────────────
994
+
995
+ pi.registerCommand("voice-setup", {
996
+ description: "Configure voice input — select backend, model, and language",
997
+ handler: async (_args, cmdCtx) => {
998
+ ctx = cmdCtx;
999
+ const diagnostics = scanEnvironment(TRANSCRIBE_SCRIPT);
1000
+ const result = await runVoiceOnboarding(cmdCtx, config, diagnostics);
1001
+ if (!result) {
1002
+ cmdCtx.ui.notify("Voice setup cancelled.", "warning");
1003
+ return;
1004
+ }
1005
+ await finalizeAndSaveSetup(cmdCtx, result.config, result.selectedScope, result.summaryLines, "setup-command");
1006
+ },
1007
+ });
1008
+
1024
1009
  pi.registerCommand("btw:new", {
1025
1010
  description: "Start a fresh BTW thread",
1026
1011
  handler: async (args, cmdCtx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codexstar/pi-listen",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "Voice input, first-run onboarding, and side-channel BTW conversations for Pi",
5
5
  "type": "module",
6
6
  "keywords": [