openmates 0.18.0-alpha.44 → 0.18.0-alpha.46
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/{chunk-FUR4UVY6.js → chunk-WQNH4XI6.js} +27 -2
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -3693,6 +3693,7 @@ var OpenMatesWsClient = class {
|
|
|
3693
3693
|
}
|
|
3694
3694
|
};
|
|
3695
3695
|
const finishPostProcessingWait = () => {
|
|
3696
|
+
postProcessingTimer = null;
|
|
3696
3697
|
postProcessingDone = true;
|
|
3697
3698
|
maybeResolve();
|
|
3698
3699
|
};
|
|
@@ -3858,7 +3859,13 @@ var OpenMatesWsClient = class {
|
|
|
3858
3859
|
aiResponseDone = true;
|
|
3859
3860
|
latestContent = content;
|
|
3860
3861
|
clearTimeout(timeout);
|
|
3861
|
-
|
|
3862
|
+
if (postProcessingDone) {
|
|
3863
|
+
maybeResolve();
|
|
3864
|
+
return;
|
|
3865
|
+
}
|
|
3866
|
+
if (!postProcessingTimer) {
|
|
3867
|
+
postProcessingTimer = setTimeout(finishPostProcessingWait, POST_PROCESSING_WINDOW_MS);
|
|
3868
|
+
}
|
|
3862
3869
|
};
|
|
3863
3870
|
const beginSubChatContinuation = (payload) => {
|
|
3864
3871
|
if (!awaitingSubChatsCompletion) return;
|
|
@@ -7287,6 +7294,20 @@ function hasRememberMessageReference(message) {
|
|
|
7287
7294
|
var PROMPT_INJECTION_DISABLED = "disabled";
|
|
7288
7295
|
var DEFAULT_CHAT_MESSAGE_CONFIRMATION_TIMEOUT_MS = 2e4;
|
|
7289
7296
|
var CANONICAL_UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
7297
|
+
var MAX_CHAT_SLUG_LENGTH = 80;
|
|
7298
|
+
function selectNewChatSlugValue(input) {
|
|
7299
|
+
if (input.explicitSlug !== void 0) return input.explicitSlug;
|
|
7300
|
+
let normalizedMessage;
|
|
7301
|
+
try {
|
|
7302
|
+
normalizedMessage = normalizeObjectSlug(input.message);
|
|
7303
|
+
} catch {
|
|
7304
|
+
normalizedMessage = "chat";
|
|
7305
|
+
}
|
|
7306
|
+
const normalizedChatId = input.chatId.toLowerCase();
|
|
7307
|
+
const prefixLength = MAX_CHAT_SLUG_LENGTH - normalizedChatId.length - 1;
|
|
7308
|
+
const prefix = normalizedMessage.slice(0, prefixLength).replace(/-+$/g, "");
|
|
7309
|
+
return `${prefix}-${normalizedChatId}`;
|
|
7310
|
+
}
|
|
7290
7311
|
function normalizeObjectSelectorLabel(value) {
|
|
7291
7312
|
return value.trim().toLowerCase().replace(/\s+/g, " ");
|
|
7292
7313
|
}
|
|
@@ -11316,7 +11337,11 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
11316
11337
|
}
|
|
11317
11338
|
const initialTitle = teamId && !shouldWaitForAi ? "New team chat" : "";
|
|
11318
11339
|
const slugMetadata = await buildEncryptedObjectSlugMetadata({
|
|
11319
|
-
value:
|
|
11340
|
+
value: selectNewChatSlugValue({
|
|
11341
|
+
message: finalMessage,
|
|
11342
|
+
chatId,
|
|
11343
|
+
explicitSlug: params.slug
|
|
11344
|
+
}),
|
|
11320
11345
|
encryptionKey: chatKeyBytes,
|
|
11321
11346
|
lookupKey: chatSlugLookupKey
|
|
11322
11347
|
});
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED