scream-code 0.10.3 → 0.10.4

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/main.mjs CHANGED
@@ -6,7 +6,7 @@ const __dirname = __cjsShimDirname(__filename);
6
6
  import "./suppress-sqlite-warning-C2VB0doZ.mjs";
7
7
  //#region src/main.ts
8
8
  try {
9
- (await import("./app-DkhRwgvY.mjs")).main();
9
+ (await import("./app-ya4nXFqp.mjs")).main();
10
10
  } catch (error) {
11
11
  process.stderr.write(`${error instanceof Error ? error.stack ?? error.message : String(error)}\n`);
12
12
  process.exit(1);
@@ -1845,9 +1845,21 @@ async function multiSearchWithTrace(store, llm, query, options = {}) {
1845
1845
  }), (matches) => ({ count: matches.length }));
1846
1846
  for (const { event } of titleMatches) seedEventIds.add(event.id);
1847
1847
  if (seedEventIds.size === 0) {
1848
- fallbackReason = "no seed events; used direct chunk vector search";
1848
+ const results = await chunkVectorFallback(store, queryVec, topK);
1849
+ if (results.length > 0) {
1850
+ fallbackReason = "no seed events; used direct chunk vector search";
1851
+ return {
1852
+ results,
1853
+ trace: {
1854
+ steps,
1855
+ rerankedEventTitles,
1856
+ fallbackReason
1857
+ }
1858
+ };
1859
+ }
1860
+ fallbackReason = "no seed events and direct chunk vector search returned no results; used FTS5 keyword fallback";
1849
1861
  return {
1850
- results: await chunkVectorFallback(store, queryVec, topK),
1862
+ results: await ftsFallback(store, query, topK),
1851
1863
  trace: {
1852
1864
  steps,
1853
1865
  rerankedEventTitles,
@@ -1907,9 +1919,21 @@ async function multiSearchWithTrace(store, llm, query, options = {}) {
1907
1919
  topScore: result.topCandidates[0]?.score ?? 0
1908
1920
  }));
1909
1921
  if (candidates.length === 0) {
1910
- fallbackReason = "no graph-reachable events with content; used chunk vector fallback";
1922
+ const results = await chunkVectorFallback(store, queryVec, topK);
1923
+ if (results.length > 0) {
1924
+ fallbackReason = "no graph-reachable events with content; used chunk vector fallback";
1925
+ return {
1926
+ results,
1927
+ trace: {
1928
+ steps,
1929
+ rerankedEventTitles,
1930
+ fallbackReason
1931
+ }
1932
+ };
1933
+ }
1934
+ fallbackReason = "no graph-reachable events with content and chunk vector search returned no results; used FTS5 keyword fallback";
1911
1935
  return {
1912
- results: await chunkVectorFallback(store, queryVec, topK),
1936
+ results: await ftsFallback(store, query, topK),
1913
1937
  trace: {
1914
1938
  steps,
1915
1939
  rerankedEventTitles,
@@ -1985,6 +2009,17 @@ async function multiSearchWithTrace(store, llm, query, options = {}) {
1985
2009
  if (result !== void 0) results.push(result);
1986
2010
  }
1987
2011
  }
2012
+ if (results.length === 0) {
2013
+ fallbackReason = "vector retrieval returned no results; used FTS5 keyword fallback";
2014
+ return {
2015
+ results: await ftsFallback(store, query, topK),
2016
+ trace: {
2017
+ steps,
2018
+ rerankedEventTitles,
2019
+ fallbackReason
2020
+ }
2021
+ };
2022
+ }
1988
2023
  return {
1989
2024
  results,
1990
2025
  trace: {
@@ -3,5 +3,5 @@ import { fileURLToPath as __cjsShimFileURLToPath } from 'node:url';
3
3
  import { dirname as __cjsShimDirname } from 'node:path';
4
4
  const __filename = __cjsShimFileURLToPath(import.meta.url);
5
5
  const __dirname = __cjsShimDirname(__filename);
6
- import { n as multiSearchWithTrace } from "./src-oeUnRY3N.mjs";
6
+ import { n as multiSearchWithTrace } from "./src-BH9W5k24.mjs";
7
7
  export { multiSearchWithTrace };
@@ -126,6 +126,7 @@ const dictionaries = {
126
126
  "status.composing": "输出中",
127
127
  "status.tool": "执行中",
128
128
  "status.waiting": "等待响应",
129
+ "status.reconnecting": "重连",
129
130
  "approval.allow_once": "批准一次",
130
131
  "approval.allow_session": "批准(当前会话)",
131
132
  "approval.deny": "拒绝",
@@ -1150,6 +1151,7 @@ const dictionaries = {
1150
1151
  "status.composing": "Writing",
1151
1152
  "status.tool": "Running",
1152
1153
  "status.waiting": "Waiting",
1154
+ "status.reconnecting": "Reconnecting",
1153
1155
  "approval.allow_once": "Allow Once",
1154
1156
  "approval.allow_session": "Allow Session",
1155
1157
  "approval.deny": "Deny",
@@ -3,5 +3,5 @@ import { fileURLToPath as __cjsShimFileURLToPath } from 'node:url';
3
3
  import { dirname as __cjsShimDirname } from 'node:path';
4
4
  const __filename = __cjsShimFileURLToPath(import.meta.url);
5
5
  const __dirname = __cjsShimDirname(__filename);
6
- import { t as TextInputDialogComponent } from "./text-input-dialog-Cj7OClhs.mjs";
6
+ import { t as TextInputDialogComponent } from "./text-input-dialog-2lpwWzfy.mjs";
7
7
  export { TextInputDialogComponent };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scream-code",
3
- "version": "0.10.3",
3
+ "version": "0.10.4",
4
4
  "description": "A terminal-native AI agent for builders",
5
5
  "license": "MIT",
6
6
  "author": "ScreamCli",