scream-code 0.8.10 → 0.9.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/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-lrfUI96b.mjs")).main();
9
+ (await import("./app-CwKaEg7v.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);
@@ -243,22 +243,6 @@ var KnowledgeStore = class {
243
243
  return this.embeddingEngine;
244
244
  }
245
245
  /**
246
- * Proactively load the embedding model (downloads on first call).
247
- * Call before ingestion so the user gets a clear download prompt instead
248
- * of a mid-ingest failure.
249
- */
250
- async ensureEmbeddingReady() {
251
- if (this.embeddingEngine === void 0) return {
252
- ok: false,
253
- reason: "engine not set"
254
- };
255
- const ok = await this.embeddingEngine.ensureReady();
256
- return {
257
- ok,
258
- reason: ok ? void 0 : "fastembed init failed"
259
- };
260
- }
261
- /**
262
246
  * Begin a write transaction. Use commitTransaction / rollbackTransaction
263
247
  * to close it. Used by ingest to keep chunks/events/entities/edges atomic —
264
248
  * a mid-ingest failure leaves no partial rows.
@@ -1467,26 +1451,11 @@ async function mapWithConcurrency(items, limit, fn, onProgress) {
1467
1451
  */
1468
1452
  async function ingestFile(store, llm, filePath, onProgress) {
1469
1453
  const engine = store.getEmbeddingEngine();
1470
- let skipEmbed = engine === void 0;
1471
- if (engine !== void 0) {
1472
- onProgress?.({
1473
- stage: "embedding-check",
1474
- message: "检查向量模型..."
1475
- });
1476
- try {
1477
- skipEmbed = !await Promise.race([engine.ensureReady(), new Promise((resolve) => setTimeout(() => resolve(false), 15e3))]);
1478
- if (skipEmbed) onProgress?.({
1479
- stage: "embedding-check",
1480
- message: "向量模型未就绪,本次摄入跳过向量嵌入"
1481
- });
1482
- } catch {
1483
- skipEmbed = true;
1484
- onProgress?.({
1485
- stage: "embedding-check",
1486
- message: "向量模型未就绪,本次摄入跳过向量嵌入"
1487
- });
1488
- }
1489
- }
1454
+ const skipEmbed = engine === void 0 || !engine.available;
1455
+ if (skipEmbed) onProgress?.({
1456
+ stage: "embedding-check",
1457
+ message: "向量模型未就绪,本次摄入跳过向量嵌入"
1458
+ });
1490
1459
  const existing = await store.findSourceByFilePath(filePath);
1491
1460
  if (existing !== void 0) {
1492
1461
  onProgress?.({
@@ -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-BHYcdFfg.mjs";
6
+ import { n as multiSearchWithTrace } from "./src-DS2zXYxd.mjs";
7
7
  export { multiSearchWithTrace };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scream-code",
3
- "version": "0.8.10",
3
+ "version": "0.9.1",
4
4
  "description": "A terminal-native AI agent for builders",
5
5
  "license": "MIT",
6
6
  "author": "ScreamCli",
@@ -63,6 +63,7 @@
63
63
  "cli-highlight": "^2.1.11",
64
64
  "commander": "^13.1.0",
65
65
  "diff": "^9.0.0",
66
+ "fastembed": "^2.1.0",
66
67
  "semver": "^7.7.4",
67
68
  "smol-toml": "^1.6.1",
68
69
  "zod": "^4.3.6"
@@ -262,13 +262,15 @@ async function main() {
262
262
  },
263
263
  pm,
264
264
  );
265
- }
266
265
 
266
+ // Best-effort Windows desktop shortcut; must stay inside main() so it
267
+ // is covered by the top-level catch and never fails the install.
267
268
  try {
268
269
  createDesktopShortcut();
269
270
  } catch {
270
271
  // Never fail the install over a shortcut.
271
272
  }
273
+ }
272
274
 
273
275
  main().catch((err) => {
274
276
  const message = err instanceof Error ? err.message : String(err);