@threadbase-sh/streamer 1.69.0 → 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/api/handlers/conversations.handlers.d.ts.map +1 -1
- package/dist/cli.cjs +7 -4
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +7 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -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
|
-
|
|
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 =
|
|
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:
|
|
8912
|
-
before_index:
|
|
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
|