@bike4mind/cli 0.2.17-add-confluence-comments.17640 → 0.2.17-feat-ripgrep-integration.17657
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/{artifactExtractor-DXOCP4HU.js → artifactExtractor-MNVIKVBH.js} +1 -1
- package/dist/{chunk-ZB6QS663.js → chunk-6EEN6XHK.js} +2 -2
- package/dist/{chunk-B5TW7WER.js → chunk-CHBAKX4C.js} +0 -148
- package/dist/{chunk-KONNPYSH.js → chunk-NMWRXDTN.js} +2 -2
- package/dist/{chunk-X3OOHIIY.js → chunk-QDWMIP2Q.js} +1 -1
- package/dist/{chunk-NRCCKB6V.js → chunk-WULZDTLD.js} +2 -2
- package/dist/{create-7AJHBWJG.js → create-SR7Q7HAF.js} +3 -3
- package/dist/index.js +94 -83
- package/dist/{llmMarkdownGenerator-QVEBSM7H.js → llmMarkdownGenerator-2APZC4H3.js} +1 -1
- package/dist/{markdownGenerator-DN6YGZGO.js → markdownGenerator-S7OHONSP.js} +1 -1
- package/dist/{mementoService-V3DMZJKU.js → mementoService-UMJ5BYDO.js} +3 -3
- package/dist/{src-I5L4S2Y6.js → src-NBBLECSQ.js} +1 -1
- package/dist/{src-33G7EMUP.js → src-VEJGC5KU.js} +2 -2
- package/dist/{subtractCredits-H45A4MA7.js → subtractCredits-N7Y27C34.js} +3 -3
- package/package.json +9 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
CurationArtifactType
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CHBAKX4C.js";
|
|
5
5
|
|
|
6
6
|
// ../../b4m-core/packages/services/dist/src/notebookCurationService/artifactExtractor.js
|
|
7
7
|
var ARTIFACT_TAG_REGEX = /<artifact\s+(.*?)>([\s\S]*?)<\/artifact>/gi;
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
getSettingsMap,
|
|
8
8
|
getSettingsValue,
|
|
9
9
|
secureParameters
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QDWMIP2Q.js";
|
|
11
11
|
import {
|
|
12
12
|
KnowledgeType,
|
|
13
13
|
SupportedFabFileMimeTypes
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CHBAKX4C.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/fabFileService/create.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -4572,43 +4572,6 @@ function formatSpaceList(spacesResponse, siteUrl) {
|
|
|
4572
4572
|
results
|
|
4573
4573
|
};
|
|
4574
4574
|
}
|
|
4575
|
-
function formatCommentResponse(comment, siteUrl) {
|
|
4576
|
-
if (!comment || typeof comment !== "object" || comment.error || comment.errors) {
|
|
4577
|
-
return comment;
|
|
4578
|
-
}
|
|
4579
|
-
const baseUrl = comment?._links?.base || siteUrl.replace(/\/$/, "");
|
|
4580
|
-
const link = comment._links?.webui ? `${baseUrl}${comment._links.webui}` : "";
|
|
4581
|
-
return {
|
|
4582
|
-
id: comment.id,
|
|
4583
|
-
type: comment.type,
|
|
4584
|
-
// 'comment'
|
|
4585
|
-
status: comment.status,
|
|
4586
|
-
title: comment.title,
|
|
4587
|
-
// Usually "Re: Page Title"
|
|
4588
|
-
body: stripHtmlAndNormalizeWhitespace(comment.body?.storage?.value || comment.body?.view?.value),
|
|
4589
|
-
author: comment.history?.createdBy ? formatUserResponse(comment.history.createdBy) : void 0,
|
|
4590
|
-
created: comment.history?.createdDate,
|
|
4591
|
-
updated: comment.history?.lastUpdated?.when,
|
|
4592
|
-
parentId: comment.container?.id,
|
|
4593
|
-
// Page ID
|
|
4594
|
-
parentCommentId: comment.ancestors?.length ? comment.ancestors[comment.ancestors.length - 1].id : void 0,
|
|
4595
|
-
link,
|
|
4596
|
-
inlineProperties: comment.extensions?.inlineProperties
|
|
4597
|
-
// For inline comments
|
|
4598
|
-
};
|
|
4599
|
-
}
|
|
4600
|
-
function formatCommentList(commentsResponse, siteUrl) {
|
|
4601
|
-
if (!commentsResponse || typeof commentsResponse !== "object" || commentsResponse.error || commentsResponse.errors) {
|
|
4602
|
-
return commentsResponse;
|
|
4603
|
-
}
|
|
4604
|
-
const results = Array.isArray(commentsResponse.results) ? commentsResponse.results.map((comment) => formatCommentResponse(comment, siteUrl)) : [];
|
|
4605
|
-
return {
|
|
4606
|
-
results,
|
|
4607
|
-
start: commentsResponse.start,
|
|
4608
|
-
limit: commentsResponse.limit,
|
|
4609
|
-
size: commentsResponse.size
|
|
4610
|
-
};
|
|
4611
|
-
}
|
|
4612
4575
|
function formatPageList(pagesResponse, siteUrl) {
|
|
4613
4576
|
if (!pagesResponse || typeof pagesResponse !== "object" || pagesResponse.error || pagesResponse.errors) {
|
|
4614
4577
|
return pagesResponse;
|
|
@@ -4951,117 +4914,6 @@ var ConfluenceApi = class {
|
|
|
4951
4914
|
const result = await this.getV1("/user/current", { expand: "personalSpace" });
|
|
4952
4915
|
return formatUserResponse(result);
|
|
4953
4916
|
}
|
|
4954
|
-
/**
|
|
4955
|
-
* Get comments for a Confluence page (v1 API)
|
|
4956
|
-
*/
|
|
4957
|
-
async getPageComments(params) {
|
|
4958
|
-
const { pageId, limit = 25, start = 0, expand } = params;
|
|
4959
|
-
if (!pageId) {
|
|
4960
|
-
throw new Error("pageId is required to fetch comments.");
|
|
4961
|
-
}
|
|
4962
|
-
const comments = await this.getV1(`/content/${pageId}/child/comment`, {
|
|
4963
|
-
limit: Math.min(Math.max(limit, 1), 50),
|
|
4964
|
-
start,
|
|
4965
|
-
expand: expand || "body.storage,history.lastUpdated,history.createdBy,ancestors,extensions.inlineProperties"
|
|
4966
|
-
});
|
|
4967
|
-
return formatCommentList(comments, this.config.siteUrl);
|
|
4968
|
-
}
|
|
4969
|
-
/**
|
|
4970
|
-
* Get a specific comment (v1 API)
|
|
4971
|
-
*/
|
|
4972
|
-
async getComment(params) {
|
|
4973
|
-
const { commentId } = params;
|
|
4974
|
-
if (!commentId)
|
|
4975
|
-
throw new Error("commentId is required");
|
|
4976
|
-
const comment = await this.getV1(`/content/${commentId}`, {
|
|
4977
|
-
expand: "body.storage,history.lastUpdated,history.createdBy,ancestors,extensions.inlineProperties,container"
|
|
4978
|
-
});
|
|
4979
|
-
return formatCommentResponse(comment, this.config.siteUrl);
|
|
4980
|
-
}
|
|
4981
|
-
/**
|
|
4982
|
-
* Add a comment to a page (v1 API)
|
|
4983
|
-
*/
|
|
4984
|
-
async addComment(params) {
|
|
4985
|
-
const { pageId, content, parentId, inlineOriginalSelection } = params;
|
|
4986
|
-
if (!pageId || !content) {
|
|
4987
|
-
throw new Error("pageId and content are required to add a comment.");
|
|
4988
|
-
}
|
|
4989
|
-
const payload = {
|
|
4990
|
-
type: "comment",
|
|
4991
|
-
container: {
|
|
4992
|
-
id: pageId,
|
|
4993
|
-
type: "page"
|
|
4994
|
-
},
|
|
4995
|
-
body: {
|
|
4996
|
-
storage: {
|
|
4997
|
-
value: content,
|
|
4998
|
-
representation: "storage"
|
|
4999
|
-
}
|
|
5000
|
-
}
|
|
5001
|
-
};
|
|
5002
|
-
if (parentId) {
|
|
5003
|
-
payload.ancestors = [{ id: parentId }];
|
|
5004
|
-
}
|
|
5005
|
-
if (inlineOriginalSelection) {
|
|
5006
|
-
payload.extensions = {
|
|
5007
|
-
inlineProperties: {
|
|
5008
|
-
originalSelection: inlineOriginalSelection
|
|
5009
|
-
}
|
|
5010
|
-
};
|
|
5011
|
-
}
|
|
5012
|
-
const result = await this.postV1("/content", payload);
|
|
5013
|
-
return formatCommentResponse(result, this.config.siteUrl);
|
|
5014
|
-
}
|
|
5015
|
-
/**
|
|
5016
|
-
* Update a comment (v1 API)
|
|
5017
|
-
*/
|
|
5018
|
-
async updateComment(params) {
|
|
5019
|
-
const { commentId, content, inlineOriginalSelection } = params;
|
|
5020
|
-
if (!commentId || !content) {
|
|
5021
|
-
throw new Error("commentId and content are required to update a comment.");
|
|
5022
|
-
}
|
|
5023
|
-
const currentComment = await this.getV1(`/content/${commentId}`, {
|
|
5024
|
-
expand: "version,body.storage"
|
|
5025
|
-
});
|
|
5026
|
-
const currentVersion = currentComment?.version?.number;
|
|
5027
|
-
if (typeof currentVersion !== "number") {
|
|
5028
|
-
throw new Error(`Unable to determine current version for comment ${commentId}.`);
|
|
5029
|
-
}
|
|
5030
|
-
const payload = {
|
|
5031
|
-
id: commentId,
|
|
5032
|
-
type: "comment",
|
|
5033
|
-
status: "current",
|
|
5034
|
-
title: currentComment.title,
|
|
5035
|
-
// Title usually persists for comments
|
|
5036
|
-
version: {
|
|
5037
|
-
number: currentVersion + 1
|
|
5038
|
-
},
|
|
5039
|
-
body: {
|
|
5040
|
-
storage: {
|
|
5041
|
-
value: content,
|
|
5042
|
-
representation: "storage"
|
|
5043
|
-
}
|
|
5044
|
-
}
|
|
5045
|
-
};
|
|
5046
|
-
if (inlineOriginalSelection) {
|
|
5047
|
-
payload.extensions = {
|
|
5048
|
-
inlineProperties: {
|
|
5049
|
-
originalSelection: inlineOriginalSelection
|
|
5050
|
-
}
|
|
5051
|
-
};
|
|
5052
|
-
}
|
|
5053
|
-
const result = await this.put(`/content/${commentId}`, payload);
|
|
5054
|
-
return formatCommentResponse(result, this.config.siteUrl);
|
|
5055
|
-
}
|
|
5056
|
-
/**
|
|
5057
|
-
* Delete a comment (v1 API)
|
|
5058
|
-
*/
|
|
5059
|
-
async deleteComment(params) {
|
|
5060
|
-
const { commentId } = params;
|
|
5061
|
-
if (!commentId)
|
|
5062
|
-
throw new Error("commentId is required");
|
|
5063
|
-
await this.requestV1("DELETE", `/content/${commentId}`);
|
|
5064
|
-
}
|
|
5065
4917
|
};
|
|
5066
4918
|
|
|
5067
4919
|
// ../../b4m-core/packages/common/dist/src/jira/format.js
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
getSettingsByNames,
|
|
7
7
|
obfuscateApiKey,
|
|
8
8
|
secureParameters
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QDWMIP2Q.js";
|
|
10
10
|
import {
|
|
11
11
|
ApiKeyType,
|
|
12
12
|
MementoTier,
|
|
13
13
|
isSupportedEmbeddingModel
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CHBAKX4C.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/apiKeyService/get.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BadRequestError,
|
|
4
4
|
secureParameters
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QDWMIP2Q.js";
|
|
6
6
|
import {
|
|
7
7
|
CompletionApiUsageTransaction,
|
|
8
8
|
GenericCreditDeductTransaction,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
RealtimeVoiceUsageTransaction,
|
|
12
12
|
TextGenerationUsageTransaction,
|
|
13
13
|
TransferCreditTransaction
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CHBAKX4C.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
createFabFile,
|
|
4
4
|
createFabFileSchema
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-6EEN6XHK.js";
|
|
6
|
+
import "./chunk-QDWMIP2Q.js";
|
|
7
|
+
import "./chunk-CHBAKX4C.js";
|
|
8
8
|
import "./chunk-OCYRD7D6.js";
|
|
9
9
|
export {
|
|
10
10
|
createFabFile,
|
package/dist/index.js
CHANGED
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
getEffectiveApiKey,
|
|
5
5
|
getOpenWeatherKey,
|
|
6
6
|
getSerperKey
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NMWRXDTN.js";
|
|
8
8
|
import {
|
|
9
9
|
ConfigStore
|
|
10
10
|
} from "./chunk-FFJX3FF3.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-WULZDTLD.js";
|
|
12
|
+
import "./chunk-6EEN6XHK.js";
|
|
13
13
|
import {
|
|
14
14
|
BFLImageService,
|
|
15
15
|
BaseStorage,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
OpenAIBackend,
|
|
22
22
|
OpenAIImageService,
|
|
23
23
|
XAIImageService
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-QDWMIP2Q.js";
|
|
25
25
|
import {
|
|
26
26
|
AiEvents,
|
|
27
27
|
ApiKeyEvents,
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
XAI_IMAGE_MODELS,
|
|
76
76
|
b4mLLMTools,
|
|
77
77
|
getMcpProviderMetadata
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-CHBAKX4C.js";
|
|
79
79
|
import {
|
|
80
80
|
Logger
|
|
81
81
|
} from "./chunk-OCYRD7D6.js";
|
|
@@ -8509,40 +8509,39 @@ var globFilesTool = {
|
|
|
8509
8509
|
};
|
|
8510
8510
|
|
|
8511
8511
|
// ../../b4m-core/packages/services/dist/src/llm/tools/implementation/grepSearch/index.js
|
|
8512
|
-
import {
|
|
8513
|
-
import { readFile, stat as stat2 } from "fs/promises";
|
|
8512
|
+
import { stat as stat2 } from "fs/promises";
|
|
8514
8513
|
import path9 from "path";
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
8521
|
-
"**/.next/**",
|
|
8522
|
-
"**/coverage/**",
|
|
8523
|
-
"**/*.min.js",
|
|
8524
|
-
"**/*.min.css",
|
|
8525
|
-
"**/package-lock.json",
|
|
8526
|
-
"**/pnpm-lock.yaml",
|
|
8527
|
-
"**/yarn.lock"
|
|
8528
|
-
];
|
|
8529
|
-
async function isBinaryFile2(filePath) {
|
|
8514
|
+
import { execFile } from "child_process";
|
|
8515
|
+
import { promisify } from "util";
|
|
8516
|
+
import { createRequire } from "module";
|
|
8517
|
+
var execFileAsync = promisify(execFile);
|
|
8518
|
+
var require2 = createRequire(import.meta.url);
|
|
8519
|
+
function getRipgrepPath() {
|
|
8530
8520
|
try {
|
|
8531
|
-
const
|
|
8532
|
-
const
|
|
8533
|
-
const
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8537
|
-
return chunk.includes(0);
|
|
8538
|
-
} catch {
|
|
8539
|
-
return true;
|
|
8521
|
+
const ripgrepPath = require2.resolve("@vscode/ripgrep");
|
|
8522
|
+
const ripgrepDir = path9.dirname(ripgrepPath);
|
|
8523
|
+
const rgBinary = path9.join(ripgrepDir, "..", "bin", "rg" + (process.platform === "win32" ? ".exe" : ""));
|
|
8524
|
+
return rgBinary;
|
|
8525
|
+
} catch (error) {
|
|
8526
|
+
throw new Error("ripgrep is not available. Please install @vscode/ripgrep: pnpm add @vscode/ripgrep --filter @bike4mind/services");
|
|
8540
8527
|
}
|
|
8541
8528
|
}
|
|
8542
8529
|
function isPathWithinWorkspace(targetPath, baseCwd) {
|
|
8543
8530
|
const resolvedTarget = path9.resolve(targetPath);
|
|
8544
8531
|
const resolvedBase = path9.resolve(baseCwd);
|
|
8545
|
-
|
|
8532
|
+
const relativePath = path9.relative(resolvedBase, resolvedTarget);
|
|
8533
|
+
return !relativePath.startsWith("..") && !path9.isAbsolute(relativePath);
|
|
8534
|
+
}
|
|
8535
|
+
function convertGlobToRipgrepGlobs(globPattern) {
|
|
8536
|
+
if (!globPattern || globPattern === "**/*") {
|
|
8537
|
+
return [];
|
|
8538
|
+
}
|
|
8539
|
+
const braceMatch = globPattern.match(/\*\.{([^}]+)}/);
|
|
8540
|
+
if (braceMatch) {
|
|
8541
|
+
const extensions = braceMatch[1].split(",");
|
|
8542
|
+
return extensions.map((ext) => `*.${ext.trim()}`);
|
|
8543
|
+
}
|
|
8544
|
+
return [globPattern];
|
|
8546
8545
|
}
|
|
8547
8546
|
async function searchFiles2(params) {
|
|
8548
8547
|
const { pattern, dir_path, include } = params;
|
|
@@ -8562,59 +8561,69 @@ async function searchFiles2(params) {
|
|
|
8562
8561
|
}
|
|
8563
8562
|
throw error;
|
|
8564
8563
|
}
|
|
8565
|
-
|
|
8564
|
+
const rgPath = getRipgrepPath();
|
|
8565
|
+
const rgArgs = [
|
|
8566
|
+
"--json",
|
|
8567
|
+
// Machine-readable output
|
|
8568
|
+
"--max-count",
|
|
8569
|
+
"500",
|
|
8570
|
+
// Limit matches per file
|
|
8571
|
+
"--ignore-case",
|
|
8572
|
+
// Case-insensitive search
|
|
8573
|
+
"--max-filesize",
|
|
8574
|
+
"10M"
|
|
8575
|
+
// Skip files larger than 10MB
|
|
8576
|
+
];
|
|
8577
|
+
const globs = convertGlobToRipgrepGlobs(include || "");
|
|
8578
|
+
if (globs.length > 0) {
|
|
8579
|
+
globs.forEach((glob2) => {
|
|
8580
|
+
rgArgs.push("--glob", glob2);
|
|
8581
|
+
});
|
|
8582
|
+
}
|
|
8583
|
+
rgArgs.push(pattern, targetDir);
|
|
8584
|
+
let stdout;
|
|
8566
8585
|
try {
|
|
8567
|
-
|
|
8586
|
+
const result2 = await execFileAsync(rgPath, rgArgs, {
|
|
8587
|
+
maxBuffer: 50 * 1024 * 1024
|
|
8588
|
+
// 50MB buffer for large results
|
|
8589
|
+
});
|
|
8590
|
+
stdout = result2.stdout;
|
|
8568
8591
|
} catch (error) {
|
|
8569
|
-
|
|
8592
|
+
const execError = error;
|
|
8593
|
+
if (execError.code === 1 && execError.stdout) {
|
|
8594
|
+
stdout = execError.stdout;
|
|
8595
|
+
} else if (execError.code === 2) {
|
|
8596
|
+
const errorMsg = execError.stderr || "Unknown ripgrep error";
|
|
8597
|
+
throw new Error(`Ripgrep error: ${errorMsg}`);
|
|
8598
|
+
} else {
|
|
8599
|
+
throw error;
|
|
8600
|
+
}
|
|
8570
8601
|
}
|
|
8571
|
-
const
|
|
8572
|
-
const filesStream = globStream(globPattern, {
|
|
8573
|
-
cwd: targetDir,
|
|
8574
|
-
dot: false,
|
|
8575
|
-
// Skip hidden files
|
|
8576
|
-
ignore: DEFAULT_IGNORE_PATTERNS3,
|
|
8577
|
-
absolute: true,
|
|
8578
|
-
nodir: true
|
|
8579
|
-
// Only match files, not directories
|
|
8580
|
-
});
|
|
8602
|
+
const lines = stdout.split("\n").filter(Boolean);
|
|
8581
8603
|
const allMatches = [];
|
|
8582
8604
|
let filesSearched = 0;
|
|
8583
|
-
const
|
|
8584
|
-
for await (const filePath of filesStream) {
|
|
8585
|
-
if (allMatches.length >= maxMatches) {
|
|
8586
|
-
break;
|
|
8587
|
-
}
|
|
8588
|
-
const fileAbsPath = filePath;
|
|
8605
|
+
for (const line of lines) {
|
|
8589
8606
|
try {
|
|
8590
|
-
const
|
|
8591
|
-
if (
|
|
8592
|
-
|
|
8593
|
-
|
|
8594
|
-
|
|
8595
|
-
|
|
8596
|
-
|
|
8597
|
-
|
|
8598
|
-
|
|
8599
|
-
|
|
8600
|
-
|
|
8601
|
-
|
|
8602
|
-
allMatches.push({
|
|
8603
|
-
filePath: path9.relative(targetDir, fileAbsPath) || path9.basename(fileAbsPath),
|
|
8604
|
-
lineNumber: index + 1,
|
|
8605
|
-
line
|
|
8606
|
-
});
|
|
8607
|
-
}
|
|
8608
|
-
});
|
|
8609
|
-
} catch (readError) {
|
|
8610
|
-
const errCode = readError.code;
|
|
8611
|
-
if (errCode !== "ENOENT" && errCode !== "EACCES") {
|
|
8612
|
-
console.debug(`Could not read ${fileAbsPath}: ${readError.message}`);
|
|
8607
|
+
const item = JSON.parse(line);
|
|
8608
|
+
if (item.type === "match") {
|
|
8609
|
+
const match = item;
|
|
8610
|
+
allMatches.push({
|
|
8611
|
+
filePath: path9.relative(targetDir, match.data.path.text) || path9.basename(match.data.path.text),
|
|
8612
|
+
lineNumber: match.data.line_number,
|
|
8613
|
+
line: match.data.lines.text.trimEnd()
|
|
8614
|
+
// Remove trailing newline
|
|
8615
|
+
});
|
|
8616
|
+
} else if (item.type === "summary") {
|
|
8617
|
+
const stats = item;
|
|
8618
|
+
filesSearched = stats.data.stats.searches || 0;
|
|
8613
8619
|
}
|
|
8620
|
+
} catch {
|
|
8621
|
+
continue;
|
|
8614
8622
|
}
|
|
8615
8623
|
}
|
|
8616
8624
|
const searchDirDisplay = dir_path || ".";
|
|
8617
8625
|
const filterInfo = include ? ` (filter: "${include}")` : "";
|
|
8626
|
+
const maxMatches = 500;
|
|
8618
8627
|
if (allMatches.length === 0) {
|
|
8619
8628
|
return `No matches found for pattern "${pattern}" in "${searchDirDisplay}"${filterInfo}.
|
|
8620
8629
|
Searched ${filesSearched} file(s).`;
|
|
@@ -8624,7 +8633,6 @@ Searched ${filesSearched} file(s).`;
|
|
|
8624
8633
|
acc[match.filePath] = [];
|
|
8625
8634
|
}
|
|
8626
8635
|
acc[match.filePath].push(match);
|
|
8627
|
-
acc[match.filePath].sort((a, b) => a.lineNumber - b.lineNumber);
|
|
8628
8636
|
return acc;
|
|
8629
8637
|
}, {});
|
|
8630
8638
|
const matchCount = allMatches.length;
|
|
@@ -9504,7 +9512,7 @@ var ToolErrorType;
|
|
|
9504
9512
|
|
|
9505
9513
|
// src/utils/diffPreview.ts
|
|
9506
9514
|
import * as Diff from "diff";
|
|
9507
|
-
import { readFile
|
|
9515
|
+
import { readFile } from "fs/promises";
|
|
9508
9516
|
import { existsSync as existsSync7 } from "fs";
|
|
9509
9517
|
async function generateFileDiffPreview(args) {
|
|
9510
9518
|
try {
|
|
@@ -9519,7 +9527,7 @@ ${preview}${hasMore ? `
|
|
|
9519
9527
|
|
|
9520
9528
|
... (${lines2.length - 20} more lines)` : ""}`;
|
|
9521
9529
|
}
|
|
9522
|
-
const currentContent = await
|
|
9530
|
+
const currentContent = await readFile(args.path, "utf-8");
|
|
9523
9531
|
const patch = Diff.createPatch(
|
|
9524
9532
|
args.path,
|
|
9525
9533
|
currentContent,
|
|
@@ -11430,7 +11438,7 @@ import { isAxiosError as isAxiosError2 } from "axios";
|
|
|
11430
11438
|
// package.json
|
|
11431
11439
|
var package_default = {
|
|
11432
11440
|
name: "@bike4mind/cli",
|
|
11433
|
-
version: "0.2.17-
|
|
11441
|
+
version: "0.2.17-feat-ripgrep-integration.17657+4afb72005",
|
|
11434
11442
|
type: "module",
|
|
11435
11443
|
description: "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
11436
11444
|
license: "UNLICENSED",
|
|
@@ -11537,10 +11545,10 @@ var package_default = {
|
|
|
11537
11545
|
},
|
|
11538
11546
|
devDependencies: {
|
|
11539
11547
|
"@bike4mind/agents": "0.1.0",
|
|
11540
|
-
"@bike4mind/common": "2.43.1-
|
|
11541
|
-
"@bike4mind/mcp": "1.22.3-
|
|
11542
|
-
"@bike4mind/services": "2.40.1-
|
|
11543
|
-
"@bike4mind/utils": "2.2.1-
|
|
11548
|
+
"@bike4mind/common": "2.43.1-feat-ripgrep-integration.17657+4afb72005",
|
|
11549
|
+
"@bike4mind/mcp": "1.22.3-feat-ripgrep-integration.17657+4afb72005",
|
|
11550
|
+
"@bike4mind/services": "2.40.1-feat-ripgrep-integration.17657+4afb72005",
|
|
11551
|
+
"@bike4mind/utils": "2.2.1-feat-ripgrep-integration.17657+4afb72005",
|
|
11544
11552
|
"@types/better-sqlite3": "^7.6.13",
|
|
11545
11553
|
"@types/diff": "^5.0.9",
|
|
11546
11554
|
"@types/jsonwebtoken": "^9.0.4",
|
|
@@ -11554,7 +11562,10 @@ var package_default = {
|
|
|
11554
11562
|
typescript: "^5.9.3",
|
|
11555
11563
|
vitest: "^3.2.4"
|
|
11556
11564
|
},
|
|
11557
|
-
|
|
11565
|
+
optionalDependencies: {
|
|
11566
|
+
"@vscode/ripgrep": "^1.17.0"
|
|
11567
|
+
},
|
|
11568
|
+
gitHead: "4afb7200575f2747c86e639a873bfb6a2f523f78"
|
|
11558
11569
|
};
|
|
11559
11570
|
|
|
11560
11571
|
// src/config/constants.ts
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
findMostSimilarMemento,
|
|
4
4
|
getRelevantMementos
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-NMWRXDTN.js";
|
|
6
|
+
import "./chunk-QDWMIP2Q.js";
|
|
7
|
+
import "./chunk-CHBAKX4C.js";
|
|
8
8
|
import "./chunk-OCYRD7D6.js";
|
|
9
9
|
export {
|
|
10
10
|
findMostSimilarMemento,
|
|
@@ -129,8 +129,8 @@ import {
|
|
|
129
129
|
validateMermaidSyntax,
|
|
130
130
|
warmUpSettingsCache,
|
|
131
131
|
withRetry
|
|
132
|
-
} from "./chunk-
|
|
133
|
-
import "./chunk-
|
|
132
|
+
} from "./chunk-QDWMIP2Q.js";
|
|
133
|
+
import "./chunk-CHBAKX4C.js";
|
|
134
134
|
import {
|
|
135
135
|
Logger,
|
|
136
136
|
NotificationDeduplicator,
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
SubtractCreditsSchema,
|
|
4
4
|
subtractCredits
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-WULZDTLD.js";
|
|
6
|
+
import "./chunk-QDWMIP2Q.js";
|
|
7
|
+
import "./chunk-CHBAKX4C.js";
|
|
8
8
|
import "./chunk-OCYRD7D6.js";
|
|
9
9
|
export {
|
|
10
10
|
SubtractCreditsSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bike4mind/cli",
|
|
3
|
-
"version": "0.2.17-
|
|
3
|
+
"version": "0.2.17-feat-ripgrep-integration.17657+4afb72005",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -107,10 +107,10 @@
|
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@bike4mind/agents": "0.1.0",
|
|
110
|
-
"@bike4mind/common": "2.43.1-
|
|
111
|
-
"@bike4mind/mcp": "1.22.3-
|
|
112
|
-
"@bike4mind/services": "2.40.1-
|
|
113
|
-
"@bike4mind/utils": "2.2.1-
|
|
110
|
+
"@bike4mind/common": "2.43.1-feat-ripgrep-integration.17657+4afb72005",
|
|
111
|
+
"@bike4mind/mcp": "1.22.3-feat-ripgrep-integration.17657+4afb72005",
|
|
112
|
+
"@bike4mind/services": "2.40.1-feat-ripgrep-integration.17657+4afb72005",
|
|
113
|
+
"@bike4mind/utils": "2.2.1-feat-ripgrep-integration.17657+4afb72005",
|
|
114
114
|
"@types/better-sqlite3": "^7.6.13",
|
|
115
115
|
"@types/diff": "^5.0.9",
|
|
116
116
|
"@types/jsonwebtoken": "^9.0.4",
|
|
@@ -124,5 +124,8 @@
|
|
|
124
124
|
"typescript": "^5.9.3",
|
|
125
125
|
"vitest": "^3.2.4"
|
|
126
126
|
},
|
|
127
|
-
"
|
|
127
|
+
"optionalDependencies": {
|
|
128
|
+
"@vscode/ripgrep": "^1.17.0"
|
|
129
|
+
},
|
|
130
|
+
"gitHead": "4afb7200575f2747c86e639a873bfb6a2f523f78"
|
|
128
131
|
}
|