token-goat 2.9.16 → 2.9.17
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/README.md +2 -5
- package/dist/{token-goat-chunk-DMQ32ZSR.mjs → token-goat-chunk-26YUO7MP.mjs} +3 -3
- package/dist/{token-goat-chunk-GMXBQS6O.mjs → token-goat-chunk-2M33Q3O4.mjs} +30 -26
- package/dist/{token-goat-chunk-H3DXI6VD.mjs → token-goat-chunk-2VASS5VR.mjs} +1 -1
- package/dist/{token-goat-chunk-OCI25AXY.mjs → token-goat-chunk-2XA5ZW4T.mjs} +3 -3
- package/dist/{token-goat-chunk-4DC6DDIB.mjs → token-goat-chunk-5WB7GDH4.mjs} +5 -5
- package/dist/{token-goat-chunk-MA5BZ2KI.mjs → token-goat-chunk-66224KCZ.mjs} +1 -1
- package/dist/{token-goat-chunk-BFNTLGVA.mjs → token-goat-chunk-73GXYYZR.mjs} +31 -9
- package/dist/{token-goat-chunk-ULA4WCED.mjs → token-goat-chunk-7EGKXBWT.mjs} +7 -7
- package/dist/{token-goat-chunk-Z5VPAXTC.mjs → token-goat-chunk-7VQMOBPQ.mjs} +31 -20
- package/dist/{token-goat-chunk-63QWJ6UM.mjs → token-goat-chunk-BK3RPPTK.mjs} +2 -2
- package/dist/{token-goat-chunk-5USHO7B6.mjs → token-goat-chunk-C26ZBGBC.mjs} +5 -5
- package/dist/{token-goat-chunk-EJCY6KHO.mjs → token-goat-chunk-CICJFVIH.mjs} +2 -2
- package/dist/{token-goat-chunk-LJL6FGDS.mjs → token-goat-chunk-CKIJWTRQ.mjs} +11 -11
- package/dist/{token-goat-chunk-NQZCSVN2.mjs → token-goat-chunk-CPHVXKNU.mjs} +1 -1
- package/dist/{token-goat-chunk-VVIYEFBI.mjs → token-goat-chunk-EKGVCAES.mjs} +3 -3
- package/dist/{token-goat-chunk-QMZMHQRR.mjs → token-goat-chunk-G75WIVFM.mjs} +18 -18
- package/dist/{token-goat-chunk-UXHDBVUR.mjs → token-goat-chunk-GLOM5W5C.mjs} +1 -1
- package/dist/{token-goat-chunk-MIL62GMN.mjs → token-goat-chunk-GPCCYQSS.mjs} +6 -6
- package/dist/{token-goat-chunk-UMXD2M7O.mjs → token-goat-chunk-HRUGS6CO.mjs} +8 -8
- package/dist/{token-goat-chunk-2PCFAQAS.mjs → token-goat-chunk-IDHWKNKZ.mjs} +87 -10
- package/dist/{token-goat-chunk-GIMGT34T.mjs → token-goat-chunk-KZPO4DWC.mjs} +1 -1
- package/dist/{token-goat-chunk-R3X5TCPB.mjs → token-goat-chunk-MWSVUKVV.mjs} +1 -1
- package/dist/{token-goat-chunk-XOHTFRDH.mjs → token-goat-chunk-PKNOHVWP.mjs} +8 -8
- package/dist/{token-goat-chunk-M2R4UQ3B.mjs → token-goat-chunk-RB24DBBS.mjs} +2 -2
- package/dist/{token-goat-chunk-ZEHFYJ7Z.mjs → token-goat-chunk-RFFUCQK7.mjs} +4 -4
- package/dist/{token-goat-chunk-YPS64ACE.mjs → token-goat-chunk-SWRKVA3J.mjs} +1 -1
- package/dist/{token-goat-chunk-NAMH252H.mjs → token-goat-chunk-THBLW56G.mjs} +2 -2
- package/dist/{token-goat-chunk-3H6FQT62.mjs → token-goat-chunk-UBZCON6N.mjs} +1 -1
- package/dist/{token-goat-chunk-2IEIBVVD.mjs → token-goat-chunk-W2GUUQAQ.mjs} +1 -1
- package/dist/{token-goat-chunk-NOBZV7PM.mjs → token-goat-chunk-YFGEUIEO.mjs} +12 -12
- package/dist/token-goat-hook.mjs +11 -11
- package/dist/token-goat.core.mjs +18 -18
- package/docs/cli.md +1 -0
- package/package.json +1 -1
|
@@ -4,23 +4,23 @@ import {
|
|
|
4
4
|
buildEvent,
|
|
5
5
|
relay,
|
|
6
6
|
relayInProcess
|
|
7
|
-
} from "./token-goat-chunk-
|
|
8
|
-
import "./token-goat-chunk-
|
|
7
|
+
} from "./token-goat-chunk-2M33Q3O4.mjs";
|
|
8
|
+
import "./token-goat-chunk-GLOM5W5C.mjs";
|
|
9
9
|
import {
|
|
10
10
|
MAX_STDIN_BYTES,
|
|
11
11
|
readStdinJson
|
|
12
|
-
} from "./token-goat-chunk-
|
|
13
|
-
import "./token-goat-chunk-
|
|
14
|
-
import "./token-goat-chunk-
|
|
15
|
-
import "./token-goat-chunk-
|
|
12
|
+
} from "./token-goat-chunk-HRUGS6CO.mjs";
|
|
13
|
+
import "./token-goat-chunk-PKNOHVWP.mjs";
|
|
14
|
+
import "./token-goat-chunk-C26ZBGBC.mjs";
|
|
15
|
+
import "./token-goat-chunk-26YUO7MP.mjs";
|
|
16
16
|
import "./token-goat-chunk-3BTK54F3.mjs";
|
|
17
|
-
import "./token-goat-chunk-
|
|
18
|
-
import "./token-goat-chunk-
|
|
19
|
-
import "./token-goat-chunk-
|
|
20
|
-
import "./token-goat-chunk-
|
|
17
|
+
import "./token-goat-chunk-73GXYYZR.mjs";
|
|
18
|
+
import "./token-goat-chunk-BK3RPPTK.mjs";
|
|
19
|
+
import "./token-goat-chunk-MWSVUKVV.mjs";
|
|
20
|
+
import "./token-goat-chunk-2VASS5VR.mjs";
|
|
21
21
|
import "./token-goat-chunk-EEIDFMEM.mjs";
|
|
22
22
|
import "./token-goat-chunk-OSUFN2FV.mjs";
|
|
23
|
-
import "./token-goat-chunk-
|
|
23
|
+
import "./token-goat-chunk-UBZCON6N.mjs";
|
|
24
24
|
import "./token-goat-chunk-ERTXEKB6.mjs";
|
|
25
25
|
import "./token-goat-chunk-Y4AFKTHK.mjs";
|
|
26
26
|
import "./token-goat-chunk-GMOUBOX4.mjs";
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
docxTables,
|
|
6
6
|
docxText,
|
|
7
7
|
formatDocxTables
|
|
8
|
-
} from "./token-goat-chunk-
|
|
9
|
-
import "./token-goat-chunk-
|
|
8
|
+
} from "./token-goat-chunk-CPHVXKNU.mjs";
|
|
9
|
+
import "./token-goat-chunk-66224KCZ.mjs";
|
|
10
10
|
import "./token-goat-chunk-XTQAOTSO.mjs";
|
|
11
11
|
import "./token-goat-chunk-AH6QILZM.mjs";
|
|
12
|
-
import "./token-goat-chunk-
|
|
12
|
+
import "./token-goat-chunk-UBZCON6N.mjs";
|
|
13
13
|
import "./token-goat-chunk-ERTXEKB6.mjs";
|
|
14
14
|
import "./token-goat-chunk-Y4AFKTHK.mjs";
|
|
15
15
|
import "./token-goat-chunk-GMOUBOX4.mjs";
|
|
@@ -70,34 +70,34 @@ import {
|
|
|
70
70
|
requirePositiveInt,
|
|
71
71
|
run,
|
|
72
72
|
visualStudioManualSteps
|
|
73
|
-
} from "./token-goat-chunk-
|
|
74
|
-
import "./token-goat-chunk-
|
|
75
|
-
import "./token-goat-chunk-
|
|
73
|
+
} from "./token-goat-chunk-7VQMOBPQ.mjs";
|
|
74
|
+
import "./token-goat-chunk-IDHWKNKZ.mjs";
|
|
75
|
+
import "./token-goat-chunk-CICJFVIH.mjs";
|
|
76
76
|
import "./token-goat-chunk-LMFO66YD.mjs";
|
|
77
77
|
import {
|
|
78
78
|
cmdDescribe,
|
|
79
79
|
cmdSessionSchema
|
|
80
|
-
} from "./token-goat-chunk-
|
|
81
|
-
import "./token-goat-chunk-
|
|
82
|
-
import "./token-goat-chunk-
|
|
83
|
-
import "./token-goat-chunk-
|
|
80
|
+
} from "./token-goat-chunk-HRUGS6CO.mjs";
|
|
81
|
+
import "./token-goat-chunk-PKNOHVWP.mjs";
|
|
82
|
+
import "./token-goat-chunk-C26ZBGBC.mjs";
|
|
83
|
+
import "./token-goat-chunk-26YUO7MP.mjs";
|
|
84
84
|
import "./token-goat-chunk-LKSXAMJB.mjs";
|
|
85
|
-
import "./token-goat-chunk-
|
|
86
|
-
import "./token-goat-chunk-
|
|
87
|
-
import "./token-goat-chunk-
|
|
88
|
-
import "./token-goat-chunk-
|
|
85
|
+
import "./token-goat-chunk-CPHVXKNU.mjs";
|
|
86
|
+
import "./token-goat-chunk-W2GUUQAQ.mjs";
|
|
87
|
+
import "./token-goat-chunk-THBLW56G.mjs";
|
|
88
|
+
import "./token-goat-chunk-KZPO4DWC.mjs";
|
|
89
89
|
import "./token-goat-chunk-3BTK54F3.mjs";
|
|
90
|
-
import "./token-goat-chunk-
|
|
90
|
+
import "./token-goat-chunk-66224KCZ.mjs";
|
|
91
91
|
import "./token-goat-chunk-XTQAOTSO.mjs";
|
|
92
92
|
import "./token-goat-chunk-AH6QILZM.mjs";
|
|
93
|
-
import "./token-goat-chunk-
|
|
94
|
-
import "./token-goat-chunk-
|
|
95
|
-
import "./token-goat-chunk-
|
|
96
|
-
import "./token-goat-chunk-
|
|
97
|
-
import "./token-goat-chunk-
|
|
93
|
+
import "./token-goat-chunk-SWRKVA3J.mjs";
|
|
94
|
+
import "./token-goat-chunk-73GXYYZR.mjs";
|
|
95
|
+
import "./token-goat-chunk-BK3RPPTK.mjs";
|
|
96
|
+
import "./token-goat-chunk-MWSVUKVV.mjs";
|
|
97
|
+
import "./token-goat-chunk-2VASS5VR.mjs";
|
|
98
98
|
import "./token-goat-chunk-EEIDFMEM.mjs";
|
|
99
99
|
import "./token-goat-chunk-OSUFN2FV.mjs";
|
|
100
|
-
import "./token-goat-chunk-
|
|
100
|
+
import "./token-goat-chunk-UBZCON6N.mjs";
|
|
101
101
|
import "./token-goat-chunk-ERTXEKB6.mjs";
|
|
102
102
|
import "./token-goat-chunk-Y4AFKTHK.mjs";
|
|
103
103
|
import "./token-goat-chunk-GMOUBOX4.mjs";
|
|
@@ -2,7 +2,7 @@ import { createRequire as __cjsRequire } from 'node:module';
|
|
|
2
2
|
const require = __cjsRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
detectHarness
|
|
5
|
-
} from "./token-goat-chunk-
|
|
5
|
+
} from "./token-goat-chunk-2VASS5VR.mjs";
|
|
6
6
|
import {
|
|
7
7
|
init_define_import_meta_env
|
|
8
8
|
} from "./token-goat-chunk-A37V4PBF.mjs";
|
|
@@ -25,11 +25,11 @@ import {
|
|
|
25
25
|
extractSwift,
|
|
26
26
|
extractThrift,
|
|
27
27
|
extractWgsl
|
|
28
|
-
} from "./token-goat-chunk-
|
|
28
|
+
} from "./token-goat-chunk-SWRKVA3J.mjs";
|
|
29
29
|
import {
|
|
30
30
|
extractShellBannerHeading
|
|
31
|
-
} from "./token-goat-chunk-
|
|
32
|
-
import "./token-goat-chunk-
|
|
31
|
+
} from "./token-goat-chunk-73GXYYZR.mjs";
|
|
32
|
+
import "./token-goat-chunk-BK3RPPTK.mjs";
|
|
33
33
|
import {
|
|
34
34
|
GENERIC_CLAUSE,
|
|
35
35
|
assignBraceBlockSpans,
|
|
@@ -58,15 +58,15 @@ import {
|
|
|
58
58
|
stripMultilineStringSpan,
|
|
59
59
|
stripStringLiterals,
|
|
60
60
|
stripXmlComments
|
|
61
|
-
} from "./token-goat-chunk-
|
|
62
|
-
import "./token-goat-chunk-
|
|
61
|
+
} from "./token-goat-chunk-MWSVUKVV.mjs";
|
|
62
|
+
import "./token-goat-chunk-2VASS5VR.mjs";
|
|
63
63
|
import "./token-goat-chunk-EEIDFMEM.mjs";
|
|
64
64
|
import "./token-goat-chunk-OSUFN2FV.mjs";
|
|
65
65
|
import {
|
|
66
66
|
countContentLines,
|
|
67
67
|
escapeRegExp,
|
|
68
68
|
pushAll
|
|
69
|
-
} from "./token-goat-chunk-
|
|
69
|
+
} from "./token-goat-chunk-UBZCON6N.mjs";
|
|
70
70
|
import "./token-goat-chunk-ERTXEKB6.mjs";
|
|
71
71
|
import "./token-goat-chunk-Y4AFKTHK.mjs";
|
|
72
72
|
import "./token-goat-chunk-GMOUBOX4.mjs";
|
|
@@ -4,31 +4,31 @@ import {
|
|
|
4
4
|
enqueueDirtyPathSafe,
|
|
5
5
|
getToolName,
|
|
6
6
|
getTrackedFiles
|
|
7
|
-
} from "./token-goat-chunk-
|
|
7
|
+
} from "./token-goat-chunk-PKNOHVWP.mjs";
|
|
8
8
|
import {
|
|
9
9
|
indexRecallEntry
|
|
10
|
-
} from "./token-goat-chunk-
|
|
10
|
+
} from "./token-goat-chunk-C26ZBGBC.mjs";
|
|
11
11
|
import {
|
|
12
12
|
isBlobStale,
|
|
13
13
|
loadBlob,
|
|
14
14
|
redactSecrets,
|
|
15
15
|
storeBlob
|
|
16
|
-
} from "./token-goat-chunk-
|
|
16
|
+
} from "./token-goat-chunk-26YUO7MP.mjs";
|
|
17
17
|
import {
|
|
18
18
|
PARSER_FINGERPRINT
|
|
19
|
-
} from "./token-goat-chunk-
|
|
19
|
+
} from "./token-goat-chunk-73GXYYZR.mjs";
|
|
20
20
|
import {
|
|
21
21
|
getProjectFileEntries,
|
|
22
22
|
projectScopeClause
|
|
23
|
-
} from "./token-goat-chunk-
|
|
23
|
+
} from "./token-goat-chunk-BK3RPPTK.mjs";
|
|
24
24
|
import {
|
|
25
25
|
getDb
|
|
26
|
-
} from "./token-goat-chunk-
|
|
26
|
+
} from "./token-goat-chunk-MWSVUKVV.mjs";
|
|
27
27
|
import {
|
|
28
28
|
fingerprintFile,
|
|
29
29
|
getDisplayRoot,
|
|
30
30
|
shortFingerprint
|
|
31
|
-
} from "./token-goat-chunk-
|
|
31
|
+
} from "./token-goat-chunk-2VASS5VR.mjs";
|
|
32
32
|
import {
|
|
33
33
|
registerReset
|
|
34
34
|
} from "./token-goat-chunk-EEIDFMEM.mjs";
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
extractErrorMessage,
|
|
39
39
|
foldPath,
|
|
40
40
|
globalDbPath
|
|
41
|
-
} from "./token-goat-chunk-
|
|
41
|
+
} from "./token-goat-chunk-UBZCON6N.mjs";
|
|
42
42
|
import {
|
|
43
43
|
displaySafeJson,
|
|
44
44
|
normalizePath,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
isTextHeavy,
|
|
6
6
|
ocrImage,
|
|
7
7
|
ocrIntegrityFailed
|
|
8
|
-
} from "./token-goat-chunk-
|
|
8
|
+
} from "./token-goat-chunk-CICJFVIH.mjs";
|
|
9
9
|
import {
|
|
10
10
|
formatSqliteQueryTable,
|
|
11
11
|
formatSqliteSchema,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
urlPolicyDenialReason,
|
|
43
43
|
virtualIndexedScopeNote,
|
|
44
44
|
walkProject
|
|
45
|
-
} from "./token-goat-chunk-
|
|
45
|
+
} from "./token-goat-chunk-PKNOHVWP.mjs";
|
|
46
46
|
import {
|
|
47
47
|
colorStdout,
|
|
48
48
|
isBlobStale,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
savedTokensFromBytes,
|
|
53
53
|
storeBlob,
|
|
54
54
|
stripAnsi
|
|
55
|
-
} from "./token-goat-chunk-
|
|
55
|
+
} from "./token-goat-chunk-26YUO7MP.mjs";
|
|
56
56
|
import {
|
|
57
57
|
extractPdfMeta,
|
|
58
58
|
extractPdfOutline,
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
parseWhereSpecs,
|
|
67
67
|
profileCsv,
|
|
68
68
|
queryCsv
|
|
69
|
-
} from "./token-goat-chunk-
|
|
69
|
+
} from "./token-goat-chunk-KZPO4DWC.mjs";
|
|
70
70
|
import {
|
|
71
71
|
MAX_ZIP_INPUT_BYTES,
|
|
72
72
|
MAX_ZIP_OUTPUT_BYTES,
|
|
@@ -101,7 +101,7 @@ import {
|
|
|
101
101
|
extractSolidity,
|
|
102
102
|
extractThrift,
|
|
103
103
|
stripLeadingAttributes
|
|
104
|
-
} from "./token-goat-chunk-
|
|
104
|
+
} from "./token-goat-chunk-SWRKVA3J.mjs";
|
|
105
105
|
import {
|
|
106
106
|
MAX_OVER_FETCH,
|
|
107
107
|
OVER_FETCH_FACTOR,
|
|
@@ -114,7 +114,7 @@ import {
|
|
|
114
114
|
mergeNearbyHits,
|
|
115
115
|
readSection,
|
|
116
116
|
searchSemantic
|
|
117
|
-
} from "./token-goat-chunk-
|
|
117
|
+
} from "./token-goat-chunk-73GXYYZR.mjs";
|
|
118
118
|
import {
|
|
119
119
|
DEFAULT_QUERY_LIMIT,
|
|
120
120
|
countRefs,
|
|
@@ -127,7 +127,7 @@ import {
|
|
|
127
127
|
queryRefsByContext,
|
|
128
128
|
querySymbols,
|
|
129
129
|
searchSymbolsFts
|
|
130
|
-
} from "./token-goat-chunk-
|
|
130
|
+
} from "./token-goat-chunk-BK3RPPTK.mjs";
|
|
131
131
|
import {
|
|
132
132
|
FILENAME_LANGUAGE,
|
|
133
133
|
TREE_SITTER_LANGUAGES,
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
partialRefsReason,
|
|
147
147
|
redactIfDotenv,
|
|
148
148
|
unsupportedLanguageName
|
|
149
|
-
} from "./token-goat-chunk-
|
|
149
|
+
} from "./token-goat-chunk-MWSVUKVV.mjs";
|
|
150
150
|
import {
|
|
151
151
|
fileIsAbsent,
|
|
152
152
|
findProject,
|
|
@@ -156,7 +156,7 @@ import {
|
|
|
156
156
|
loadConfig,
|
|
157
157
|
resolveProjectRoot,
|
|
158
158
|
shortFingerprint
|
|
159
|
-
} from "./token-goat-chunk-
|
|
159
|
+
} from "./token-goat-chunk-2VASS5VR.mjs";
|
|
160
160
|
import {
|
|
161
161
|
registerReset
|
|
162
162
|
} from "./token-goat-chunk-EEIDFMEM.mjs";
|
|
@@ -188,7 +188,7 @@ import {
|
|
|
188
188
|
supportRequestLine,
|
|
189
189
|
windowsCmdQuoteArg,
|
|
190
190
|
withExtension
|
|
191
|
-
} from "./token-goat-chunk-
|
|
191
|
+
} from "./token-goat-chunk-UBZCON6N.mjs";
|
|
192
192
|
import {
|
|
193
193
|
UNTRUSTED_FILE_TAG,
|
|
194
194
|
UNTRUSTED_GITHUB_TAG,
|
|
@@ -10198,6 +10198,78 @@ function runFind(opts) {
|
|
|
10198
10198
|
}
|
|
10199
10199
|
return 0;
|
|
10200
10200
|
}
|
|
10201
|
+
function runLocate(opts) {
|
|
10202
|
+
if (opts.limit !== void 0 && opts.limit <= 0) {
|
|
10203
|
+
emitErr4(`--limit must be a positive number, got: ${opts.limit}`);
|
|
10204
|
+
return 1;
|
|
10205
|
+
}
|
|
10206
|
+
const rootDir = opts.projectRoot ?? resolveProjectRoot({ project: process.cwd() });
|
|
10207
|
+
let targetSpec = opts.spec;
|
|
10208
|
+
let targetFile = opts.file;
|
|
10209
|
+
if (targetSpec.includes("::")) {
|
|
10210
|
+
const colonIdx = targetSpec.indexOf("::");
|
|
10211
|
+
targetFile = targetSpec.slice(0, colonIdx);
|
|
10212
|
+
targetSpec = targetSpec.slice(colonIdx + 2);
|
|
10213
|
+
}
|
|
10214
|
+
const queryOpts = {
|
|
10215
|
+
limit: FIND_SCAN_LIMIT2
|
|
10216
|
+
};
|
|
10217
|
+
if (targetFile !== void 0) {
|
|
10218
|
+
queryOpts.filePath = resolveIndexPath(targetFile, rootDir);
|
|
10219
|
+
healStaleIndex(queryOpts.filePath);
|
|
10220
|
+
} else {
|
|
10221
|
+
queryOpts.rootDir = rootDir;
|
|
10222
|
+
}
|
|
10223
|
+
let rawSymbols = querySymbols(queryOpts);
|
|
10224
|
+
if (targetFile === void 0) {
|
|
10225
|
+
const heal = healStaleResultFiles(rawSymbols.map((s) => s.filePath));
|
|
10226
|
+
if (heal.healed) rawSymbols = querySymbols(queryOpts);
|
|
10227
|
+
}
|
|
10228
|
+
const specLower = targetSpec.toLowerCase();
|
|
10229
|
+
const exactMatches = rawSymbols.filter((s) => s.name.toLowerCase() === specLower);
|
|
10230
|
+
const partialMatches = rawSymbols.filter(
|
|
10231
|
+
(s) => s.name.toLowerCase() !== specLower && s.name.toLowerCase().includes(specLower)
|
|
10232
|
+
);
|
|
10233
|
+
const combined = [...exactMatches, ...partialMatches];
|
|
10234
|
+
let fuzzyNames = [];
|
|
10235
|
+
if (combined.length === 0) {
|
|
10236
|
+
fuzzyNames = rankSimilarNames(rawSymbols.map((s) => s.name), targetSpec);
|
|
10237
|
+
}
|
|
10238
|
+
const matched = fuzzyNames.length > 0 ? fuzzyNames.flatMap((n) => rawSymbols.filter((s) => s.name === n)) : combined;
|
|
10239
|
+
const limit = opts.limit ?? 25;
|
|
10240
|
+
const shown = matched.slice(0, limit);
|
|
10241
|
+
if (shown.length === 0) {
|
|
10242
|
+
emitErr4(`No landmark or symbol located for '${targetSpec}'`);
|
|
10243
|
+
return 1;
|
|
10244
|
+
}
|
|
10245
|
+
const hits = shown.map((s) => ({
|
|
10246
|
+
filePath: toDisplayPath(rootDir, s.filePath),
|
|
10247
|
+
name: s.name,
|
|
10248
|
+
kind: s.kind,
|
|
10249
|
+
lineStart: s.lineStart,
|
|
10250
|
+
lineEnd: s.lineEnd,
|
|
10251
|
+
span: `${s.lineStart}-${s.lineEnd}`
|
|
10252
|
+
}));
|
|
10253
|
+
if (opts.json === true) {
|
|
10254
|
+
emit4(displaySafeJson({
|
|
10255
|
+
items: hits,
|
|
10256
|
+
totalCount: matched.length,
|
|
10257
|
+
truncated: matched.length > limit,
|
|
10258
|
+
...fuzzyNames.length > 0 ? { fuzzy: true, matchedNames: fuzzyNames } : {}
|
|
10259
|
+
}));
|
|
10260
|
+
return 0;
|
|
10261
|
+
}
|
|
10262
|
+
if (fuzzyNames.length > 0) {
|
|
10263
|
+
emitErr4(`No exact landmark for '${targetSpec}'; nearest matches: ${fuzzyNames.join(", ")}`);
|
|
10264
|
+
}
|
|
10265
|
+
for (const hit of hits) {
|
|
10266
|
+
emit4(`${displaySafeText(hit.filePath)}:${hit.span} [${displaySafeText(hit.kind)}] ${displaySafeText(hit.name)}`);
|
|
10267
|
+
}
|
|
10268
|
+
if (matched.length > limit) {
|
|
10269
|
+
emitErr4(`Showing ${limit} of ${matched.length} locations; rerun with --limit ${matched.length} to see them all`);
|
|
10270
|
+
}
|
|
10271
|
+
return 0;
|
|
10272
|
+
}
|
|
10201
10273
|
function runListSections(opts) {
|
|
10202
10274
|
const sections = listSections(opts.file);
|
|
10203
10275
|
if (sections.length === 0) {
|
|
@@ -11729,6 +11801,10 @@ function runGrep(opts) {
|
|
|
11729
11801
|
}
|
|
11730
11802
|
if (hits.length > maxLines) {
|
|
11731
11803
|
emitErr4(`... (${hits.length - maxLines} more lines omitted)`);
|
|
11804
|
+
emitErr4(`Tip: To avoid broad grepping and reduce token expenditure, locate specific symbols with:`);
|
|
11805
|
+
emitErr4(` token-goat symbol <name>`);
|
|
11806
|
+
emitErr4(` token-goat locate <name>`);
|
|
11807
|
+
emitErr4(` token-goat outline <file> / token-goat skeleton <file>`);
|
|
11732
11808
|
}
|
|
11733
11809
|
return 0;
|
|
11734
11810
|
}
|
|
@@ -12490,6 +12566,7 @@ export {
|
|
|
12490
12566
|
runNoteGet,
|
|
12491
12567
|
runNoteList,
|
|
12492
12568
|
runFind,
|
|
12569
|
+
runLocate,
|
|
12493
12570
|
runListSections,
|
|
12494
12571
|
AMBIGUOUS_HEADING_LIMIT,
|
|
12495
12572
|
runSection,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
resolveMinNetSavingsBytes,
|
|
11
11
|
storeBashOutputSync,
|
|
12
12
|
stripAnsiCodes
|
|
13
|
-
} from "./token-goat-chunk-
|
|
13
|
+
} from "./token-goat-chunk-C26ZBGBC.mjs";
|
|
14
14
|
import {
|
|
15
15
|
DEFAULT_MAX_AGE_MS,
|
|
16
16
|
DEFAULT_MAX_COUNT,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
savedTokensFromBytes,
|
|
23
23
|
summarize,
|
|
24
24
|
sweepCacheRoots
|
|
25
|
-
} from "./token-goat-chunk-
|
|
25
|
+
} from "./token-goat-chunk-26YUO7MP.mjs";
|
|
26
26
|
import {
|
|
27
27
|
parse
|
|
28
28
|
} from "./token-goat-chunk-3BTK54F3.mjs";
|
|
@@ -52,13 +52,13 @@ import {
|
|
|
52
52
|
isTreeSitterAvailable,
|
|
53
53
|
loadRegexExtractors,
|
|
54
54
|
parseSourceSymbolsTreeSitterOnly
|
|
55
|
-
} from "./token-goat-chunk-
|
|
55
|
+
} from "./token-goat-chunk-73GXYYZR.mjs";
|
|
56
56
|
import {
|
|
57
57
|
getFileEntry,
|
|
58
58
|
pathEqClause,
|
|
59
59
|
projectScopeClause,
|
|
60
60
|
querySymbols
|
|
61
|
-
} from "./token-goat-chunk-
|
|
61
|
+
} from "./token-goat-chunk-BK3RPPTK.mjs";
|
|
62
62
|
import {
|
|
63
63
|
detectLanguage,
|
|
64
64
|
detectLanguageOfFile,
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
getDb,
|
|
67
67
|
languageHasFlag,
|
|
68
68
|
redactIfDotenv
|
|
69
|
-
} from "./token-goat-chunk-
|
|
69
|
+
} from "./token-goat-chunk-MWSVUKVV.mjs";
|
|
70
70
|
import {
|
|
71
71
|
detectHarness,
|
|
72
72
|
fileIsAbsent,
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
makeProjectAt,
|
|
81
81
|
resolveProjectRoot,
|
|
82
82
|
shortFingerprint
|
|
83
|
-
} from "./token-goat-chunk-
|
|
83
|
+
} from "./token-goat-chunk-2VASS5VR.mjs";
|
|
84
84
|
import {
|
|
85
85
|
registerReset
|
|
86
86
|
} from "./token-goat-chunk-EEIDFMEM.mjs";
|
|
@@ -126,7 +126,7 @@ import {
|
|
|
126
126
|
withFileLock,
|
|
127
127
|
withInstallScope,
|
|
128
128
|
writeIfDifferent
|
|
129
|
-
} from "./token-goat-chunk-
|
|
129
|
+
} from "./token-goat-chunk-UBZCON6N.mjs";
|
|
130
130
|
import {
|
|
131
131
|
displaySafeJson,
|
|
132
132
|
displaySafePath,
|
|
@@ -4151,7 +4151,7 @@ ${dataUrl2}`);
|
|
|
4151
4151
|
}
|
|
4152
4152
|
recordStat("image_shrink", shrinkSaved, shrinkTokens, void 0, basename11);
|
|
4153
4153
|
if (loadConfig().image_shrink.ocr_enabled) {
|
|
4154
|
-
const { ocrImage, isTextHeavy, formatOcrSummary } = await import("./token-goat-chunk-
|
|
4154
|
+
const { ocrImage, isTextHeavy, formatOcrSummary } = await import("./token-goat-chunk-5WB7GDH4.mjs");
|
|
4155
4155
|
const ocr = await ocrImage(result.data);
|
|
4156
4156
|
if (ocr !== null && isTextHeavy(ocr, loadConfig().image_shrink.ocr_min_confidence)) {
|
|
4157
4157
|
const emitted = formatOcrSummary(ocr, basename11, result.originalBytes);
|
|
@@ -2,11 +2,11 @@ import { createRequire as __cjsRequire } from 'node:module';
|
|
|
2
2
|
const require = __cjsRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
loadConfig
|
|
5
|
-
} from "./token-goat-chunk-
|
|
5
|
+
} from "./token-goat-chunk-2VASS5VR.mjs";
|
|
6
6
|
import "./token-goat-chunk-EEIDFMEM.mjs";
|
|
7
7
|
import {
|
|
8
8
|
VERSION
|
|
9
|
-
} from "./token-goat-chunk-
|
|
9
|
+
} from "./token-goat-chunk-UBZCON6N.mjs";
|
|
10
10
|
import {
|
|
11
11
|
displaySafeJson
|
|
12
12
|
} from "./token-goat-chunk-ERTXEKB6.mjs";
|
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
querySheet,
|
|
11
11
|
rangeSheet,
|
|
12
12
|
xlsxColumns
|
|
13
|
-
} from "./token-goat-chunk-
|
|
14
|
-
import "./token-goat-chunk-
|
|
13
|
+
} from "./token-goat-chunk-THBLW56G.mjs";
|
|
14
|
+
import "./token-goat-chunk-KZPO4DWC.mjs";
|
|
15
15
|
import "./token-goat-chunk-3BTK54F3.mjs";
|
|
16
|
-
import "./token-goat-chunk-
|
|
16
|
+
import "./token-goat-chunk-66224KCZ.mjs";
|
|
17
17
|
import "./token-goat-chunk-XTQAOTSO.mjs";
|
|
18
18
|
import "./token-goat-chunk-AH6QILZM.mjs";
|
|
19
|
-
import "./token-goat-chunk-
|
|
19
|
+
import "./token-goat-chunk-UBZCON6N.mjs";
|
|
20
20
|
import "./token-goat-chunk-ERTXEKB6.mjs";
|
|
21
21
|
import "./token-goat-chunk-Y4AFKTHK.mjs";
|
|
22
22
|
import "./token-goat-chunk-GMOUBOX4.mjs";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
stripMultilineStringSpan,
|
|
11
11
|
stripNestedBlockCommentSpan,
|
|
12
12
|
stripStringLiterals
|
|
13
|
-
} from "./token-goat-chunk-
|
|
13
|
+
} from "./token-goat-chunk-MWSVUKVV.mjs";
|
|
14
14
|
import {
|
|
15
15
|
init_define_import_meta_env
|
|
16
16
|
} from "./token-goat-chunk-A37V4PBF.mjs";
|
|
@@ -3,7 +3,7 @@ const require = __cjsRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
queryCsv,
|
|
5
5
|
quoteCsvCell
|
|
6
|
-
} from "./token-goat-chunk-
|
|
6
|
+
} from "./token-goat-chunk-KZPO4DWC.mjs";
|
|
7
7
|
import {
|
|
8
8
|
NotAnOfficeDocumentError,
|
|
9
9
|
assertOoxmlWithinDeadline,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
ooxmlWorkDeadline,
|
|
13
13
|
parseOoxmlPart,
|
|
14
14
|
readOoxmlZip
|
|
15
|
-
} from "./token-goat-chunk-
|
|
15
|
+
} from "./token-goat-chunk-66224KCZ.mjs";
|
|
16
16
|
import {
|
|
17
17
|
displaySafeText
|
|
18
18
|
} from "./token-goat-chunk-ERTXEKB6.mjs";
|
|
@@ -21,7 +21,7 @@ init_define_import_meta_env();
|
|
|
21
21
|
import { createRequire } from "node:module";
|
|
22
22
|
function resolveVersion() {
|
|
23
23
|
if (true) {
|
|
24
|
-
return "2.9.
|
|
24
|
+
return "2.9.17";
|
|
25
25
|
}
|
|
26
26
|
const require2 = createRequire(import.meta.url);
|
|
27
27
|
const pkg = require2("../package.json");
|
|
@@ -25,8 +25,8 @@ import {
|
|
|
25
25
|
runSkeleton,
|
|
26
26
|
runSymbol,
|
|
27
27
|
withPinnedReads
|
|
28
|
-
} from "./token-goat-chunk-
|
|
29
|
-
import "./token-goat-chunk-
|
|
28
|
+
} from "./token-goat-chunk-IDHWKNKZ.mjs";
|
|
29
|
+
import "./token-goat-chunk-CICJFVIH.mjs";
|
|
30
30
|
import "./token-goat-chunk-LMFO66YD.mjs";
|
|
31
31
|
import {
|
|
32
32
|
buildProjectMap,
|
|
@@ -36,31 +36,31 @@ import {
|
|
|
36
36
|
getProjectIndexCounts,
|
|
37
37
|
isWorkerRunning,
|
|
38
38
|
mapLookupBytesSaved
|
|
39
|
-
} from "./token-goat-chunk-
|
|
40
|
-
import "./token-goat-chunk-
|
|
39
|
+
} from "./token-goat-chunk-PKNOHVWP.mjs";
|
|
40
|
+
import "./token-goat-chunk-C26ZBGBC.mjs";
|
|
41
41
|
import {
|
|
42
42
|
recordStat,
|
|
43
43
|
savedTokensFromBytes
|
|
44
|
-
} from "./token-goat-chunk-
|
|
44
|
+
} from "./token-goat-chunk-26YUO7MP.mjs";
|
|
45
45
|
import "./token-goat-chunk-LKSXAMJB.mjs";
|
|
46
|
-
import "./token-goat-chunk-
|
|
46
|
+
import "./token-goat-chunk-KZPO4DWC.mjs";
|
|
47
47
|
import "./token-goat-chunk-3BTK54F3.mjs";
|
|
48
48
|
import "./token-goat-chunk-XTQAOTSO.mjs";
|
|
49
49
|
import "./token-goat-chunk-AH6QILZM.mjs";
|
|
50
|
-
import "./token-goat-chunk-
|
|
50
|
+
import "./token-goat-chunk-SWRKVA3J.mjs";
|
|
51
51
|
import {
|
|
52
52
|
checkEmbeddingPreflight,
|
|
53
53
|
embeddingsDepsAvailable
|
|
54
|
-
} from "./token-goat-chunk-
|
|
55
|
-
import "./token-goat-chunk-
|
|
54
|
+
} from "./token-goat-chunk-73GXYYZR.mjs";
|
|
55
|
+
import "./token-goat-chunk-BK3RPPTK.mjs";
|
|
56
56
|
import {
|
|
57
57
|
getDb
|
|
58
|
-
} from "./token-goat-chunk-
|
|
58
|
+
} from "./token-goat-chunk-MWSVUKVV.mjs";
|
|
59
59
|
import {
|
|
60
60
|
envStrList,
|
|
61
61
|
loadConfig,
|
|
62
62
|
resolveProjectRoot
|
|
63
|
-
} from "./token-goat-chunk-
|
|
63
|
+
} from "./token-goat-chunk-2VASS5VR.mjs";
|
|
64
64
|
import "./token-goat-chunk-EEIDFMEM.mjs";
|
|
65
65
|
import "./token-goat-chunk-OSUFN2FV.mjs";
|
|
66
66
|
import {
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
extractErrorMessage,
|
|
71
71
|
foldCaseForContainment,
|
|
72
72
|
globalDbPath
|
|
73
|
-
} from "./token-goat-chunk-
|
|
73
|
+
} from "./token-goat-chunk-UBZCON6N.mjs";
|
|
74
74
|
import {
|
|
75
75
|
displaySafeJson,
|
|
76
76
|
normalizePath
|
package/dist/token-goat-hook.mjs
CHANGED
|
@@ -2,20 +2,20 @@ import { createRequire as __cjsRequire } from 'node:module';
|
|
|
2
2
|
const require = __cjsRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
relayInProcess
|
|
5
|
-
} from "./token-goat-chunk-
|
|
6
|
-
import "./token-goat-chunk-
|
|
7
|
-
import "./token-goat-chunk-
|
|
8
|
-
import "./token-goat-chunk-
|
|
9
|
-
import "./token-goat-chunk-
|
|
10
|
-
import "./token-goat-chunk-
|
|
5
|
+
} from "./token-goat-chunk-2M33Q3O4.mjs";
|
|
6
|
+
import "./token-goat-chunk-GLOM5W5C.mjs";
|
|
7
|
+
import "./token-goat-chunk-HRUGS6CO.mjs";
|
|
8
|
+
import "./token-goat-chunk-PKNOHVWP.mjs";
|
|
9
|
+
import "./token-goat-chunk-C26ZBGBC.mjs";
|
|
10
|
+
import "./token-goat-chunk-26YUO7MP.mjs";
|
|
11
11
|
import "./token-goat-chunk-3BTK54F3.mjs";
|
|
12
|
-
import "./token-goat-chunk-
|
|
13
|
-
import "./token-goat-chunk-
|
|
14
|
-
import "./token-goat-chunk-
|
|
15
|
-
import "./token-goat-chunk-
|
|
12
|
+
import "./token-goat-chunk-73GXYYZR.mjs";
|
|
13
|
+
import "./token-goat-chunk-BK3RPPTK.mjs";
|
|
14
|
+
import "./token-goat-chunk-MWSVUKVV.mjs";
|
|
15
|
+
import "./token-goat-chunk-2VASS5VR.mjs";
|
|
16
16
|
import "./token-goat-chunk-EEIDFMEM.mjs";
|
|
17
17
|
import "./token-goat-chunk-OSUFN2FV.mjs";
|
|
18
|
-
import "./token-goat-chunk-
|
|
18
|
+
import "./token-goat-chunk-UBZCON6N.mjs";
|
|
19
19
|
import "./token-goat-chunk-ERTXEKB6.mjs";
|
|
20
20
|
import "./token-goat-chunk-Y4AFKTHK.mjs";
|
|
21
21
|
import "./token-goat-chunk-GMOUBOX4.mjs";
|