wotann 0.5.67 → 0.5.68
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/dist/index.js +9 -42
- package/dist/index.js.map +1 -1
- package/dist/providers/discovery.d.ts +9 -2
- package/dist/providers/discovery.d.ts.map +1 -1
- package/dist/providers/discovery.js +14 -28
- package/dist/providers/discovery.js.map +1 -1
- package/dist/providers/onboarding-auth-choices.d.ts +30 -0
- package/dist/providers/onboarding-auth-choices.d.ts.map +1 -0
- package/dist/providers/onboarding-auth-choices.js +40 -0
- package/dist/providers/onboarding-auth-choices.js.map +1 -0
- package/dist/ui/components/v3/AppV3.d.ts.map +1 -1
- package/dist/ui/components/v3/AppV3.js +61 -3
- package/dist/ui/components/v3/AppV3.js.map +1 -1
- package/dist/ui/components/v3/onboarding-gate.d.ts +20 -0
- package/dist/ui/components/v3/onboarding-gate.d.ts.map +1 -0
- package/dist/ui/components/v3/onboarding-gate.js +15 -0
- package/dist/ui/components/v3/onboarding-gate.js.map +1 -0
- package/dist/ui/themes.d.ts +7 -0
- package/dist/ui/themes.d.ts.map +1 -1
- package/dist/ui/themes.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -198,50 +198,17 @@ program
|
|
|
198
198
|
// (every shell is just chrome over the SAME shared slash-command
|
|
199
199
|
// + runtime engine). The env/flag escape hatches and the three
|
|
200
200
|
// tui-variant resolvers went with them.
|
|
201
|
-
//
|
|
202
|
-
//
|
|
203
|
-
//
|
|
204
|
-
//
|
|
205
|
-
//
|
|
206
|
-
//
|
|
207
|
-
//
|
|
208
|
-
//
|
|
209
|
-
// when no controlling TTY is attached. This was the "npx wotann
|
|
210
|
-
// hangs" failure: certain npx exec wrappers and shells run the
|
|
211
|
-
// child with a degraded TTY, the wizard mounts to a void, and
|
|
212
|
-
// every keystroke is dropped. Matching the `wotann init` guard
|
|
213
|
-
// at the corresponding code path below ensures parity.
|
|
201
|
+
// First-run onboarding is the IN-TUI OnboardingTour, mounted by
|
|
202
|
+
// AppV3 when no provider is configured (user chose the in-TUI
|
|
203
|
+
// flow over a separate pre-TUI CLI wizard — 2026-05-18). The
|
|
204
|
+
// standalone Ink wizard still exists for explicit `wotann init
|
|
205
|
+
// --wizard`; auto-launching it here too would double-onboard.
|
|
206
|
+
// For NON-TTY callers (piped / CI) no interactive tour can run —
|
|
207
|
+
// the raw-mode guard refuses cleanly — so we just print how to
|
|
208
|
+
// authenticate the standardized way and fall through.
|
|
214
209
|
const detected = interactive.providers.filter((p) => p.available).length;
|
|
215
210
|
const isInteractiveTTY = Boolean(process.stdin.isTTY) && Boolean(process.stdout.isTTY);
|
|
216
|
-
|
|
217
|
-
Boolean(options.provider) ||
|
|
218
|
-
Boolean(options.model) ||
|
|
219
|
-
!isInteractiveTTY;
|
|
220
|
-
if (detected === 0 && !skipWizard) {
|
|
221
|
-
try {
|
|
222
|
-
// Give the user immediate feedback so they know the wizard is
|
|
223
|
-
// about to mount — the Ink render itself can take 1-2s on
|
|
224
|
-
// cold start while react + ink load. Without this, the user
|
|
225
|
-
// sees a black screen and assumes it's hung.
|
|
226
|
-
process.stderr.write("[wotann] No providers detected — launching onboarding wizard…\n");
|
|
227
|
-
const { runOnboardingWizard } = await import("./cli/run-onboarding-wizard.js");
|
|
228
|
-
await runOnboardingWizard();
|
|
229
|
-
// After the wizard completes, re-bootstrap so the TUI sees the
|
|
230
|
-
// newly-configured providers.
|
|
231
|
-
interactive = await bootstrapInteractiveSession(process.cwd(), options);
|
|
232
|
-
}
|
|
233
|
-
catch (err) {
|
|
234
|
-
// Wizard import or run failed — log so first-launch users get
|
|
235
|
-
// a hint why the hand-holding wizard didn't appear, then fall
|
|
236
|
-
// through to the in-TUI onboarding banner.
|
|
237
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
238
|
-
process.stderr.write(`[wotann] onboarding wizard unavailable: ${msg}\n`);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
else if (detected === 0 && !isInteractiveTTY) {
|
|
242
|
-
// Non-TTY caller with no providers: surface a plain-text hint
|
|
243
|
-
// so the user knows WHY the wizard didn't run. Then fall through
|
|
244
|
-
// to App.tsx's static banner (also TTY-safe).
|
|
211
|
+
if (detected === 0 && !isInteractiveTTY) {
|
|
245
212
|
process.stderr.write("[wotann] No providers detected and stdin is not a TTY. " +
|
|
246
213
|
"Run `wotann init` in an interactive terminal, or set " +
|
|
247
214
|
"ANTHROPIC_API_KEY / OPENAI_API_KEY / GEMINI_API_KEY etc. " +
|