@hasna/assistants 1.1.54 → 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 +241 -33
- package/dist/index.js.map +8 -7
- package/package.json +1 -1
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
|
|
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.
|
|
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(),
|
|
@@ -274503,7 +274546,7 @@ function useGradientCycle(intervalMs = 800) {
|
|
|
274503
274546
|
// packages/terminal/src/components/OnboardingPanel.tsx
|
|
274504
274547
|
init_src2();
|
|
274505
274548
|
var jsx_dev_runtime32 = __toESM(require_jsx_dev_runtime(), 1);
|
|
274506
|
-
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"];
|
|
274507
274550
|
var POPULAR_CONNECTORS = {
|
|
274508
274551
|
notion: { desc: "Notion workspace", install: "bun add -g connect-notion" },
|
|
274509
274552
|
gmail: { desc: "Gmail email", install: "bun add -g connect-gmail" },
|
|
@@ -274522,11 +274565,11 @@ var LOGO_LINES = [
|
|
|
274522
274565
|
var GRADIENT_COLORS = ["#7dd3fc", "#38bdf8", "#0ea5e9", "#0284c7", "#0369a1"];
|
|
274523
274566
|
var COMPACT_LOGO = "ASSISTANTS";
|
|
274524
274567
|
var INTRO_FEATURES = [
|
|
274525
|
-
"Chat with
|
|
274526
|
-
"
|
|
274527
|
-
"
|
|
274528
|
-
"
|
|
274529
|
-
"
|
|
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"
|
|
274530
274573
|
];
|
|
274531
274574
|
var MAX_VISIBLE_CONNECTORS = 5;
|
|
274532
274575
|
function getVisibleRange5(selectedIndex, totalItems, maxVisible = MAX_VISIBLE_CONNECTORS) {
|
|
@@ -274599,7 +274642,8 @@ function OnboardingPanel({
|
|
|
274599
274642
|
onCancel,
|
|
274600
274643
|
existingApiKeys,
|
|
274601
274644
|
existingModel,
|
|
274602
|
-
discoveredConnectors
|
|
274645
|
+
discoveredConnectors,
|
|
274646
|
+
discoveredSkills
|
|
274603
274647
|
}) {
|
|
274604
274648
|
const [currentStep, setCurrentStep] = import_react66.useState("welcome");
|
|
274605
274649
|
const initialProvider = existingModel && getProviderForModel(existingModel) || "anthropic";
|
|
@@ -274623,6 +274667,8 @@ function OnboardingPanel({
|
|
|
274623
274667
|
const [isCompact, setIsCompact] = import_react66.useState(false);
|
|
274624
274668
|
const [isSaving, setIsSaving] = import_react66.useState(false);
|
|
274625
274669
|
const submitGuardRef = import_react66.useRef(false);
|
|
274670
|
+
const skillsList = discoveredSkills || [];
|
|
274671
|
+
const [selectedSkillIndex, setSelectedSkillIndex] = import_react66.useState(0);
|
|
274626
274672
|
const selectedProvider = LLM_PROVIDERS[selectedProviderIndex]?.id || "anthropic";
|
|
274627
274673
|
const providerModels = ALL_MODELS.filter((m5) => m5.provider === selectedProvider);
|
|
274628
274674
|
const availableModels = providerModels.length > 0 ? providerModels : ALL_MODELS;
|
|
@@ -274670,7 +274716,7 @@ function OnboardingPanel({
|
|
|
274670
274716
|
if (idx > 0) {
|
|
274671
274717
|
let prevStep = STEPS[idx - 1];
|
|
274672
274718
|
if (prevStep === "connector-keys" && connectorKeysNeeded.length === 0) {
|
|
274673
|
-
prevStep = "
|
|
274719
|
+
prevStep = "skills";
|
|
274674
274720
|
}
|
|
274675
274721
|
setCurrentStep(prevStep);
|
|
274676
274722
|
}
|
|
@@ -274686,12 +274732,13 @@ function OnboardingPanel({
|
|
|
274686
274732
|
provider: selectedProvider,
|
|
274687
274733
|
model: selectedModel ? selectedModel.id : existingModel || "",
|
|
274688
274734
|
connectors: Array.from(enabledConnectors),
|
|
274689
|
-
connectorKeys
|
|
274735
|
+
connectorKeys,
|
|
274736
|
+
skills: skillsList.map((s6) => s6.name)
|
|
274690
274737
|
});
|
|
274691
274738
|
} finally {
|
|
274692
274739
|
setIsSaving(false);
|
|
274693
274740
|
}
|
|
274694
|
-
}, [apiKey, selectedModelIndex, enabledConnectors, connectorKeys, onComplete, isSaving, selectedProvider, availableModels, existingModel]);
|
|
274741
|
+
}, [apiKey, selectedModelIndex, enabledConnectors, connectorKeys, onComplete, isSaving, selectedProvider, availableModels, existingModel, skillsList]);
|
|
274695
274742
|
const submitApiKey = import_react66.useCallback((value) => {
|
|
274696
274743
|
if (submitGuardRef.current)
|
|
274697
274744
|
return;
|
|
@@ -274806,6 +274853,15 @@ function OnboardingPanel({
|
|
|
274806
274853
|
}
|
|
274807
274854
|
break;
|
|
274808
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;
|
|
274809
274865
|
case "connector-keys":
|
|
274810
274866
|
break;
|
|
274811
274867
|
case "summary":
|
|
@@ -274821,6 +274877,8 @@ function OnboardingPanel({
|
|
|
274821
274877
|
setCurrentStep("api-key");
|
|
274822
274878
|
} else if (keyInput === "c") {
|
|
274823
274879
|
setCurrentStep("connectors");
|
|
274880
|
+
} else if (keyInput === "s") {
|
|
274881
|
+
setCurrentStep("skills");
|
|
274824
274882
|
}
|
|
274825
274883
|
}
|
|
274826
274884
|
break;
|
|
@@ -275201,16 +275259,37 @@ function OnboardingPanel({
|
|
|
275201
275259
|
}, undefined, false, undefined, this),
|
|
275202
275260
|
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
|
|
275203
275261
|
bold: true,
|
|
275204
|
-
children: "
|
|
275262
|
+
children: "Connectors"
|
|
275205
275263
|
}, undefined, false, undefined, this),
|
|
275206
275264
|
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
|
|
275207
|
-
flexDirection: "column",
|
|
275208
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",
|
|
275209
275288
|
children: [
|
|
275210
275289
|
visibleRange.hasMore.above > 0 && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
|
|
275211
275290
|
dimColor: true,
|
|
275212
275291
|
children: [
|
|
275213
|
-
"
|
|
275292
|
+
" ^ ",
|
|
275214
275293
|
visibleRange.hasMore.above,
|
|
275215
275294
|
" more above"
|
|
275216
275295
|
]
|
|
@@ -275249,9 +275328,9 @@ function OnboardingPanel({
|
|
|
275249
275328
|
descDisplay
|
|
275250
275329
|
]
|
|
275251
275330
|
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
|
|
275252
|
-
|
|
275331
|
+
dimColor: true,
|
|
275253
275332
|
children: [
|
|
275254
|
-
" ",
|
|
275333
|
+
" (not installed) ",
|
|
275255
275334
|
connector.install
|
|
275256
275335
|
]
|
|
275257
275336
|
}, undefined, true, undefined, this)
|
|
@@ -275261,7 +275340,7 @@ function OnboardingPanel({
|
|
|
275261
275340
|
visibleRange.hasMore.below > 0 && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
|
|
275262
275341
|
dimColor: true,
|
|
275263
275342
|
children: [
|
|
275264
|
-
"
|
|
275343
|
+
" v ",
|
|
275265
275344
|
visibleRange.hasMore.below,
|
|
275266
275345
|
" more below"
|
|
275267
275346
|
]
|
|
@@ -275270,10 +275349,100 @@ function OnboardingPanel({
|
|
|
275270
275349
|
}, undefined, true, undefined, this),
|
|
275271
275350
|
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
|
|
275272
275351
|
marginTop: 1,
|
|
275352
|
+
flexDirection: "column",
|
|
275273
275353
|
children: [
|
|
275274
275354
|
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
|
|
275275
275355
|
color: "gray",
|
|
275276
|
-
children: "Arrow keys to move, Space to toggle, Enter to continue"
|
|
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",
|
|
275442
|
+
children: [
|
|
275443
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
|
|
275444
|
+
color: "gray",
|
|
275445
|
+
children: "Press Enter to continue..."
|
|
275277
275446
|
}, undefined, false, undefined, this),
|
|
275278
275447
|
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
|
|
275279
275448
|
color: "gray",
|
|
@@ -275350,6 +275519,7 @@ function OnboardingPanel({
|
|
|
275350
275519
|
const selectedModel = availableModels[selectedModelIndex] || availableModels[0];
|
|
275351
275520
|
const modelLabel = selectedModel ? `${selectedModel.name} (${getProviderLabel(selectedProvider)})` : "unknown";
|
|
275352
275521
|
const connectorList = Array.from(enabledConnectors).join(", ") || "none";
|
|
275522
|
+
const skillsDisplay = skillsList.length > 0 ? skillsList.map((s6) => s6.name).join(", ") : "none";
|
|
275353
275523
|
const modelDisplay = modelLabel.length > 24 ? modelLabel.slice(0, 21) + "..." : modelLabel.padEnd(24);
|
|
275354
275524
|
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
|
|
275355
275525
|
flexDirection: "column",
|
|
@@ -275421,6 +275591,17 @@ function OnboardingPanel({
|
|
|
275421
275591
|
"\u2502"
|
|
275422
275592
|
]
|
|
275423
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),
|
|
275424
275605
|
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
|
|
275425
275606
|
color: "gray",
|
|
275426
275607
|
children: [
|
|
@@ -275454,7 +275635,7 @@ function OnboardingPanel({
|
|
|
275454
275635
|
children: [
|
|
275455
275636
|
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
|
|
275456
275637
|
color: "gray",
|
|
275457
|
-
children: "Edit: (P)rovider (M)odel (K)ey (C)onnectors"
|
|
275638
|
+
children: "Edit: (P)rovider (M)odel (K)ey (C)onnectors (S)kills"
|
|
275458
275639
|
}, undefined, false, undefined, this),
|
|
275459
275640
|
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
|
|
275460
275641
|
color: "gray",
|
|
@@ -286420,6 +286601,7 @@ function App2({ cwd: cwd3, version: version5 }) {
|
|
|
286420
286601
|
const isProcessingRef = import_react84.useRef(isProcessing);
|
|
286421
286602
|
const currentToolCallRef = import_react84.useRef(currentToolCall);
|
|
286422
286603
|
const hasPendingToolsRef = import_react84.useRef(false);
|
|
286604
|
+
const pendingFirstGreetingRef = import_react84.useRef(false);
|
|
286423
286605
|
const inputRef = import_react84.useRef(null);
|
|
286424
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;
|
|
286425
286607
|
const processingStartTimeRef = import_react84.useRef(processingStartTime);
|
|
@@ -287670,6 +287852,21 @@ function App2({ cwd: cwd3, version: version5 }) {
|
|
|
287670
287852
|
}
|
|
287671
287853
|
initStateRef.current = "done";
|
|
287672
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
|
+
}
|
|
287673
287870
|
}, [cwd3, registry3, handleChunk, finalizeResponse2, resetTurnState, loadSessionMetadata, beginAskUser, beginInterview, workspaceBaseDir]);
|
|
287674
287871
|
const handleRecover = import_react84.useCallback((session) => {
|
|
287675
287872
|
setShowRecoveryPanel(false);
|
|
@@ -287749,7 +287946,13 @@ function App2({ cwd: cwd3, version: version5 }) {
|
|
|
287749
287946
|
};
|
|
287750
287947
|
writeFileSync12(configPath, JSON.stringify(newConfig, null, 2), "utf-8");
|
|
287751
287948
|
await loadConfigFiles();
|
|
287949
|
+
try {
|
|
287950
|
+
markOnboardingCompleted();
|
|
287951
|
+
} catch {}
|
|
287752
287952
|
process.env[envName] = result.apiKey;
|
|
287953
|
+
if (!isFirstGreetingShown()) {
|
|
287954
|
+
pendingFirstGreetingRef.current = true;
|
|
287955
|
+
}
|
|
287753
287956
|
setShowOnboardingPanel(false);
|
|
287754
287957
|
}, [loadConfigFiles, workspaceBaseDir]);
|
|
287755
287958
|
const handleOnboardingCancel = import_react84.useCallback(() => {
|
|
@@ -287776,20 +287979,24 @@ function App2({ cwd: cwd3, version: version5 }) {
|
|
|
287776
287979
|
return;
|
|
287777
287980
|
}
|
|
287778
287981
|
try {
|
|
287779
|
-
const configPath = join43(workspaceBaseDir || getConfigDir(), "config.json");
|
|
287780
|
-
const { existsSync: existsSync27, readFileSync: readFileSync16 } = await import("fs");
|
|
287781
287982
|
let needsOnboarding = false;
|
|
287782
|
-
if (
|
|
287783
|
-
needsOnboarding =
|
|
287983
|
+
if (isOnboardingCompleted()) {
|
|
287984
|
+
needsOnboarding = false;
|
|
287784
287985
|
} else {
|
|
287785
|
-
|
|
287786
|
-
|
|
287787
|
-
|
|
287788
|
-
|
|
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 {
|
|
287789
287998
|
needsOnboarding = true;
|
|
287790
287999
|
}
|
|
287791
|
-
} catch {
|
|
287792
|
-
needsOnboarding = true;
|
|
287793
288000
|
}
|
|
287794
288001
|
}
|
|
287795
288002
|
if (needsOnboarding) {
|
|
@@ -288646,7 +288853,8 @@ function App2({ cwd: cwd3, version: version5 }) {
|
|
|
288646
288853
|
onComplete: handleOnboardingComplete,
|
|
288647
288854
|
onCancel: handleOnboardingCancel,
|
|
288648
288855
|
existingApiKeys: existingKeys,
|
|
288649
|
-
discoveredConnectors: discoveredNames
|
|
288856
|
+
discoveredConnectors: discoveredNames,
|
|
288857
|
+
discoveredSkills: []
|
|
288650
288858
|
}, undefined, false, undefined, this);
|
|
288651
288859
|
}
|
|
288652
288860
|
if (showRecoveryPanel && recoverableSessions.length > 0) {
|
|
@@ -290896,7 +291104,7 @@ Interactive Mode:
|
|
|
290896
291104
|
// packages/terminal/src/index.tsx
|
|
290897
291105
|
var jsx_dev_runtime52 = __toESM(require_jsx_dev_runtime(), 1);
|
|
290898
291106
|
setRuntime(bunRuntime);
|
|
290899
|
-
var VERSION4 = "1.1.
|
|
291107
|
+
var VERSION4 = "1.1.55";
|
|
290900
291108
|
var SYNC_START = "\x1B[?2026h";
|
|
290901
291109
|
var SYNC_END = "\x1B[?2026l";
|
|
290902
291110
|
function enableSynchronizedOutput() {
|
|
@@ -291015,4 +291223,4 @@ export {
|
|
|
291015
291223
|
main
|
|
291016
291224
|
};
|
|
291017
291225
|
|
|
291018
|
-
//# debugId=
|
|
291226
|
+
//# debugId=924F3A93E2DEEC0164756E2164756E21
|