@hasna/assistants 1.1.53 → 1.1.55

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 CHANGED
@@ -665,7 +665,7 @@ async function loadTextFile(path) {
665
665
  return null;
666
666
  }
667
667
  }
668
- var DEFAULT_SYSTEM_PROMPT = `You are Hasna Assistant, a helpful AI assistant running in the terminal.
668
+ var DEFAULT_SYSTEM_PROMPT = `You are a helpful AI assistant by Hasna, running in the terminal. Your name and capabilities are defined by your identity configuration \u2014 do not invent a name for yourself.
669
669
 
670
670
  ## Runtime Environment
671
671
  - Use **Bun** as the default runtime for JavaScript/TypeScript scripts
@@ -89084,7 +89084,7 @@ Not a git repository or git not available.
89084
89084
  context.setProjectContext(projectContext);
89085
89085
  }
89086
89086
  }
89087
- var VERSION2 = "1.1.53";
89087
+ var VERSION2 = "1.1.55";
89088
89088
  var init_builtin = __esm(async () => {
89089
89089
  init_src2();
89090
89090
  init_context3();
@@ -214961,6 +214961,42 @@ var init_migration = __esm(() => {
214961
214961
  init_validators();
214962
214962
  });
214963
214963
 
214964
+ // packages/core/src/config-store.ts
214965
+ function getConfigValue(key, scope = "global", scopeId = "") {
214966
+ try {
214967
+ const db = getDatabase();
214968
+ const row = db.query("SELECT value FROM config WHERE scope = ? AND scope_id = ? AND key = ?").get(scope, scopeId, key);
214969
+ return row?.value ?? null;
214970
+ } catch {
214971
+ return null;
214972
+ }
214973
+ }
214974
+ function setConfigValue(key, value, scope = "global", scopeId = "") {
214975
+ try {
214976
+ const db = getDatabase();
214977
+ db.prepare(`INSERT INTO config (scope, scope_id, key, value, updated_at)
214978
+ VALUES (?, ?, ?, ?, ?)
214979
+ ON CONFLICT (scope, scope_id, key) DO UPDATE SET value = excluded.value, updated_at = excluded.updated_at`).run(scope, scopeId, key, value, new Date().toISOString());
214980
+ } catch {}
214981
+ }
214982
+ function isOnboardingCompleted() {
214983
+ const val = getConfigValue("onboardingCompleted");
214984
+ return val === "true";
214985
+ }
214986
+ function markOnboardingCompleted() {
214987
+ setConfigValue("onboardingCompleted", "true");
214988
+ }
214989
+ function isFirstGreetingShown() {
214990
+ const val = getConfigValue("firstGreetingShown");
214991
+ return val === "true";
214992
+ }
214993
+ function markFirstGreetingShown() {
214994
+ setConfigValue("firstGreetingShown", "true");
214995
+ }
214996
+ var init_config_store = __esm(async () => {
214997
+ await init_database();
214998
+ });
214999
+
214964
215000
  // packages/core/src/scheduler/index.ts
214965
215001
  var init_scheduler2 = __esm(async () => {
214966
215002
  init_cron();
@@ -215268,6 +215304,7 @@ __export(exports_src3, {
215268
215304
  setRuntime: () => setRuntime,
215269
215305
  setPaused: () => setPaused,
215270
215306
  setDnsLookupForTests: () => setDnsLookupForTests,
215307
+ setConfigValue: () => setConfigValue,
215271
215308
  setAutoRun: () => setAutoRun,
215272
215309
  setActiveWorkspaceId: () => setActiveWorkspaceId,
215273
215310
  sessionUpdateTool: () => sessionUpdateTool,
@@ -215385,6 +215422,8 @@ __export(exports_src3, {
215385
215422
  memoryRecallTool: () => memoryRecallTool,
215386
215423
  memoryListTool: () => memoryListTool,
215387
215424
  memoryForgetTool: () => memoryForgetTool,
215425
+ markOnboardingCompleted: () => markOnboardingCompleted,
215426
+ markFirstGreetingShown: () => markFirstGreetingShown,
215388
215427
  logsTools: () => logsTools,
215389
215428
  logsTailTool: () => logsTailTool,
215390
215429
  logsStatsTool: () => logsStatsTool,
@@ -215412,8 +215451,10 @@ __export(exports_src3, {
215412
215451
  isPaused: () => isPaused,
215413
215452
  isPathSafe: () => isPathSafe,
215414
215453
  isOpenAIConfigured: () => isOpenAIConfigured,
215454
+ isOnboardingCompleted: () => isOnboardingCompleted,
215415
215455
  isMigrated: () => isMigrated,
215416
215456
  isIpLiteral: () => isIpLiteral,
215457
+ isFirstGreetingShown: () => isFirstGreetingShown,
215417
215458
  isExaConfigured: () => isExaConfigured,
215418
215459
  isElevenLabsConfigured: () => isElevenLabsConfigured,
215419
215460
  isAutoRun: () => isAutoRun,
@@ -215474,6 +215515,7 @@ __export(exports_src3, {
215474
215515
  getDefaultCapabilities: () => getDefaultCapabilities,
215475
215516
  getDatabasePath: () => getDatabasePath,
215476
215517
  getDatabase: () => getDatabase,
215518
+ getConfigValue: () => getConfigValue,
215477
215519
  getConfigPath: () => getConfigPath,
215478
215520
  getConfigDir: () => getConfigDir,
215479
215521
  getCommandHistory: () => getCommandHistory,
@@ -215874,6 +215916,7 @@ var init_src3 = __esm(async () => {
215874
215916
  init_global_memory(),
215875
215917
  init_budget(),
215876
215918
  init_config(),
215919
+ init_config_store(),
215877
215920
  init_client4(),
215878
215921
  init_registry3(),
215879
215922
  init_store12(),
@@ -259240,65 +259283,76 @@ function ProcessingIndicator({
259240
259283
  init_src2();
259241
259284
  await init_build2();
259242
259285
  var jsx_dev_runtime8 = __toESM(require_jsx_dev_runtime(), 1);
259286
+ var MINI_LOGO = [
259287
+ " \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588",
259288
+ "\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 ",
259289
+ "\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588",
259290
+ "\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588",
259291
+ "\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588"
259292
+ ];
259293
+ var COLORS = ["#7dd3fc", "#38bdf8", "#0ea5e9", "#0284c7", "#0369a1"];
259243
259294
  function WelcomeBanner({ version: version5, model, directory }) {
259244
259295
  const homeDir = process.env.HOME || "";
259245
259296
  const displayDir = homeDir && directory.startsWith(homeDir) ? "~" + directory.slice(homeDir.length) : directory;
259246
259297
  const displayModel = getModelDisplayName(model);
259298
+ const isWide2 = (process.stdout.columns || 80) >= 82;
259247
259299
  return /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
259248
259300
  flexDirection: "column",
259249
259301
  marginBottom: 1,
259250
259302
  children: [
259251
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
259303
+ isWide2 ? /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
259304
+ flexDirection: "column",
259305
+ marginBottom: 0,
259252
259306
  children: [
259253
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text3, {
259254
- color: "cyan",
259255
- bold: true,
259256
- children: ">"
259257
- }, undefined, false, undefined, this),
259258
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text3, {
259259
- color: "cyan",
259260
- bold: true,
259261
- children: "_ "
259262
- }, undefined, false, undefined, this),
259263
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text3, {
259264
- bold: true,
259265
- children: "Hasna Assistants"
259266
- }, undefined, false, undefined, this),
259307
+ MINI_LOGO.map((line, i5) => /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text3, {
259308
+ color: COLORS[i5],
259309
+ children: line
259310
+ }, i5, false, undefined, this)),
259267
259311
  /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text3, {
259268
259312
  dimColor: true,
259269
- children: [
259270
- " (v",
259271
- version5,
259272
- ")"
259273
- ]
259274
- }, undefined, true, undefined, this)
259313
+ children: " by "
259314
+ }, undefined, false, undefined, this)
259275
259315
  ]
259276
- }, undefined, true, undefined, this),
259277
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
259278
- marginTop: 1,
259316
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
259317
+ marginBottom: 0,
259279
259318
  children: [
259280
259319
  /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text3, {
259281
- dimColor: true,
259282
- children: "model: "
259283
- }, undefined, false, undefined, this),
259284
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text3, {
259285
- children: displayModel
259320
+ color: "#0ea5e9",
259321
+ bold: true,
259322
+ children: "assistants"
259286
259323
  }, undefined, false, undefined, this),
259287
259324
  /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text3, {
259288
259325
  dimColor: true,
259289
- children: " /model to change"
259326
+ children: " by hasna"
259290
259327
  }, undefined, false, undefined, this)
259291
259328
  ]
259292
259329
  }, undefined, true, undefined, this),
259293
259330
  /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
259331
+ marginTop: 0,
259294
259332
  children: [
259295
259333
  /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text3, {
259296
259334
  dimColor: true,
259297
- children: "directory: "
259298
- }, undefined, false, undefined, this),
259335
+ children: [
259336
+ "v",
259337
+ version5,
259338
+ " "
259339
+ ]
259340
+ }, undefined, true, undefined, this),
259299
259341
  /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text3, {
259300
- children: displayDir
259301
- }, undefined, false, undefined, this)
259342
+ dimColor: true,
259343
+ children: [
259344
+ " ",
259345
+ displayModel,
259346
+ " "
259347
+ ]
259348
+ }, undefined, true, undefined, this),
259349
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text3, {
259350
+ dimColor: true,
259351
+ children: [
259352
+ " ",
259353
+ displayDir
259354
+ ]
259355
+ }, undefined, true, undefined, this)
259302
259356
  ]
259303
259357
  }, undefined, true, undefined, this)
259304
259358
  ]
@@ -260179,6 +260233,7 @@ function InterviewPanel({
260179
260233
  await init_build2();
260180
260234
  var import_react45 = __toESM(require_react(), 1);
260181
260235
  var jsx_dev_runtime14 = __toESM(require_jsx_dev_runtime(), 1);
260236
+ var VISIBLE_COUNT = 5;
260182
260237
  function formatTimeAgo3(date3) {
260183
260238
  const seconds = Math.floor((Date.now() - date3.getTime()) / 1000);
260184
260239
  if (seconds < 60)
@@ -260220,15 +260275,6 @@ function RecoveryPanel({ sessions, onRecover, onStartFresh }) {
260220
260275
  setSelectedIndex((prev) => prev === totalItems - 1 ? 0 : prev + 1);
260221
260276
  return;
260222
260277
  }
260223
- const num = parseInt(input, 10);
260224
- if (!isNaN(num) && num >= 1 && num <= sessions.length) {
260225
- setSelectedIndex(num);
260226
- return;
260227
- }
260228
- if (input === "s" || input === "S" || input === "0") {
260229
- setSelectedIndex(0);
260230
- return;
260231
- }
260232
260278
  if (key.return) {
260233
260279
  if (selectedIndex === 0) {
260234
260280
  onStartFresh();
@@ -260242,6 +260288,28 @@ function RecoveryPanel({ sessions, onRecover, onStartFresh }) {
260242
260288
  return;
260243
260289
  }
260244
260290
  });
260291
+ const { visibleSessions, startIdx, showUpArrow, showDownArrow } = import_react45.useMemo(() => {
260292
+ const sessionSelectedIdx = selectedIndex - 1;
260293
+ const sessionCount = sessions.length;
260294
+ if (sessionCount <= VISIBLE_COUNT) {
260295
+ return {
260296
+ visibleSessions: sessions.map((s6, i5) => ({ session: s6, originalIndex: i5 })),
260297
+ startIdx: 0,
260298
+ showUpArrow: false,
260299
+ showDownArrow: false
260300
+ };
260301
+ }
260302
+ let start = Math.max(0, sessionSelectedIdx - Math.floor(VISIBLE_COUNT / 2));
260303
+ start = Math.min(start, sessionCount - VISIBLE_COUNT);
260304
+ start = Math.max(0, start);
260305
+ const visible = sessions.slice(start, start + VISIBLE_COUNT).map((s6, i5) => ({ session: s6, originalIndex: start + i5 }));
260306
+ return {
260307
+ visibleSessions: visible,
260308
+ startIdx: start,
260309
+ showUpArrow: start > 0,
260310
+ showDownArrow: start + VISIBLE_COUNT < sessionCount
260311
+ };
260312
+ }, [sessions, selectedIndex]);
260245
260313
  const selectedSessionIndex = selectedIndex - 1;
260246
260314
  return /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Box_default, {
260247
260315
  flexDirection: "column",
@@ -260253,7 +260321,7 @@ function RecoveryPanel({ sessions, onRecover, onStartFresh }) {
260253
260321
  children: /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Text3, {
260254
260322
  color: "yellow",
260255
260323
  bold: true,
260256
- children: "Session Recovery Available"
260324
+ children: "Session Recovery"
260257
260325
  }, undefined, false, undefined, this)
260258
260326
  }, undefined, false, undefined, this),
260259
260327
  /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Box_default, {
@@ -260264,7 +260332,7 @@ function RecoveryPanel({ sessions, onRecover, onStartFresh }) {
260264
260332
  sessions.length,
260265
260333
  " recoverable session",
260266
260334
  sessions.length !== 1 ? "s" : "",
260267
- " found. Select one to resume or start fresh."
260335
+ " found."
260268
260336
  ]
260269
260337
  }, undefined, true, undefined, this)
260270
260338
  }, undefined, false, undefined, this),
@@ -260295,12 +260363,22 @@ function RecoveryPanel({ sessions, onRecover, onStartFresh }) {
260295
260363
  children: "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"
260296
260364
  }, undefined, false, undefined, this)
260297
260365
  }, undefined, false, undefined, this),
260298
- sessions.map((session, index) => {
260299
- const isSelected = index === selectedSessionIndex;
260366
+ showUpArrow && /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Box_default, {
260367
+ children: /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Text3, {
260368
+ dimColor: true,
260369
+ children: [
260370
+ " \u2191 ",
260371
+ startIdx,
260372
+ " more above"
260373
+ ]
260374
+ }, undefined, true, undefined, this)
260375
+ }, undefined, false, undefined, this),
260376
+ visibleSessions.map(({ session, originalIndex }) => {
260377
+ const isSelected = originalIndex === selectedSessionIndex;
260300
260378
  const stateLabel = getStateLabel(session.heartbeat.state);
260301
260379
  const timeAgo = formatTimeAgo3(session.lastActivity);
260302
260380
  const cwdDisplay = truncatePath(session.cwd, 30);
260303
- const msgCount = session.messageCount > 0 ? ` \u2022 ${session.messageCount} msgs` : "";
260381
+ const msgCount = session.messageCount > 0 ? ` ${session.messageCount} msgs` : "";
260304
260382
  return /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Box_default, {
260305
260383
  paddingY: 0,
260306
260384
  children: /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Text3, {
@@ -260308,8 +260386,6 @@ function RecoveryPanel({ sessions, onRecover, onStartFresh }) {
260308
260386
  children: [
260309
260387
  isSelected ? "\u25B6" : " ",
260310
260388
  " ",
260311
- index + 1,
260312
- ". ",
260313
260389
  cwdDisplay,
260314
260390
  msgCount,
260315
260391
  /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Text3, {
@@ -260325,7 +260401,17 @@ function RecoveryPanel({ sessions, onRecover, onStartFresh }) {
260325
260401
  ]
260326
260402
  }, undefined, true, undefined, this)
260327
260403
  }, session.sessionId, false, undefined, this);
260328
- })
260404
+ }),
260405
+ showDownArrow && /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Box_default, {
260406
+ children: /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Text3, {
260407
+ dimColor: true,
260408
+ children: [
260409
+ " \u2193 ",
260410
+ sessions.length - startIdx - VISIBLE_COUNT,
260411
+ " more below"
260412
+ ]
260413
+ }, undefined, true, undefined, this)
260414
+ }, undefined, false, undefined, this)
260329
260415
  ]
260330
260416
  }, undefined, true, undefined, this),
260331
260417
  selectedSessionIndex >= 0 && selectedSessionIndex < sessions.length && /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Box_default, {
@@ -260334,11 +260420,11 @@ function RecoveryPanel({ sessions, onRecover, onStartFresh }) {
260334
260420
  children: [
260335
260421
  /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Text3, {
260336
260422
  dimColor: true,
260337
- children: "Selected session details:"
260423
+ children: "Selected:"
260338
260424
  }, undefined, false, undefined, this),
260339
260425
  /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Text3, {
260340
260426
  children: [
260341
- " Directory: ",
260427
+ " ",
260342
260428
  /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Text3, {
260343
260429
  color: "cyan",
260344
260430
  children: sessions[selectedSessionIndex].cwd
@@ -260347,33 +260433,19 @@ function RecoveryPanel({ sessions, onRecover, onStartFresh }) {
260347
260433
  }, undefined, true, undefined, this),
260348
260434
  /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Text3, {
260349
260435
  children: [
260350
- " Last activity: ",
260351
- formatTimeAgo3(sessions[selectedSessionIndex].lastActivity)
260352
- ]
260353
- }, undefined, true, undefined, this),
260354
- /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Text3, {
260355
- children: [
260356
- " State: ",
260436
+ " ",
260437
+ formatTimeAgo3(sessions[selectedSessionIndex].lastActivity),
260438
+ " \xB7 ",
260357
260439
  getStateLabel(sessions[selectedSessionIndex].heartbeat.state)
260358
260440
  ]
260359
- }, undefined, true, undefined, this),
260360
- sessions[selectedSessionIndex].messageCount > 0 && /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Text3, {
260361
- children: [
260362
- " Messages: ",
260363
- sessions[selectedSessionIndex].messageCount
260364
- ]
260365
260441
  }, undefined, true, undefined, this)
260366
260442
  ]
260367
260443
  }, undefined, true, undefined, this),
260368
260444
  /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Box_default, {
260369
260445
  children: /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Text3, {
260370
260446
  dimColor: true,
260371
- children: [
260372
- "\u2191/\u2193 navigate \u2022 Enter to select \u2022 Esc for fresh \u2022 1-",
260373
- Math.min(9, sessions.length),
260374
- " quick select"
260375
- ]
260376
- }, undefined, true, undefined, this)
260447
+ children: "\u2191/\u2193 navigate \xB7 Enter select \xB7 Esc fresh start"
260448
+ }, undefined, false, undefined, this)
260377
260449
  }, undefined, false, undefined, this)
260378
260450
  ]
260379
260451
  }, undefined, true, undefined, this);
@@ -274453,13 +274525,13 @@ function useTypewriter(text, speed = 30, active = true) {
274453
274525
 
274454
274526
  // packages/terminal/src/hooks/useGradientCycle.ts
274455
274527
  var import_react65 = __toESM(require_react(), 1);
274456
- var COLORS = ["cyan", "blue", "magenta", "red", "yellow", "green"];
274528
+ var COLORS2 = ["cyan", "blue", "magenta", "red", "yellow", "green"];
274457
274529
  function useGradientCycle(intervalMs = 800) {
274458
274530
  const [index, setIndex] = import_react65.useState(0);
274459
274531
  const timerRef = import_react65.useRef(null);
274460
274532
  import_react65.useEffect(() => {
274461
274533
  timerRef.current = setInterval(() => {
274462
- setIndex((prev) => (prev + 1) % COLORS.length);
274534
+ setIndex((prev) => (prev + 1) % COLORS2.length);
274463
274535
  }, intervalMs);
274464
274536
  return () => {
274465
274537
  if (timerRef.current) {
@@ -274468,13 +274540,13 @@ function useGradientCycle(intervalMs = 800) {
274468
274540
  }
274469
274541
  };
274470
274542
  }, [intervalMs]);
274471
- return COLORS[index];
274543
+ return COLORS2[index];
274472
274544
  }
274473
274545
 
274474
274546
  // packages/terminal/src/components/OnboardingPanel.tsx
274475
274547
  init_src2();
274476
274548
  var jsx_dev_runtime32 = __toESM(require_jsx_dev_runtime(), 1);
274477
- var STEPS = ["welcome", "intro", "provider-select", "model-select", "api-key", "connectors", "connector-keys", "summary"];
274549
+ var STEPS = ["welcome", "intro", "provider-select", "model-select", "api-key", "connectors", "skills", "connector-keys", "summary"];
274478
274550
  var POPULAR_CONNECTORS = {
274479
274551
  notion: { desc: "Notion workspace", install: "bun add -g connect-notion" },
274480
274552
  gmail: { desc: "Gmail email", install: "bun add -g connect-gmail" },
@@ -274483,18 +274555,21 @@ var POPULAR_CONNECTORS = {
274483
274555
  github: { desc: "GitHub repos & issues", install: "bun add -g connect-github" },
274484
274556
  calendar: { desc: "Google Calendar", install: "bun add -g connect-calendar" }
274485
274557
  };
274486
- var ASCII_LOGO = ` _ ____ ____ ___ ____ _____ _ _ _ _____ ____
274487
- / \\ / ___/ ___|_ _/ ___|_ _|/ \\ | \\ | |_ _/ ___|
274488
- / _ \\ \\___ \\___ \\| |\\___ \\ | | / _ \\ | \\| | | | \\___ \\
274489
- / ___ \\ ___) |__) | | ___) || |/ ___ \\| |\\ | | | ___) |
274490
- /_/ \\_\\____/____/___|____/ |_/_/ \\_\\_| \\_| |_| |____/`;
274558
+ var LOGO_LINES = [
274559
+ " \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588",
274560
+ " \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 ",
274561
+ " \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588",
274562
+ " \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588",
274563
+ " \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588"
274564
+ ];
274565
+ var GRADIENT_COLORS = ["#7dd3fc", "#38bdf8", "#0ea5e9", "#0284c7", "#0369a1"];
274491
274566
  var COMPACT_LOGO = "ASSISTANTS";
274492
274567
  var INTRO_FEATURES = [
274493
- "Chat with Claude AI directly in your terminal",
274494
- "Connect to your tools - Notion, Gmail, Google Drive & more",
274495
- "Learn skills to automate your workflows",
274496
- "Remember context across conversations",
274497
- "Run on schedules and respond to webhooks"
274568
+ "Chat with AI models - Claude, GPT, and more",
274569
+ "Install connectors to integrate Notion, Gmail, Google Drive & more",
274570
+ "Install skills to automate your workflows",
274571
+ "Persistent memory across conversations",
274572
+ "Schedules, webhooks, and autonomous operation"
274498
274573
  ];
274499
274574
  var MAX_VISIBLE_CONNECTORS = 5;
274500
274575
  function getVisibleRange5(selectedIndex, totalItems, maxVisible = MAX_VISIBLE_CONNECTORS) {
@@ -274567,7 +274642,8 @@ function OnboardingPanel({
274567
274642
  onCancel,
274568
274643
  existingApiKeys,
274569
274644
  existingModel,
274570
- discoveredConnectors
274645
+ discoveredConnectors,
274646
+ discoveredSkills
274571
274647
  }) {
274572
274648
  const [currentStep, setCurrentStep] = import_react66.useState("welcome");
274573
274649
  const initialProvider = existingModel && getProviderForModel(existingModel) || "anthropic";
@@ -274591,6 +274667,8 @@ function OnboardingPanel({
274591
274667
  const [isCompact, setIsCompact] = import_react66.useState(false);
274592
274668
  const [isSaving, setIsSaving] = import_react66.useState(false);
274593
274669
  const submitGuardRef = import_react66.useRef(false);
274670
+ const skillsList = discoveredSkills || [];
274671
+ const [selectedSkillIndex, setSelectedSkillIndex] = import_react66.useState(0);
274594
274672
  const selectedProvider = LLM_PROVIDERS[selectedProviderIndex]?.id || "anthropic";
274595
274673
  const providerModels = ALL_MODELS.filter((m5) => m5.provider === selectedProvider);
274596
274674
  const availableModels = providerModels.length > 0 ? providerModels : ALL_MODELS;
@@ -274638,7 +274716,7 @@ function OnboardingPanel({
274638
274716
  if (idx > 0) {
274639
274717
  let prevStep = STEPS[idx - 1];
274640
274718
  if (prevStep === "connector-keys" && connectorKeysNeeded.length === 0) {
274641
- prevStep = "connectors";
274719
+ prevStep = "skills";
274642
274720
  }
274643
274721
  setCurrentStep(prevStep);
274644
274722
  }
@@ -274654,12 +274732,13 @@ function OnboardingPanel({
274654
274732
  provider: selectedProvider,
274655
274733
  model: selectedModel ? selectedModel.id : existingModel || "",
274656
274734
  connectors: Array.from(enabledConnectors),
274657
- connectorKeys
274735
+ connectorKeys,
274736
+ skills: skillsList.map((s6) => s6.name)
274658
274737
  });
274659
274738
  } finally {
274660
274739
  setIsSaving(false);
274661
274740
  }
274662
- }, [apiKey, selectedModelIndex, enabledConnectors, connectorKeys, onComplete, isSaving, selectedProvider, availableModels, existingModel]);
274741
+ }, [apiKey, selectedModelIndex, enabledConnectors, connectorKeys, onComplete, isSaving, selectedProvider, availableModels, existingModel, skillsList]);
274663
274742
  const submitApiKey = import_react66.useCallback((value) => {
274664
274743
  if (submitGuardRef.current)
274665
274744
  return;
@@ -274774,6 +274853,15 @@ function OnboardingPanel({
274774
274853
  }
274775
274854
  break;
274776
274855
  }
274856
+ case "skills":
274857
+ if (key.upArrow) {
274858
+ setSelectedSkillIndex((prev) => Math.max(0, prev - 1));
274859
+ } else if (key.downArrow) {
274860
+ setSelectedSkillIndex((prev) => Math.min(Math.max(0, skillsList.length - 1), prev + 1));
274861
+ } else if (key.return) {
274862
+ goNext();
274863
+ }
274864
+ break;
274777
274865
  case "connector-keys":
274778
274866
  break;
274779
274867
  case "summary":
@@ -274789,6 +274877,8 @@ function OnboardingPanel({
274789
274877
  setCurrentStep("api-key");
274790
274878
  } else if (keyInput === "c") {
274791
274879
  setCurrentStep("connectors");
274880
+ } else if (keyInput === "s") {
274881
+ setCurrentStep("skills");
274792
274882
  }
274793
274883
  }
274794
274884
  break;
@@ -274841,16 +274931,31 @@ function OnboardingPanel({
274841
274931
  children: [
274842
274932
  /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
274843
274933
  marginTop: 1,
274844
- marginBottom: 1,
274934
+ marginBottom: 0,
274935
+ flexDirection: "column",
274845
274936
  children: isCompact ? /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
274846
274937
  bold: true,
274847
274938
  color: logoColor,
274848
274939
  children: COMPACT_LOGO
274849
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
274850
- color: logoColor,
274851
- children: ASCII_LOGO
274852
- }, undefined, false, undefined, this)
274940
+ }, undefined, false, undefined, this) : LOGO_LINES.map((line, i5) => /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
274941
+ color: GRADIENT_COLORS[i5] || GRADIENT_COLORS[GRADIENT_COLORS.length - 1],
274942
+ children: line
274943
+ }, i5, false, undefined, this))
274853
274944
  }, undefined, false, undefined, this),
274945
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
274946
+ marginBottom: 1,
274947
+ children: [
274948
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
274949
+ dimColor: true,
274950
+ children: " by "
274951
+ }, undefined, false, undefined, this),
274952
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
274953
+ color: "#94a3b8",
274954
+ bold: true,
274955
+ children: "hasna"
274956
+ }, undefined, false, undefined, this)
274957
+ ]
274958
+ }, undefined, true, undefined, this),
274854
274959
  /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
274855
274960
  marginBottom: 1,
274856
274961
  children: [
@@ -275154,16 +275259,37 @@ function OnboardingPanel({
275154
275259
  }, undefined, false, undefined, this),
275155
275260
  /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275156
275261
  bold: true,
275157
- children: "Connect your tools"
275262
+ children: "Connectors"
275158
275263
  }, undefined, false, undefined, this),
275159
275264
  /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
275160
- flexDirection: "column",
275161
275265
  marginTop: 1,
275266
+ marginBottom: 1,
275267
+ flexDirection: "column",
275268
+ children: [
275269
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275270
+ color: "gray",
275271
+ children: "Connectors integrate external services. Install packages to add more."
275272
+ }, undefined, false, undefined, this),
275273
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275274
+ color: "gray",
275275
+ dimColor: true,
275276
+ children: [
275277
+ "Coming soon: ",
275278
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275279
+ color: "cyan",
275280
+ children: "bun add -g @hasna/connectors"
275281
+ }, undefined, false, undefined, this)
275282
+ ]
275283
+ }, undefined, true, undefined, this)
275284
+ ]
275285
+ }, undefined, true, undefined, this),
275286
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
275287
+ flexDirection: "column",
275162
275288
  children: [
275163
275289
  visibleRange.hasMore.above > 0 && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275164
275290
  dimColor: true,
275165
275291
  children: [
275166
- " \u2191 ",
275292
+ " ^ ",
275167
275293
  visibleRange.hasMore.above,
275168
275294
  " more above"
275169
275295
  ]
@@ -275202,9 +275328,9 @@ function OnboardingPanel({
275202
275328
  descDisplay
275203
275329
  ]
275204
275330
  }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275205
- color: "gray",
275331
+ dimColor: true,
275206
275332
  children: [
275207
- " ",
275333
+ " (not installed) ",
275208
275334
  connector.install
275209
275335
  ]
275210
275336
  }, undefined, true, undefined, this)
@@ -275214,7 +275340,7 @@ function OnboardingPanel({
275214
275340
  visibleRange.hasMore.below > 0 && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275215
275341
  dimColor: true,
275216
275342
  children: [
275217
- " \u2193 ",
275343
+ " v ",
275218
275344
  visibleRange.hasMore.below,
275219
275345
  " more below"
275220
275346
  ]
@@ -275223,10 +275349,100 @@ function OnboardingPanel({
275223
275349
  }, undefined, true, undefined, this),
275224
275350
  /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
275225
275351
  marginTop: 1,
275352
+ flexDirection: "column",
275353
+ children: [
275354
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275355
+ color: "gray",
275356
+ children: "Arrow keys to move, Space to toggle installed, Enter to continue"
275357
+ }, undefined, false, undefined, this),
275358
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275359
+ color: "gray",
275360
+ children: "Esc or B to go back"
275361
+ }, undefined, false, undefined, this)
275362
+ ]
275363
+ }, undefined, true, undefined, this)
275364
+ ]
275365
+ }, undefined, true, undefined, this);
275366
+ }
275367
+ if (currentStep === "skills") {
275368
+ return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
275369
+ flexDirection: "column",
275370
+ paddingX: 1,
275371
+ children: [
275372
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(ProgressBar, {
275373
+ step: stepIndex,
275374
+ total: STEPS.length
275375
+ }, undefined, false, undefined, this),
275376
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275377
+ bold: true,
275378
+ children: "Skills"
275379
+ }, undefined, false, undefined, this),
275380
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
275381
+ marginTop: 1,
275382
+ marginBottom: 1,
275383
+ flexDirection: "column",
275384
+ children: [
275385
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275386
+ color: "gray",
275387
+ children: "Skills teach your assistant specialized workflows."
275388
+ }, undefined, false, undefined, this),
275389
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275390
+ color: "gray",
275391
+ dimColor: true,
275392
+ children: [
275393
+ "Coming soon: ",
275394
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275395
+ color: "cyan",
275396
+ children: "bun add -g @hasna/skills"
275397
+ }, undefined, false, undefined, this)
275398
+ ]
275399
+ }, undefined, true, undefined, this)
275400
+ ]
275401
+ }, undefined, true, undefined, this),
275402
+ skillsList.length > 0 ? /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
275403
+ flexDirection: "column",
275404
+ children: skillsList.map((skill, i5) => {
275405
+ const isSelected = i5 === selectedSkillIndex;
275406
+ return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
275407
+ children: [
275408
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275409
+ color: isSelected ? "cyan" : "gray",
275410
+ children: isSelected ? "> " : " "
275411
+ }, undefined, false, undefined, this),
275412
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275413
+ color: "green",
275414
+ children: "[x]"
275415
+ }, undefined, false, undefined, this),
275416
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275417
+ children: [
275418
+ " /",
275419
+ skill.name
275420
+ ]
275421
+ }, undefined, true, undefined, this),
275422
+ skill.description && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275423
+ color: "gray",
275424
+ children: [
275425
+ " ",
275426
+ skill.description.length > 40 ? skill.description.slice(0, 37) + "..." : skill.description
275427
+ ]
275428
+ }, undefined, true, undefined, this)
275429
+ ]
275430
+ }, skill.name, true, undefined, this);
275431
+ })
275432
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
275433
+ marginBottom: 1,
275434
+ children: /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275435
+ dimColor: true,
275436
+ children: " No skills discovered. Add SKILL.md files to ~/.assistants/skills/"
275437
+ }, undefined, false, undefined, this)
275438
+ }, undefined, false, undefined, this),
275439
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
275440
+ marginTop: 1,
275441
+ flexDirection: "column",
275226
275442
  children: [
275227
275443
  /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275228
275444
  color: "gray",
275229
- children: "Arrow keys to move, Space to toggle, Enter to continue"
275445
+ children: "Press Enter to continue..."
275230
275446
  }, undefined, false, undefined, this),
275231
275447
  /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275232
275448
  color: "gray",
@@ -275303,6 +275519,7 @@ function OnboardingPanel({
275303
275519
  const selectedModel = availableModels[selectedModelIndex] || availableModels[0];
275304
275520
  const modelLabel = selectedModel ? `${selectedModel.name} (${getProviderLabel(selectedProvider)})` : "unknown";
275305
275521
  const connectorList = Array.from(enabledConnectors).join(", ") || "none";
275522
+ const skillsDisplay = skillsList.length > 0 ? skillsList.map((s6) => s6.name).join(", ") : "none";
275306
275523
  const modelDisplay = modelLabel.length > 24 ? modelLabel.slice(0, 21) + "..." : modelLabel.padEnd(24);
275307
275524
  return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
275308
275525
  flexDirection: "column",
@@ -275374,6 +275591,17 @@ function OnboardingPanel({
275374
275591
  "\u2502"
275375
275592
  ]
275376
275593
  }, undefined, true, undefined, this),
275594
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275595
+ color: "gray",
275596
+ children: [
275597
+ "\u2502",
275598
+ " Skills: ",
275599
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275600
+ children: skillsDisplay.length > 24 ? skillsDisplay.slice(0, 21) + "..." : skillsDisplay.padEnd(24)
275601
+ }, undefined, false, undefined, this),
275602
+ "\u2502"
275603
+ ]
275604
+ }, undefined, true, undefined, this),
275377
275605
  /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275378
275606
  color: "gray",
275379
275607
  children: [
@@ -275407,7 +275635,7 @@ function OnboardingPanel({
275407
275635
  children: [
275408
275636
  /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275409
275637
  color: "gray",
275410
- children: "Edit: (P)rovider (M)odel (K)ey (C)onnectors"
275638
+ children: "Edit: (P)rovider (M)odel (K)ey (C)onnectors (S)kills"
275411
275639
  }, undefined, false, undefined, this),
275412
275640
  /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
275413
275641
  color: "gray",
@@ -286373,6 +286601,7 @@ function App2({ cwd: cwd3, version: version5 }) {
286373
286601
  const isProcessingRef = import_react84.useRef(isProcessing);
286374
286602
  const currentToolCallRef = import_react84.useRef(currentToolCall);
286375
286603
  const hasPendingToolsRef = import_react84.useRef(false);
286604
+ const pendingFirstGreetingRef = import_react84.useRef(false);
286376
286605
  const inputRef = import_react84.useRef(null);
286377
286606
  const isPanelOpen = showOnboardingPanel || showRecoveryPanel || showConnectorsPanel || showTasksPanel || showSchedulesPanel || showSkillsPanel || showAssistantsPanel || showIdentityPanel || showMemoryPanel || showHooksPanel || showGuardrailsPanel || showBudgetPanel || showModelPanel || showAssistantsRegistryPanel || showConfigPanel || showWebhooksPanel || showChannelsPanel || showPeoplePanel || showContactsPanel || showTelephonyPanel || showOrdersPanel || showJobsPanel || showDocsPanel || showMessagesPanel || showProjectsPanel || showPlansPanel || showWalletPanel || showSecretsPanel || showWorkspacePanel || showAssistantsDashboard || showSwarmPanel || showLogsPanel || showHeartbeatPanel || showResumePanel;
286378
286607
  const processingStartTimeRef = import_react84.useRef(processingStartTime);
@@ -287623,6 +287852,21 @@ function App2({ cwd: cwd3, version: version5 }) {
287623
287852
  }
287624
287853
  initStateRef.current = "done";
287625
287854
  setIsInitializing(false);
287855
+ if (pendingFirstGreetingRef.current) {
287856
+ pendingFirstGreetingRef.current = false;
287857
+ markFirstGreetingShown();
287858
+ setTimeout(() => {
287859
+ const greetingPrompt = [
287860
+ "This is the user's very first interaction with you after completing setup.",
287861
+ "Greet them warmly and briefly introduce yourself.",
287862
+ "You are their personal AI assistant, made by Hasna.",
287863
+ "Tell them you're ready to help and ask what they'd like to do.",
287864
+ "Keep it short and friendly (2-3 sentences max).",
287865
+ 'Do NOT say your name is "Hasna Assistant" \u2014 you are simply their assistant.'
287866
+ ].join(" ");
287867
+ session.client.send(greetingPrompt).catch(() => {});
287868
+ }, 300);
287869
+ }
287626
287870
  }, [cwd3, registry3, handleChunk, finalizeResponse2, resetTurnState, loadSessionMetadata, beginAskUser, beginInterview, workspaceBaseDir]);
287627
287871
  const handleRecover = import_react84.useCallback((session) => {
287628
287872
  setShowRecoveryPanel(false);
@@ -287702,7 +287946,13 @@ function App2({ cwd: cwd3, version: version5 }) {
287702
287946
  };
287703
287947
  writeFileSync12(configPath, JSON.stringify(newConfig, null, 2), "utf-8");
287704
287948
  await loadConfigFiles();
287949
+ try {
287950
+ markOnboardingCompleted();
287951
+ } catch {}
287705
287952
  process.env[envName] = result.apiKey;
287953
+ if (!isFirstGreetingShown()) {
287954
+ pendingFirstGreetingRef.current = true;
287955
+ }
287706
287956
  setShowOnboardingPanel(false);
287707
287957
  }, [loadConfigFiles, workspaceBaseDir]);
287708
287958
  const handleOnboardingCancel = import_react84.useCallback(() => {
@@ -287729,20 +287979,24 @@ function App2({ cwd: cwd3, version: version5 }) {
287729
287979
  return;
287730
287980
  }
287731
287981
  try {
287732
- const configPath = join43(workspaceBaseDir || getConfigDir(), "config.json");
287733
- const { existsSync: existsSync27, readFileSync: readFileSync16 } = await import("fs");
287734
287982
  let needsOnboarding = false;
287735
- if (!existsSync27(configPath)) {
287736
- needsOnboarding = true;
287983
+ if (isOnboardingCompleted()) {
287984
+ needsOnboarding = false;
287737
287985
  } else {
287738
- try {
287739
- const raw = readFileSync16(configPath, "utf-8");
287740
- const parsed = JSON.parse(raw);
287741
- if (!parsed.onboardingCompleted) {
287986
+ const configPath = join43(workspaceBaseDir || getConfigDir(), "config.json");
287987
+ const { existsSync: existsSync27, readFileSync: readFileSync16 } = await import("fs");
287988
+ if (!existsSync27(configPath)) {
287989
+ needsOnboarding = true;
287990
+ } else {
287991
+ try {
287992
+ const raw = readFileSync16(configPath, "utf-8");
287993
+ const parsed = JSON.parse(raw);
287994
+ if (!parsed.onboardingCompleted) {
287995
+ needsOnboarding = true;
287996
+ }
287997
+ } catch {
287742
287998
  needsOnboarding = true;
287743
287999
  }
287744
- } catch {
287745
- needsOnboarding = true;
287746
288000
  }
287747
288001
  }
287748
288002
  if (needsOnboarding) {
@@ -288599,7 +288853,8 @@ function App2({ cwd: cwd3, version: version5 }) {
288599
288853
  onComplete: handleOnboardingComplete,
288600
288854
  onCancel: handleOnboardingCancel,
288601
288855
  existingApiKeys: existingKeys,
288602
- discoveredConnectors: discoveredNames
288856
+ discoveredConnectors: discoveredNames,
288857
+ discoveredSkills: []
288603
288858
  }, undefined, false, undefined, this);
288604
288859
  }
288605
288860
  if (showRecoveryPanel && recoverableSessions.length > 0) {
@@ -290849,7 +291104,7 @@ Interactive Mode:
290849
291104
  // packages/terminal/src/index.tsx
290850
291105
  var jsx_dev_runtime52 = __toESM(require_jsx_dev_runtime(), 1);
290851
291106
  setRuntime(bunRuntime);
290852
- var VERSION4 = "1.1.53";
291107
+ var VERSION4 = "1.1.55";
290853
291108
  var SYNC_START = "\x1B[?2026h";
290854
291109
  var SYNC_END = "\x1B[?2026l";
290855
291110
  function enableSynchronizedOutput() {
@@ -290968,4 +291223,4 @@ export {
290968
291223
  main
290969
291224
  };
290970
291225
 
290971
- //# debugId=2C44C31995AA98B064756E2164756E21
291226
+ //# debugId=924F3A93E2DEEC0164756E2164756E21