reasonix 0.16.0 → 0.17.0

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.d.ts CHANGED
@@ -1762,7 +1762,18 @@ interface CodeSystemPromptOptions {
1762
1762
  }
1763
1763
  declare function codeSystemPrompt(rootDir: string, opts?: CodeSystemPromptOptions): string;
1764
1764
 
1765
+ /** Shared exclude defaults + resolver — chunker, directory_tree, and dashboard read from here. */
1766
+ interface IndexUserConfig {
1767
+ excludeDirs?: string[];
1768
+ excludeFiles?: string[];
1769
+ excludeExts?: string[];
1770
+ excludePatterns?: string[];
1771
+ respectGitignore?: boolean;
1772
+ maxFileBytes?: number;
1773
+ }
1774
+
1765
1775
  /** Library reads only DEEPSEEK_API_KEY from env; the CLI bridges config.json → env var. */
1776
+
1766
1777
  /** Legacy `fast|smart|max` kept for back-compat with existing config.json files. */
1767
1778
  type PresetName = "auto" | "flash" | "pro" | "fast" | "smart" | "max";
1768
1779
  /** Single trust dial: review queues edits + gates shell; auto applies + gates shell; yolo skips both gates. */
@@ -1785,6 +1796,7 @@ interface ReasonixConfig {
1785
1796
  shellAllowed?: string[];
1786
1797
  };
1787
1798
  };
1799
+ index?: IndexUserConfig;
1788
1800
  }
1789
1801
  declare function defaultConfigPath(): string;
1790
1802
  declare function readConfig(path?: string): ReasonixConfig;
package/dist/index.js CHANGED
@@ -2651,7 +2651,7 @@ ${summary}`;
2651
2651
  assistantMessage(content, toolCalls, producingModel, reasoningContent) {
2652
2652
  const msg = { role: "assistant", content };
2653
2653
  if (toolCalls.length > 0) msg.tool_calls = toolCalls;
2654
- if (isThinkingModeModel(producingModel)) {
2654
+ if (isThinkingModeModel(producingModel) || reasoningContent && reasoningContent.length > 0) {
2655
2655
  msg.reasoning_content = reasoningContent ?? "";
2656
2656
  }
2657
2657
  return msg;
@@ -3893,74 +3893,100 @@ function applyMemoryStack(basePrompt, rootDir) {
3893
3893
  // src/tools/filesystem.ts
3894
3894
  import { promises as fs } from "fs";
3895
3895
  import * as pathMod from "path";
3896
+
3897
+ // src/index/config.ts
3898
+ import picomatch from "picomatch";
3899
+ var DEFAULT_INDEX_EXCLUDES = {
3900
+ dirs: [
3901
+ "node_modules",
3902
+ ".git",
3903
+ ".hg",
3904
+ ".svn",
3905
+ "dist",
3906
+ "build",
3907
+ "out",
3908
+ ".next",
3909
+ ".nuxt",
3910
+ "target",
3911
+ ".venv",
3912
+ "venv",
3913
+ "__pycache__",
3914
+ ".pytest_cache",
3915
+ ".mypy_cache",
3916
+ ".cache",
3917
+ "coverage",
3918
+ ".turbo",
3919
+ ".vercel",
3920
+ ".reasonix"
3921
+ ],
3922
+ files: [
3923
+ "package-lock.json",
3924
+ "yarn.lock",
3925
+ "pnpm-lock.yaml",
3926
+ "Cargo.lock",
3927
+ "poetry.lock",
3928
+ "Pipfile.lock",
3929
+ "go.sum",
3930
+ ".DS_Store"
3931
+ ],
3932
+ exts: [
3933
+ ".png",
3934
+ ".jpg",
3935
+ ".jpeg",
3936
+ ".gif",
3937
+ ".webp",
3938
+ ".bmp",
3939
+ ".ico",
3940
+ ".tiff",
3941
+ ".woff",
3942
+ ".woff2",
3943
+ ".ttf",
3944
+ ".otf",
3945
+ ".eot",
3946
+ ".zip",
3947
+ ".tar",
3948
+ ".gz",
3949
+ ".bz2",
3950
+ ".xz",
3951
+ ".rar",
3952
+ ".7z",
3953
+ ".exe",
3954
+ ".dll",
3955
+ ".so",
3956
+ ".dylib",
3957
+ ".bin",
3958
+ ".class",
3959
+ ".jar",
3960
+ ".war",
3961
+ ".wasm",
3962
+ ".o",
3963
+ ".obj",
3964
+ ".lib",
3965
+ ".a",
3966
+ ".pyc",
3967
+ ".pyo",
3968
+ ".mp3",
3969
+ ".mp4",
3970
+ ".wav",
3971
+ ".ogg",
3972
+ ".webm",
3973
+ ".mov",
3974
+ ".avi",
3975
+ ".pdf",
3976
+ ".sqlite",
3977
+ ".db"
3978
+ ]
3979
+ };
3980
+ var DEFAULT_MAX_FILE_BYTES = 256 * 1024;
3981
+
3982
+ // src/tools/filesystem.ts
3896
3983
  var DEFAULT_MAX_READ_BYTES = 2 * 1024 * 1024;
3897
3984
  var DEFAULT_MAX_LIST_BYTES = 256 * 1024;
3898
3985
  var DEFAULT_AUTO_PREVIEW_LINES = 200;
3899
3986
  var AUTO_PREVIEW_HEAD_LINES = 80;
3900
3987
  var AUTO_PREVIEW_TAIL_LINES = 40;
3901
- var SKIP_DIR_NAMES = /* @__PURE__ */ new Set([
3902
- "node_modules",
3903
- ".git",
3904
- ".hg",
3905
- ".svn",
3906
- "dist",
3907
- "build",
3908
- "out",
3909
- ".next",
3910
- ".nuxt",
3911
- "target",
3912
- // Rust / Java
3913
- ".venv",
3914
- "venv",
3915
- "__pycache__",
3916
- ".pytest_cache",
3917
- ".mypy_cache",
3918
- ".cache",
3919
- "coverage"
3920
- ]);
3921
- var BINARY_EXTENSIONS = /* @__PURE__ */ new Set([
3922
- ".png",
3923
- ".jpg",
3924
- ".jpeg",
3925
- ".gif",
3926
- ".bmp",
3927
- ".ico",
3928
- ".webp",
3929
- ".tiff",
3930
- ".pdf",
3931
- ".zip",
3932
- ".tar",
3933
- ".gz",
3934
- ".bz2",
3935
- ".xz",
3936
- ".7z",
3937
- ".rar",
3938
- ".exe",
3939
- ".dll",
3940
- ".so",
3941
- ".dylib",
3942
- ".bin",
3943
- ".class",
3944
- ".jar",
3945
- ".war",
3946
- ".o",
3947
- ".obj",
3948
- ".lib",
3949
- ".a",
3950
- ".woff",
3951
- ".woff2",
3952
- ".ttf",
3953
- ".otf",
3954
- ".eot",
3955
- ".mp3",
3956
- ".mp4",
3957
- ".mov",
3958
- ".avi",
3959
- ".webm",
3960
- ".wasm",
3961
- ".pyc",
3962
- ".pyo"
3963
- ]);
3988
+ var SKIP_DIR_NAMES = new Set(DEFAULT_INDEX_EXCLUDES.dirs);
3989
+ var BINARY_EXTENSIONS = new Set(DEFAULT_INDEX_EXCLUDES.exts);
3964
3990
  function isLikelyBinaryByName(name) {
3965
3991
  const dot = name.lastIndexOf(".");
3966
3992
  if (dot < 0) return false;