git-coco 0.49.0 → 0.51.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/README.md CHANGED
@@ -15,10 +15,11 @@ An AI-powered git assistant that generates meaningful commit messages, creates c
15
15
  **✨ Key Features:**
16
16
 
17
17
  - 🤖 **AI-Powered Commit Messages** - Generate contextual commits from your staged changes
18
- - 📋 **Conventional Commits** - Full support with automatic validation and formatting
18
+ - 📋 **Conventional Commits** - Full support with automatic validation and formatting (extends to `coco commit --split` too — every group's title respects the spec)
19
19
  - 🔧 **Commitlint Integration** - Seamless integration with your existing commitlint configuration
20
20
  - 🏠 **Local AI Support** - Run completely offline with Ollama (no API costs, full privacy)
21
- - 🖥️ **Coco UI Git Workstation** - Twelve top-level views (history, status, diff, compose, branches, tags, stash, worktrees, pull-request, conflicts, reflog, bisect) reachable via `g`-prefixed chords, with an interactive command palette (`:`), global search (`/`), and cross-view flows like compare-two-refs and the bisect decision keys
21
+ - 🖥️ **Coco UI Git Workstation** - Thirteen top-level views (history, status, diff, compose, branches, tags, stash, worktrees, pull-request, conflicts, reflog, bisect, changelog) reachable via `g`-prefixed chords, with an interactive command palette (`:`), global search (`/`), and one-keystroke workflows: `S` split staged changes, `L` generate a changelog, `C` create a PR seeded from changelog, `E` open the commit draft in `$EDITOR`
22
+ - 🎯 **`--repo <dir>` global flag** - Drive any coco command against any repository without `cd`-ing first
22
23
  - 📦 **Package Manager Friendly** - Works with npm, yarn, and pnpm
23
24
  - 👥 **Team Ready** - Shared configurations and enterprise deployment
24
25
 
package/dist/index.d.ts CHANGED
@@ -33,7 +33,7 @@ type LogInkThemeConfig = {
33
33
  };
34
34
 
35
35
  type LLMProvider = 'openai' | 'ollama' | 'anthropic';
36
- type DynamicModelTask = 'summarize' | 'commit' | 'changelog' | 'review' | 'recap' | 'repair' | 'largeDiff';
36
+ type DynamicModelTask = 'summarize' | 'commit' | 'commitSplit' | 'changelog' | 'review' | 'recap' | 'repair' | 'largeDiff';
37
37
  type DynamicModelPreference = 'cost' | 'balanced' | 'quality';
38
38
  type OpenAIModel = TiktokenModel | 'gpt-4o-mini' | 'gpt-4o' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano';
39
39
  type AnthropicModel = 'claude-sonnet-4-6' | 'claude-haiku-4-5-20251001' | 'claude-haiku-4-5' | 'claude-opus-4-7' | 'claude-sonnet-4-0' | 'claude-3-7-sonnet-latest' | 'claude-3-5-haiku-latest' | 'claude-3-5-sonnet-latest' | 'claude-3-5-sonnet-20241022' | 'claude-3-5-sonnet-20240620' | 'claude-3-opus-20240229' | 'claude-3-sonnet-20240229' | 'claude-3-haiku-20240307';
@@ -127,6 +127,38 @@ type BaseLLMService = {
127
127
  * @default false
128
128
  */
129
129
  markdown?: boolean;
130
+ /**
131
+ * Language-aware structural fast path (#883). Replace the LLM
132
+ * summary with a symbol-level extract ("added parseRequest();
133
+ * removed legacyParse()") for source files in the listed
134
+ * languages. Off by default; quality is harder to validate than
135
+ * the markdown fast path so we don't enable it without opt-in.
136
+ *
137
+ * Diffs without top-level structural signals (paragraph-only
138
+ * body edits, formatting changes) still go to the LLM regardless
139
+ * of this flag.
140
+ *
141
+ * Currently supports:
142
+ * - 'ts' : `.ts` / `.tsx` / `.mts` / `.cts`
143
+ * - 'js' : `.js` / `.jsx` / `.mjs` / `.cjs`
144
+ * - 'py' : `.py` / `.pyi`
145
+ * - 'rs' : `.rs`
146
+ * - 'go' : `.go`
147
+ */
148
+ languageAware?: {
149
+ /**
150
+ * Master switch. When false (default) the languageAware path
151
+ * is skipped entirely regardless of `languages`.
152
+ *
153
+ * @default false
154
+ */
155
+ enabled?: boolean;
156
+ /**
157
+ * Languages to opt in. Omit / empty to enable all supported
158
+ * languages.
159
+ */
160
+ languages?: ('ts' | 'js' | 'py' | 'rs' | 'go')[];
161
+ };
130
162
  };
131
163
  };
132
164
  type Authentication = {
@@ -272,6 +304,20 @@ type BaseConfig = {
272
304
  * idle for >10s. Off by default so power users aren't distracted.
273
305
  */
274
306
  idleTips?: boolean;
307
+ /**
308
+ * Group adjacent commits in the history surface under shared section
309
+ * headers (`── Today ──`, `── Yesterday ──`, `── April 2026 ──`) and
310
+ * drop the per-row date column in favor of the headers. On by default
311
+ * because the bucketed view gives stronger temporal orientation at
312
+ * a glance and the freed cells go to the commit subject. Flip off if
313
+ * you prefer a date column on every row.
314
+ *
315
+ * Bucketing automatically suppresses itself while a search filter is
316
+ * active (results aren't chronological), regardless of this setting.
317
+ *
318
+ * @default true
319
+ */
320
+ dateBucketing?: boolean;
275
321
  };
276
322
  };
277
323
  type ConfigWithServiceObject = BaseConfig & Partial<BaseCommandOptions> & {
@@ -284,19 +330,43 @@ interface BaseArgvOptions {
284
330
  verbose: boolean;
285
331
  version: boolean;
286
332
  help: boolean;
333
+ /**
334
+ * Repository directory to operate against. When set, the command
335
+ * chdir's to this path before loading config / opening a git
336
+ * instance, so every downstream read (config lookup, simple-git
337
+ * baseDir, commitlint discovery, etc.) sees the same root.
338
+ *
339
+ * `--cwd` is an alias.
340
+ *
341
+ * Inherited by every coco subcommand so scripts / editor wrappers
342
+ * / scenario tests can target arbitrary repos without `cd`-ing
343
+ * first. Defaults to `process.cwd()` when omitted (unchanged
344
+ * behavior for users who launch via the regular `cd && coco ...`
345
+ * path).
346
+ */
347
+ repo?: string;
287
348
  }
288
349
  interface BaseCommandOptions extends BaseArgvOptions {
289
350
  }
290
351
 
291
352
  interface CacheOptions extends BaseCommandOptions {
353
+ /**
354
+ * Positional list of language identifiers / aliases for the
355
+ * `prefetch` subcommand. Empty → interactive checkbox picker.
356
+ * Recognized values mirror the `COCO_PREFETCH` env-var grammar:
357
+ * `py`, `python`, `rs`, `rust`, `go`, `golang`, `all`.
358
+ */
359
+ languages?: string[];
292
360
  }
293
361
  type CacheArgv = Arguments<CacheOptions>;
294
362
 
295
- declare const _default$7: {
363
+ declare const _default$9: {
296
364
  command: string;
297
365
  desc: string;
298
366
  builder: (yargs: yargs.Argv) => yargs.Argv<{
299
- subcommand: "clear" | "info" | undefined;
367
+ subcommand: "clear" | "info" | "parsers" | "prefetch" | "clear-parsers" | "clear-github" | undefined;
368
+ } & {
369
+ languages: string[] | undefined;
300
370
  }>;
301
371
  handler: (argv: CacheArgv) => Promise<void>;
302
372
  };
@@ -313,7 +383,7 @@ interface ChangelogOptions extends BaseCommandOptions {
313
383
  }
314
384
  type ChangelogArgv = Arguments<ChangelogOptions>;
315
385
 
316
- declare const _default$6: {
386
+ declare const _default$8: {
317
387
  command: string;
318
388
  desc: string;
319
389
  builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
@@ -336,7 +406,7 @@ interface CommitOptions extends BaseCommandOptions {
336
406
  }
337
407
  type CommitArgv = Arguments<CommitOptions>;
338
408
 
339
- declare const _default$5: {
409
+ declare const _default$7: {
340
410
  command: string;
341
411
  desc: string;
342
412
  builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
@@ -349,7 +419,7 @@ interface DoctorOptions extends BaseCommandOptions {
349
419
  }
350
420
  type DoctorArgv = Arguments<DoctorOptions>;
351
421
 
352
- declare const _default$4: {
422
+ declare const _default$6: {
353
423
  command: string;
354
424
  desc: string;
355
425
  builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
@@ -358,7 +428,7 @@ declare const _default$4: {
358
428
 
359
429
  type InstallationScope = 'global' | 'project';
360
430
 
361
- declare const _default$3: {
431
+ declare const _default$5: {
362
432
  command: string;
363
433
  desc: string;
364
434
  builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
@@ -370,6 +440,7 @@ declare const _default$3: {
370
440
  verbose: boolean;
371
441
  version: boolean;
372
442
  help: boolean;
443
+ repo?: string | undefined;
373
444
  _: (string | number)[];
374
445
  $0: string;
375
446
  } | Promise<{
@@ -380,12 +451,44 @@ declare const _default$3: {
380
451
  verbose: boolean;
381
452
  version: boolean;
382
453
  help: boolean;
454
+ repo?: string | undefined;
383
455
  _: (string | number)[];
384
456
  $0: string;
385
457
  }>) => Promise<void>;
386
458
  options: Record<string, yargs.Options>;
387
459
  };
388
460
 
461
+ interface IssuesOptions extends BaseCommandOptions {
462
+ state?: 'open' | 'closed' | 'all';
463
+ assignee?: string;
464
+ author?: string;
465
+ label?: string;
466
+ search?: string;
467
+ /** Convenience flag → `--assignee @me`. */
468
+ mine?: boolean;
469
+ limit?: number;
470
+ /** Print machine-readable JSON instead of the formatted table. */
471
+ json?: boolean;
472
+ /**
473
+ * Force a fresh `gh` call even if the cached entry is within
474
+ * the TTL. The fresh result still gets written back to cache.
475
+ */
476
+ refresh?: boolean;
477
+ /**
478
+ * Disable cache entirely — skip read AND write. Useful when
479
+ * piping into tooling that manages its own freshness.
480
+ */
481
+ noCache?: boolean;
482
+ }
483
+ type IssuesArgv = Arguments<IssuesOptions>;
484
+
485
+ declare const _default$4: {
486
+ command: string;
487
+ desc: string;
488
+ builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
489
+ handler: (argv: IssuesArgv) => Promise<void>;
490
+ };
491
+
389
492
  type LogFormat = 'table' | 'json';
390
493
  type LogView = 'compact' | 'graph' | 'full';
391
494
  interface LogOptions extends BaseCommandOptions {
@@ -404,7 +507,7 @@ interface LogOptions extends BaseCommandOptions {
404
507
  }
405
508
  type LogArgv = Arguments<LogOptions>;
406
509
 
407
- declare const _default$2: {
510
+ declare const _default$3: {
408
511
  command: string;
409
512
  desc: string;
410
513
  builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
@@ -412,6 +515,40 @@ declare const _default$2: {
412
515
  options: Record<string, yargs.Options>;
413
516
  };
414
517
 
518
+ interface PrsOptions extends BaseCommandOptions {
519
+ state?: 'open' | 'closed' | 'merged' | 'all';
520
+ assignee?: string;
521
+ author?: string;
522
+ label?: string;
523
+ search?: string;
524
+ base?: string;
525
+ head?: string;
526
+ draft?: boolean;
527
+ /** Convenience flag → `--assignee @me`. */
528
+ mine?: boolean;
529
+ limit?: number;
530
+ /** Print machine-readable JSON instead of the formatted table. */
531
+ json?: boolean;
532
+ /**
533
+ * Force a fresh `gh` call even if the cached entry is within
534
+ * the TTL. The fresh result still gets written back to cache.
535
+ */
536
+ refresh?: boolean;
537
+ /**
538
+ * Disable cache entirely — skip read AND write. Useful when
539
+ * piping into tooling that manages its own freshness.
540
+ */
541
+ noCache?: boolean;
542
+ }
543
+ type PrsArgv = Arguments<PrsOptions>;
544
+
545
+ declare const _default$2: {
546
+ command: string;
547
+ desc: string;
548
+ builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
549
+ handler: (argv: PrsArgv) => Promise<void>;
550
+ };
551
+
415
552
  interface RecapOptions extends BaseCommandOptions {
416
553
  yesterday?: boolean;
417
554
  'last-week'?: boolean;
@@ -575,6 +712,22 @@ interface BaseParserOptions {
575
712
  * @default false
576
713
  */
577
714
  markdown?: boolean;
715
+ /**
716
+ * Language-aware structural fast path (#883). Replaces the LLM
717
+ * summary with a symbol-level extract ("added parseRequest();
718
+ * removed legacyParse()") for source files in the listed
719
+ * languages. Off by default — lossy by design, and quality is
720
+ * harder to validate than the markdown fast path.
721
+ */
722
+ languageAware?: {
723
+ enabled?: boolean;
724
+ /**
725
+ * Languages to opt in. Omit / empty to enable all currently
726
+ * supported languages. Today: 'ts' (covers .ts/.tsx/.mts/.cts),
727
+ * 'js' (covers .js/.jsx/.mjs/.cjs).
728
+ */
729
+ languages?: ('ts' | 'js' | 'py' | 'rs' | 'go')[];
730
+ };
578
731
  };
579
732
  metadata?: Partial<LlmCallMetadata>;
580
733
  }
@@ -612,5 +765,5 @@ declare namespace types_d {
612
765
  export type { types_d_BaseParserInput as BaseParserInput, types_d_BaseParserOptions as BaseParserOptions, types_d_CommandHandler as CommandHandler, types_d_CommitLogParserInput as CommitLogParserInput, types_d_ConfirmMessage as ConfirmMessage, types_d_ConfirmMessageCallback as ConfirmMessageCallback, types_d_DiffNode as DiffNode, types_d_DirectoryDiff as DirectoryDiff, types_d_FileChange as FileChange, types_d_FileChangeParserInput as FileChangeParserInput, types_d_FileChangeStatus as FileChangeStatus, types_d_FileDiff as FileDiff, types_d_GetChangesResult as GetChangesResult };
613
766
  }
614
767
 
615
- export { _default$7 as cache, _default$6 as changelog, _default$5 as commit, _default$4 as doctor, _default$3 as init, _default$2 as log, _default$1 as recap, types_d as types, _default as ui };
768
+ export { _default$9 as cache, _default$8 as changelog, _default$7 as commit, _default$6 as doctor, _default$5 as init, _default$4 as issues, _default$3 as log, _default$2 as prs, _default$1 as recap, types_d as types, _default as ui };
616
769
  export type { Config$1 as Config };