alice-and-bot 1.0.83 → 1.0.85
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/lit/components/connected-chat.d.ts +1 -0
- package/_dist/lit/components/connected-chat.d.ts.map +1 -1
- package/_dist/mod.d.ts +1 -1
- package/_dist/mod.d.ts.map +1 -1
- package/canvas/server.js +2 -2
- package/{chunk-LKMOJJGN.js → chunk-OXV7L3XK.js} +3 -3
- package/{chunk-NL7CRADJ.js → chunk-RV6SBNBB.js} +1 -1
- package/{chunk-DFH57F4C.js → chunk-XWUVRQYD.js} +1 -1
- package/components.js +36 -24
- package/mod.js +2 -2
- package/package.json +1 -1
|
@@ -129,6 +129,7 @@ export declare class ConnectedChat extends LitElement {
|
|
|
129
129
|
private _showImportIdentityPopup: any;
|
|
130
130
|
private _editingSidebarConvId: any;
|
|
131
131
|
private _sidebarRenameInput: any;
|
|
132
|
+
private _sidebarRenameOriginal: any;
|
|
132
133
|
private _renaming: any;
|
|
133
134
|
private _qrCodeDataUrl: any;
|
|
134
135
|
private _transferUrl: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connected-chat.d.ts","sources":["../../../lit/components/connected-chat.ts"],"names":[],"mappings":"AAAA,SAAe,UAAU,EAAE,OAAO,EAAE,KAAK,cAAc,cAAwB;AAE/E,cAEE,WAAW,0CAI4B;AAoBzC,SAEE,KAAK,YAAY,mCAWe;
|
|
1
|
+
{"version":3,"file":"connected-chat.d.ts","sources":["../../../lit/components/connected-chat.ts"],"names":[],"mappings":"AAAA,SAAe,UAAU,EAAE,OAAO,EAAE,KAAK,cAAc,cAAwB;AAE/E,cAEE,WAAW,0CAI4B;AAoBzC,SAEE,KAAK,YAAY,mCAWe;AAuDlC,cAKE,YAAY,EAGZ,gBAAgB,qBACE;AAsrBpB,OAAO,cAAM,sBAAsB;EACjC,gBAAgB;IACd;MAAe;;IACf;MAAkB;;IAClB;MAAuB;;IACvB;MA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D;UAE1D;UA0BA;EAcR,QAAQ,iBA6BN;EAEF,QAAQ,gCA0CN;EAEF,QAAQ,8BAON;EAEF,QAAQ,iBAaN;EAEF,QAAQ,kBAaN;EAEF,QAAQ,yBAiBN;EAEF,QAAQ,0BAEN;EAEF,QAAQ,wBAGN;EAEF,QAAQ,6BAGN;EAEF,QAAQ,sBA8BN;EAEF,QAAQ,8BAGN;UAEM;EAcR,QAAQ,yBAaN;EAEF,QAAQ,2BAIN;EAEF,QAAQ,0BAKN;EAEF,QAAQ,0BAUN;EAEF,QAAQ,6BAQN;EAEF,QAAQ,+BAMN;EAEF,QAAQ,mBAuCN;EAEF,QAAQ,2BAyBN;EAEF,QAAQ,uBAA0B;EAElC,QAAQ,kBAiBN;EAEF,QAAQ,qBA0DN;EAEF,QAAQ,2BAIN;EAEF,QAAQ,4BAcN;EAEF,QAAQ,0BAKN;EAEF,QAAQ,yBAoCN;EAEF,QAAQ,6BAIN;EAEF,QAAQ,4BAaN;EAEF,QAAQ,sBAEN;EACF,QAAQ,uBAEN;EACF,QAAQ,uBAEN;EACF,QAAQ,oBAEN;EACF,QAAQ,uBAEN;EAEF,QAAQ,mBAGN;UAEM;EAgBR,QAAQ,0BA+BN;EAEF,QAAQ,wBAGN;EAEF,QAAQ,0BAiBN;UAEM;UA2LA;EAwFR,SAAS,UAAU,wBAAwB;AAiT7C"}
|
package/_dist/mod.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export declare const getProfile: (publicSignKey: string) => Promise<{
|
|
|
27
27
|
alias?: string;
|
|
28
28
|
priceTag?: number;
|
|
29
29
|
} | null>;
|
|
30
|
-
export declare const createConversation: (publicSignKeys: string[], conversationTitle: string, credentials: Credentials) => Promise<{
|
|
30
|
+
export declare const createConversation: (publicSignKeys: string[], conversationTitle: string | undefined, credentials: Credentials) => Promise<{
|
|
31
31
|
conversationId: string;
|
|
32
32
|
} | {
|
|
33
33
|
error: string;
|
package/_dist/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sources":["../mod.ts"],"names":[],"mappings":"AAYA,cAAc,iBAAiB,+BAA+B;AAC9D,SAEE,KAAK,WAAW,EAChB,KAAK,iBAAiB,sCAKa;AAErC,cAAc,YAAY,iCAAiC;AAC3D,SACE,oBAAoB,EACpB,wBAAwB,EACxB,YAAY,EACZ,UAAU,EACV,UAAU,+BACkB;AAC9B,SACE,kBAAkB,EAClB,KAAK,aAAa,uCACkB;AACtC,cAAc,iBAAiB,+BAA+B;AAC9D,SACE,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,kBAAkB,EAClB,KAAK,cAAc,EACnB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,QAAQ,EACR,SAAS,EACT,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,aAAa,sCACiB;AACrC,SACE,yBAAyB,EACzB,aAAa,6CAC6B;AAC5C,SACE,wBAAwB,EACxB,aAAa,EACb,WAAW,sCACwB;AACrC,SACE,wBAAwB,EACxB,aAAa,oCACoB;AACnC,SACE,6BAA6B,EAC7B,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,wCACkB;AACvC,SAAS,mBAAmB,kCAAkC;AAC9D,SACE,KAAK,YAAY,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,sCACW;AACrC,SACE,eAAe,EACf,uBAAuB,EACvB,eAAe,oCACkB;AACnC,SACE,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB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EAM1B,gBAAgB,MAAM;EACtB,QAAQ,MAAM;EACd,SAAS,MAAM;EACf,aAAa;CACd,KAAG,QAAQ,mBACyD;AAErE,OAAO,cAAM,uBAA8B;EAMzC,gBAAgB,MAAM;EACtB,QAAQ,MAAM;EACd,SAAS,MAAM;EACf,aAAa;CACd,KAAG;EAEA,UAAU;EACV,SAAS,OAAO;;EAEd,OAAO,oBAAoB;GA6C/B;AAEF,OAAO,cAAM,cAAe,QAAQ,iBAAe,MAAM,CAW9C"}
|
package/canvas/server.js
CHANGED
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
storeTransferPayload,
|
|
34
34
|
unique,
|
|
35
35
|
verify
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-XWUVRQYD.js";
|
|
37
37
|
|
|
38
38
|
// protocol/src/shortId.ts
|
|
39
39
|
var shortIdLength = 12;
|
|
@@ -349,7 +349,7 @@ var createConversation = (db) => async (publicSignKeys, conversationTitle, crede
|
|
|
349
349
|
endpoint: "createConversation",
|
|
350
350
|
payload: await buildSignedRequest(credentials, "createConversation", {
|
|
351
351
|
publicSignKeyToEncryptedSymmetricKey,
|
|
352
|
-
title: conversationTitle,
|
|
352
|
+
title: conversationTitle ?? "",
|
|
353
353
|
...maxTotalCost !== void 0 ? {
|
|
354
354
|
maxTotalCost
|
|
355
355
|
} : {}
|
|
@@ -2228,7 +2228,7 @@ var subscribeConversationsActivity = (conversationIds, onChange, credentials) =>
|
|
|
2228
2228
|
}));
|
|
2229
2229
|
return () => unsubs.forEach((u) => u());
|
|
2230
2230
|
};
|
|
2231
|
-
var getOrCreateConversation = (credentials, participants, onConversation, title = "
|
|
2231
|
+
var getOrCreateConversation = (credentials, participants, onConversation, title = "") => {
|
|
2232
2232
|
const fixedParticipants = sort(unique([
|
|
2233
2233
|
credentials.publicSignKey,
|
|
2234
2234
|
...participants
|
|
@@ -715,7 +715,7 @@ var backendApiSchema = {
|
|
|
715
715
|
}),
|
|
716
716
|
createConversation: authenticatedEndpoint(z.object({
|
|
717
717
|
publicSignKeyToEncryptedSymmetricKey: z.record(z.string(), z.string()),
|
|
718
|
-
title: z.string(),
|
|
718
|
+
title: z.string().optional(),
|
|
719
719
|
maxTotalCost: z.number().nonnegative().finite().optional()
|
|
720
720
|
}), z.union([
|
|
721
721
|
z.object({
|
package/components.js
CHANGED
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
subscribeUserName,
|
|
46
46
|
typingTtl,
|
|
47
47
|
uploadAttachment
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-OXV7L3XK.js";
|
|
49
49
|
import {
|
|
50
50
|
actOnCanvas,
|
|
51
51
|
canvasFromRow,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
isRenderableTag,
|
|
54
54
|
renderCanvas,
|
|
55
55
|
sanitizeViewUrl
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-RV6SBNBB.js";
|
|
57
57
|
import {
|
|
58
58
|
__commonJS,
|
|
59
59
|
__toESM,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
sort,
|
|
70
70
|
sortKey,
|
|
71
71
|
unique
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-XWUVRQYD.js";
|
|
73
73
|
|
|
74
74
|
// ../../../.cache/deno/npm/registry.npmjs.org/levenshtein-search/0.1.2/utils.js
|
|
75
75
|
var require_utils = __commonJS({
|
|
@@ -1854,12 +1854,16 @@ var mergeIdentityDetails = (current, incoming) => ({
|
|
|
1854
1854
|
...current,
|
|
1855
1855
|
...incoming
|
|
1856
1856
|
});
|
|
1857
|
+
var isUnnamedConversation = (title) => {
|
|
1858
|
+
const trimmed = title?.trim() ?? "";
|
|
1859
|
+
return trimmed === "" || trimmed === "Chat";
|
|
1860
|
+
};
|
|
1861
|
+
var resolveParticipantName = (participant, nameCache, identityDetails) => participant.name?.split("@")[0] || nameCache.get(participant.publicSignKey) || identityDetails?.[participant.publicSignKey]?.name?.split("@")[0] || compactPublicKey(participant.publicSignKey);
|
|
1857
1862
|
var resolveConversationDisplayName = (conv, myKey, nameCache, identityDetails) => {
|
|
1858
|
-
if (conv.title
|
|
1859
|
-
const
|
|
1860
|
-
if (
|
|
1861
|
-
|
|
1862
|
-
return cachedName || conv.title || compactPublicKey(other.publicSignKey);
|
|
1863
|
+
if (!isUnnamedConversation(conv.title)) return conv.title;
|
|
1864
|
+
const others = conv.participants.filter((p) => p.publicSignKey !== myKey);
|
|
1865
|
+
if (empty(others)) return conv.title.trim() || "Chat";
|
|
1866
|
+
return others.map((other) => resolveParticipantName(other, nameCache, identityDetails)).sort((a, b) => a.localeCompare(b)).join(", ");
|
|
1863
1867
|
};
|
|
1864
1868
|
var recordingMimeType = typeof MediaRecorder !== "undefined" && MediaRecorder.isTypeSupported("audio/webm") ? "audio/webm" : "audio/mp4";
|
|
1865
1869
|
var recordingExtension = recordingMimeType === "audio/webm" ? "webm" : "m4a";
|
|
@@ -9964,7 +9968,7 @@ var confirmPaidOutreach = async (targetPublicSignKey, myPublicSignKey, fetchProf
|
|
|
9964
9968
|
return confirmFn(`This outreach will cost $${costInDollars}. Proceed?`);
|
|
9965
9969
|
};
|
|
9966
9970
|
var resolveName = (details) => (key) => details[key]?.name ?? compactPublicKey(key);
|
|
9967
|
-
var
|
|
9971
|
+
var resolveParticipantName2 = (p, details) => p.name || details[p.publicSignKey]?.name || compactPublicKey(p.publicSignKey);
|
|
9968
9972
|
var resolveParticipantAvatar = (p, details) => p.avatar || details[p.publicSignKey]?.avatar || "";
|
|
9969
9973
|
var participantsOverlayStyle = "position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5);display:flex;align-items:center;justify-content:center;z-index:1000";
|
|
9970
9974
|
var participantsPopupStyle = (isDark) => `background:${isDark ? "#1a1a1a" : "#fff"};border-radius:16px;padding:24px;min-width:300px;max-width:400px;width:90%;max-height:80vh;border:1px solid ${isDark ? "#2a2a2a" : "#e5e7eb"};box-shadow:${isDark ? "0 8px 24px #0008" : "0 8px 24px #0002"};display:flex;flex-direction:column;gap:16px;box-sizing:border-box`;
|
|
@@ -9982,7 +9986,7 @@ var sidebarRenameButtonStyle = (isDark, customColors) => `background:transparent
|
|
|
9982
9986
|
var sidebarItemBodyStyle = "flex:1;min-width:0;display:flex;flex-direction:column;gap:2px";
|
|
9983
9987
|
var sidebarItemTopRowStyle = "display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;min-height:18px";
|
|
9984
9988
|
var sidebarItemTimeStyle = (isDark, isUnread = false) => `font-size:11px;line-height:18px;flex-shrink:0;font-variant-numeric:tabular-nums;font-weight:${isUnread ? "700" : "400"};color:${isUnread ? isDark ? "#60a5fa" : "#2563eb" : isDark ? "#66625b" : "#9c968c"}`;
|
|
9985
|
-
var sidebarItemBottomRowStyle = "display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0";
|
|
9989
|
+
var sidebarItemBottomRowStyle = "display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;min-height:19px";
|
|
9986
9990
|
var sidebarItemPreviewRowStyle = "font-size:12px;line-height:15px;min-height:15px;height:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0";
|
|
9987
9991
|
var sidebarItemPreviewStyle = (isDark, isUnread = false) => `${sidebarItemPreviewRowStyle};font-weight:${isUnread ? "600" : "400"};color:${isUnread ? isDark ? "#f3f1ea" : "#1f1e1b" : isDark ? "#78736a" : "#8c867c"}`;
|
|
9988
9992
|
var sidebarItemTypingStyle = (isDark) => `${sidebarItemPreviewRowStyle};font-weight:500;color:${isDark ? "#60a5fa" : "#2563eb"}`;
|
|
@@ -10339,7 +10343,7 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
10339
10343
|
_uiElements = [];
|
|
10340
10344
|
_hasAccess = true;
|
|
10341
10345
|
_convNotFound = false;
|
|
10342
|
-
_conversationTitle = "
|
|
10346
|
+
_conversationTitle = "";
|
|
10343
10347
|
_isGroupChat = false;
|
|
10344
10348
|
_progressMax = /* @__PURE__ */ new Map();
|
|
10345
10349
|
_profileAuthorId = null;
|
|
@@ -10350,6 +10354,7 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
10350
10354
|
_showImportIdentityPopup = false;
|
|
10351
10355
|
_editingSidebarConvId = null;
|
|
10352
10356
|
_sidebarRenameInput = "";
|
|
10357
|
+
_sidebarRenameOriginal = "";
|
|
10353
10358
|
_renaming = false;
|
|
10354
10359
|
_qrCodeDataUrl = "";
|
|
10355
10360
|
_transferUrl = "";
|
|
@@ -10477,6 +10482,7 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
10477
10482
|
this._typingNames = [];
|
|
10478
10483
|
this._hasAccess = true;
|
|
10479
10484
|
this._convNotFound = false;
|
|
10485
|
+
this._conversationTitle = "";
|
|
10480
10486
|
this._subscribedConversationId = "";
|
|
10481
10487
|
}
|
|
10482
10488
|
_teardownChatListSubscriptions() {
|
|
@@ -10576,10 +10582,12 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
10576
10582
|
this._previewsManager?.setConversations(convs);
|
|
10577
10583
|
}
|
|
10578
10584
|
convs?.forEach((conv) => {
|
|
10579
|
-
|
|
10580
|
-
|
|
10581
|
-
this.
|
|
10582
|
-
|
|
10585
|
+
if (!isUnnamedConversation(conv.title)) return;
|
|
10586
|
+
conv.participants.forEach((p) => {
|
|
10587
|
+
if (p.publicSignKey !== this.credentials.publicSignKey && !p.name) {
|
|
10588
|
+
this._subscribeName(p.publicSignKey);
|
|
10589
|
+
}
|
|
10590
|
+
});
|
|
10583
10591
|
});
|
|
10584
10592
|
this._identityDetails = mergeIdentityDetails(this._identityDetails, extractInlineIdentityDetails(this._participants, convs));
|
|
10585
10593
|
this._resubscribeIdentities();
|
|
@@ -10638,7 +10646,7 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
10638
10646
|
_applyInitialConversation(targetId) {
|
|
10639
10647
|
const seed = this.initialConversation;
|
|
10640
10648
|
if (!seed || seed.id !== targetId || this._participants.length > 0) return;
|
|
10641
|
-
this._conversationTitle = seed.title || "
|
|
10649
|
+
this._conversationTitle = seed.title || "";
|
|
10642
10650
|
this._isGroupChat = seed.participants.length > 2;
|
|
10643
10651
|
this._participants = seed.participants;
|
|
10644
10652
|
this._identityDetails = mergeIdentityDetails(this._identityDetails, extractInlineIdentityDetails(this._participants, this.enableChatSwitching ? this._conversations : null));
|
|
@@ -10663,7 +10671,7 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
10663
10671
|
if (conversationBootstrap?.conversationId !== targetId || this._participants.length > 0 || !conversationBootstrap.participants) {
|
|
10664
10672
|
return;
|
|
10665
10673
|
}
|
|
10666
|
-
this._conversationTitle = conversationBootstrap.title || "
|
|
10674
|
+
this._conversationTitle = conversationBootstrap.title || "";
|
|
10667
10675
|
this._isGroupChat = conversationBootstrap.participants.length > 2;
|
|
10668
10676
|
this._participants = conversationBootstrap.participants;
|
|
10669
10677
|
this._identityDetails = mergeIdentityDetails(this._identityDetails, extractInlineIdentityDetails(this._participants, this.enableChatSwitching ? this._conversations : null));
|
|
@@ -10682,7 +10690,7 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
10682
10690
|
if (!data) return;
|
|
10683
10691
|
const conv = data.conversations[0];
|
|
10684
10692
|
this._convNotFound = !conv;
|
|
10685
|
-
this._conversationTitle = conv?.title || "
|
|
10693
|
+
this._conversationTitle = conv?.title || "";
|
|
10686
10694
|
this._isGroupChat = (conv?.participants.length ?? 0) > 2;
|
|
10687
10695
|
this._participants = conv?.participants ?? [];
|
|
10688
10696
|
this._identityDetails = mergeIdentityDetails(this._identityDetails, extractInlineIdentityDetails(this._participants, this.enableChatSwitching ? this._conversations : null));
|
|
@@ -10938,7 +10946,7 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
10938
10946
|
...this._participants.map((p) => p.publicSignKey)
|
|
10939
10947
|
]));
|
|
10940
10948
|
try {
|
|
10941
|
-
const res = await createConversation(accessAdminDb)(participantKeys,
|
|
10949
|
+
const res = await createConversation(accessAdminDb)(participantKeys, "", this.credentials);
|
|
10942
10950
|
if ("error" in res) {
|
|
10943
10951
|
console.error("Failed to create new thread", res.error);
|
|
10944
10952
|
return;
|
|
@@ -10962,7 +10970,7 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
10962
10970
|
};
|
|
10963
10971
|
_currentDisplayTitle() {
|
|
10964
10972
|
const targetId = this._activeConversationId || this.conversationId;
|
|
10965
|
-
return
|
|
10973
|
+
return resolveConversationDisplayName({
|
|
10966
10974
|
id: targetId,
|
|
10967
10975
|
title: this._conversationTitle,
|
|
10968
10976
|
participants: this._participants
|
|
@@ -10972,6 +10980,7 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
10972
10980
|
if (!this.credentials || !convId) return;
|
|
10973
10981
|
this._editingSidebarConvId = convId;
|
|
10974
10982
|
this._sidebarRenameInput = currentTitle;
|
|
10983
|
+
this._sidebarRenameOriginal = currentTitle;
|
|
10975
10984
|
this.requestUpdate();
|
|
10976
10985
|
this.updateComplete.then(() => {
|
|
10977
10986
|
const input = this.querySelector('[data-testid="sidebar-rename-input"]');
|
|
@@ -10988,16 +10997,19 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
10988
10997
|
_cancelSidebarRename = () => {
|
|
10989
10998
|
this._editingSidebarConvId = null;
|
|
10990
10999
|
this._sidebarRenameInput = "";
|
|
11000
|
+
this._sidebarRenameOriginal = "";
|
|
10991
11001
|
this.requestUpdate();
|
|
10992
11002
|
};
|
|
10993
11003
|
_commitSidebarRename = () => {
|
|
10994
11004
|
const convId = this._editingSidebarConvId;
|
|
10995
11005
|
if (!convId) return;
|
|
10996
11006
|
const trimmed = this._sidebarRenameInput.trim();
|
|
11007
|
+
const original = this._sidebarRenameOriginal;
|
|
10997
11008
|
this._editingSidebarConvId = null;
|
|
10998
11009
|
this._sidebarRenameInput = "";
|
|
11010
|
+
this._sidebarRenameOriginal = "";
|
|
10999
11011
|
this.requestUpdate();
|
|
11000
|
-
if (trimmed) this._submitRename(convId, trimmed);
|
|
11012
|
+
if (trimmed && trimmed !== original) this._submitRename(convId, trimmed);
|
|
11001
11013
|
};
|
|
11002
11014
|
_onSidebarRenameKeydown = (e) => {
|
|
11003
11015
|
if (e.key === "Enter") {
|
|
@@ -11126,7 +11138,7 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
11126
11138
|
if (!await confirmPaidOutreach(resolvedKey, myKey)) {
|
|
11127
11139
|
return;
|
|
11128
11140
|
}
|
|
11129
|
-
const title = topic || "
|
|
11141
|
+
const title = topic || "";
|
|
11130
11142
|
const res = await createConversation(accessAdminDb)(participantKeys, title, this.credentials);
|
|
11131
11143
|
if ("error" in res) {
|
|
11132
11144
|
console.error("Failed to create conversation", res.error);
|
|
@@ -11453,7 +11465,7 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
11453
11465
|
.messages="${chatMessages}"
|
|
11454
11466
|
.participants="${this._participants.map((p) => ({
|
|
11455
11467
|
publicSignKey: p.publicSignKey,
|
|
11456
|
-
name:
|
|
11468
|
+
name: resolveParticipantName2(p, this._identityDetails),
|
|
11457
11469
|
avatar: resolveParticipantAvatar(p, this._identityDetails)
|
|
11458
11470
|
}))}"
|
|
11459
11471
|
.canLoadMore="${this._canLoadMore}"
|
|
@@ -11526,7 +11538,7 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
11526
11538
|
<h3 style="${popupTitleStyle(isDark)}">Participants</h3>
|
|
11527
11539
|
<div style="${participantsListStyle}">
|
|
11528
11540
|
${this._participants.map((p) => {
|
|
11529
|
-
const name =
|
|
11541
|
+
const name = resolveParticipantName2(p, this._identityDetails);
|
|
11530
11542
|
const avatar = resolveParticipantAvatar(p, this._identityDetails);
|
|
11531
11543
|
const baseColor = avatarColor(p.publicSignKey, isDark);
|
|
11532
11544
|
const isCopied = this._copiedParticipantId === p.publicSignKey;
|
package/mod.js
CHANGED
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
uiUpdateUrl,
|
|
48
48
|
uploadAttachment,
|
|
49
49
|
verifyWebhookOrigin
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-OXV7L3XK.js";
|
|
51
51
|
import {
|
|
52
52
|
aliasToPublicSignKey,
|
|
53
53
|
buildSignedRequest,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
maxTextLength,
|
|
63
63
|
sendTyping,
|
|
64
64
|
setWebhook
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-XWUVRQYD.js";
|
|
66
66
|
|
|
67
67
|
// lit/react-hooks.ts
|
|
68
68
|
import { useEffect, useRef, useState } from "react";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alice-and-bot",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.85",
|
|
4
4
|
"description": "A chat network for agents. Open-source, end-to-end encrypted messaging SDK, React chat UI, and embeddable widgets for AI agents and humans.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|