@hasna/assistants 0.6.14 → 0.6.15
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 +22 -11
- package/dist/index.js.map +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -43715,9 +43715,18 @@ async function migrateFromOldpal() {
|
|
|
43715
43715
|
await writeFile7(join19(newPath, "config.json"), JSON.stringify(config, null, 2));
|
|
43716
43716
|
result.migrated.push("config.json");
|
|
43717
43717
|
}
|
|
43718
|
+
if (await copyIfExists(join19(oldPath, "settings.local.json"), join19(newPath, "config.local.json"))) {
|
|
43719
|
+
result.migrated.push("config.local.json");
|
|
43720
|
+
}
|
|
43718
43721
|
if (await copyIfExists(join19(oldPath, "hooks.json"), join19(newPath, "hooks.json"))) {
|
|
43719
43722
|
result.migrated.push("hooks.json");
|
|
43720
43723
|
}
|
|
43724
|
+
if (await copyIfExists(join19(oldPath, "commands"), join19(newPath, "commands"))) {
|
|
43725
|
+
result.migrated.push("commands");
|
|
43726
|
+
}
|
|
43727
|
+
if (await copyIfExists(join19(oldPath, "OLDPAL.md"), join19(newPath, "ASSISTANTS.md"))) {
|
|
43728
|
+
result.migrated.push("ASSISTANTS.md");
|
|
43729
|
+
}
|
|
43721
43730
|
if (await copyIfExists(join19(oldPath, "skills"), join19(newPath, "shared", "skills"))) {
|
|
43722
43731
|
result.migrated.push("skills");
|
|
43723
43732
|
}
|
|
@@ -46190,7 +46199,7 @@ function parseErrorMessage(error) {
|
|
|
46190
46199
|
}
|
|
46191
46200
|
var MESSAGE_CHUNK_LINES = 12;
|
|
46192
46201
|
var MESSAGE_WRAP_CHARS = 120;
|
|
46193
|
-
function buildDisplayMessages(messages, chunkLines) {
|
|
46202
|
+
function buildDisplayMessages(messages, chunkLines, wrapChars) {
|
|
46194
46203
|
const display = [];
|
|
46195
46204
|
for (const msg of messages) {
|
|
46196
46205
|
const content = msg.content ?? "";
|
|
@@ -46203,12 +46212,12 @@ function buildDisplayMessages(messages, chunkLines) {
|
|
|
46203
46212
|
`);
|
|
46204
46213
|
const lines = [];
|
|
46205
46214
|
for (const line of rawLines) {
|
|
46206
|
-
if (line.length <=
|
|
46215
|
+
if (line.length <= wrapChars) {
|
|
46207
46216
|
lines.push(line);
|
|
46208
46217
|
continue;
|
|
46209
46218
|
}
|
|
46210
|
-
for (let i = 0;i < line.length; i +=
|
|
46211
|
-
lines.push(line.slice(i, i +
|
|
46219
|
+
for (let i = 0;i < line.length; i += wrapChars) {
|
|
46220
|
+
lines.push(line.slice(i, i + wrapChars));
|
|
46212
46221
|
}
|
|
46213
46222
|
}
|
|
46214
46223
|
if (lines.length <= chunkLines) {
|
|
@@ -46230,9 +46239,9 @@ function buildDisplayMessages(messages, chunkLines) {
|
|
|
46230
46239
|
}
|
|
46231
46240
|
return display;
|
|
46232
46241
|
}
|
|
46233
|
-
function App2({ cwd: cwd2 }) {
|
|
46242
|
+
function App2({ cwd: cwd2, version }) {
|
|
46234
46243
|
const { exit } = use_app_default();
|
|
46235
|
-
const { rows } = use_stdout_default();
|
|
46244
|
+
const { rows, columns } = use_stdout_default();
|
|
46236
46245
|
const [registry2] = import_react29.useState(() => new SessionRegistry);
|
|
46237
46246
|
const registryRef = import_react29.useRef(registry2);
|
|
46238
46247
|
const [activeSessionId, setActiveSessionId] = import_react29.useState(null);
|
|
@@ -46570,7 +46579,8 @@ function App2({ cwd: cwd2 }) {
|
|
|
46570
46579
|
}, [activeSessionId]);
|
|
46571
46580
|
const activeQueue = activeSessionId ? messageQueue.filter((msg) => msg.sessionId === activeSessionId) : [];
|
|
46572
46581
|
const queuedMessageIds = import_react29.useMemo(() => new Set(activeQueue.map((msg) => msg.id)), [activeQueue]);
|
|
46573
|
-
const
|
|
46582
|
+
const wrapChars = columns ? Math.max(40, columns - 4) : MESSAGE_WRAP_CHARS;
|
|
46583
|
+
const displayMessages = import_react29.useMemo(() => buildDisplayMessages(messages, MESSAGE_CHUNK_LINES, wrapChars), [messages, wrapChars]);
|
|
46574
46584
|
import_react29.useEffect(() => {
|
|
46575
46585
|
if (!isProcessing && activeQueue.length > 0) {
|
|
46576
46586
|
processQueue();
|
|
@@ -46829,7 +46839,7 @@ function App2({ cwd: cwd2 }) {
|
|
|
46829
46839
|
padding: 1,
|
|
46830
46840
|
children: [
|
|
46831
46841
|
showWelcome && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(WelcomeBanner, {
|
|
46832
|
-
version: "0.6.
|
|
46842
|
+
version: version ?? "0.6.13",
|
|
46833
46843
|
model: "claude-sonnet-4",
|
|
46834
46844
|
directory: activeSession?.cwd || cwd2
|
|
46835
46845
|
}, undefined, false, undefined, this),
|
|
@@ -47156,7 +47166,7 @@ function formatStreamEvent(chunk) {
|
|
|
47156
47166
|
|
|
47157
47167
|
// packages/terminal/src/index.tsx
|
|
47158
47168
|
var jsx_dev_runtime11 = __toESM(require_jsx_dev_runtime(), 1);
|
|
47159
|
-
var VERSION3 = "0.6.
|
|
47169
|
+
var VERSION3 = "0.6.15";
|
|
47160
47170
|
function parseArgs(argv) {
|
|
47161
47171
|
const args = argv.slice(2);
|
|
47162
47172
|
const options = {
|
|
@@ -47311,11 +47321,12 @@ if (options.print !== null) {
|
|
|
47311
47321
|
});
|
|
47312
47322
|
} else {
|
|
47313
47323
|
const { waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(App2, {
|
|
47314
|
-
cwd: options.cwd
|
|
47324
|
+
cwd: options.cwd,
|
|
47325
|
+
version: VERSION3
|
|
47315
47326
|
}, undefined, false, undefined, this));
|
|
47316
47327
|
waitUntilExit().then(() => {
|
|
47317
47328
|
process.exit(0);
|
|
47318
47329
|
});
|
|
47319
47330
|
}
|
|
47320
47331
|
|
|
47321
|
-
//# debugId=
|
|
47332
|
+
//# debugId=E5501B17CB0867B264756E2164756E21
|