@hasna/assistants 1.0.6 → 1.0.7
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 +30 -8
- package/dist/index.js.map +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6978,13 +6978,30 @@ async function loadConfig(cwd = process.cwd()) {
|
|
|
6978
6978
|
const userConfigPath = getConfigPath("config.json");
|
|
6979
6979
|
const legacyUserConfigPath = getConfigPath("settings.json");
|
|
6980
6980
|
const userConfig = await loadJsonFile(userConfigPath) || await loadJsonFile(legacyUserConfigPath);
|
|
6981
|
-
config = mergeConfig(config, userConfig || undefined);
|
|
6981
|
+
config = mergeConfig(config, migrateConfigKeys(userConfig) || undefined);
|
|
6982
6982
|
const projectConfigPath = join(getProjectConfigDir(cwd), "config.json");
|
|
6983
6983
|
const projectConfig = await loadJsonFile(projectConfigPath);
|
|
6984
|
-
config = mergeConfig(config, projectConfig || undefined);
|
|
6984
|
+
config = mergeConfig(config, migrateConfigKeys(projectConfig) || undefined);
|
|
6985
6985
|
const localConfigPath = join(getProjectConfigDir(cwd), "config.local.json");
|
|
6986
6986
|
const localConfig = await loadJsonFile(localConfigPath);
|
|
6987
|
-
config = mergeConfig(config, localConfig || undefined);
|
|
6987
|
+
config = mergeConfig(config, migrateConfigKeys(localConfig) || undefined);
|
|
6988
|
+
return config;
|
|
6989
|
+
}
|
|
6990
|
+
function migrateConfigKeys(config) {
|
|
6991
|
+
if (!config)
|
|
6992
|
+
return null;
|
|
6993
|
+
const c = config;
|
|
6994
|
+
if (c.subagents && !c.subassistants) {
|
|
6995
|
+
c.subassistants = c.subagents;
|
|
6996
|
+
delete c.subagents;
|
|
6997
|
+
}
|
|
6998
|
+
if (config.budget) {
|
|
6999
|
+
const b = config.budget;
|
|
7000
|
+
if (b.agent && !b.assistant) {
|
|
7001
|
+
b.assistant = b.agent;
|
|
7002
|
+
delete b.agent;
|
|
7003
|
+
}
|
|
7004
|
+
}
|
|
6988
7005
|
return config;
|
|
6989
7006
|
}
|
|
6990
7007
|
async function loadHooksConfig(cwd = process.cwd()) {
|
|
@@ -51257,7 +51274,8 @@ class BudgetTracker {
|
|
|
51257
51274
|
return;
|
|
51258
51275
|
this.sessionUsage = data.session;
|
|
51259
51276
|
this.swarmUsage = data.swarm;
|
|
51260
|
-
|
|
51277
|
+
const assistantData = data.assistants || data.agents || {};
|
|
51278
|
+
for (const [assistantId, usage] of Object.entries(assistantData)) {
|
|
51261
51279
|
this.assistantUsages.set(assistantId, usage);
|
|
51262
51280
|
}
|
|
51263
51281
|
} catch {}
|
|
@@ -136072,7 +136090,7 @@ async function cancelRecurringTask(cwd, id) {
|
|
|
136072
136090
|
return task;
|
|
136073
136091
|
}
|
|
136074
136092
|
// packages/core/src/commands/builtin.ts
|
|
136075
|
-
var VERSION = "1.0.
|
|
136093
|
+
var VERSION = "1.0.7";
|
|
136076
136094
|
function resolveAuthTimeout(resolve5) {
|
|
136077
136095
|
resolve5({ exitCode: 1, stdout: { toString: () => "{}" } });
|
|
136078
136096
|
}
|
|
@@ -158917,7 +158935,11 @@ class LocalMessagesStorage {
|
|
|
158917
158935
|
if (!await file.exists()) {
|
|
158918
158936
|
return { assistants: {} };
|
|
158919
158937
|
}
|
|
158920
|
-
|
|
158938
|
+
const data = await file.json();
|
|
158939
|
+
if (data.agents && !data.assistants) {
|
|
158940
|
+
return { assistants: data.agents };
|
|
158941
|
+
}
|
|
158942
|
+
return { assistants: data.assistants || {} };
|
|
158921
158943
|
} catch {
|
|
158922
158944
|
return { assistants: {} };
|
|
158923
158945
|
}
|
|
@@ -192485,7 +192507,7 @@ Interactive Mode:
|
|
|
192485
192507
|
// packages/terminal/src/index.tsx
|
|
192486
192508
|
var jsx_dev_runtime30 = __toESM(require_jsx_dev_runtime(), 1);
|
|
192487
192509
|
setRuntime(bunRuntime);
|
|
192488
|
-
var VERSION4 = "1.0.
|
|
192510
|
+
var VERSION4 = "1.0.7";
|
|
192489
192511
|
var SYNC_START = "\x1B[?2026h";
|
|
192490
192512
|
var SYNC_END = "\x1B[?2026l";
|
|
192491
192513
|
function enableSynchronizedOutput() {
|
|
@@ -192625,4 +192647,4 @@ export {
|
|
|
192625
192647
|
main
|
|
192626
192648
|
};
|
|
192627
192649
|
|
|
192628
|
-
//# debugId=
|
|
192650
|
+
//# debugId=D5A3B4DDF64180F864756E2164756E21
|