@hasna/assistants 1.1.11 → 1.1.12
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 +26 -20
- package/dist/index.js.map +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -79300,7 +79300,7 @@ ${repoUrl}/issues/new
|
|
|
79300
79300
|
context.setProjectContext(projectContext);
|
|
79301
79301
|
}
|
|
79302
79302
|
}
|
|
79303
|
-
var VERSION = "1.1.
|
|
79303
|
+
var VERSION = "1.1.12";
|
|
79304
79304
|
var init_builtin = __esm(async () => {
|
|
79305
79305
|
init_src2();
|
|
79306
79306
|
init_store();
|
|
@@ -205109,7 +205109,7 @@ function formatRelativeTime5(isoDate) {
|
|
|
205109
205109
|
return `${minutes}m ago`;
|
|
205110
205110
|
return `${seconds}s ago`;
|
|
205111
205111
|
}
|
|
205112
|
-
function ChannelsPanel({ manager, onClose }) {
|
|
205112
|
+
function ChannelsPanel({ manager, onClose, activePersonId, activePersonName }) {
|
|
205113
205113
|
const [mode, setMode] = import_react46.useState("list");
|
|
205114
205114
|
const [channels2, setChannels] = import_react46.useState([]);
|
|
205115
205115
|
const [selectedIndex, setSelectedIndex] = import_react46.useState(0);
|
|
@@ -205151,12 +205151,9 @@ function ChannelsPanel({ manager, onClose }) {
|
|
|
205151
205151
|
setMode("members");
|
|
205152
205152
|
}
|
|
205153
205153
|
};
|
|
205154
|
-
|
|
205155
|
-
|
|
205156
|
-
|
|
205157
|
-
if (mode === "chat" && !key.escape)
|
|
205158
|
-
return;
|
|
205159
|
-
if (key.escape || input === "q") {
|
|
205154
|
+
const isTextEntry = mode === "create-name" || mode === "create-desc" || mode === "invite" || mode === "chat";
|
|
205155
|
+
useSafeInput((_input, key) => {
|
|
205156
|
+
if (key.escape) {
|
|
205160
205157
|
if (mode === "list") {
|
|
205161
205158
|
onClose();
|
|
205162
205159
|
} else {
|
|
@@ -205164,8 +205161,11 @@ function ChannelsPanel({ manager, onClose }) {
|
|
|
205164
205161
|
setSelectedChannel(null);
|
|
205165
205162
|
setStatusMessage(null);
|
|
205166
205163
|
}
|
|
205167
|
-
return;
|
|
205168
205164
|
}
|
|
205165
|
+
});
|
|
205166
|
+
useSafeInput((input, key) => {
|
|
205167
|
+
if (key.escape)
|
|
205168
|
+
return;
|
|
205169
205169
|
if (mode === "list") {
|
|
205170
205170
|
if (key.upArrow || input === "k") {
|
|
205171
205171
|
setSelectedIndex((prev) => Math.max(0, prev - 1));
|
|
@@ -205195,6 +205195,8 @@ function ChannelsPanel({ manager, onClose }) {
|
|
|
205195
205195
|
const ch2 = channels2[selectedIndex];
|
|
205196
205196
|
setSelectedChannel(manager.getChannel(ch2.id));
|
|
205197
205197
|
setMode("delete-confirm");
|
|
205198
|
+
} else if (input === "q") {
|
|
205199
|
+
onClose();
|
|
205198
205200
|
} else if (input === "r") {
|
|
205199
205201
|
loadChannels();
|
|
205200
205202
|
setStatusMessage("Refreshed");
|
|
@@ -205228,7 +205230,7 @@ function ChannelsPanel({ manager, onClose }) {
|
|
|
205228
205230
|
setMode("list");
|
|
205229
205231
|
}
|
|
205230
205232
|
}
|
|
205231
|
-
});
|
|
205233
|
+
}, { isActive: !isTextEntry });
|
|
205232
205234
|
const header = /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
205233
205235
|
borderStyle: "single",
|
|
205234
205236
|
borderColor: "blue",
|
|
@@ -205391,7 +205393,7 @@ function ChannelsPanel({ manager, onClose }) {
|
|
|
205391
205393
|
onChange: setChatInput,
|
|
205392
205394
|
onSubmit: () => {
|
|
205393
205395
|
if (chatInput.trim()) {
|
|
205394
|
-
const result = manager.send(selectedChannel.id, chatInput.trim());
|
|
205396
|
+
const result = activePersonId && activePersonName ? manager.sendAs(selectedChannel.id, chatInput.trim(), activePersonId, activePersonName) : manager.send(selectedChannel.id, chatInput.trim());
|
|
205395
205397
|
if (result.success) {
|
|
205396
205398
|
setChatInput("");
|
|
205397
205399
|
const updated = manager.readMessages(selectedChannel.id, 50);
|
|
@@ -205698,18 +205700,20 @@ function PeoplePanel({ manager, onClose }) {
|
|
|
205698
205700
|
import_react47.useEffect(() => {
|
|
205699
205701
|
loadPeople();
|
|
205700
205702
|
}, []);
|
|
205701
|
-
|
|
205702
|
-
|
|
205703
|
-
|
|
205704
|
-
if (key.escape || input === "q") {
|
|
205703
|
+
const isTextEntry = mode === "create-name" || mode === "create-email";
|
|
205704
|
+
useSafeInput((_input, key) => {
|
|
205705
|
+
if (key.escape) {
|
|
205705
205706
|
if (mode === "list") {
|
|
205706
205707
|
onClose();
|
|
205707
205708
|
} else {
|
|
205708
205709
|
setMode("list");
|
|
205709
205710
|
setStatusMessage(null);
|
|
205710
205711
|
}
|
|
205711
|
-
return;
|
|
205712
205712
|
}
|
|
205713
|
+
});
|
|
205714
|
+
useSafeInput((input, key) => {
|
|
205715
|
+
if (key.escape)
|
|
205716
|
+
return;
|
|
205713
205717
|
if (mode === "list") {
|
|
205714
205718
|
if (key.upArrow || input === "k") {
|
|
205715
205719
|
setSelectedIndex((prev) => Math.max(0, prev - 1));
|
|
@@ -205774,7 +205778,7 @@ function PeoplePanel({ manager, onClose }) {
|
|
|
205774
205778
|
setMode("list");
|
|
205775
205779
|
}
|
|
205776
205780
|
}
|
|
205777
|
-
});
|
|
205781
|
+
}, { isActive: !isTextEntry });
|
|
205778
205782
|
const header = /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
|
|
205779
205783
|
borderStyle: "single",
|
|
205780
205784
|
borderColor: "green",
|
|
@@ -219550,7 +219554,9 @@ When done, report the result.`);
|
|
|
219550
219554
|
}
|
|
219551
219555
|
return /* @__PURE__ */ jsx_dev_runtime43.jsxDEV(ChannelsPanel, {
|
|
219552
219556
|
manager: channelsManager,
|
|
219553
|
-
onClose: () => setShowChannelsPanel(false)
|
|
219557
|
+
onClose: () => setShowChannelsPanel(false),
|
|
219558
|
+
activePersonId: activeSession?.client.getPeopleManager?.()?.getActivePersonId?.() || undefined,
|
|
219559
|
+
activePersonName: activeSession?.client.getPeopleManager?.()?.getActivePerson?.()?.name || undefined
|
|
219554
219560
|
}, undefined, false, undefined, this);
|
|
219555
219561
|
}
|
|
219556
219562
|
if (showPeoplePanel) {
|
|
@@ -220341,7 +220347,7 @@ Interactive Mode:
|
|
|
220341
220347
|
// packages/terminal/src/index.tsx
|
|
220342
220348
|
var jsx_dev_runtime44 = __toESM(require_jsx_dev_runtime(), 1);
|
|
220343
220349
|
setRuntime(bunRuntime);
|
|
220344
|
-
var VERSION4 = "1.1.
|
|
220350
|
+
var VERSION4 = "1.1.12";
|
|
220345
220351
|
var SYNC_START = "\x1B[?2026h";
|
|
220346
220352
|
var SYNC_END = "\x1B[?2026l";
|
|
220347
220353
|
function enableSynchronizedOutput() {
|
|
@@ -220481,4 +220487,4 @@ export {
|
|
|
220481
220487
|
main
|
|
220482
220488
|
};
|
|
220483
220489
|
|
|
220484
|
-
//# debugId=
|
|
220490
|
+
//# debugId=935038E737EE38BC64756E2164756E21
|