@threadbase-sh/streamer 1.68.1 → 1.69.1

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.cjs CHANGED
@@ -5941,7 +5941,7 @@ function describePushCapability(liveActivityEnabled, env = process.env) {
5941
5941
  };
5942
5942
  }
5943
5943
  var E2EE_PROTOCOL_VERSION = 1;
5944
- var E2EE_SUPPORTED = false;
5944
+ var E2EE_SUPPORTED = true;
5945
5945
  function describeE2eeCapability(flagEnabled) {
5946
5946
  const enabled = E2EE_SUPPORTED && flagEnabled;
5947
5947
  const base = {
@@ -8878,11 +8878,14 @@ var ConversationHandlers = class {
8878
8878
  const isFirstLoad = !url.searchParams.has("before_index");
8879
8879
  if (isFirstLoad) {
8880
8880
  const tail = this.cache.getConversationTail(id);
8881
- if (tail && tail.messages.length > 0) {
8881
+ const usableTail = (tail?.messages ?? []).filter(
8882
+ (message) => (message.text ?? "").length > 0 || (message.content?.length ?? 0) > 0
8883
+ );
8884
+ if (usableTail.length > 0) {
8882
8885
  const cachedMeta = this.cache.getMetaById(id);
8883
8886
  const cachedProvider = cachedMeta?.provider ?? CLAUDE_CODE_PROVIDER;
8884
8887
  const availability2 = classifyResumability(cachedMeta?.projectPath);
8885
- const messagesPayload2 = tail.messages.map((m, idx) => ({
8888
+ const messagesPayload2 = usableTail.map((m, idx) => ({
8886
8889
  message_index: idx,
8887
8890
  role: m.role,
8888
8891
  timestamp: m.timestamp,
@@ -8908,8 +8911,8 @@ var ConversationHandlers = class {
8908
8911
  },
8909
8912
  messages: messagesPayload2,
8910
8913
  message_pagination: {
8911
- total: tail.tailSize,
8912
- before_index: tail.tailSize,
8914
+ total: usableTail.length,
8915
+ before_index: usableTail.length,
8913
8916
  from_index: 0,
8914
8917
  has_more_older: false,
8915
8918
  next_before_index: null