@kt3k/tku 1.0.10 → 1.1.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.
Files changed (2) hide show
  1. package/dist/main.js +7 -3
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -35,7 +35,9 @@ async function listFiles(repoPath, options = {}) {
35
35
  g
36
36
  ] : [
37
37
  g,
38
- `${g}/**`
38
+ `${g}/**`,
39
+ `**/${g}`,
40
+ `**/${g}/**`
39
41
  ]);
40
42
  const isExcluded = picomatch(expanded);
41
43
  files = files.filter((f) => !isExcluded(f));
@@ -182,7 +184,7 @@ function formatResult(result, options = {}) {
182
184
 
183
185
  // src/main.ts
184
186
  function printUsage() {
185
- console.log(`Usage: tku [options] [path]
187
+ console.log(`Usage: npx @kt3k/tku [options] [path]
186
188
 
187
189
  Options:
188
190
  --encoding <encoding> Tiktoken encoding (default: o200k_base)
@@ -240,7 +242,9 @@ async function main() {
240
242
  const isTTY = process.stderr.isTTY;
241
243
  function status(msg) {
242
244
  if (isTTY) {
243
- process.stderr.write(`\r\x1B[K${msg}`);
245
+ const cols = process.stderr.columns || 80;
246
+ const truncated = msg.length > cols ? msg.slice(0, cols) : msg;
247
+ process.stderr.write(`\r\x1B[K${truncated}`);
244
248
  }
245
249
  }
246
250
  function clearStatus() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kt3k/tku",
3
- "version": "1.0.10",
3
+ "version": "1.1.0",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "bin": {