@proxysoul/soulforge 1.3.0 → 1.3.2

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.js CHANGED
@@ -67324,7 +67324,7 @@ __export(exports_tree_sitter2, {
67324
67324
  import { existsSync as existsSync11 } from "fs";
67325
67325
  import { readFile as readFile6 } from "fs/promises";
67326
67326
  import { homedir as homedir9 } from "os";
67327
- import { join as join10, resolve as resolve6 } from "path";
67327
+ import { dirname as dirname4, join as join10, resolve as resolve6 } from "path";
67328
67328
  function extractImportSpecifiers(node, language) {
67329
67329
  const specifiers = [];
67330
67330
  collectSpecifiers(node, language, specifiers);
@@ -68459,11 +68459,17 @@ var init_tree_sitter2 = __esm(() => {
68459
68459
  if (TreeSitterBackend.IS_BUNDLED) {
68460
68460
  return join10(BUNDLED_WASM_DIR, basename2);
68461
68461
  }
68462
- const cwd = process.cwd();
68463
- const devPaths = [join10(cwd, "node_modules", "web-tree-sitter", basename2), join10(cwd, "node_modules", "tree-sitter-wasms", "out", basename2)];
68464
- for (const p of devPaths) {
68465
- if (existsSync11(p))
68466
- return p;
68462
+ let dir = import.meta.dir;
68463
+ for (let i2 = 0;i2 < 5; i2++) {
68464
+ for (const sub of ["node_modules/web-tree-sitter", "node_modules/tree-sitter-wasms/out"]) {
68465
+ const p = join10(dir, sub, basename2);
68466
+ if (existsSync11(p))
68467
+ return p;
68468
+ }
68469
+ const parent = dirname4(dir);
68470
+ if (parent === dir)
68471
+ break;
68472
+ dir = parent;
68467
68473
  }
68468
68474
  return join10(BUNDLED_WASM_DIR, basename2);
68469
68475
  }
@@ -239279,7 +239285,7 @@ var require_path_browserify = __commonJS((exports, module2) => {
239279
239285
  _makeLong: function _makeLong(path) {
239280
239286
  return path;
239281
239287
  },
239282
- dirname: function dirname4(path) {
239288
+ dirname: function dirname5(path) {
239283
239289
  assertPath(path);
239284
239290
  if (path.length === 0)
239285
239291
  return ".";
@@ -311940,7 +311946,7 @@ import { Database as Database2 } from "bun:sqlite";
311940
311946
  import { execSync as execSync4 } from "child_process";
311941
311947
  import { chmodSync as chmodSync3, existsSync as existsSync14, mkdirSync as mkdirSync7, readFileSync as readFileSync8, statSync } from "fs";
311942
311948
  import { stat as statAsync } from "fs/promises";
311943
- import { dirname as dirname4, extname as extname3, join as join15, relative as relative2, resolve as resolve9 } from "path";
311949
+ import { dirname as dirname5, extname as extname3, join as join15, relative as relative2, resolve as resolve9 } from "path";
311944
311950
 
311945
311951
  class RepoMap {
311946
311952
  db;
@@ -312654,7 +312660,7 @@ class RepoMap {
312654
312660
  return this.tsconfigPaths;
312655
312661
  }
312656
312662
  resolveImportSource(importSource, importerAbsPath) {
312657
- const importerDir = dirname4(importerAbsPath);
312663
+ const importerDir = dirname5(importerAbsPath);
312658
312664
  let normalized = null;
312659
312665
  if (importSource.startsWith("./") || importSource.startsWith("../")) {
312660
312666
  normalized = importSource.replace(/\.(m?js|cjs|jsx)$/, "");
@@ -317126,7 +317132,7 @@ var init_post_edit = __esm(() => {
317126
317132
 
317127
317133
  // src/core/tools/edit-file.ts
317128
317134
  import { mkdir as mkdir2, readFile as readFile10, stat as statAsync3, writeFile as writeFile3 } from "fs/promises";
317129
- import { dirname as dirname5, resolve as resolve13 } from "path";
317135
+ import { dirname as dirname6, resolve as resolve13 } from "path";
317130
317136
  function formatMetricDelta(label, before, after) {
317131
317137
  const delta = after - before;
317132
317138
  if (delta === 0)
@@ -317322,7 +317328,7 @@ var init_edit_file = __esm(() => {
317322
317328
  const oldStr = args2.oldString;
317323
317329
  const newStr = args2.newString;
317324
317330
  if (oldStr === "") {
317325
- const dir = dirname5(filePath);
317331
+ const dir = dirname6(filePath);
317326
317332
  let dirCreated = false;
317327
317333
  try {
317328
317334
  await statAsync3(dir);
@@ -331599,13 +331605,14 @@ function disposeIOClient() {
331599
331605
  _instance2?.dispose();
331600
331606
  _instance2 = null;
331601
331607
  }
331602
- var IS_BUNDLED, _instance2 = null, IOClient;
331608
+ var IS_COMPILED, IS_DIST, _instance2 = null, IOClient;
331603
331609
  var init_io_client = __esm(() => {
331604
331610
  init_workers();
331605
- IS_BUNDLED = import.meta.url.includes("$bunfs");
331611
+ IS_COMPILED = import.meta.url.includes("$bunfs");
331612
+ IS_DIST = !IS_COMPILED && import.meta.dir.includes("/dist");
331606
331613
  IOClient = class IOClient extends WorkerClient {
331607
331614
  constructor() {
331608
- const workerPath = IS_BUNDLED ? join18(homedir12(), ".soulforge", "workers", "io.worker.js") : join18(import.meta.dir, "io.worker.ts");
331615
+ const workerPath = IS_COMPILED ? join18(homedir12(), ".soulforge", "workers", "io.worker.js") : IS_DIST ? join18(import.meta.dir, "workers", "io.worker.js") : join18(import.meta.dir, "io.worker.ts");
331609
331616
  super(workerPath, undefined, {
331610
331617
  smol: true
331611
331618
  });
@@ -333483,7 +333490,7 @@ var init_post_edit_fix = __esm(() => {
333483
333490
 
333484
333491
  // src/core/tools/move-symbol.ts
333485
333492
  import { access as access2, mkdir as mkdir3, readFile as readFile12, unlink as unlink2, writeFile as writeFile5 } from "fs/promises";
333486
- import { dirname as dirname6, relative as relative5, resolve as resolve18 } from "path";
333493
+ import { dirname as dirname7, relative as relative5, resolve as resolve18 } from "path";
333487
333494
 
333488
333495
  class WriteTransaction {
333489
333496
  writes = [];
@@ -333510,7 +333517,7 @@ class WriteTransaction {
333510
333517
  throw new Error(`Cannot write forbidden file: ${w.path} (${blocked})`);
333511
333518
  }
333512
333519
  for (const w of this.writes) {
333513
- const dir = dirname6(w.path);
333520
+ const dir = dirname7(w.path);
333514
333521
  await mkdir3(dir, {
333515
333522
  recursive: true
333516
333523
  });
@@ -333615,7 +333622,7 @@ function findCommentStart(lines, defStart) {
333615
333622
  return start2;
333616
333623
  }
333617
333624
  async function findProjectRoot(file2) {
333618
- let dir = dirname6(resolve18(file2));
333625
+ let dir = dirname7(resolve18(file2));
333619
333626
  for (let depth = 0;depth < 20; depth++) {
333620
333627
  for (const m of ["tsconfig.json", "package.json", "Cargo.toml", "go.mod", "pyproject.toml", "Makefile"]) {
333621
333628
  try {
@@ -333623,12 +333630,12 @@ async function findProjectRoot(file2) {
333623
333630
  return dir;
333624
333631
  } catch {}
333625
333632
  }
333626
- const parent = dirname6(dir);
333633
+ const parent = dirname7(dir);
333627
333634
  if (parent === dir)
333628
333635
  break;
333629
333636
  dir = parent;
333630
333637
  }
333631
- return dirname6(file2);
333638
+ return dirname7(file2);
333632
333639
  }
333633
333640
  async function grepSymbol(symbol26, root) {
333634
333641
  try {
@@ -333769,7 +333776,7 @@ ${lines[j] ?? ""}`;
333769
333776
  async resolveSource(source, contextFile) {
333770
333777
  if (!source.startsWith("."))
333771
333778
  return null;
333772
- const dir = dirname6(contextFile);
333779
+ const dir = dirname7(contextFile);
333773
333780
  const base = source.replace(/\.(js|ts|jsx|tsx|mjs|cjs)$/, "");
333774
333781
  for (const ext of [".ts", ".tsx", ".js", ".jsx"]) {
333775
333782
  const p = resolve18(dir, base + ext);
@@ -333781,7 +333788,7 @@ ${lines[j] ?? ""}`;
333781
333788
  return null;
333782
333789
  },
333783
333790
  computePath(fromFile, toFile) {
333784
- let rel = relative5(dirname6(fromFile), toFile).replace(/\.tsx?$/, ".js");
333791
+ let rel = relative5(dirname7(fromFile), toFile).replace(/\.tsx?$/, ".js");
333785
333792
  if (!rel.startsWith("."))
333786
333793
  rel = `./${rel}`;
333787
333794
  return rel;
@@ -333826,9 +333833,9 @@ ${lines[j] ?? ""}`;
333826
333833
  const dots = source.match(/^(\.+)/);
333827
333834
  const dotStr = dots?.[1] ?? ".";
333828
333835
  const levels = dotStr.length - 1;
333829
- let dir = dirname6(contextFile);
333836
+ let dir = dirname7(contextFile);
333830
333837
  for (let i2 = 0;i2 < levels; i2++)
333831
- dir = dirname6(dir);
333838
+ dir = dirname7(dir);
333832
333839
  const parts3 = source.slice(dotStr.length).split(".");
333833
333840
  const modPath2 = resolve18(dir, ...parts3);
333834
333841
  if (await fileExists(`${modPath2}.py`))
@@ -333838,7 +333845,7 @@ ${lines[j] ?? ""}`;
333838
333845
  return null;
333839
333846
  }
333840
333847
  const parts2 = source.split(".");
333841
- const modPath = resolve18(dirname6(contextFile), ...parts2);
333848
+ const modPath = resolve18(dirname7(contextFile), ...parts2);
333842
333849
  if (await fileExists(`${modPath}.py`))
333843
333850
  return `${modPath}.py`;
333844
333851
  if (await fileExists(resolve18(modPath, "__init__.py")))
@@ -333846,7 +333853,7 @@ ${lines[j] ?? ""}`;
333846
333853
  return null;
333847
333854
  },
333848
333855
  computePath(fromFile, toFile) {
333849
- const rel = relative5(dirname6(fromFile), toFile).replace(/\.py$/, "");
333856
+ const rel = relative5(dirname7(fromFile), toFile).replace(/\.py$/, "");
333850
333857
  const parts2 = rel.split("/");
333851
333858
  const upCount = parts2.filter((p) => p === "..").length;
333852
333859
  const downParts = parts2.filter((p) => p !== "..");
@@ -333986,7 +333993,7 @@ ${lines[j] ?? ""}`;
333986
333993
  return result;
333987
333994
  },
333988
333995
  async resolveSource(source, contextFile) {
333989
- const p = resolve18(dirname6(contextFile), source);
333996
+ const p = resolve18(dirname7(contextFile), source);
333990
333997
  try {
333991
333998
  await access2(p);
333992
333999
  return p;
@@ -333995,7 +334002,7 @@ ${lines[j] ?? ""}`;
333995
334002
  }
333996
334003
  },
333997
334004
  computePath(fromFile, toFile) {
333998
- return relative5(dirname6(fromFile), toFile);
334005
+ return relative5(dirname7(fromFile), toFile);
333999
334006
  },
334000
334007
  generate(_s, path) {
334001
334008
  return `#include "${path}"`;
@@ -335980,7 +335987,7 @@ ${diagOutput}`;
335980
335987
 
335981
335988
  // src/core/tools/rename-file.ts
335982
335989
  import { mkdir as mkdir4, readFile as readFile15, rename as rename2, stat as statAsync7, writeFile as writeFile8 } from "fs/promises";
335983
- import { dirname as dirname7, relative as relative6, resolve as resolve24 } from "path";
335990
+ import { dirname as dirname8, relative as relative6, resolve as resolve24 } from "path";
335984
335991
  var renameFileTool;
335985
335992
  var init_rename_file = __esm(() => {
335986
335993
  init_intelligence();
@@ -336075,7 +336082,7 @@ var init_rename_file = __esm(() => {
336075
336082
  appliedFiles.push(edit.file);
336076
336083
  } catch {}
336077
336084
  }
336078
- const toDir = dirname7(to);
336085
+ const toDir = dirname8(to);
336079
336086
  await mkdir4(toDir, {
336080
336087
  recursive: true
336081
336088
  });
@@ -336396,10 +336403,10 @@ async function locateSymbol(router2, symbol26, hint) {
336396
336403
  }
336397
336404
  async function findProjectRoot2(file2) {
336398
336405
  const {
336399
- dirname: dirname8,
336406
+ dirname: dirname9,
336400
336407
  join: join20
336401
336408
  } = __require("path");
336402
- let dir = dirname8(file2);
336409
+ let dir = dirname9(file2);
336403
336410
  const cwd2 = process.cwd();
336404
336411
  while (dir.length >= cwd2.length) {
336405
336412
  for (const marker21 of ["tsconfig.json", "package.json", "Cargo.toml", "go.mod", "pyproject.toml"]) {
@@ -336408,12 +336415,12 @@ async function findProjectRoot2(file2) {
336408
336415
  return dir;
336409
336416
  } catch {}
336410
336417
  }
336411
- const parent = dirname8(dir);
336418
+ const parent = dirname9(dir);
336412
336419
  if (parent === dir)
336413
336420
  break;
336414
336421
  dir = parent;
336415
336422
  }
336416
- return dirname8(file2);
336423
+ return dirname9(file2);
336417
336424
  }
336418
336425
  async function findRemainingReferences(symbol26, definitionFile) {
336419
336426
  try {
@@ -337148,7 +337155,7 @@ ${hint}` : stdout || stderr;
337148
337155
  // src/core/skills/manager.ts
337149
337156
  import { existsSync as existsSync16, readdirSync as readdirSync5, readFileSync as readFileSync9, realpathSync as realpathSync2, rmSync as rmSync2, statSync as statSync4 } from "fs";
337150
337157
  import { homedir as homedir13 } from "os";
337151
- import { dirname as dirname8, join as join20 } from "path";
337158
+ import { dirname as dirname9, join as join20 } from "path";
337152
337159
  async function searchSkills(query2) {
337153
337160
  const url2 = `https://skills.sh/api/search?q=${encodeURIComponent(query2)}`;
337154
337161
  const res = await fetch(url2);
@@ -337291,7 +337298,7 @@ function loadSkill(path) {
337291
337298
  }
337292
337299
  function removeInstalledSkill(skill) {
337293
337300
  try {
337294
- const dir = dirname8(skill.path);
337301
+ const dir = dirname9(skill.path);
337295
337302
  if (existsSync16(dir)) {
337296
337303
  rmSync2(dir, {
337297
337304
  recursive: true
@@ -339323,7 +339330,7 @@ ${added.join(`
339323
339330
 
339324
339331
  // src/core/tools/test-scaffold.ts
339325
339332
  import { access as access4, mkdir as mkdir5, stat as stat5, writeFile as writeFile10 } from "fs/promises";
339326
- import { basename as basename4, dirname as dirname9, extname as extname8, join as join22, relative as relative11, resolve as resolve27 } from "path";
339333
+ import { basename as basename4, dirname as dirname10, extname as extname8, join as join22, relative as relative11, resolve as resolve27 } from "path";
339327
339334
  async function fileExists(path) {
339328
339335
  try {
339329
339336
  await access4(path);
@@ -339350,7 +339357,7 @@ async function detectTestFramework(cwd2) {
339350
339357
  return "vitest";
339351
339358
  }
339352
339359
  async function inferTestPath(sourcePath) {
339353
- const dir = dirname9(sourcePath);
339360
+ const dir = dirname10(sourcePath);
339354
339361
  const base = basename4(sourcePath, extname8(sourcePath));
339355
339362
  const ext = extname8(sourcePath);
339356
339363
  const testsDir = join22(dir, "__tests__");
@@ -339413,7 +339420,7 @@ var init_test_scaffold = __esm(() => {
339413
339420
  };
339414
339421
  }));
339415
339422
  const outputPath = args2.output ?? await inferTestPath(file2);
339416
- const relativePath = relative11(dirname9(outputPath), file2).replace(/\\/g, "/");
339423
+ const relativePath = relative11(dirname10(outputPath), file2).replace(/\\/g, "/");
339417
339424
  const importPath = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
339418
339425
  const importPathNoExt = importPath.replace(/\.(ts|tsx|js|jsx|mts|cts|mjs|cjs)$/, "");
339419
339426
  const lines = [];
@@ -339488,7 +339495,7 @@ var init_test_scaffold = __esm(() => {
339488
339495
  error: "path outside project"
339489
339496
  };
339490
339497
  }
339491
- await mkdir5(dirname9(resolvedOutput), {
339498
+ await mkdir5(dirname10(resolvedOutput), {
339492
339499
  recursive: true
339493
339500
  });
339494
339501
  await writeFile10(resolvedOutput, content, "utf-8");
@@ -360334,10 +360341,11 @@ var init_prompts = __esm(() => {
360334
360341
  // src/core/workers/intelligence-client.ts
360335
360342
  import { homedir as homedir15 } from "os";
360336
360343
  import { join as join26 } from "path";
360337
- var IS_BUNDLED2, IntelligenceClient;
360344
+ var IS_COMPILED2, IS_DIST2, IntelligenceClient;
360338
360345
  var init_intelligence_client = __esm(() => {
360339
360346
  init_workers();
360340
- IS_BUNDLED2 = import.meta.url.includes("$bunfs");
360347
+ IS_COMPILED2 = import.meta.url.includes("$bunfs");
360348
+ IS_DIST2 = !IS_COMPILED2 && import.meta.dir.includes("/dist");
360341
360349
  IntelligenceClient = class IntelligenceClient extends WorkerClient {
360342
360350
  _isReady = false;
360343
360351
  _cwd;
@@ -360356,7 +360364,7 @@ var init_intelligence_client = __esm(() => {
360356
360364
  onStaleSymbols = null;
360357
360365
  static SCAN_TIMEOUT = 300000;
360358
360366
  constructor(cwd2) {
360359
- const workerPath = IS_BUNDLED2 ? join26(homedir15(), ".soulforge", "workers", "intelligence.worker.js") : join26(import.meta.dir, "intelligence.worker.ts");
360367
+ const workerPath = IS_COMPILED2 ? join26(homedir15(), ".soulforge", "workers", "intelligence.worker.js") : IS_DIST2 ? join26(import.meta.dir, "workers", "intelligence.worker.js") : join26(import.meta.dir, "intelligence.worker.ts");
360360
360368
  super(workerPath, {
360361
360369
  cwd: cwd2
360362
360370
  });
@@ -382215,7 +382223,7 @@ import { EventEmitter } from "events";
382215
382223
  import { Buffer as Buffer2 } from "buffer";
382216
382224
  import { Buffer as Buffer3 } from "buffer";
382217
382225
  import { EventEmitter as EventEmitter2 } from "events";
382218
- import { resolve as resolve31, dirname as dirname10 } from "path";
382226
+ import { resolve as resolve31, dirname as dirname11 } from "path";
382219
382227
  import { fileURLToPath } from "url";
382220
382228
  import { resolve as resolve210, isAbsolute, parse as parse7 } from "path";
382221
382229
  import { existsSync as existsSync23 } from "fs";
@@ -385416,25 +385424,25 @@ function getParsers() {
385416
385424
  filetype: "javascript",
385417
385425
  aliases: ["javascriptreact"],
385418
385426
  queries: {
385419
- highlights: [resolve31(dirname10(fileURLToPath(import.meta.url)), highlights_default)]
385427
+ highlights: [resolve31(dirname11(fileURLToPath(import.meta.url)), highlights_default)]
385420
385428
  },
385421
- wasm: resolve31(dirname10(fileURLToPath(import.meta.url)), tree_sitter_javascript_default)
385429
+ wasm: resolve31(dirname11(fileURLToPath(import.meta.url)), tree_sitter_javascript_default)
385422
385430
  },
385423
385431
  {
385424
385432
  filetype: "typescript",
385425
385433
  aliases: ["typescriptreact"],
385426
385434
  queries: {
385427
- highlights: [resolve31(dirname10(fileURLToPath(import.meta.url)), highlights_default2)]
385435
+ highlights: [resolve31(dirname11(fileURLToPath(import.meta.url)), highlights_default2)]
385428
385436
  },
385429
- wasm: resolve31(dirname10(fileURLToPath(import.meta.url)), tree_sitter_typescript_default)
385437
+ wasm: resolve31(dirname11(fileURLToPath(import.meta.url)), tree_sitter_typescript_default)
385430
385438
  },
385431
385439
  {
385432
385440
  filetype: "markdown",
385433
385441
  queries: {
385434
- highlights: [resolve31(dirname10(fileURLToPath(import.meta.url)), highlights_default3)],
385435
- injections: [resolve31(dirname10(fileURLToPath(import.meta.url)), injections_default)]
385442
+ highlights: [resolve31(dirname11(fileURLToPath(import.meta.url)), highlights_default3)],
385443
+ injections: [resolve31(dirname11(fileURLToPath(import.meta.url)), injections_default)]
385436
385444
  },
385437
- wasm: resolve31(dirname10(fileURLToPath(import.meta.url)), tree_sitter_markdown_default),
385445
+ wasm: resolve31(dirname11(fileURLToPath(import.meta.url)), tree_sitter_markdown_default),
385438
385446
  injectionMapping: {
385439
385447
  nodeTypes: {
385440
385448
  inline: "markdown_inline",
@@ -385457,16 +385465,16 @@ function getParsers() {
385457
385465
  {
385458
385466
  filetype: "markdown_inline",
385459
385467
  queries: {
385460
- highlights: [resolve31(dirname10(fileURLToPath(import.meta.url)), highlights_default4)]
385468
+ highlights: [resolve31(dirname11(fileURLToPath(import.meta.url)), highlights_default4)]
385461
385469
  },
385462
- wasm: resolve31(dirname10(fileURLToPath(import.meta.url)), tree_sitter_markdown_inline_default)
385470
+ wasm: resolve31(dirname11(fileURLToPath(import.meta.url)), tree_sitter_markdown_inline_default)
385463
385471
  },
385464
385472
  {
385465
385473
  filetype: "zig",
385466
385474
  queries: {
385467
- highlights: [resolve31(dirname10(fileURLToPath(import.meta.url)), highlights_default5)]
385475
+ highlights: [resolve31(dirname11(fileURLToPath(import.meta.url)), highlights_default5)]
385468
385476
  },
385469
- wasm: resolve31(dirname10(fileURLToPath(import.meta.url)), tree_sitter_zig_default)
385477
+ wasm: resolve31(dirname11(fileURLToPath(import.meta.url)), tree_sitter_zig_default)
385470
385478
  }
385471
385479
  ];
385472
385480
  }
@@ -430415,7 +430423,7 @@ __export(exports_export, {
430415
430423
  exportChat: () => exportChat
430416
430424
  });
430417
430425
  import { mkdirSync as mkdirSync10, writeFileSync as writeFileSync8 } from "fs";
430418
- import { dirname as dirname13, join as join37 } from "path";
430426
+ import { dirname as dirname14, join as join37 } from "path";
430419
430427
  function formatTimestamp(ts) {
430420
430428
  const d3 = new Date(ts);
430421
430429
  return d3.toLocaleString("en-US", {
@@ -430597,7 +430605,7 @@ function exportChat(messages, opts) {
430597
430605
  const slug = slugify2(title);
430598
430606
  outPath = join37(exportDir, `${slug}-${stamp}${ext}`);
430599
430607
  }
430600
- const parentDir = dirname13(outPath);
430608
+ const parentDir = dirname14(outPath);
430601
430609
  mkdirSync10(parentDir, {
430602
430610
  recursive: true
430603
430611
  });
@@ -430683,9 +430691,9 @@ async function handleExportAll(ctx) {
430683
430691
  const relPath = outPath.startsWith(ctx.cwd) ? outPath.slice(ctx.cwd.length + 1) : outPath;
430684
430692
  sysMsg(ctx, `Diagnostic export \u2192 \`${relPath}\` (system prompt: ${String(Math.round(systemPrompt.length / 4))} tokens, ${String(coreMessages.length)} core messages, ${String(chatMessages.length)} chat messages)`);
430685
430693
  const {
430686
- dirname: dirname14
430694
+ dirname: dirname15
430687
430695
  } = await import("path");
430688
- Bun.spawn([process.platform === "darwin" ? "open" : "xdg-open", dirname14(outPath)]);
430696
+ Bun.spawn([process.platform === "darwin" ? "open" : "xdg-open", dirname15(outPath)]);
430689
430697
  }
430690
430698
  async function handleExport(input, ctx) {
430691
430699
  const trimmed = input.trim();
@@ -430732,9 +430740,9 @@ async function handleExport(input, ctx) {
430732
430740
  const relPath = result.path.startsWith(ctx.cwd) ? result.path.slice(ctx.cwd.length + 1) : result.path;
430733
430741
  sysMsg(ctx, `Exported ${String(result.messageCount)} messages \u2192 \`${relPath}\``);
430734
430742
  const {
430735
- dirname: dirname14
430743
+ dirname: dirname15
430736
430744
  } = await import("path");
430737
- const dir = dirname14(result.path);
430745
+ const dir = dirname15(result.path);
430738
430746
  const opener = process.platform === "darwin" ? "open" : process.platform === "win32" ? "explorer" : "xdg-open";
430739
430747
  Bun.spawn([opener, dir]);
430740
430748
  }
@@ -439074,13 +439082,13 @@ var init_useChat = __esm(() => {
439074
439082
  // src/core/history/db.ts
439075
439083
  import { Database as Database4 } from "bun:sqlite";
439076
439084
  import { existsSync as existsSync30, mkdirSync as mkdirSync11 } from "fs";
439077
- import { dirname as dirname14 } from "path";
439085
+ import { dirname as dirname15 } from "path";
439078
439086
 
439079
439087
  class HistoryDB {
439080
439088
  db;
439081
439089
  writesSincePrune = 0;
439082
439090
  constructor(dbPath) {
439083
- const dir = dirname14(dbPath);
439091
+ const dir = dirname15(dbPath);
439084
439092
  if (!existsSync30(dir))
439085
439093
  mkdirSync11(dir, {
439086
439094
  recursive: true
@@ -439982,7 +439990,7 @@ var init_InputBox = __esm(async () => {
439982
439990
  // src/core/utils/syntax.ts
439983
439991
  import { existsSync as existsSync31, readdirSync as readdirSync8 } from "fs";
439984
439992
  import { homedir as homedir20 } from "os";
439985
- import { dirname as dirname15, join as join41, resolve as resolve33 } from "path";
439993
+ import { dirname as dirname16, join as join41, resolve as resolve33 } from "path";
439986
439994
  function discoverParsers() {
439987
439995
  const parsers = [];
439988
439996
  let dirs;
@@ -440049,16 +440057,16 @@ function getTSClient() {
440049
440057
  }
440050
440058
  return _tsClient;
440051
440059
  }
440052
- var IS_BUNDLED3, bundledAssets, coreAssetsDir, MARKDOWN_INJECTION_MAP, TS_ALIASES, EXTRA_FILETYPES, theme, _syntaxStyle = null, _tsClient = null;
440060
+ var IS_BUNDLED, bundledAssets, coreAssetsDir, MARKDOWN_INJECTION_MAP, TS_ALIASES, EXTRA_FILETYPES, theme, _syntaxStyle = null, _tsClient = null;
440053
440061
  var init_syntax = __esm(async () => {
440054
440062
  await init_core4();
440055
- IS_BUNDLED3 = import.meta.url.includes("$bunfs");
440063
+ IS_BUNDLED = import.meta.url.includes("$bunfs");
440056
440064
  bundledAssets = join41(homedir20(), ".soulforge", "opentui-assets");
440057
- if (IS_BUNDLED3) {
440065
+ if (IS_BUNDLED) {
440058
440066
  coreAssetsDir = bundledAssets;
440059
440067
  } else {
440060
440068
  try {
440061
- coreAssetsDir = resolve33(dirname15(__require.resolve("@opentui/core")), "assets");
440069
+ coreAssetsDir = resolve33(dirname16(__require.resolve("@opentui/core")), "assets");
440062
440070
  } catch {
440063
440071
  coreAssetsDir = bundledAssets;
440064
440072
  }