@gitkraken/core-gitlens 0.35.0 → 0.37.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/CHANGELOG.md +30 -1
- package/dist/git/models/branch.d.ts +9 -0
- package/dist/git/models/branch.js.map +1 -1
- package/dist/git/providers/branches.d.ts +11 -1
- package/dist/git/providers/revision.d.ts +6 -0
- package/dist/git/utils/branch.utils.d.ts +14 -0
- package/dist/git/utils/branch.utils.js +37 -1
- package/dist/git/utils/branch.utils.js.map +1 -1
- package/dist/git/utils/branchLanded.utils.d.ts +43 -0
- package/dist/git/utils/branchLanded.utils.js +56 -0
- package/dist/git/utils/branchLanded.utils.js.map +1 -0
- package/dist/git-cli/exec/git.js +2 -2
- package/dist/git-cli/exec/git.js.map +1 -1
- package/dist/git-cli/providers/branches.d.ts +6 -1
- package/dist/git-cli/providers/branches.js +58 -0
- package/dist/git-cli/providers/branches.js.map +1 -1
- package/dist/git-cli/providers/revision.d.ts +1 -0
- package/dist/git-cli/providers/revision.js +9 -0
- package/dist/git-cli/providers/revision.js.map +1 -1
- package/dist/plus/ai/models/model.js +58 -4
- package/dist/plus/ai/models/model.js.map +1 -1
- package/dist/plus/ai/providers/anthropicProvider.js +58 -223
- package/dist/plus/ai/providers/anthropicProvider.js.map +1 -1
- package/dist/plus/ai/providers/deepSeekProvider.js +32 -18
- package/dist/plus/ai/providers/deepSeekProvider.js.map +1 -1
- package/dist/plus/ai/providers/geminiProvider.js +25 -189
- package/dist/plus/ai/providers/geminiProvider.js.map +1 -1
- package/dist/plus/ai/providers/mistralProvider.js +31 -73
- package/dist/plus/ai/providers/mistralProvider.js.map +1 -1
- package/dist/plus/ai/providers/xaiProvider.js +9 -11
- package/dist/plus/ai/providers/xaiProvider.js.map +1 -1
- package/dist/plus/git-github/api/github.d.ts +14 -3
- package/dist/plus/git-github/api/github.js +47 -14
- package/dist/plus/git-github/api/github.js.map +1 -1
- package/dist/plus/integrations/integrationService.d.ts +5 -1
- package/dist/plus/integrations/integrationService.js +4 -2
- package/dist/plus/integrations/integrationService.js.map +1 -1
- package/dist/plus/integrations/manager.d.ts +24 -5
- package/dist/plus/integrations/models/integration.d.ts +12 -0
- package/dist/plus/integrations/models/integration.js +15 -1
- package/dist/plus/integrations/models/integration.js.map +1 -1
- package/dist/plus/integrations/models/issuesIntegration.d.ts +2 -1
- package/dist/plus/integrations/models/issuesIntegration.js +6 -3
- package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
- package/dist/plus/integrations/providers/azureDevOps.d.ts +21 -6
- package/dist/plus/integrations/providers/azureDevOps.js +24 -12
- package/dist/plus/integrations/providers/azureDevOps.js.map +1 -1
- package/dist/plus/integrations/providers/azureDevOpsServer.d.ts +49 -3
- package/dist/plus/integrations/providers/azureDevOpsServer.js +151 -23
- package/dist/plus/integrations/providers/azureDevOpsServer.js.map +1 -1
- package/dist/plus/integrations/providers/linear.d.ts +3 -2
- package/dist/plus/integrations/providers/linear.js +7 -5
- package/dist/plus/integrations/providers/linear.js.map +1 -1
- package/dist/plus/integrations/reads/autolinks.js.map +1 -1
- package/dist/plus/integrations/reads/searchPullRequests.d.ts +2 -0
- package/dist/plus/integrations/reads/searchPullRequests.js +18 -9
- package/dist/plus/integrations/reads/searchPullRequests.js.map +1 -1
- package/docs/integrations.md +27 -6
- package/package.json +1 -1
|
@@ -463,6 +463,19 @@ export interface IntegrationManager {
|
|
|
463
463
|
* pre-ceiling facet count, not the reachable or returned row count; this mirrors the per-search ceiling's own
|
|
464
464
|
* unit.
|
|
465
465
|
*
|
|
466
|
+
* **On GitHub/GHE a page is bounded by how long GitHub takes to build it**, not only by `itemsPerPage`: past about
|
|
467
|
+
* 11 seconds its gateway gives up with a 502/504. So a page holds at most 20 pull requests across all its facets
|
|
468
|
+
* in the full shape and 100 in the `summary` shape, split evenly across the active facets (a 3-facet full search
|
|
469
|
+
* gets 6 per facet), and `itemsPerPage` can only lower a facet's share. When the gateway gives up anyway, the
|
|
470
|
+
* page is asked for once more at half its size (unchanged once it is one row per facet) and the rest of the walk
|
|
471
|
+
* keeps that size; if that fails at the gateway too, the read fails (warning + `fetchFailed`) rather than asking
|
|
472
|
+
* a third time. Other transient failures (503, a network failure) are retried unchanged, as on any read. A smaller
|
|
473
|
+
* page is not a failure and carries no warning: it reports its real size in
|
|
474
|
+
* `page.itemsPerPage`, and its `cursor` resumes every facet exactly after the last row it served, so no facet
|
|
475
|
+
* skips or repeats a row. Never read a page shorter than requested as the last one; only `hasMore`/`cursor` say
|
|
476
|
+
* that. As on every page of this search, a pull request two facets share (authored AND assigned, say) can come back
|
|
477
|
+
* on two different pages, once per facet; dedupe across pages by `url`.
|
|
478
|
+
*
|
|
466
479
|
* **Azure DevOps Server** differs in how it gets there, because its pull request API can't filter by text, date or
|
|
467
480
|
* draft: the first page drains every facet (up to 1,000 rows each) and later pages are served from that drain,
|
|
468
481
|
* so a first page can cost many requests and a continuation none. A continuation whose drain expired is refused;
|
|
@@ -505,8 +518,9 @@ export interface IntegrationManager {
|
|
|
505
518
|
* 2-state search returns up to `6 × itemsPerPage` items before deduplication, and fewer than that where
|
|
506
519
|
* the facets overlap. Deduplication does NOT bring the page back to this size: it removes only the rows the
|
|
507
520
|
* facets share. `page.itemsPerPage` reports what actually came back, so size the UI off that rather than
|
|
508
|
-
* off this. A provider may also cap it below what is asked for
|
|
509
|
-
*
|
|
521
|
+
* off this. A provider may also cap it below what is asked for, as GitHub/GHE do to keep a page within the
|
|
522
|
+
* time GitHub allows (see above), so omit it unless you need FEWER rows than the default. Azure DevOps Server
|
|
523
|
+
* is the exception: it serves one merged page, so there this is the page size (at most 100).
|
|
510
524
|
*/
|
|
511
525
|
itemsPerPage?: number;
|
|
512
526
|
forceSync?: boolean;
|
|
@@ -515,9 +529,8 @@ export interface IntegrationManager {
|
|
|
515
529
|
domain?: string;
|
|
516
530
|
/**
|
|
517
531
|
* Requests the lightweight row shape: identity, body, author, repository, branch refs and stack info,
|
|
518
|
-
* without review, check or diff statistics.
|
|
519
|
-
*
|
|
520
|
-
* and from four on it LOWERS it — measured against GitHub, a 100-row budget versus a flat 30 each.
|
|
532
|
+
* without review, check or diff statistics. On GitHub/GHE it also raises the page budget shared across the
|
|
533
|
+
* search's ACTIVE facets from 20 rows to 100, since the lite rows take GitHub a fraction of the time to build.
|
|
521
534
|
*
|
|
522
535
|
* A provider without a lightweight projection ignores it and returns its usual shape, so this is a hint
|
|
523
536
|
* rather than a contract about which fields are present.
|
|
@@ -530,6 +543,12 @@ export interface IntegrationManager {
|
|
|
530
543
|
* rate-limit request per row.
|
|
531
544
|
*/
|
|
532
545
|
mergeQueue?: boolean;
|
|
546
|
+
/**
|
|
547
|
+
* Aborts the read: the request in flight, a retry waiting to be sent, and any page a page-number walk still
|
|
548
|
+
* has to read. The read then rejects with a `CancellationError` instead of resolving, so a cancelled read is
|
|
549
|
+
* never mistaken for a failed or an empty one.
|
|
550
|
+
*/
|
|
551
|
+
cancellation?: AbortSignal;
|
|
533
552
|
}): Promise<ProviderPagedResult<PullRequestShape>>;
|
|
534
553
|
listIssuesPage(options: {
|
|
535
554
|
state?: IssueStateFilter;
|
|
@@ -322,6 +322,18 @@ export declare abstract class IntegrationBase<ID extends IntegrationIds = Integr
|
|
|
322
322
|
*/
|
|
323
323
|
invalidateDiscoveryCaches(): void;
|
|
324
324
|
invalidateDiscoveryForConnection(_connectionId?: string): void;
|
|
325
|
+
/**
|
|
326
|
+
* The one owner of the drop a forced refresh makes before its sync, so it never serves a discovery list cached
|
|
327
|
+
* before it: drops the discovery of `connectionId` (the primary when omitted), whether the sync then succeeds,
|
|
328
|
+
* fails transiently and keeps the stored token, or hands back the same token (a PAT always does).
|
|
329
|
+
*
|
|
330
|
+
* Called once per forced refresh, by the path that runs its sync: an explicit forced re-sync of the primary
|
|
331
|
+
* ({@link syncCloudConnection}, run by a primary `forceSync` read and by `refreshConnections`), and a
|
|
332
|
+
* per-connection `forceSync` read, whose re-sync goes through the auth provider and never reaches it. An `expired`
|
|
333
|
+
* re-sync is not a refresh the caller asked for and keeps its discovery. A strict autolinks refresh also drops at
|
|
334
|
+
* completion, a separate drop that retires the reads started while it was pending (see `getAutolinkReferences`).
|
|
335
|
+
*/
|
|
336
|
+
beginForcedRefresh(connectionId?: string): void;
|
|
325
337
|
getSessionDiscoveryGeneration(_sessionId?: string, _connectionId?: string, _cloud?: boolean): number;
|
|
326
338
|
get discoveryGeneration(): number;
|
|
327
339
|
protected isResolvedSessionCurrent(_session: ProviderAuthenticationSession | undefined, _generation: number): boolean;
|
|
@@ -370,6 +370,20 @@ var IntegrationBase = class IntegrationBase {
|
|
|
370
370
|
invalidateDiscoveryForConnection(_connectionId) {
|
|
371
371
|
this.invalidateDiscoveryCaches();
|
|
372
372
|
}
|
|
373
|
+
/**
|
|
374
|
+
* The one owner of the drop a forced refresh makes before its sync, so it never serves a discovery list cached
|
|
375
|
+
* before it: drops the discovery of `connectionId` (the primary when omitted), whether the sync then succeeds,
|
|
376
|
+
* fails transiently and keeps the stored token, or hands back the same token (a PAT always does).
|
|
377
|
+
*
|
|
378
|
+
* Called once per forced refresh, by the path that runs its sync: an explicit forced re-sync of the primary
|
|
379
|
+
* ({@link syncCloudConnection}, run by a primary `forceSync` read and by `refreshConnections`), and a
|
|
380
|
+
* per-connection `forceSync` read, whose re-sync goes through the auth provider and never reaches it. An `expired`
|
|
381
|
+
* re-sync is not a refresh the caller asked for and keeps its discovery. A strict autolinks refresh also drops at
|
|
382
|
+
* completion, a separate drop that retires the reads started while it was pending (see `getAutolinkReferences`).
|
|
383
|
+
*/
|
|
384
|
+
beginForcedRefresh(connectionId) {
|
|
385
|
+
this.invalidateDiscoveryForConnection(connectionId);
|
|
386
|
+
}
|
|
373
387
|
getSessionDiscoveryGeneration(_sessionId, _connectionId, _cloud) {
|
|
374
388
|
return this.discoveryGeneration;
|
|
375
389
|
}
|
|
@@ -494,7 +508,7 @@ var IntegrationBase = class IntegrationBase {
|
|
|
494
508
|
if (forceSync) {
|
|
495
509
|
if (reason === "explicit") {
|
|
496
510
|
this._rejectedTokens.clear();
|
|
497
|
-
this.
|
|
511
|
+
this.beginForcedRefresh();
|
|
498
512
|
}
|
|
499
513
|
await this.ctx.storage.deleteWorkspace(this.connectedKey);
|
|
500
514
|
resyncing = true;
|