@lvce-editor/chat-tool-worker 9.12.0 → 9.13.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/chatToolWorkerMain.js +17 -17
- package/package.json +1 -1
|
@@ -1228,13 +1228,13 @@ const getToolErrorPayload = error => {
|
|
|
1228
1228
|
const rawStack = error && typeof error === 'object' ? Reflect.get(error, 'stack') : undefined;
|
|
1229
1229
|
return {
|
|
1230
1230
|
error: String(error),
|
|
1231
|
-
...(typeof rawCode === 'string' && rawCode.trim()
|
|
1231
|
+
...(typeof rawCode === 'string' && rawCode.trim() && {
|
|
1232
1232
|
errorCode: rawCode
|
|
1233
|
-
}
|
|
1234
|
-
...(typeof rawStack === 'string' && rawStack.trim()
|
|
1233
|
+
}),
|
|
1234
|
+
...(typeof rawStack === 'string' && rawStack.trim() && {
|
|
1235
1235
|
errorStack: rawStack,
|
|
1236
1236
|
stack: rawStack
|
|
1237
|
-
}
|
|
1237
|
+
})
|
|
1238
1238
|
};
|
|
1239
1239
|
};
|
|
1240
1240
|
|
|
@@ -1683,9 +1683,9 @@ const formatJsonMatches = matches => {
|
|
|
1683
1683
|
return {
|
|
1684
1684
|
count: matches.length,
|
|
1685
1685
|
matches: matches.map(match => ({
|
|
1686
|
-
...(typeof match.lineNumber === 'number'
|
|
1686
|
+
...(typeof match.lineNumber === 'number' && {
|
|
1687
1687
|
line: match.lineNumber
|
|
1688
|
-
}
|
|
1688
|
+
}),
|
|
1689
1689
|
path: match.path,
|
|
1690
1690
|
text: match.text
|
|
1691
1691
|
})),
|
|
@@ -1821,9 +1821,9 @@ const executeFileGrepSearch = async (workspaceUri, grepSearchArgs) => {
|
|
|
1821
1821
|
...(typeof formattedResult === 'string' ? {
|
|
1822
1822
|
result: formattedResult
|
|
1823
1823
|
} : formattedResult),
|
|
1824
|
-
...(result.limitHit
|
|
1824
|
+
...(result.limitHit && {
|
|
1825
1825
|
warning: 'Search result limit reached.'
|
|
1826
|
-
}
|
|
1826
|
+
})
|
|
1827
1827
|
};
|
|
1828
1828
|
};
|
|
1829
1829
|
|
|
@@ -1870,9 +1870,9 @@ const executeMemoryGrepSearch = async (workspaceUri, grepSearchArgs, options) =>
|
|
|
1870
1870
|
...(typeof formattedResult === 'string' ? {
|
|
1871
1871
|
result: formattedResult
|
|
1872
1872
|
} : formattedResult),
|
|
1873
|
-
...(result.limitHit
|
|
1873
|
+
...(result.limitHit && {
|
|
1874
1874
|
warning: 'Search result limit reached.'
|
|
1875
|
-
}
|
|
1875
|
+
})
|
|
1876
1876
|
};
|
|
1877
1877
|
} catch {
|
|
1878
1878
|
const legacyResults = await invoke$1('ExtensionHostTextSearch.textSearchMemory', searchOptions.scheme, workspaceUri, grepSearchArgs.query, searchOptions, options.assetDir);
|
|
@@ -1929,16 +1929,16 @@ const getGrepSearchArgs = args => {
|
|
|
1929
1929
|
return undefined;
|
|
1930
1930
|
}
|
|
1931
1931
|
return {
|
|
1932
|
-
...(includeIgnoredFiles
|
|
1932
|
+
...(includeIgnoredFiles !== undefined && {
|
|
1933
1933
|
includeIgnoredFiles
|
|
1934
1934
|
}),
|
|
1935
|
-
...(includePattern
|
|
1935
|
+
...(includePattern !== undefined && {
|
|
1936
1936
|
includePattern
|
|
1937
1937
|
}),
|
|
1938
|
-
...(maxResults
|
|
1938
|
+
...(maxResults !== undefined && {
|
|
1939
1939
|
maxResults
|
|
1940
1940
|
}),
|
|
1941
|
-
...(outputFormat
|
|
1941
|
+
...(outputFormat !== undefined && {
|
|
1942
1942
|
outputFormat
|
|
1943
1943
|
}),
|
|
1944
1944
|
isRegexp,
|
|
@@ -2133,13 +2133,13 @@ const getRgArgs = args => {
|
|
|
2133
2133
|
return undefined;
|
|
2134
2134
|
}
|
|
2135
2135
|
return {
|
|
2136
|
-
...(lineNumbers
|
|
2136
|
+
...(lineNumbers !== undefined && {
|
|
2137
2137
|
'-n': lineNumbers
|
|
2138
2138
|
}),
|
|
2139
|
-
...(output_mode
|
|
2139
|
+
...(output_mode !== undefined && {
|
|
2140
2140
|
output_mode
|
|
2141
2141
|
}),
|
|
2142
|
-
...(path
|
|
2142
|
+
...(path !== undefined && {
|
|
2143
2143
|
path
|
|
2144
2144
|
}),
|
|
2145
2145
|
pattern
|