@travisennis/acai 0.0.10 → 0.0.11

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.
Files changed (112) hide show
  1. package/README.md +5 -1
  2. package/dist/agent/index.d.ts.map +1 -1
  3. package/dist/agent/index.js +29 -27
  4. package/dist/cli/stdin.d.ts +2 -1
  5. package/dist/cli/stdin.d.ts.map +1 -1
  6. package/dist/commands/generate-rules/service.d.ts +3 -2
  7. package/dist/commands/generate-rules/service.d.ts.map +1 -1
  8. package/dist/commands/health/utils.d.ts +3 -2
  9. package/dist/commands/health/utils.d.ts.map +1 -1
  10. package/dist/commands/init-project/utils.d.ts +2 -1
  11. package/dist/commands/init-project/utils.d.ts.map +1 -1
  12. package/dist/commands/review/utils.d.ts +6 -1
  13. package/dist/commands/review/utils.d.ts.map +1 -1
  14. package/dist/index.js +1 -1
  15. package/dist/models/opencode-go-provider.d.ts +25 -0
  16. package/dist/models/opencode-go-provider.d.ts.map +1 -0
  17. package/dist/models/opencode-go-provider.js +78 -0
  18. package/dist/models/opencode-zen-provider.d.ts +3 -3
  19. package/dist/models/opencode-zen-provider.js +17 -17
  20. package/dist/models/openrouter-provider.d.ts +4 -1
  21. package/dist/models/openrouter-provider.d.ts.map +1 -1
  22. package/dist/models/openrouter-provider.js +39 -0
  23. package/dist/models/providers.d.ts +3 -3
  24. package/dist/models/providers.d.ts.map +1 -1
  25. package/dist/models/providers.js +6 -0
  26. package/dist/modes/manager.d.ts +2 -1
  27. package/dist/modes/manager.d.ts.map +1 -1
  28. package/dist/modes/prompts.d.ts +1 -1
  29. package/dist/modes/prompts.d.ts.map +1 -1
  30. package/dist/modes/prompts.js +1 -2
  31. package/dist/prompts/mentions.d.ts.map +1 -1
  32. package/dist/prompts/mentions.js +35 -6
  33. package/dist/repl/index.d.ts.map +1 -1
  34. package/dist/repl/index.js +9 -1
  35. package/dist/sessions/manager.d.ts +3 -3
  36. package/dist/sessions/manager.d.ts.map +1 -1
  37. package/dist/sessions/manager.js +1 -1
  38. package/dist/skills/index.d.ts +2 -1
  39. package/dist/skills/index.d.ts.map +1 -1
  40. package/dist/subagents/index.d.ts +2 -1
  41. package/dist/subagents/index.d.ts.map +1 -1
  42. package/dist/terminal/table/utils.d.ts +1 -1
  43. package/dist/terminal/table/utils.d.ts.map +1 -1
  44. package/dist/terminal/wrap-ansi.js +2 -2
  45. package/dist/tools/agent.js +1 -1
  46. package/dist/tools/apply-patch.d.ts +62 -0
  47. package/dist/tools/apply-patch.d.ts.map +1 -0
  48. package/dist/tools/apply-patch.js +377 -0
  49. package/dist/tools/bash.d.ts.map +1 -1
  50. package/dist/tools/bash.js +28 -7
  51. package/dist/tools/directory-tree.d.ts.map +1 -1
  52. package/dist/tools/directory-tree.js +1 -1
  53. package/dist/tools/dynamic-tool-loader.d.ts +1 -1
  54. package/dist/tools/dynamic-tool-loader.d.ts.map +1 -1
  55. package/dist/tools/edit-file.d.ts.map +1 -1
  56. package/dist/tools/edit-file.js +188 -79
  57. package/dist/tools/glob.d.ts.map +1 -1
  58. package/dist/tools/glob.js +22 -15
  59. package/dist/tools/grep.d.ts.map +1 -1
  60. package/dist/tools/grep.js +43 -29
  61. package/dist/tools/index.d.ts +15 -48
  62. package/dist/tools/index.d.ts.map +1 -1
  63. package/dist/tools/index.js +4 -4
  64. package/dist/tools/ls.d.ts.map +1 -1
  65. package/dist/tools/ls.js +1 -1
  66. package/dist/tools/read-file.d.ts +1 -3
  67. package/dist/tools/read-file.d.ts.map +1 -1
  68. package/dist/tools/read-file.js +21 -16
  69. package/dist/tools/save-file.d.ts.map +1 -1
  70. package/dist/tools/save-file.js +26 -21
  71. package/dist/tools/web-fetch.d.ts +0 -12
  72. package/dist/tools/web-fetch.d.ts.map +1 -1
  73. package/dist/tools/web-fetch.js +18 -1
  74. package/dist/tools/web-search.d.ts +0 -18
  75. package/dist/tools/web-search.d.ts.map +1 -1
  76. package/dist/tui/autocomplete/file-search-provider.js +1 -1
  77. package/dist/tui/autocomplete/utils.d.ts +2 -1
  78. package/dist/tui/autocomplete/utils.d.ts.map +1 -1
  79. package/dist/tui/autocomplete/utils.js +25 -23
  80. package/dist/tui/components/editor.d.ts +2 -1
  81. package/dist/tui/components/editor.d.ts.map +1 -1
  82. package/dist/tui/components/editor.js +1 -1
  83. package/dist/tui/components/markdown.d.ts +2 -2
  84. package/dist/tui/components/markdown.d.ts.map +1 -1
  85. package/dist/tui/components/welcome.d.ts +2 -1
  86. package/dist/tui/components/welcome.d.ts.map +1 -1
  87. package/dist/tui/editor-launcher.d.ts +3 -2
  88. package/dist/tui/editor-launcher.d.ts.map +1 -1
  89. package/dist/tui/index.d.ts +0 -1
  90. package/dist/tui/index.d.ts.map +1 -1
  91. package/dist/tui/tui.d.ts +1 -0
  92. package/dist/tui/tui.d.ts.map +1 -1
  93. package/dist/tui/tui.js +9 -0
  94. package/dist/tui/utils.d.ts +1 -5
  95. package/dist/tui/utils.d.ts.map +1 -1
  96. package/dist/tui/utils.js +271 -44
  97. package/package.json +18 -18
  98. package/dist/commands/add-directory/types.d.ts +0 -6
  99. package/dist/commands/add-directory/types.d.ts.map +0 -1
  100. package/dist/commands/add-directory/types.js +0 -1
  101. package/dist/commands/copy/types.d.ts +0 -3
  102. package/dist/commands/copy/types.d.ts.map +0 -1
  103. package/dist/commands/copy/types.js +0 -1
  104. package/dist/commands/review/types.d.ts +0 -12
  105. package/dist/commands/review/types.d.ts.map +0 -1
  106. package/dist/commands/review/types.js +0 -1
  107. package/dist/tools/code-search.d.ts +0 -41
  108. package/dist/tools/code-search.d.ts.map +0 -1
  109. package/dist/tools/code-search.js +0 -195
  110. package/dist/utils/iterables.d.ts +0 -2
  111. package/dist/utils/iterables.d.ts.map +0 -1
  112. package/dist/utils/iterables.js +0 -6
package/dist/tui/utils.js CHANGED
@@ -1,5 +1,17 @@
1
1
  import { getSegmenter } from "../terminal/segmenter.js";
2
2
  import stringWidth from "../terminal/string-width.js";
3
+ /**
4
+ * Check if a string contains only printable ASCII characters (0x20-0x7e).
5
+ */
6
+ function isPrintableAscii(str) {
7
+ for (let i = 0; i < str.length; i++) {
8
+ const code = str.charCodeAt(i);
9
+ if (code < 0x20 || code > 0x7e) {
10
+ return false;
11
+ }
12
+ }
13
+ return true;
14
+ }
3
15
  /**
4
16
  * Calculate the visible width of a string in terminal columns.
5
17
  * This correctly handles:
@@ -13,6 +25,12 @@ export function visibleWidth(str) {
13
25
  const normalized = str.replace(/\t/g, " ");
14
26
  return stringWidth(normalized);
15
27
  }
28
+ /**
29
+ * Get the width of a single grapheme cluster.
30
+ */
31
+ function graphemeWidth(grapheme) {
32
+ return stringWidth(grapheme);
33
+ }
16
34
  /**
17
35
  * Extract ANSI escape sequences from a string at the given position.
18
36
  */
@@ -32,64 +50,273 @@ function extractAnsiCode(str, pos) {
32
50
  }
33
51
  return null;
34
52
  }
35
- /**
36
- * Truncate text to fit within a maximum visible width, preserving ANSI codes.
37
- * Adds ellipsis if truncation occurs.
38
- */
39
- export function truncateToWidth(text, maxWidth, ellipsis = "...") {
40
- const textVisibleWidth = visibleWidth(text);
41
- if (textVisibleWidth <= maxWidth) {
42
- return text;
53
+ function createInitialState() {
54
+ return {
55
+ result: "",
56
+ pendingAnsi: "",
57
+ visibleSoFar: 0,
58
+ keptWidth: 0,
59
+ keepContiguousPrefix: true,
60
+ overflowed: false,
61
+ };
62
+ }
63
+ function processAnsiCode(state, text, pos) {
64
+ const ansi = extractAnsiCode(text, pos);
65
+ if (ansi) {
66
+ state.pendingAnsi += ansi.code;
67
+ return ansi.length;
68
+ }
69
+ return 0;
70
+ }
71
+ function processTab(state, targetWidth, maxWidth) {
72
+ if (state.keepContiguousPrefix && state.keptWidth + 3 <= targetWidth) {
73
+ if (state.pendingAnsi) {
74
+ state.result += state.pendingAnsi;
75
+ state.pendingAnsi = "";
76
+ }
77
+ state.result += "\t";
78
+ state.keptWidth += 3;
79
+ }
80
+ else {
81
+ state.keepContiguousPrefix = false;
82
+ state.pendingAnsi = "";
83
+ }
84
+ state.visibleSoFar += 3;
85
+ if (state.visibleSoFar > maxWidth) {
86
+ state.overflowed = true;
87
+ return true;
88
+ }
89
+ return false;
90
+ }
91
+ function processGraphemeSegment(state, segment, targetWidth, maxWidth) {
92
+ const width = graphemeWidth(segment);
93
+ if (state.keepContiguousPrefix && state.keptWidth + width <= targetWidth) {
94
+ if (state.pendingAnsi) {
95
+ state.result += state.pendingAnsi;
96
+ state.pendingAnsi = "";
97
+ }
98
+ state.result += segment;
99
+ state.keptWidth += width;
100
+ }
101
+ else {
102
+ state.keepContiguousPrefix = false;
103
+ state.pendingAnsi = "";
104
+ }
105
+ state.visibleSoFar += width;
106
+ if (state.visibleSoFar > maxWidth) {
107
+ state.overflowed = true;
108
+ return true;
109
+ }
110
+ return false;
111
+ }
112
+ function truncateSimple(text, targetWidth, maxWidth) {
113
+ const state = createInitialState();
114
+ for (const { segment } of getSegmenter().segment(text)) {
115
+ if (processGraphemeSegment(state, segment, targetWidth, maxWidth)) {
116
+ break;
117
+ }
118
+ }
119
+ return {
120
+ result: state.result,
121
+ keptWidth: state.keptWidth,
122
+ overflowed: state.overflowed,
123
+ visibleSoFar: state.visibleSoFar,
124
+ };
125
+ }
126
+ function truncateComplex(text, targetWidth, maxWidth) {
127
+ const state = createInitialState();
128
+ let i = 0;
129
+ while (i < text.length && !state.overflowed) {
130
+ const ansiSkip = processAnsiCode(state, text, i);
131
+ if (ansiSkip > 0) {
132
+ i += ansiSkip;
133
+ continue;
134
+ }
135
+ if (text[i] === "\t") {
136
+ if (processTab(state, targetWidth, maxWidth)) {
137
+ break;
138
+ }
139
+ i++;
140
+ continue;
141
+ }
142
+ // Find end of current text segment (until tab or ANSI)
143
+ let end = i;
144
+ while (end < text.length && text[end] !== "\t") {
145
+ const nextAnsi = extractAnsiCode(text, end);
146
+ if (nextAnsi) {
147
+ break;
148
+ }
149
+ end++;
150
+ }
151
+ // Process graphemes in this segment
152
+ for (const { segment } of getSegmenter().segment(text.slice(i, end))) {
153
+ if (processGraphemeSegment(state, segment, targetWidth, maxWidth)) {
154
+ break;
155
+ }
156
+ }
157
+ i = end;
158
+ }
159
+ return {
160
+ result: state.result,
161
+ keptWidth: state.keptWidth,
162
+ overflowed: state.overflowed,
163
+ exhaustedInput: i >= text.length,
164
+ visibleSoFar: state.visibleSoFar,
165
+ };
166
+ }
167
+ function handleOversizedEllipsis(text, maxWidth, ellipsis, pad) {
168
+ const textWidth = visibleWidth(text);
169
+ if (textWidth <= maxWidth) {
170
+ return pad ? text + " ".repeat(maxWidth - textWidth) : text;
171
+ }
172
+ const clippedEllipsis = truncateFragmentToWidth(ellipsis, maxWidth);
173
+ if (clippedEllipsis.width === 0) {
174
+ return pad ? " ".repeat(maxWidth) : "";
175
+ }
176
+ return finalizeTruncatedResult("", 0, clippedEllipsis.text, clippedEllipsis.width, maxWidth, pad);
177
+ }
178
+ export function truncateToWidth(text, maxWidth, ellipsis = "...", pad = false) {
179
+ if (maxWidth <= 0) {
180
+ return "";
181
+ }
182
+ if (text.length === 0) {
183
+ return pad ? " ".repeat(maxWidth) : "";
43
184
  }
44
185
  const ellipsisWidth = visibleWidth(ellipsis);
186
+ // Handle case where ellipsis is wider than maxWidth
187
+ if (ellipsisWidth >= maxWidth) {
188
+ const result = handleOversizedEllipsis(text, maxWidth, ellipsis, pad);
189
+ if (result !== null) {
190
+ return result;
191
+ }
192
+ }
193
+ // Fast path: pure ASCII printable
194
+ if (isPrintableAscii(text)) {
195
+ if (text.length <= maxWidth) {
196
+ return pad ? text + " ".repeat(maxWidth - text.length) : text;
197
+ }
198
+ const targetWidth = maxWidth - ellipsisWidth;
199
+ return finalizeTruncatedResult(text.slice(0, targetWidth), targetWidth, ellipsis, ellipsisWidth, maxWidth, pad);
200
+ }
45
201
  const targetWidth = maxWidth - ellipsisWidth;
46
- if (targetWidth <= 0) {
47
- return ellipsis.substring(0, maxWidth);
202
+ const hasAnsi = text.includes("\x1b");
203
+ const hasTabs = text.includes("\t");
204
+ let truncatedResult;
205
+ let exhaustedInput;
206
+ if (!hasAnsi && !hasTabs) {
207
+ truncatedResult = truncateSimple(text, targetWidth, maxWidth);
208
+ exhaustedInput = !truncatedResult.overflowed;
48
209
  }
49
- // Separate ANSI codes from visible content using grapheme segmentation
210
+ else {
211
+ const complexResult = truncateComplex(text, targetWidth, maxWidth);
212
+ truncatedResult = complexResult;
213
+ exhaustedInput = complexResult.exhaustedInput;
214
+ }
215
+ // Text fits completely
216
+ if (!truncatedResult.overflowed && exhaustedInput) {
217
+ return pad
218
+ ? text + " ".repeat(Math.max(0, maxWidth - truncatedResult.visibleSoFar))
219
+ : text;
220
+ }
221
+ return finalizeTruncatedResult(truncatedResult.result, truncatedResult.keptWidth, ellipsis, ellipsisWidth, maxWidth, pad);
222
+ }
223
+ /**
224
+ * Truncate a single fragment to a maximum width.
225
+ */
226
+ function truncateFragmentToWidth(text, maxWidth) {
227
+ if (maxWidth <= 0 || text.length === 0) {
228
+ return { text: "", width: 0 };
229
+ }
230
+ if (isPrintableAscii(text)) {
231
+ const clipped = text.slice(0, maxWidth);
232
+ return { text: clipped, width: clipped.length };
233
+ }
234
+ const hasAnsi = text.includes("\x1b");
235
+ const hasTabs = text.includes("\t");
236
+ if (!hasAnsi && !hasTabs) {
237
+ let result = "";
238
+ let width = 0;
239
+ for (const { segment } of getSegmenter().segment(text)) {
240
+ const w = graphemeWidth(segment);
241
+ if (width + w > maxWidth) {
242
+ break;
243
+ }
244
+ result += segment;
245
+ width += w;
246
+ }
247
+ return { text: result, width };
248
+ }
249
+ let result = "";
250
+ let width = 0;
50
251
  let i = 0;
51
- const segments = [];
252
+ let pendingAnsi = "";
52
253
  while (i < text.length) {
53
- const ansiResult = extractAnsiCode(text, i);
54
- if (ansiResult) {
55
- segments.push({ type: "ansi", value: ansiResult.code });
56
- i += ansiResult.length;
254
+ const ansi = extractAnsiCode(text, i);
255
+ if (ansi) {
256
+ pendingAnsi += ansi.code;
257
+ i += ansi.length;
258
+ continue;
57
259
  }
58
- else {
59
- // Find the next ANSI code or end of string
60
- let end = i;
61
- while (end < text.length) {
62
- const nextAnsi = extractAnsiCode(text, end);
63
- if (nextAnsi)
64
- break;
65
- end++;
260
+ if (text[i] === "\t") {
261
+ if (width + 3 > maxWidth) {
262
+ break;
263
+ }
264
+ if (pendingAnsi) {
265
+ result += pendingAnsi;
266
+ pendingAnsi = "";
267
+ }
268
+ result += "\t";
269
+ width += 3;
270
+ i++;
271
+ continue;
272
+ }
273
+ let end = i;
274
+ while (end < text.length && text[end] !== "\t") {
275
+ const nextAnsi = extractAnsiCode(text, end);
276
+ if (nextAnsi) {
277
+ break;
278
+ }
279
+ end++;
280
+ }
281
+ for (const { segment } of getSegmenter().segment(text.slice(i, end))) {
282
+ const w = graphemeWidth(segment);
283
+ if (width + w > maxWidth) {
284
+ return { text: result, width };
66
285
  }
67
- // Segment this non-ANSI portion into graphemes
68
- const textPortion = text.slice(i, end);
69
- for (const seg of getSegmenter().segment(textPortion)) {
70
- segments.push({ type: "grapheme", value: seg.segment });
286
+ if (pendingAnsi) {
287
+ result += pendingAnsi;
288
+ pendingAnsi = "";
71
289
  }
72
- i = end;
290
+ result += segment;
291
+ width += w;
73
292
  }
293
+ i = end;
74
294
  }
75
- // Build truncated string from segments
76
- let result = "";
77
- let currentWidth = 0;
78
- for (const seg of segments) {
79
- if (seg.type === "ansi") {
80
- result += seg.value;
81
- continue;
295
+ return { text: result, width };
296
+ }
297
+ /**
298
+ * Finalize a truncated result with proper ANSI reset codes.
299
+ * Only adds reset codes if the prefix contains ANSI sequences.
300
+ */
301
+ function finalizeTruncatedResult(prefix, prefixWidth, ellipsis, ellipsisWidth, maxWidth, pad) {
302
+ const hasAnsi = prefix.includes("\x1b");
303
+ const visibleWidth = prefixWidth + ellipsisWidth;
304
+ let result;
305
+ if (hasAnsi) {
306
+ const reset = "\x1b[0m";
307
+ if (ellipsis.length > 0) {
308
+ result = `${prefix}${reset}${ellipsis}${reset}`;
82
309
  }
83
- const grapheme = seg.value;
84
- const graphemeWidth = visibleWidth(grapheme);
85
- if (currentWidth + graphemeWidth > targetWidth) {
86
- break;
310
+ else {
311
+ result = `${prefix}${reset}`;
87
312
  }
88
- result += grapheme;
89
- currentWidth += graphemeWidth;
90
313
  }
91
- // Add reset code before ellipsis to prevent styling leaking into it
92
- return `${result}\x1b[0m${ellipsis}`;
314
+ else {
315
+ result = ellipsis.length > 0 ? `${prefix}${ellipsis}` : prefix;
316
+ }
317
+ return pad
318
+ ? result + " ".repeat(Math.max(0, maxWidth - visibleWidth))
319
+ : result;
93
320
  }
94
321
  /**
95
322
  * Apply background color to a line, padding to full width.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travisennis/acai",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "An AI assistant for developing software.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -57,23 +57,23 @@
57
57
  "lint:length": "find source -name '*.ts' | xargs -I{} awk 'END{if(NR>500)print FILENAME\": \"NR\" lines\"}' {}"
58
58
  },
59
59
  "dependencies": {
60
- "@ai-sdk/anthropic": "^3.0.53",
61
- "@ai-sdk/deepseek": "^2.0.22",
60
+ "@ai-sdk/anthropic": "^3.0.63",
61
+ "@ai-sdk/deepseek": "^2.0.26",
62
62
  "@ai-sdk/devtools": "^0.0.15",
63
- "@ai-sdk/google": "^3.0.36",
64
- "@ai-sdk/groq": "^3.0.27",
65
- "@ai-sdk/open-responses": "^1.0.4",
66
- "@ai-sdk/openai": "^3.0.39",
67
- "@ai-sdk/openai-compatible": "^2.0.33",
63
+ "@ai-sdk/google": "^3.0.52",
64
+ "@ai-sdk/groq": "^3.0.31",
65
+ "@ai-sdk/open-responses": "^1.0.8",
66
+ "@ai-sdk/openai": "^3.0.47",
67
+ "@ai-sdk/openai-compatible": "^2.0.37",
68
68
  "@crosscopy/clipboard": "^0.3.6",
69
69
  "@travisennis/stdlib": "^0.0.14",
70
- "ai": "^6.0.107",
70
+ "ai": "^6.0.134",
71
71
  "cheerio": "^1.2.0",
72
72
  "diff": "^8.0.3",
73
73
  "fast-glob": "^3.3.3",
74
74
  "fdir": "^6.5.0",
75
75
  "highlight.js": "^11.11.1",
76
- "marked": "17.0.3",
76
+ "marked": "17.0.5",
77
77
  "p-throttle": "^8.1.0",
78
78
  "parse5": "^8.0.0",
79
79
  "parse5-htmlparser2-tree-adapter": "^8.0.0",
@@ -85,16 +85,16 @@
85
85
  },
86
86
  "devDependencies": {
87
87
  "@ai-sdk/provider": "^3.0.8",
88
- "@ast-grep/napi": "^0.41.0",
89
- "@biomejs/biome": "2.4.5",
90
- "@commitlint/config-conventional": "^20.4.2",
91
- "@types/node": "^25.3.3",
88
+ "@ast-grep/napi": "^0.42.0",
89
+ "@biomejs/biome": "2.4.8",
90
+ "@commitlint/config-conventional": "^20.5.0",
91
+ "@types/node": "^25.5.0",
92
92
  "c8": "^11.0.0",
93
- "commitlint": "^20.4.2",
94
- "domhandler": "^5.0.3",
93
+ "commitlint": "^20.5.0",
94
+ "domhandler": "^6.0.1",
95
95
  "husky": "^9.1.7",
96
- "oxlint": "^1.51.0",
97
- "oxlint-tsgolint": "^0.15.0",
96
+ "oxlint": "^1.56.0",
97
+ "oxlint-tsgolint": "^0.17.1",
98
98
  "typescript": "^5.9.3"
99
99
  },
100
100
  "engines": {
@@ -1,6 +0,0 @@
1
- import type { WorkspaceContext } from "../../index.ts";
2
- export interface AddDirectoryOptions {
3
- workspace: WorkspaceContext;
4
- }
5
- export type { WorkspaceContext };
6
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../source/commands/add-directory/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,gBAAgB,CAAC;CAC7B;AAED,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- import type { ModelMessage, TextPart } from "ai";
2
- export type { ModelMessage, TextPart };
3
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../source/commands/copy/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAEjD,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- export interface FileChange {
2
- fileName: string;
3
- diff: string;
4
- stats: string;
5
- }
6
- export interface ReviewCommandOptions {
7
- tui: unknown;
8
- container: unknown;
9
- editor: unknown;
10
- inputContainer: unknown;
11
- }
12
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../source/commands/review/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,OAAO,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,OAAO,CAAC;CACzB"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,41 +0,0 @@
1
- import { z } from "zod";
2
- import type { ToolExecutionOptions } from "./types.ts";
3
- export declare const CodeSearchTool: {
4
- name: "CodeSearch";
5
- };
6
- declare const inputSchema: z.ZodObject<{
7
- query: z.ZodString;
8
- path: z.ZodDefault<z.ZodString>;
9
- regexPattern: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodString>>;
10
- filePattern: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodString>>;
11
- excludePattern: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodString>>;
12
- excludeDir: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodString>>;
13
- maxResults: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
14
- contextLines: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
15
- filesOnly: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodCoercedBoolean<unknown>>>;
16
- showContent: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodCoercedBoolean<unknown>>>;
17
- codeOnly: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodCoercedBoolean<unknown>>>;
18
- }, z.core.$strip>;
19
- type CodeSearchInputSchema = z.infer<typeof inputSchema>;
20
- export declare const createCodeSearchTool: () => {
21
- toolDef: {
22
- description: string;
23
- inputSchema: z.ZodObject<{
24
- query: z.ZodString;
25
- path: z.ZodDefault<z.ZodString>;
26
- regexPattern: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodString>>;
27
- filePattern: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodString>>;
28
- excludePattern: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodString>>;
29
- excludeDir: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodString>>;
30
- maxResults: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
31
- contextLines: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
32
- filesOnly: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodCoercedBoolean<unknown>>>;
33
- showContent: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodCoercedBoolean<unknown>>>;
34
- codeOnly: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodCoercedBoolean<unknown>>>;
35
- }, z.core.$strip>;
36
- };
37
- display({ query, path, regexPattern, filePattern, excludePattern, excludeDir, maxResults, contextLines, filesOnly, showContent, codeOnly, }: CodeSearchInputSchema): string;
38
- execute({ query, path, regexPattern, filePattern, excludePattern, excludeDir, maxResults, contextLines, filesOnly, showContent, codeOnly, }: CodeSearchInputSchema, { abortSignal }: ToolExecutionOptions): Promise<string>;
39
- };
40
- export {};
41
- //# sourceMappingURL=code-search.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"code-search.d.ts","sourceRoot":"","sources":["../../source/tools/code-search.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAMvD,eAAO,MAAM,cAAc;;CAE1B,CAAC;AAEF,QAAA,MAAM,WAAW;;;;;;;;;;;;iBA8Bf,CAAC;AAEH,KAAK,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AA4GzD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;iJAkB1B,qBAAqB;iJAsDnB,qBAAqB,mBACP,oBAAoB,GACpC,OAAO,CAAC,MAAM,CAAC;CAgCrB,CAAC"}