@owloops/browserbird 1.4.9 → 1.4.11
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.mjs +10 -14
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -122,8 +122,8 @@ function unknownSubcommand(subcommand, command, validCommands) {
|
|
|
122
122
|
/** @fileoverview ASCII banner displayed on daemon startup and in help text. */
|
|
123
123
|
const pkg = createRequire(import.meta.url)("../package.json");
|
|
124
124
|
const buildInfo = [];
|
|
125
|
-
buildInfo.push(`commit: ${"
|
|
126
|
-
buildInfo.push(`built: 2026-03-
|
|
125
|
+
buildInfo.push(`commit: ${"afb8a9cd1a061c41a693ba7afab3c7c68dddb413".substring(0, 7)}`);
|
|
126
|
+
buildInfo.push(`built: 2026-03-12T00:11:52+04:00`);
|
|
127
127
|
const buildString = buildInfo.length > 0 ? ` (${buildInfo.join(", ")})` : "";
|
|
128
128
|
const VERSION = `browserbird ${pkg.version}${buildString}`;
|
|
129
129
|
const BIRD = [
|
|
@@ -3160,7 +3160,12 @@ function createHandler(client, getConfig, signal, getTeamId) {
|
|
|
3160
3160
|
}).join("\n");
|
|
3161
3161
|
}
|
|
3162
3162
|
async function streamToChannel(events, channelId, threadTs, sessionUid, teamId, userId, meta) {
|
|
3163
|
-
|
|
3163
|
+
const streamer = client.startStream({
|
|
3164
|
+
channelId,
|
|
3165
|
+
threadTs,
|
|
3166
|
+
teamId,
|
|
3167
|
+
userId
|
|
3168
|
+
});
|
|
3164
3169
|
let streamDead = false;
|
|
3165
3170
|
let fullText = "";
|
|
3166
3171
|
let completion;
|
|
@@ -3171,19 +3176,10 @@ function createHandler(client, getConfig, signal, getTeamId) {
|
|
|
3171
3176
|
const msg = err instanceof Error ? err.message : String(err);
|
|
3172
3177
|
return msg.includes("not_in_streaming_state") || msg.includes("streaming");
|
|
3173
3178
|
}
|
|
3174
|
-
function ensureStream() {
|
|
3175
|
-
if (!streamer) streamer = client.startStream({
|
|
3176
|
-
channelId,
|
|
3177
|
-
threadTs,
|
|
3178
|
-
teamId,
|
|
3179
|
-
userId
|
|
3180
|
-
});
|
|
3181
|
-
return streamer;
|
|
3182
|
-
}
|
|
3183
3179
|
async function safeAppend(content) {
|
|
3184
3180
|
if (streamDead) return;
|
|
3185
3181
|
try {
|
|
3186
|
-
await
|
|
3182
|
+
await streamer.append(content);
|
|
3187
3183
|
} catch (err) {
|
|
3188
3184
|
if (isStreamExpired(err)) {
|
|
3189
3185
|
streamDead = true;
|
|
@@ -3192,7 +3188,7 @@ function createHandler(client, getConfig, signal, getTeamId) {
|
|
|
3192
3188
|
}
|
|
3193
3189
|
}
|
|
3194
3190
|
async function safeStop(opts) {
|
|
3195
|
-
if (
|
|
3191
|
+
if (streamDead) return;
|
|
3196
3192
|
try {
|
|
3197
3193
|
await streamer.stop(opts);
|
|
3198
3194
|
} catch (err) {
|