@dev-anywhere/proxy 0.4.32 → 0.4.33

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/serve.js CHANGED
@@ -851,6 +851,7 @@ var INTERNAL_TITLE_PATTERNS = [
851
851
  /^codex agent history\b/i,
852
852
  /^conversation summary\b/i
853
853
  ];
854
+ var CLAUDE_CONTINUATION_SUMMARY_PATTERN = /^This session is being continued from a previous conversation that ran out of context\.\s+The summary below covers the earlier portion of the conversation\.\s+Summary:/i;
854
855
  var TEMP_HISTORY_ROOTS = expandPathAliases([tmpdir(), "/tmp", "/private/tmp", "/var/tmp"]).map(normalizeAbsolutePath).filter((path) => path !== null);
855
856
  async function scanSessionHistory(options = {}) {
856
857
  const entries = applySessionHistoryMetadata(
@@ -1086,10 +1087,14 @@ function isXmlishNoise(text) {
1086
1087
  const tag = match[1].toLowerCase();
1087
1088
  return XMLISH_NOISE_PREFIXES.some((prefix) => tag === prefix || tag.startsWith(`${prefix}_`));
1088
1089
  }
1090
+ function isClaudeContinuationSummary(text) {
1091
+ return CLAUDE_CONTINUATION_SUMMARY_PATTERN.test(text.trimStart());
1092
+ }
1089
1093
  function normalizeHistoryTitle(raw) {
1090
1094
  if (!raw) return null;
1091
1095
  const text = collapseWhitespace(raw);
1092
1096
  if (text.length < 2) return null;
1097
+ if (isClaudeContinuationSummary(text)) return null;
1093
1098
  if (text.startsWith("<") || isXmlishNoise(text)) return null;
1094
1099
  if (INTERNAL_TITLE_PATTERNS.some((pattern) => pattern.test(text))) return null;
1095
1100
  const slashCommand = text.match(/^\/\S+/)?.[0];
@@ -1121,6 +1126,7 @@ function extractLocalCommandHistoryMarker(text) {
1121
1126
  return null;
1122
1127
  }
1123
1128
  function extractConversationString(text) {
1129
+ if (isClaudeContinuationSummary(text)) return null;
1124
1130
  if (isCommandEnvelope(text)) {
1125
1131
  const command = extractSlashCommand(text);
1126
1132
  return command ? { text: command } : null;
@@ -1177,16 +1183,14 @@ function extractConversationPayload(msg) {
1177
1183
  const texts = content.filter(
1178
1184
  (b) => b.type === "text" && typeof b.text === "string"
1179
1185
  ).map((b) => b.text);
1180
- const normalized = normalizeConversationText(texts.join("\n"));
1181
- return normalized ? { text: normalized } : null;
1186
+ return extractConversationString(texts.join("\n"));
1182
1187
  }
1183
1188
  }
1184
1189
  if (Array.isArray(msg)) {
1185
1190
  const texts = msg.filter(
1186
1191
  (b) => b.type === "text" && typeof b.text === "string"
1187
1192
  ).map((b) => b.text);
1188
- const normalized = normalizeConversationText(texts.join("\n"));
1189
- return normalized ? { text: normalized } : null;
1193
+ return extractConversationString(texts.join("\n"));
1190
1194
  }
1191
1195
  return null;
1192
1196
  }