@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.
Files changed (59) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/dist/git/models/branch.d.ts +9 -0
  3. package/dist/git/models/branch.js.map +1 -1
  4. package/dist/git/providers/branches.d.ts +11 -1
  5. package/dist/git/providers/revision.d.ts +6 -0
  6. package/dist/git/utils/branch.utils.d.ts +14 -0
  7. package/dist/git/utils/branch.utils.js +37 -1
  8. package/dist/git/utils/branch.utils.js.map +1 -1
  9. package/dist/git/utils/branchLanded.utils.d.ts +43 -0
  10. package/dist/git/utils/branchLanded.utils.js +56 -0
  11. package/dist/git/utils/branchLanded.utils.js.map +1 -0
  12. package/dist/git-cli/exec/git.js +2 -2
  13. package/dist/git-cli/exec/git.js.map +1 -1
  14. package/dist/git-cli/providers/branches.d.ts +6 -1
  15. package/dist/git-cli/providers/branches.js +58 -0
  16. package/dist/git-cli/providers/branches.js.map +1 -1
  17. package/dist/git-cli/providers/revision.d.ts +1 -0
  18. package/dist/git-cli/providers/revision.js +9 -0
  19. package/dist/git-cli/providers/revision.js.map +1 -1
  20. package/dist/plus/ai/models/model.js +58 -4
  21. package/dist/plus/ai/models/model.js.map +1 -1
  22. package/dist/plus/ai/providers/anthropicProvider.js +58 -223
  23. package/dist/plus/ai/providers/anthropicProvider.js.map +1 -1
  24. package/dist/plus/ai/providers/deepSeekProvider.js +32 -18
  25. package/dist/plus/ai/providers/deepSeekProvider.js.map +1 -1
  26. package/dist/plus/ai/providers/geminiProvider.js +25 -189
  27. package/dist/plus/ai/providers/geminiProvider.js.map +1 -1
  28. package/dist/plus/ai/providers/mistralProvider.js +31 -73
  29. package/dist/plus/ai/providers/mistralProvider.js.map +1 -1
  30. package/dist/plus/ai/providers/xaiProvider.js +9 -11
  31. package/dist/plus/ai/providers/xaiProvider.js.map +1 -1
  32. package/dist/plus/git-github/api/github.d.ts +14 -3
  33. package/dist/plus/git-github/api/github.js +47 -14
  34. package/dist/plus/git-github/api/github.js.map +1 -1
  35. package/dist/plus/integrations/integrationService.d.ts +5 -1
  36. package/dist/plus/integrations/integrationService.js +4 -2
  37. package/dist/plus/integrations/integrationService.js.map +1 -1
  38. package/dist/plus/integrations/manager.d.ts +24 -5
  39. package/dist/plus/integrations/models/integration.d.ts +12 -0
  40. package/dist/plus/integrations/models/integration.js +15 -1
  41. package/dist/plus/integrations/models/integration.js.map +1 -1
  42. package/dist/plus/integrations/models/issuesIntegration.d.ts +2 -1
  43. package/dist/plus/integrations/models/issuesIntegration.js +6 -3
  44. package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
  45. package/dist/plus/integrations/providers/azureDevOps.d.ts +21 -6
  46. package/dist/plus/integrations/providers/azureDevOps.js +24 -12
  47. package/dist/plus/integrations/providers/azureDevOps.js.map +1 -1
  48. package/dist/plus/integrations/providers/azureDevOpsServer.d.ts +49 -3
  49. package/dist/plus/integrations/providers/azureDevOpsServer.js +151 -23
  50. package/dist/plus/integrations/providers/azureDevOpsServer.js.map +1 -1
  51. package/dist/plus/integrations/providers/linear.d.ts +3 -2
  52. package/dist/plus/integrations/providers/linear.js +7 -5
  53. package/dist/plus/integrations/providers/linear.js.map +1 -1
  54. package/dist/plus/integrations/reads/autolinks.js.map +1 -1
  55. package/dist/plus/integrations/reads/searchPullRequests.d.ts +2 -0
  56. package/dist/plus/integrations/reads/searchPullRequests.js +18 -9
  57. package/dist/plus/integrations/reads/searchPullRequests.js.map +1 -1
  58. package/docs/integrations.md +27 -6
  59. package/package.json +1 -1
@@ -27,6 +27,7 @@ export declare class RevisionGitSubProvider implements GitRevisionSubProvider {
27
27
  getTrackedFiles(repoPath: string, options?: {
28
28
  paths?: readonly string[];
29
29
  }, cancellation?: AbortSignal): Promise<string[]>;
30
+ getTrackedFilesRaw(repoPath: string, cancellation?: AbortSignal): Promise<Uint8Array>;
30
31
  getTreeForRevision(repoPath: string, rev: string, options?: {
31
32
  paths?: readonly string[];
32
33
  }, cancellation?: AbortSignal): Promise<GitTreeEntry[]>;
@@ -174,6 +174,14 @@ var RevisionGitSubProvider = class {
174
174
  }
175
175
  return [...files];
176
176
  }
177
+ async getTrackedFilesRaw(repoPath, cancellation) {
178
+ return (await this.git.run({
179
+ cwd: repoPath,
180
+ cancellation,
181
+ errors: "throw",
182
+ encoding: "buffer"
183
+ }, "ls-files", "-z")).stdout;
184
+ }
177
185
  async getTreeForRevision(repoPath, rev, options, cancellation) {
178
186
  if (!repoPath) return [];
179
187
  const paths = options?.paths;
@@ -395,6 +403,7 @@ __decorate([gate(), debug({ quiet: true })], RevisionGitSubProvider.prototype, "
395
403
  __decorate([debug({ quiet: true })], RevisionGitSubProvider.prototype, "getSubmoduleHead", null);
396
404
  __decorate([gate(), debug({ quiet: true })], RevisionGitSubProvider.prototype, "getTreeEntryForRevision", null);
397
405
  __decorate([debug({ quiet: true })], RevisionGitSubProvider.prototype, "getTrackedFiles", null);
406
+ __decorate([debug({ quiet: true })], RevisionGitSubProvider.prototype, "getTrackedFilesRaw", null);
398
407
  __decorate([debug({ quiet: true })], RevisionGitSubProvider.prototype, "getTreeForRevision", null);
399
408
  __decorate([gate()], RevisionGitSubProvider.prototype, "getTreeForRevisionGated", null);
400
409
  __decorate([debug({
@@ -1 +1 @@
1
- {"version":3,"file":"revision.js","names":[],"sources":["../../../../git-cli/src/providers/revision.ts"],"sourcesContent":["import type { Cache } from '@gitlens/git/cache.js';\nimport type { GitServiceContext } from '@gitlens/git/context.js';\nimport { ShowError } from '@gitlens/git/errors.js';\nimport type { GitFileStatus } from '@gitlens/git/models/fileStatus.js';\nimport { deletedOrMissing } from '@gitlens/git/models/revision.js';\nimport type { GitTreeEntry } from '@gitlens/git/models/tree.js';\nimport type { GitRevisionSubProvider, ResolvedRevision } from '@gitlens/git/providers/revision.js';\nimport {\n\tisRevisionWithSuffix,\n\tisSha,\n\tisUncommitted,\n\tisUncommittedStaged,\n\tisUncommittedWithParentSuffix,\n} from '@gitlens/git/utils/revision.utils.js';\nimport { CancellationError } from '@gitlens/utils/cancellation.js';\nimport { gate } from '@gitlens/utils/decorators/gate.js';\nimport { debug } from '@gitlens/utils/decorators/log.js';\nimport { first } from '@gitlens/utils/iterable.js';\nimport { joinPaths, splitPath } from '@gitlens/utils/path.js';\nimport { iterateByDelimiter } from '@gitlens/utils/string.js';\nimport type { Uri } from '@gitlens/utils/uri.js';\nimport { toFsPath } from '@gitlens/utils/uri.js';\nimport type { CliGitProviderInternal } from '../cliGitProvider.js';\nimport type { GitErrorHandling, GitRunOptions } from '../exec/exec.types.js';\nimport type { Git } from '../exec/git.js';\nimport {\n\tbatchLiteralPathspecs,\n\tdefaultExceptionHandler,\n\tgetGitCommandError,\n\tgitConfigsLog,\n\tGitErrors,\n} from '../exec/git.js';\nimport { parseGitLsFilesStaged } from '../parsers/indexParser.js';\nimport { getShaAndFileSummaryLogParser } from '../parsers/logParser.js';\nimport { parseGitTree } from '../parsers/treeParser.js';\n\nconst emptyArray: readonly GitTreeEntry[] = Object.freeze([]);\n\nexport class RevisionGitSubProvider implements GitRevisionSubProvider {\n\tconstructor(\n\t\tprivate readonly context: GitServiceContext,\n\t\tprivate readonly git: Git,\n\t\tprivate readonly cache: Cache,\n\t\tprivate readonly provider: CliGitProviderInternal,\n\t) {}\n\n\texists(\n\t\trepoPath: string,\n\t\tpath: string,\n\t\trevOrOptions?: string | { untracked?: 'only' | 'include' },\n\t): Promise<boolean> {\n\t\tlet rev: string | undefined;\n\t\tlet untracked: 'only' | 'include' | undefined;\n\t\tif (typeof revOrOptions === 'string') {\n\t\t\trev = revOrOptions;\n\t\t} else if (revOrOptions != null) {\n\t\t\tuntracked = revOrOptions.untracked;\n\t\t}\n\n\t\tconst cacheKey = `${path}\\0${rev ?? ''}\\0${untracked ?? ''}`;\n\t\treturn this.cache.fileExistence.getOrCreate(repoPath, cacheKey, async () => {\n\t\t\tconst args = ['ls-files'];\n\t\t\tif (rev) {\n\t\t\t\tif (!isUncommitted(rev)) {\n\t\t\t\t\targs.push(`--with-tree=${rev}`);\n\t\t\t\t} else if (isUncommittedStaged(rev)) {\n\t\t\t\t\targs.push('--stage');\n\t\t\t\t}\n\t\t\t} else if (untracked === 'only') {\n\t\t\t\targs.push('-o');\n\t\t\t} else if (untracked === 'include') {\n\t\t\t\t// Tracked (cached) OR untracked (others)\n\t\t\t\targs.push('-c', '-o');\n\t\t\t}\n\n\t\t\t// Literal, or a missing `[id]/page.tsx` would count as existing whenever `i/page.tsx` does\n\t\t\tconst result = await this.git.run({ cwd: repoPath, errors: 'ignore' }, ...args, '--', `:(literal)${path}`);\n\t\t\treturn Boolean(result.stdout.trim());\n\t\t});\n\t}\n\n\t@debug()\n\tasync getBlobIds(\n\t\trepoPath: string,\n\t\tpaths: readonly string[],\n\t\tsource: 'index' | 'working',\n\t\tcancellation?: AbortSignal,\n\t): Promise<Map<string, string>> {\n\t\tconst ids = new Map<string, string>();\n\t\tif (paths.length === 0) return ids;\n\n\t\tif (source === 'index') {\n\t\t\t// Literal pathspecs, so a file named like `[id]/page.tsx` doesn't also match `i/page.tsx`\n\t\t\tconst prefix = ['ls-files', '-z', '--stage'];\n\t\t\tfor (const batch of batchLiteralPathspecs(paths, prefix)) {\n\t\t\t\tconst result = await this.git.run(\n\t\t\t\t\t{ cwd: repoPath, cancellation: cancellation, errors: 'ignore' },\n\t\t\t\t\t...prefix,\n\t\t\t\t\t'--',\n\t\t\t\t\t...batch,\n\t\t\t\t);\n\t\t\t\tfor (const entry of parseGitLsFilesStaged(result.stdout, false)) {\n\t\t\t\t\t// A conflicted path lists one entry per stage; the first is as good an identity as any\n\t\t\t\t\tif (!ids.has(entry.path)) {\n\t\t\t\t\t\tids.set(entry.path, entry.oid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn ids;\n\t\t}\n\n\t\t// `hash-object` without `-w` computes ids without storing anything; `--stdin-paths` hashes them\n\t\t// all in one process, printing one line per path in input order. A path it can't hash (a\n\t\t// submodule, a directory, a missing or unreadable file) ends the run right there, after the ids\n\t\t// of the paths before it — so the first missing line names the culprit, and the rest resume in\n\t\t// a new run after it.\n\t\tconst unhashable: string[] = [];\n\t\tlet start = 0;\n\t\twhile (start < paths.length) {\n\t\t\tconst pending = paths.slice(start);\n\t\t\tconst result = await this.git.run(\n\t\t\t\t{ cwd: repoPath, cancellation: cancellation, errors: 'ignore', stdin: `${pending.join('\\n')}\\n` },\n\t\t\t\t'hash-object',\n\t\t\t\t'--stdin-paths',\n\t\t\t);\n\t\t\tconst lines = result.stdout.split('\\n');\n\t\t\tlet hashed = 0;\n\t\t\twhile (hashed < pending.length) {\n\t\t\t\tconst oid = lines[hashed]?.trim();\n\t\t\t\tif (!oid) break;\n\n\t\t\t\tids.set(pending[hashed], oid);\n\t\t\t\thashed++;\n\t\t\t}\n\t\t\tif (hashed === pending.length) break;\n\t\t\t// Only a run that exited with an error stopped at a path; a cancelled or never-started one\n\t\t\t// says nothing about which path is to blame\n\t\t\tif (result.completion.status !== 'exited' || result.completion.code === 0) break;\n\n\t\t\tunhashable.push(pending[hashed]);\n\t\t\tstart += hashed + 1;\n\t\t}\n\n\t\tif (unhashable.length && !cancellation?.aborted) {\n\t\t\tawait Promise.all(\n\t\t\t\tunhashable.map(async path => {\n\t\t\t\t\tconst oid = await this.getCheckedOutSubmoduleCommit(repoPath, path, cancellation);\n\t\t\t\t\tif (oid) {\n\t\t\t\t\t\tids.set(path, oid);\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t\treturn ids;\n\t}\n\n\t/** The commit checked out in the submodule at `path` — what the index records for it too, so its id\n\t * moves when the submodule does. Anything else that couldn't be hashed has no id. */\n\tprivate async getCheckedOutSubmoduleCommit(\n\t\trepoPath: string,\n\t\tpath: string,\n\t\tcancellation: AbortSignal | undefined,\n\t): Promise<string | undefined> {\n\t\t// Inside a plain directory git finds the outer repository and reports a non-empty prefix (`dir/`);\n\t\t// only the top of a repository of its own answers with an empty one\n\t\tconst result = await this.git.run(\n\t\t\t{ cwd: joinPaths(repoPath, path), cancellation: cancellation, errors: 'ignore' },\n\t\t\t'rev-parse',\n\t\t\t'--show-prefix',\n\t\t\t'HEAD',\n\t\t);\n\t\tif (result.completion.status !== 'exited' || result.completion.code !== 0) return undefined;\n\n\t\tconst [prefix, sha] = result.stdout.split('\\n');\n\t\treturn prefix === '' ? sha?.trim() || undefined : undefined;\n\t}\n\n\t/** `hash-object` without `-w` computes the id in the repository's format without storing anything */\n\t@debug({ quiet: true })\n\tgetEmptyTreeSha(repoPath: string): Promise<string> {\n\t\treturn this.cache.getEmptyTreeSha(repoPath, async () => {\n\t\t\tconst result = await this.git.run(\n\t\t\t\t{ cwd: repoPath, stdin: '', errors: 'throw' },\n\t\t\t\t'hash-object',\n\t\t\t\t'-t',\n\t\t\t\t'tree',\n\t\t\t\t'--stdin',\n\t\t\t);\n\t\t\treturn result.stdout.trim();\n\t\t});\n\t}\n\n\t@gate()\n\t@debug({ quiet: true })\n\tgetRevisionContent(repoPath: string, path: string, rev: string): Promise<Uint8Array | undefined> {\n\t\tconst [relativePath, root] = splitPath(path, repoPath);\n\t\treturn this.showContentCore<Buffer>(root, relativePath, rev, { encoding: 'buffer', errors: 'throw' });\n\t}\n\n\t@debug({ quiet: true })\n\tasync getSubmoduleHead(repoPath: string, submodulePath: string): Promise<string | undefined> {\n\t\t// Verify the path is a submodule (gitlink commit) in the parent tree, not just a regular directory\n\t\tconst treeEntry = await this.getTreeEntryForRevision(repoPath, submodulePath, 'HEAD');\n\t\tif (treeEntry?.type !== 'commit') return undefined;\n\n\t\tconst [relativePath, root] = splitPath(submodulePath, repoPath);\n\t\tconst submoduleFullPath = this.provider.getAbsoluteUri(relativePath, root).fsPath;\n\n\t\tconst result = await this.git.run({ cwd: submoduleFullPath, errors: 'ignore' }, 'rev-parse', 'HEAD');\n\t\tconst sha = result.stdout.trim();\n\t\treturn sha || undefined;\n\t}\n\n\t@gate()\n\t@debug({ quiet: true })\n\tasync getTreeEntryForRevision(repoPath: string, path: string, rev: string): Promise<GitTreeEntry | undefined> {\n\t\tif (!repoPath || !path) return undefined;\n\n\t\tconst [relativePath, root] = splitPath(path, repoPath);\n\n\t\tif (isUncommittedStaged(rev)) {\n\t\t\tlet result = await this.git.run(\n\t\t\t\t{ cwd: root, errors: 'ignore' },\n\t\t\t\t'ls-files',\n\t\t\t\t'-z',\n\t\t\t\t'--stage',\n\t\t\t\t'--',\n\t\t\t\t// Literal, or a glob-like name could read the entry of a different file that it matches\n\t\t\t\t`:(literal)${relativePath}`,\n\t\t\t);\n\n\t\t\tconst entries = parseGitLsFilesStaged(result.stdout, true);\n\t\t\tif (entries.length === 0) return undefined;\n\n\t\t\tconst entry = entries[0];\n\t\t\tresult = await this.git.run({ cwd: root }, 'cat-file', '-s', entry.oid);\n\t\t\tconst size = parseInt(result.stdout.trim(), 10) || 0;\n\n\t\t\treturn { ref: rev, oid: entry.oid, path: relativePath, size: size, type: 'blob' };\n\t\t}\n\n\t\tconst [entry] = await this.getTreeForRevisionCore(repoPath, rev, path);\n\t\treturn entry;\n\t}\n\n\t@debug({ quiet: true })\n\tasync getTrackedFiles(\n\t\trepoPath: string,\n\t\toptions?: { paths?: readonly string[] },\n\t\tcancellation?: AbortSignal,\n\t): Promise<string[]> {\n\t\tif (!repoPath) return [];\n\n\t\tconst paths = options?.paths;\n\t\t// No pathspec means \"everything\" to git, which is not what an empty list asks for\n\t\tif (paths != null && !paths.length) return [];\n\n\t\tconst prefix = ['ls-files', '-z'];\n\t\t// A single run when unscoped, otherwise batched to stay under the command-line length limit\n\t\tconst batches = paths != null ? batchLiteralPathspecs(paths, prefix) : [undefined];\n\n\t\t// Unmerged entries are listed once per stage, and a path can sit under more than one scope\n\t\tconst files = new Set<string>();\n\t\tfor (const batch of batches) {\n\t\t\tconst result = await this.git.run(\n\t\t\t\t{ cwd: repoPath, errors: 'ignore', cancellation: cancellation },\n\t\t\t\t...prefix,\n\t\t\t\t...(batch != null ? ['--', ...batch] : []),\n\t\t\t);\n\t\t\t// `errors: 'ignore'` resolves an abort as an empty listing, which would read as a folder with no files\n\t\t\tif (result.completion.status === 'cancelled' || cancellation?.aborted) throw new CancellationError();\n\n\t\t\tfor (const file of iterateByDelimiter(result.stdout, '\\0')) {\n\t\t\t\tif (file) {\n\t\t\t\t\tfiles.add(file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn [...files];\n\t}\n\n\t@debug({ quiet: true })\n\tasync getTreeForRevision(\n\t\trepoPath: string,\n\t\trev: string,\n\t\toptions?: { paths?: readonly string[] },\n\t\tcancellation?: AbortSignal,\n\t): Promise<GitTreeEntry[]> {\n\t\tif (!repoPath) return [];\n\n\t\tconst paths = options?.paths;\n\t\tif (paths == null) return this.getTreeForRevisionCore(repoPath, rev, undefined, undefined, cancellation);\n\t\t// No pathspec means \"everything\" to git, which is not what an empty list asks for\n\t\tif (!paths.length) return [];\n\n\t\t// A scope's ancestor folders are listed with it, and a path can sit under more than one scope\n\t\tconst seen = new Set<string>();\n\t\tconst entries: GitTreeEntry[] = [];\n\t\tfor (const batch of batchLiteralPathspecs(paths, ['ls-tree', '-lrt', rev])) {\n\t\t\tfor (const entry of await this.getTreeForRevisionCore(repoPath, rev, undefined, batch, cancellation)) {\n\t\t\t\tif (!seen.has(entry.path)) {\n\t\t\t\t\tseen.add(entry.path);\n\t\t\t\t\tentries.push(entry);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn entries;\n\t}\n\n\t/**\n\t * A read with a signal skips the gate, whose default key can't tell signals apart (one caller's abort would cancel\n\t * another's read) and which keeps an instance property per key for good (a key per signal would grow without end).\n\t * `git.run` still joins such a read to an identical one with the same signal\n\t */\n\tprivate getTreeForRevisionCore(\n\t\trepoPath: string,\n\t\trev: string,\n\t\tpath?: string,\n\t\tpathspecs?: readonly string[],\n\t\tcancellation?: AbortSignal,\n\t): Promise<GitTreeEntry[]> {\n\t\treturn cancellation != null\n\t\t\t? this.lsTree(repoPath, rev, path, pathspecs, cancellation)\n\t\t\t: this.getTreeForRevisionGated(repoPath, rev, path, pathspecs);\n\t}\n\n\t@gate()\n\tprivate getTreeForRevisionGated(\n\t\trepoPath: string,\n\t\trev: string,\n\t\tpath?: string,\n\t\tpathspecs?: readonly string[],\n\t): Promise<GitTreeEntry[]> {\n\t\treturn this.lsTree(repoPath, rev, path, pathspecs);\n\t}\n\n\tprivate async lsTree(\n\t\trepoPath: string,\n\t\trev: string,\n\t\tpath?: string,\n\t\tpathspecs?: readonly string[],\n\t\tcancellation?: AbortSignal,\n\t): Promise<GitTreeEntry[]> {\n\t\tconst hasPath = Boolean(path);\n\t\tconst args = hasPath\n\t\t\t? ['ls-tree', '-l', rev, '--', path]\n\t\t\t: ['ls-tree', '-lrt', rev, '--', ...(pathspecs ?? [])];\n\t\tconst result = await this.git.run({ cwd: repoPath, errors: 'ignore', cancellation: cancellation }, ...args);\n\t\t// `errors: 'ignore'` resolves an abort as an empty tree, which would read as a folder with no entries\n\t\tif (result.completion.status === 'cancelled' || cancellation?.aborted) throw new CancellationError();\n\n\t\tconst data = result.stdout.trim();\n\t\tif (!data) return emptyArray as GitTreeEntry[];\n\n\t\treturn parseGitTree(data, rev, hasPath);\n\t}\n\n\tprivate async showContentCore<T extends string | Buffer>(\n\t\trepoPath: string | undefined,\n\t\tpath: string,\n\t\trev: string,\n\t\toptions?: {\n\t\t\tencoding?: string;\n\t\t\terrors?: GitErrorHandling;\n\t\t},\n\t): Promise<T | undefined> {\n\t\tconst [file, root] = splitPath(path, repoPath, true);\n\n\t\tif (isUncommittedStaged(rev)) {\n\t\t\trev = ':';\n\t\t}\n\t\tif (isUncommitted(rev)) throw new Error(`ref=${rev} is uncommitted`);\n\n\t\tconst opts: GitRunOptions = {\n\t\t\tconfigs: gitConfigsLog,\n\t\t\tcwd: root,\n\t\t\tencoding: options?.encoding ?? 'utf8',\n\t\t\terrors: 'throw',\n\t\t};\n\t\tconst args = rev.endsWith(':') ? `${rev}./${file}` : `${rev}:./${file}`;\n\t\tconst params = ['show', '--textconv', args, '--'];\n\n\t\ttry {\n\t\t\tconst result = await this.git.run<T>(opts, ...params);\n\t\t\treturn result.stdout;\n\t\t} catch (ex) {\n\t\t\tconst msg: string = ex?.toString() ?? '';\n\t\t\tif (rev === ':' && GitErrors.badRevision.test(msg)) {\n\t\t\t\treturn this.showContentCore<T>(repoPath, path, 'HEAD:', options);\n\t\t\t}\n\n\t\t\tconst error = getGitCommandError(\n\t\t\t\t'show',\n\t\t\t\tex,\n\t\t\t\treason =>\n\t\t\t\t\tnew ShowError(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treason: reason ?? 'other',\n\t\t\t\t\t\t\trev: rev,\n\t\t\t\t\t\t\tpath: path,\n\t\t\t\t\t\t\tgitCommand: { repoPath: repoPath ?? '', args: params },\n\t\t\t\t\t\t},\n\t\t\t\t\t\tex,\n\t\t\t\t\t),\n\t\t\t);\n\t\t\tif (options?.errors === 'throw') throw error;\n\n\t\t\tif (\n\t\t\t\tShowError.is(error, 'invalidObject') ||\n\t\t\t\tShowError.is(error, 'invalidRevision') ||\n\t\t\t\tShowError.is(error, 'notFound') ||\n\t\t\t\tShowError.is(error, 'notInRevision')\n\t\t\t) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tdefaultExceptionHandler(ex, opts.cwd);\n\t\t\treturn '' as T;\n\t\t}\n\t}\n\n\t@debug({ quiet: true, args: (repoPath, shas) => ({ repoPath: repoPath, shas: `${shas.size} value(s)` }) })\n\tasync resolveShas(repoPath: string, shas: ReadonlySet<string>, cancellation?: AbortSignal): Promise<Set<string>> {\n\t\tconst resolved = new Set<string>();\n\t\tconst prefixes: string[] = [];\n\n\t\tfor (const value of shas) {\n\t\t\t// Pure hex 4-40 chars: resolve to full commit SHA(s) via disambiguation. Everything else\n\t\t\t// (refs, suffixed SHAs like `^`/`~1`/`:path`, non-hex, <4 hex) passes through unchanged.\n\t\t\tif (/^[0-9a-f]{4,40}$/i.test(value)) {\n\t\t\t\tprefixes.push(value);\n\t\t\t} else {\n\t\t\t\tresolved.add(value);\n\t\t\t}\n\t\t}\n\n\t\tif (prefixes.length) {\n\t\t\t// List every object (any type) whose id starts with any prefix (empty + exit 0 if none)\n\t\t\tconst rp = await this.git.run(\n\t\t\t\t{ cwd: repoPath, cancellation: cancellation, errors: 'ignore' },\n\t\t\t\t'rev-parse',\n\t\t\t\t...prefixes.map(p => `--disambiguate=${p}`),\n\t\t\t);\n\t\t\tconst oids = rp.stdout.split('\\n').filter(Boolean);\n\t\t\tif (oids.length) {\n\t\t\t\t// `--disambiguate` has no type filter, so keep only commit objects\n\t\t\t\tconst cf = await this.git.run(\n\t\t\t\t\t{ cwd: repoPath, cancellation: cancellation, errors: 'ignore', stdin: `${oids.join('\\n')}\\n` },\n\t\t\t\t\t'cat-file',\n\t\t\t\t\t'--batch-check=%(objectname) %(objecttype)',\n\t\t\t\t);\n\t\t\t\tfor (const line of cf.stdout.split('\\n')) {\n\t\t\t\t\tconst [oid, type] = line.split(' ');\n\t\t\t\t\tif (type === 'commit') {\n\t\t\t\t\t\tresolved.add(oid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn resolved;\n\t}\n\n\t@debug({ quiet: true })\n\tasync resolveRevision(\n\t\trepoPath: string,\n\t\tref: string,\n\t\tpathOrUri?: string | Uri,\n\t\toptions?: { force?: boolean },\n\t): Promise<ResolvedRevision> {\n\t\tconst path = pathOrUri != null ? toFsPath(pathOrUri) : undefined;\n\t\tif (!ref || ref === deletedOrMissing) return { sha: ref, revision: ref };\n\n\t\tif (path == null) {\n\t\t\tif (isSha(ref)) return { sha: ref, revision: ref };\n\t\t\tif (ref.endsWith('^3')) return { sha: ref, revision: ref };\n\t\t} else if (isUncommitted(ref)) {\n\t\t\t// Uncommitted refs depend on index/working-tree state — resolve without caching\n\t\t\treturn this.resolveRevisionCore(repoPath, ref, path);\n\t\t}\n\n\t\t// Kept until a change report clears it, and a ref name resolves to wherever it pointed when first read, so\n\t\t// validated as the refs' reads are (see `Cache.setReadValidator`)\n\t\tconst validation = this.cache.validateBeforeRead(repoPath);\n\t\tif (validation != null) {\n\t\t\tawait validation;\n\t\t}\n\n\t\tconst key = path != null ? `${ref}|${this.provider.getRelativePath(path, repoPath)}` : ref;\n\t\tif (options?.force) {\n\t\t\t// Hard-delete first: a later caller must never join a read that started before this one.\n\t\t\tthis.cache.resolvedRevisions.delete(repoPath, key);\n\t\t}\n\n\t\treturn this.cache.resolvedRevisions.getOrCreate(repoPath, key, () =>\n\t\t\tthis.resolveRevisionCore(repoPath, ref, path, options?.force),\n\t\t);\n\t}\n\n\tprivate async resolveRevisionCore(\n\t\trepoPath: string,\n\t\tref: string,\n\t\tpath: string | undefined,\n\t\tforce?: boolean,\n\t): Promise<ResolvedRevision> {\n\t\tif (path == null) {\n\t\t\tconst sha = await this.provider.refs.validateReference(repoPath, ref, force ? { force: true } : undefined);\n\t\t\tif (sha == null) return { sha: ref, revision: ref };\n\n\t\t\treturn {\n\t\t\t\tsha: sha,\n\t\t\t\t// If it looks like non-sha like then preserve it as the friendly name\n\t\t\t\trevision: isRevisionWithSuffix(ref) ? sha : ref,\n\t\t\t};\n\t\t}\n\n\t\tif (isUncommittedWithParentSuffix(ref)) {\n\t\t\tref = 'HEAD';\n\t\t}\n\t\tconst relativePath = this.provider.getRelativePath(path, repoPath);\n\n\t\tif (isUncommitted(ref)) {\n\t\t\tif (!isUncommittedStaged(ref)) {\n\t\t\t\treturn { sha: ref, revision: ref };\n\t\t\t}\n\n\t\t\t// Ensure that the file is actually staged\n\t\t\tconst status = await this.provider.status.getStatusForFile?.(repoPath, relativePath, { renames: false });\n\t\t\tif (status?.indexStatus) return { sha: ref, revision: ref };\n\n\t\t\tref = 'HEAD';\n\t\t}\n\n\t\tconst resolvedRevisionCaching = { cache: this.cache.gitResults, options: { accessTTL: 5 * 60 * 1000 } };\n\n\t\tconst parser = getShaAndFileSummaryLogParser();\n\t\tlet result = await this.git.run(\n\t\t\t// Forced here only: this read is keyed by `ref`, which can move; the follow-up below is keyed by a sha\n\t\t\t{ cwd: repoPath, errors: 'ignore', caching: { ...resolvedRevisionCaching, force: force } },\n\t\t\t'log',\n\t\t\t...parser.arguments,\n\t\t\t'-n1',\n\t\t\tref,\n\t\t\t'--',\n\t\t\trelativePath,\n\t\t);\n\n\t\tlet commit = first(parser.parse(result.stdout));\n\t\tlet file = commit?.files.find(f => f.path === relativePath);\n\t\tif (file == null) {\n\t\t\treturn {\n\t\t\t\tsha: commit?.sha ?? deletedOrMissing,\n\t\t\t\t// If it looks like non-sha like then preserve it as the friendly name\n\t\t\t\trevision: isRevisionWithSuffix(ref) ? (commit?.sha ?? ref) : ref,\n\t\t\t};\n\t\t}\n\n\t\tif (file.status === 'A') {\n\t\t\treturn {\n\t\t\t\tsha: commit?.sha ?? deletedOrMissing,\n\t\t\t\t// If it looks like non-sha like then preserve it as the friendly name\n\t\t\t\trevision: isRevisionWithSuffix(ref) ? (commit?.sha ?? ref) : ref,\n\t\t\t\tstatus: file.status as GitFileStatus,\n\t\t\t\toriginalPath: file.originalPath,\n\t\t\t};\n\t\t}\n\n\t\tif (file.status === 'D') {\n\t\t\t// If the file was deleted, check if it was moved or renamed\n\t\t\tresult = await this.git.run(\n\t\t\t\t{ cwd: repoPath, errors: 'ignore', caching: resolvedRevisionCaching },\n\t\t\t\t'log',\n\t\t\t\t...parser.arguments,\n\t\t\t\t'-n1',\n\n\t\t\t\tcommit!.sha,\n\t\t\t\t'--',\n\t\t\t);\n\n\t\t\tcommit = first(parser.parse(result.stdout));\n\t\t\tfile = commit?.files.find(f => f.path === relativePath || f.originalPath === relativePath);\n\t\t\tif (file == null) {\n\t\t\t\treturn {\n\t\t\t\t\tsha: commit?.sha ?? deletedOrMissing,\n\t\t\t\t\t// If it looks like non-sha like then preserve it as the friendly name\n\t\t\t\t\trevision: isRevisionWithSuffix(ref) ? (commit?.sha ?? ref) : ref,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tsha: commit?.sha ?? deletedOrMissing,\n\t\t\t\t// If it looks like non-sha like without a suffix then preserve it as the friendly name\n\t\t\t\trevision: isRevisionWithSuffix(ref) ? (commit?.sha ?? ref) : ref,\n\t\t\t\tstatus: file.status as GitFileStatus,\n\t\t\t\tpath: file.path,\n\t\t\t\toriginalPath: file.originalPath,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tsha: commit?.sha ?? deletedOrMissing,\n\t\t\t// If it looks like non-sha like then preserve it as the friendly name\n\t\t\trevision: isRevisionWithSuffix(ref) ? (commit?.sha ?? ref) : ref,\n\t\t\tstatus: file.status as GitFileStatus,\n\t\t\toriginalPath: file.originalPath,\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAoCA,MAAM,aAAsC,OAAO,OAAO,CAAC,CAAC;AAE5D,IAAa,yBAAb,MAAsE;CAEnD;CACA;CACA;CACA;CAJlB,YACC,SACA,KACA,OACA,UACC;EAJgB,KAAA,UAAA;EACA,KAAA,MAAA;EACA,KAAA,QAAA;EACA,KAAA,WAAA;CACf;CAEH,OACC,UACA,MACA,cACmB;EACnB,IAAI;EACJ,IAAI;EACJ,IAAI,OAAO,iBAAiB,UAC3B,MAAM;OACA,IAAI,gBAAgB,MAC1B,YAAY,aAAa;EAG1B,MAAM,WAAW,GAAG,KAAK,IAAI,OAAO,GAAG,IAAI,aAAa;EACxD,OAAO,KAAK,MAAM,cAAc,YAAY,UAAU,UAAU,YAAY;GAC3E,MAAM,OAAO,CAAC,UAAU;GACxB,IAAI,KAAK;IACR,IAAI,CAAC,cAAc,GAAG,GACrB,KAAK,KAAK,eAAe,KAAK;SACxB,IAAI,oBAAoB,GAAG,GACjC,KAAK,KAAK,SAAS;GAErB,OAAO,IAAI,cAAc,QACxB,KAAK,KAAK,IAAI;QACR,IAAI,cAAc,WAExB,KAAK,KAAK,MAAM,IAAI;GAIrB,MAAM,SAAS,MAAM,KAAK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AAA,uBAAA,WAAA,cAAA,IAAA;AAiGN,WAAA,CAAA,MAAM,EAAE,OAAO,KAAK,CAAC,CAAA,GAAA,uBAAA,WAAA,mBAAA,IAAA;AAcrB,WAAA,CAAA,KAAK,GACL,MAAM,EAAE,OAAO,KAAK,CAAC,CAAA,GAAA,uBAAA,WAAA,sBAAA,IAAA;AAMrB,WAAA,CAAA,MAAM,EAAE,OAAO,KAAK,CAAC,CAAA,GAAA,uBAAA,WAAA,oBAAA,IAAA;AAcrB,WAAA,CAAA,KAAK,GACL,MAAM,EAAE,OAAO,KAAK,CAAC,CAAA,GAAA,uBAAA,WAAA,2BAAA,IAAA;AA+BrB,WAAA,CAAA,MAAM,EAAE,OAAO,KAAK,CAAC,CAAA,GAAA,uBAAA,WAAA,mBAAA,IAAA;AAoCrB,WAAA,CAAA,MAAM,EAAE,OAAO,KAAK,CAAC,CAAA,GAAA,uBAAA,WAAA,sBAAA,IAAA;AA6CrB,WAAA,CAAA,KAAK,CAAA,GAAA,uBAAA,WAAA,2BAAA,IAAA;AA+FL,WAAA,CAAA,MAAM;CAAE,OAAO;CAAM,OAAO,UAAU,UAAU;EAAY;EAAU,MAAM,GAAG,KAAK,KAAK;CAAW;AAAG,CAAC,CAAA,GAAA,uBAAA,WAAA,eAAA,IAAA;AA0CxG,WAAA,CAAA,MAAM,EAAE,OAAO,KAAK,CAAC,CAAA,GAAA,uBAAA,WAAA,mBAAA,IAAA"}
1
+ {"version":3,"file":"revision.js","names":[],"sources":["../../../../git-cli/src/providers/revision.ts"],"sourcesContent":["import type { Cache } from '@gitlens/git/cache.js';\nimport type { GitServiceContext } from '@gitlens/git/context.js';\nimport { ShowError } from '@gitlens/git/errors.js';\nimport type { GitFileStatus } from '@gitlens/git/models/fileStatus.js';\nimport { deletedOrMissing } from '@gitlens/git/models/revision.js';\nimport type { GitTreeEntry } from '@gitlens/git/models/tree.js';\nimport type { GitRevisionSubProvider, ResolvedRevision } from '@gitlens/git/providers/revision.js';\nimport {\n\tisRevisionWithSuffix,\n\tisSha,\n\tisUncommitted,\n\tisUncommittedStaged,\n\tisUncommittedWithParentSuffix,\n} from '@gitlens/git/utils/revision.utils.js';\nimport { CancellationError } from '@gitlens/utils/cancellation.js';\nimport { gate } from '@gitlens/utils/decorators/gate.js';\nimport { debug } from '@gitlens/utils/decorators/log.js';\nimport { first } from '@gitlens/utils/iterable.js';\nimport { joinPaths, splitPath } from '@gitlens/utils/path.js';\nimport { iterateByDelimiter } from '@gitlens/utils/string.js';\nimport type { Uri } from '@gitlens/utils/uri.js';\nimport { toFsPath } from '@gitlens/utils/uri.js';\nimport type { CliGitProviderInternal } from '../cliGitProvider.js';\nimport type { GitErrorHandling, GitRunOptions } from '../exec/exec.types.js';\nimport type { Git } from '../exec/git.js';\nimport {\n\tbatchLiteralPathspecs,\n\tdefaultExceptionHandler,\n\tgetGitCommandError,\n\tgitConfigsLog,\n\tGitErrors,\n} from '../exec/git.js';\nimport { parseGitLsFilesStaged } from '../parsers/indexParser.js';\nimport { getShaAndFileSummaryLogParser } from '../parsers/logParser.js';\nimport { parseGitTree } from '../parsers/treeParser.js';\n\nconst emptyArray: readonly GitTreeEntry[] = Object.freeze([]);\n\nexport class RevisionGitSubProvider implements GitRevisionSubProvider {\n\tconstructor(\n\t\tprivate readonly context: GitServiceContext,\n\t\tprivate readonly git: Git,\n\t\tprivate readonly cache: Cache,\n\t\tprivate readonly provider: CliGitProviderInternal,\n\t) {}\n\n\texists(\n\t\trepoPath: string,\n\t\tpath: string,\n\t\trevOrOptions?: string | { untracked?: 'only' | 'include' },\n\t): Promise<boolean> {\n\t\tlet rev: string | undefined;\n\t\tlet untracked: 'only' | 'include' | undefined;\n\t\tif (typeof revOrOptions === 'string') {\n\t\t\trev = revOrOptions;\n\t\t} else if (revOrOptions != null) {\n\t\t\tuntracked = revOrOptions.untracked;\n\t\t}\n\n\t\tconst cacheKey = `${path}\\0${rev ?? ''}\\0${untracked ?? ''}`;\n\t\treturn this.cache.fileExistence.getOrCreate(repoPath, cacheKey, async () => {\n\t\t\tconst args = ['ls-files'];\n\t\t\tif (rev) {\n\t\t\t\tif (!isUncommitted(rev)) {\n\t\t\t\t\targs.push(`--with-tree=${rev}`);\n\t\t\t\t} else if (isUncommittedStaged(rev)) {\n\t\t\t\t\targs.push('--stage');\n\t\t\t\t}\n\t\t\t} else if (untracked === 'only') {\n\t\t\t\targs.push('-o');\n\t\t\t} else if (untracked === 'include') {\n\t\t\t\t// Tracked (cached) OR untracked (others)\n\t\t\t\targs.push('-c', '-o');\n\t\t\t}\n\n\t\t\t// Literal, or a missing `[id]/page.tsx` would count as existing whenever `i/page.tsx` does\n\t\t\tconst result = await this.git.run({ cwd: repoPath, errors: 'ignore' }, ...args, '--', `:(literal)${path}`);\n\t\t\treturn Boolean(result.stdout.trim());\n\t\t});\n\t}\n\n\t@debug()\n\tasync getBlobIds(\n\t\trepoPath: string,\n\t\tpaths: readonly string[],\n\t\tsource: 'index' | 'working',\n\t\tcancellation?: AbortSignal,\n\t): Promise<Map<string, string>> {\n\t\tconst ids = new Map<string, string>();\n\t\tif (paths.length === 0) return ids;\n\n\t\tif (source === 'index') {\n\t\t\t// Literal pathspecs, so a file named like `[id]/page.tsx` doesn't also match `i/page.tsx`\n\t\t\tconst prefix = ['ls-files', '-z', '--stage'];\n\t\t\tfor (const batch of batchLiteralPathspecs(paths, prefix)) {\n\t\t\t\tconst result = await this.git.run(\n\t\t\t\t\t{ cwd: repoPath, cancellation: cancellation, errors: 'ignore' },\n\t\t\t\t\t...prefix,\n\t\t\t\t\t'--',\n\t\t\t\t\t...batch,\n\t\t\t\t);\n\t\t\t\tfor (const entry of parseGitLsFilesStaged(result.stdout, false)) {\n\t\t\t\t\t// A conflicted path lists one entry per stage; the first is as good an identity as any\n\t\t\t\t\tif (!ids.has(entry.path)) {\n\t\t\t\t\t\tids.set(entry.path, entry.oid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn ids;\n\t\t}\n\n\t\t// `hash-object` without `-w` computes ids without storing anything; `--stdin-paths` hashes them\n\t\t// all in one process, printing one line per path in input order. A path it can't hash (a\n\t\t// submodule, a directory, a missing or unreadable file) ends the run right there, after the ids\n\t\t// of the paths before it — so the first missing line names the culprit, and the rest resume in\n\t\t// a new run after it.\n\t\tconst unhashable: string[] = [];\n\t\tlet start = 0;\n\t\twhile (start < paths.length) {\n\t\t\tconst pending = paths.slice(start);\n\t\t\tconst result = await this.git.run(\n\t\t\t\t{ cwd: repoPath, cancellation: cancellation, errors: 'ignore', stdin: `${pending.join('\\n')}\\n` },\n\t\t\t\t'hash-object',\n\t\t\t\t'--stdin-paths',\n\t\t\t);\n\t\t\tconst lines = result.stdout.split('\\n');\n\t\t\tlet hashed = 0;\n\t\t\twhile (hashed < pending.length) {\n\t\t\t\tconst oid = lines[hashed]?.trim();\n\t\t\t\tif (!oid) break;\n\n\t\t\t\tids.set(pending[hashed], oid);\n\t\t\t\thashed++;\n\t\t\t}\n\t\t\tif (hashed === pending.length) break;\n\t\t\t// Only a run that exited with an error stopped at a path; a cancelled or never-started one\n\t\t\t// says nothing about which path is to blame\n\t\t\tif (result.completion.status !== 'exited' || result.completion.code === 0) break;\n\n\t\t\tunhashable.push(pending[hashed]);\n\t\t\tstart += hashed + 1;\n\t\t}\n\n\t\tif (unhashable.length && !cancellation?.aborted) {\n\t\t\tawait Promise.all(\n\t\t\t\tunhashable.map(async path => {\n\t\t\t\t\tconst oid = await this.getCheckedOutSubmoduleCommit(repoPath, path, cancellation);\n\t\t\t\t\tif (oid) {\n\t\t\t\t\t\tids.set(path, oid);\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t\treturn ids;\n\t}\n\n\t/** The commit checked out in the submodule at `path` — what the index records for it too, so its id\n\t * moves when the submodule does. Anything else that couldn't be hashed has no id. */\n\tprivate async getCheckedOutSubmoduleCommit(\n\t\trepoPath: string,\n\t\tpath: string,\n\t\tcancellation: AbortSignal | undefined,\n\t): Promise<string | undefined> {\n\t\t// Inside a plain directory git finds the outer repository and reports a non-empty prefix (`dir/`);\n\t\t// only the top of a repository of its own answers with an empty one\n\t\tconst result = await this.git.run(\n\t\t\t{ cwd: joinPaths(repoPath, path), cancellation: cancellation, errors: 'ignore' },\n\t\t\t'rev-parse',\n\t\t\t'--show-prefix',\n\t\t\t'HEAD',\n\t\t);\n\t\tif (result.completion.status !== 'exited' || result.completion.code !== 0) return undefined;\n\n\t\tconst [prefix, sha] = result.stdout.split('\\n');\n\t\treturn prefix === '' ? sha?.trim() || undefined : undefined;\n\t}\n\n\t/** `hash-object` without `-w` computes the id in the repository's format without storing anything */\n\t@debug({ quiet: true })\n\tgetEmptyTreeSha(repoPath: string): Promise<string> {\n\t\treturn this.cache.getEmptyTreeSha(repoPath, async () => {\n\t\t\tconst result = await this.git.run(\n\t\t\t\t{ cwd: repoPath, stdin: '', errors: 'throw' },\n\t\t\t\t'hash-object',\n\t\t\t\t'-t',\n\t\t\t\t'tree',\n\t\t\t\t'--stdin',\n\t\t\t);\n\t\t\treturn result.stdout.trim();\n\t\t});\n\t}\n\n\t@gate()\n\t@debug({ quiet: true })\n\tgetRevisionContent(repoPath: string, path: string, rev: string): Promise<Uint8Array | undefined> {\n\t\tconst [relativePath, root] = splitPath(path, repoPath);\n\t\treturn this.showContentCore<Buffer>(root, relativePath, rev, { encoding: 'buffer', errors: 'throw' });\n\t}\n\n\t@debug({ quiet: true })\n\tasync getSubmoduleHead(repoPath: string, submodulePath: string): Promise<string | undefined> {\n\t\t// Verify the path is a submodule (gitlink commit) in the parent tree, not just a regular directory\n\t\tconst treeEntry = await this.getTreeEntryForRevision(repoPath, submodulePath, 'HEAD');\n\t\tif (treeEntry?.type !== 'commit') return undefined;\n\n\t\tconst [relativePath, root] = splitPath(submodulePath, repoPath);\n\t\tconst submoduleFullPath = this.provider.getAbsoluteUri(relativePath, root).fsPath;\n\n\t\tconst result = await this.git.run({ cwd: submoduleFullPath, errors: 'ignore' }, 'rev-parse', 'HEAD');\n\t\tconst sha = result.stdout.trim();\n\t\treturn sha || undefined;\n\t}\n\n\t@gate()\n\t@debug({ quiet: true })\n\tasync getTreeEntryForRevision(repoPath: string, path: string, rev: string): Promise<GitTreeEntry | undefined> {\n\t\tif (!repoPath || !path) return undefined;\n\n\t\tconst [relativePath, root] = splitPath(path, repoPath);\n\n\t\tif (isUncommittedStaged(rev)) {\n\t\t\tlet result = await this.git.run(\n\t\t\t\t{ cwd: root, errors: 'ignore' },\n\t\t\t\t'ls-files',\n\t\t\t\t'-z',\n\t\t\t\t'--stage',\n\t\t\t\t'--',\n\t\t\t\t// Literal, or a glob-like name could read the entry of a different file that it matches\n\t\t\t\t`:(literal)${relativePath}`,\n\t\t\t);\n\n\t\t\tconst entries = parseGitLsFilesStaged(result.stdout, true);\n\t\t\tif (entries.length === 0) return undefined;\n\n\t\t\tconst entry = entries[0];\n\t\t\tresult = await this.git.run({ cwd: root }, 'cat-file', '-s', entry.oid);\n\t\t\tconst size = parseInt(result.stdout.trim(), 10) || 0;\n\n\t\t\treturn { ref: rev, oid: entry.oid, path: relativePath, size: size, type: 'blob' };\n\t\t}\n\n\t\tconst [entry] = await this.getTreeForRevisionCore(repoPath, rev, path);\n\t\treturn entry;\n\t}\n\n\t@debug({ quiet: true })\n\tasync getTrackedFiles(\n\t\trepoPath: string,\n\t\toptions?: { paths?: readonly string[] },\n\t\tcancellation?: AbortSignal,\n\t): Promise<string[]> {\n\t\tif (!repoPath) return [];\n\n\t\tconst paths = options?.paths;\n\t\t// No pathspec means \"everything\" to git, which is not what an empty list asks for\n\t\tif (paths != null && !paths.length) return [];\n\n\t\tconst prefix = ['ls-files', '-z'];\n\t\t// A single run when unscoped, otherwise batched to stay under the command-line length limit\n\t\tconst batches = paths != null ? batchLiteralPathspecs(paths, prefix) : [undefined];\n\n\t\t// Unmerged entries are listed once per stage, and a path can sit under more than one scope\n\t\tconst files = new Set<string>();\n\t\tfor (const batch of batches) {\n\t\t\tconst result = await this.git.run(\n\t\t\t\t{ cwd: repoPath, errors: 'ignore', cancellation: cancellation },\n\t\t\t\t...prefix,\n\t\t\t\t...(batch != null ? ['--', ...batch] : []),\n\t\t\t);\n\t\t\t// `errors: 'ignore'` resolves an abort as an empty listing, which would read as a folder with no files\n\t\t\tif (result.completion.status === 'cancelled' || cancellation?.aborted) throw new CancellationError();\n\n\t\t\tfor (const file of iterateByDelimiter(result.stdout, '\\0')) {\n\t\t\t\tif (file) {\n\t\t\t\t\tfiles.add(file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn [...files];\n\t}\n\n\t@debug({ quiet: true })\n\tasync getTrackedFilesRaw(repoPath: string, cancellation?: AbortSignal): Promise<Uint8Array> {\n\t\tconst result = await this.git.run<Buffer>(\n\t\t\t{ cwd: repoPath, cancellation: cancellation, errors: 'throw', encoding: 'buffer' },\n\t\t\t'ls-files',\n\t\t\t'-z',\n\t\t);\n\t\treturn result.stdout;\n\t}\n\n\t@debug({ quiet: true })\n\tasync getTreeForRevision(\n\t\trepoPath: string,\n\t\trev: string,\n\t\toptions?: { paths?: readonly string[] },\n\t\tcancellation?: AbortSignal,\n\t): Promise<GitTreeEntry[]> {\n\t\tif (!repoPath) return [];\n\n\t\tconst paths = options?.paths;\n\t\tif (paths == null) return this.getTreeForRevisionCore(repoPath, rev, undefined, undefined, cancellation);\n\t\t// No pathspec means \"everything\" to git, which is not what an empty list asks for\n\t\tif (!paths.length) return [];\n\n\t\t// A scope's ancestor folders are listed with it, and a path can sit under more than one scope\n\t\tconst seen = new Set<string>();\n\t\tconst entries: GitTreeEntry[] = [];\n\t\tfor (const batch of batchLiteralPathspecs(paths, ['ls-tree', '-lrt', rev])) {\n\t\t\tfor (const entry of await this.getTreeForRevisionCore(repoPath, rev, undefined, batch, cancellation)) {\n\t\t\t\tif (!seen.has(entry.path)) {\n\t\t\t\t\tseen.add(entry.path);\n\t\t\t\t\tentries.push(entry);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn entries;\n\t}\n\n\t/**\n\t * A read with a signal skips the gate, whose default key can't tell signals apart (one caller's abort would cancel\n\t * another's read) and which keeps an instance property per key for good (a key per signal would grow without end).\n\t * `git.run` still joins such a read to an identical one with the same signal\n\t */\n\tprivate getTreeForRevisionCore(\n\t\trepoPath: string,\n\t\trev: string,\n\t\tpath?: string,\n\t\tpathspecs?: readonly string[],\n\t\tcancellation?: AbortSignal,\n\t): Promise<GitTreeEntry[]> {\n\t\treturn cancellation != null\n\t\t\t? this.lsTree(repoPath, rev, path, pathspecs, cancellation)\n\t\t\t: this.getTreeForRevisionGated(repoPath, rev, path, pathspecs);\n\t}\n\n\t@gate()\n\tprivate getTreeForRevisionGated(\n\t\trepoPath: string,\n\t\trev: string,\n\t\tpath?: string,\n\t\tpathspecs?: readonly string[],\n\t): Promise<GitTreeEntry[]> {\n\t\treturn this.lsTree(repoPath, rev, path, pathspecs);\n\t}\n\n\tprivate async lsTree(\n\t\trepoPath: string,\n\t\trev: string,\n\t\tpath?: string,\n\t\tpathspecs?: readonly string[],\n\t\tcancellation?: AbortSignal,\n\t): Promise<GitTreeEntry[]> {\n\t\tconst hasPath = Boolean(path);\n\t\tconst args = hasPath\n\t\t\t? ['ls-tree', '-l', rev, '--', path]\n\t\t\t: ['ls-tree', '-lrt', rev, '--', ...(pathspecs ?? [])];\n\t\tconst result = await this.git.run({ cwd: repoPath, errors: 'ignore', cancellation: cancellation }, ...args);\n\t\t// `errors: 'ignore'` resolves an abort as an empty tree, which would read as a folder with no entries\n\t\tif (result.completion.status === 'cancelled' || cancellation?.aborted) throw new CancellationError();\n\n\t\tconst data = result.stdout.trim();\n\t\tif (!data) return emptyArray as GitTreeEntry[];\n\n\t\treturn parseGitTree(data, rev, hasPath);\n\t}\n\n\tprivate async showContentCore<T extends string | Buffer>(\n\t\trepoPath: string | undefined,\n\t\tpath: string,\n\t\trev: string,\n\t\toptions?: {\n\t\t\tencoding?: string;\n\t\t\terrors?: GitErrorHandling;\n\t\t},\n\t): Promise<T | undefined> {\n\t\tconst [file, root] = splitPath(path, repoPath, true);\n\n\t\tif (isUncommittedStaged(rev)) {\n\t\t\trev = ':';\n\t\t}\n\t\tif (isUncommitted(rev)) throw new Error(`ref=${rev} is uncommitted`);\n\n\t\tconst opts: GitRunOptions = {\n\t\t\tconfigs: gitConfigsLog,\n\t\t\tcwd: root,\n\t\t\tencoding: options?.encoding ?? 'utf8',\n\t\t\terrors: 'throw',\n\t\t};\n\t\tconst args = rev.endsWith(':') ? `${rev}./${file}` : `${rev}:./${file}`;\n\t\tconst params = ['show', '--textconv', args, '--'];\n\n\t\ttry {\n\t\t\tconst result = await this.git.run<T>(opts, ...params);\n\t\t\treturn result.stdout;\n\t\t} catch (ex) {\n\t\t\tconst msg: string = ex?.toString() ?? '';\n\t\t\tif (rev === ':' && GitErrors.badRevision.test(msg)) {\n\t\t\t\treturn this.showContentCore<T>(repoPath, path, 'HEAD:', options);\n\t\t\t}\n\n\t\t\tconst error = getGitCommandError(\n\t\t\t\t'show',\n\t\t\t\tex,\n\t\t\t\treason =>\n\t\t\t\t\tnew ShowError(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treason: reason ?? 'other',\n\t\t\t\t\t\t\trev: rev,\n\t\t\t\t\t\t\tpath: path,\n\t\t\t\t\t\t\tgitCommand: { repoPath: repoPath ?? '', args: params },\n\t\t\t\t\t\t},\n\t\t\t\t\t\tex,\n\t\t\t\t\t),\n\t\t\t);\n\t\t\tif (options?.errors === 'throw') throw error;\n\n\t\t\tif (\n\t\t\t\tShowError.is(error, 'invalidObject') ||\n\t\t\t\tShowError.is(error, 'invalidRevision') ||\n\t\t\t\tShowError.is(error, 'notFound') ||\n\t\t\t\tShowError.is(error, 'notInRevision')\n\t\t\t) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tdefaultExceptionHandler(ex, opts.cwd);\n\t\t\treturn '' as T;\n\t\t}\n\t}\n\n\t@debug({ quiet: true, args: (repoPath, shas) => ({ repoPath: repoPath, shas: `${shas.size} value(s)` }) })\n\tasync resolveShas(repoPath: string, shas: ReadonlySet<string>, cancellation?: AbortSignal): Promise<Set<string>> {\n\t\tconst resolved = new Set<string>();\n\t\tconst prefixes: string[] = [];\n\n\t\tfor (const value of shas) {\n\t\t\t// Pure hex 4-40 chars: resolve to full commit SHA(s) via disambiguation. Everything else\n\t\t\t// (refs, suffixed SHAs like `^`/`~1`/`:path`, non-hex, <4 hex) passes through unchanged.\n\t\t\tif (/^[0-9a-f]{4,40}$/i.test(value)) {\n\t\t\t\tprefixes.push(value);\n\t\t\t} else {\n\t\t\t\tresolved.add(value);\n\t\t\t}\n\t\t}\n\n\t\tif (prefixes.length) {\n\t\t\t// List every object (any type) whose id starts with any prefix (empty + exit 0 if none)\n\t\t\tconst rp = await this.git.run(\n\t\t\t\t{ cwd: repoPath, cancellation: cancellation, errors: 'ignore' },\n\t\t\t\t'rev-parse',\n\t\t\t\t...prefixes.map(p => `--disambiguate=${p}`),\n\t\t\t);\n\t\t\tconst oids = rp.stdout.split('\\n').filter(Boolean);\n\t\t\tif (oids.length) {\n\t\t\t\t// `--disambiguate` has no type filter, so keep only commit objects\n\t\t\t\tconst cf = await this.git.run(\n\t\t\t\t\t{ cwd: repoPath, cancellation: cancellation, errors: 'ignore', stdin: `${oids.join('\\n')}\\n` },\n\t\t\t\t\t'cat-file',\n\t\t\t\t\t'--batch-check=%(objectname) %(objecttype)',\n\t\t\t\t);\n\t\t\t\tfor (const line of cf.stdout.split('\\n')) {\n\t\t\t\t\tconst [oid, type] = line.split(' ');\n\t\t\t\t\tif (type === 'commit') {\n\t\t\t\t\t\tresolved.add(oid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn resolved;\n\t}\n\n\t@debug({ quiet: true })\n\tasync resolveRevision(\n\t\trepoPath: string,\n\t\tref: string,\n\t\tpathOrUri?: string | Uri,\n\t\toptions?: { force?: boolean },\n\t): Promise<ResolvedRevision> {\n\t\tconst path = pathOrUri != null ? toFsPath(pathOrUri) : undefined;\n\t\tif (!ref || ref === deletedOrMissing) return { sha: ref, revision: ref };\n\n\t\tif (path == null) {\n\t\t\tif (isSha(ref)) return { sha: ref, revision: ref };\n\t\t\tif (ref.endsWith('^3')) return { sha: ref, revision: ref };\n\t\t} else if (isUncommitted(ref)) {\n\t\t\t// Uncommitted refs depend on index/working-tree state — resolve without caching\n\t\t\treturn this.resolveRevisionCore(repoPath, ref, path);\n\t\t}\n\n\t\t// Kept until a change report clears it, and a ref name resolves to wherever it pointed when first read, so\n\t\t// validated as the refs' reads are (see `Cache.setReadValidator`)\n\t\tconst validation = this.cache.validateBeforeRead(repoPath);\n\t\tif (validation != null) {\n\t\t\tawait validation;\n\t\t}\n\n\t\tconst key = path != null ? `${ref}|${this.provider.getRelativePath(path, repoPath)}` : ref;\n\t\tif (options?.force) {\n\t\t\t// Hard-delete first: a later caller must never join a read that started before this one.\n\t\t\tthis.cache.resolvedRevisions.delete(repoPath, key);\n\t\t}\n\n\t\treturn this.cache.resolvedRevisions.getOrCreate(repoPath, key, () =>\n\t\t\tthis.resolveRevisionCore(repoPath, ref, path, options?.force),\n\t\t);\n\t}\n\n\tprivate async resolveRevisionCore(\n\t\trepoPath: string,\n\t\tref: string,\n\t\tpath: string | undefined,\n\t\tforce?: boolean,\n\t): Promise<ResolvedRevision> {\n\t\tif (path == null) {\n\t\t\tconst sha = await this.provider.refs.validateReference(repoPath, ref, force ? { force: true } : undefined);\n\t\t\tif (sha == null) return { sha: ref, revision: ref };\n\n\t\t\treturn {\n\t\t\t\tsha: sha,\n\t\t\t\t// If it looks like non-sha like then preserve it as the friendly name\n\t\t\t\trevision: isRevisionWithSuffix(ref) ? sha : ref,\n\t\t\t};\n\t\t}\n\n\t\tif (isUncommittedWithParentSuffix(ref)) {\n\t\t\tref = 'HEAD';\n\t\t}\n\t\tconst relativePath = this.provider.getRelativePath(path, repoPath);\n\n\t\tif (isUncommitted(ref)) {\n\t\t\tif (!isUncommittedStaged(ref)) {\n\t\t\t\treturn { sha: ref, revision: ref };\n\t\t\t}\n\n\t\t\t// Ensure that the file is actually staged\n\t\t\tconst status = await this.provider.status.getStatusForFile?.(repoPath, relativePath, { renames: false });\n\t\t\tif (status?.indexStatus) return { sha: ref, revision: ref };\n\n\t\t\tref = 'HEAD';\n\t\t}\n\n\t\tconst resolvedRevisionCaching = { cache: this.cache.gitResults, options: { accessTTL: 5 * 60 * 1000 } };\n\n\t\tconst parser = getShaAndFileSummaryLogParser();\n\t\tlet result = await this.git.run(\n\t\t\t// Forced here only: this read is keyed by `ref`, which can move; the follow-up below is keyed by a sha\n\t\t\t{ cwd: repoPath, errors: 'ignore', caching: { ...resolvedRevisionCaching, force: force } },\n\t\t\t'log',\n\t\t\t...parser.arguments,\n\t\t\t'-n1',\n\t\t\tref,\n\t\t\t'--',\n\t\t\trelativePath,\n\t\t);\n\n\t\tlet commit = first(parser.parse(result.stdout));\n\t\tlet file = commit?.files.find(f => f.path === relativePath);\n\t\tif (file == null) {\n\t\t\treturn {\n\t\t\t\tsha: commit?.sha ?? deletedOrMissing,\n\t\t\t\t// If it looks like non-sha like then preserve it as the friendly name\n\t\t\t\trevision: isRevisionWithSuffix(ref) ? (commit?.sha ?? ref) : ref,\n\t\t\t};\n\t\t}\n\n\t\tif (file.status === 'A') {\n\t\t\treturn {\n\t\t\t\tsha: commit?.sha ?? deletedOrMissing,\n\t\t\t\t// If it looks like non-sha like then preserve it as the friendly name\n\t\t\t\trevision: isRevisionWithSuffix(ref) ? (commit?.sha ?? ref) : ref,\n\t\t\t\tstatus: file.status as GitFileStatus,\n\t\t\t\toriginalPath: file.originalPath,\n\t\t\t};\n\t\t}\n\n\t\tif (file.status === 'D') {\n\t\t\t// If the file was deleted, check if it was moved or renamed\n\t\t\tresult = await this.git.run(\n\t\t\t\t{ cwd: repoPath, errors: 'ignore', caching: resolvedRevisionCaching },\n\t\t\t\t'log',\n\t\t\t\t...parser.arguments,\n\t\t\t\t'-n1',\n\n\t\t\t\tcommit!.sha,\n\t\t\t\t'--',\n\t\t\t);\n\n\t\t\tcommit = first(parser.parse(result.stdout));\n\t\t\tfile = commit?.files.find(f => f.path === relativePath || f.originalPath === relativePath);\n\t\t\tif (file == null) {\n\t\t\t\treturn {\n\t\t\t\t\tsha: commit?.sha ?? deletedOrMissing,\n\t\t\t\t\t// If it looks like non-sha like then preserve it as the friendly name\n\t\t\t\t\trevision: isRevisionWithSuffix(ref) ? (commit?.sha ?? ref) : ref,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tsha: commit?.sha ?? deletedOrMissing,\n\t\t\t\t// If it looks like non-sha like without a suffix then preserve it as the friendly name\n\t\t\t\trevision: isRevisionWithSuffix(ref) ? (commit?.sha ?? ref) : ref,\n\t\t\t\tstatus: file.status as GitFileStatus,\n\t\t\t\tpath: file.path,\n\t\t\t\toriginalPath: file.originalPath,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tsha: commit?.sha ?? deletedOrMissing,\n\t\t\t// If it looks like non-sha like then preserve it as the friendly name\n\t\t\trevision: isRevisionWithSuffix(ref) ? (commit?.sha ?? ref) : ref,\n\t\t\tstatus: file.status as GitFileStatus,\n\t\t\toriginalPath: file.originalPath,\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAoCA,MAAM,aAAsC,OAAO,OAAO,CAAC,CAAC;AAE5D,IAAa,yBAAb,MAAsE;CAEnD;CACA;CACA;CACA;CAJlB,YACC,SACA,KACA,OACA,UACC;EAJgB,KAAA,UAAA;EACA,KAAA,MAAA;EACA,KAAA,QAAA;EACA,KAAA,WAAA;CACf;CAEH,OACC,UACA,MACA,cACmB;EACnB,IAAI;EACJ,IAAI;EACJ,IAAI,OAAO,iBAAiB,UAC3B,MAAM;OACA,IAAI,gBAAgB,MAC1B,YAAY,aAAa;EAG1B,MAAM,WAAW,GAAG,KAAK,IAAI,OAAO,GAAG,IAAI,aAAa;EACxD,OAAO,KAAK,MAAM,cAAc,YAAY,UAAU,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UAAU,UAAU;EAAY;EAAU,MAAM,GAAG,KAAK,KAAK;CAAW;AAAG,CAAC,CAAA,GAAA,uBAAA,WAAA,eAAA,IAAA;AA0CxG,WAAA,CAAA,MAAM,EAAE,OAAO,KAAK,CAAC,CAAA,GAAA,uBAAA,WAAA,mBAAA,IAAA"}
@@ -1,5 +1,55 @@
1
1
  //#region ../plus/ai/src/models/model.ts
2
2
  const openAIModels = (provider) => [
3
+ {
4
+ id: "gpt-6.1-sol",
5
+ name: "GPT-6.1 Sol",
6
+ maxTokens: {
7
+ input: 922e3,
8
+ output: 128e3
9
+ },
10
+ provider,
11
+ temperature: null
12
+ },
13
+ {
14
+ id: "gpt-6.1-terra",
15
+ name: "GPT-6.1 Terra",
16
+ maxTokens: {
17
+ input: 922e3,
18
+ output: 128e3
19
+ },
20
+ provider,
21
+ temperature: null
22
+ },
23
+ {
24
+ id: "gpt-6-astra",
25
+ name: "GPT-6 Astra",
26
+ maxTokens: {
27
+ input: 922e3,
28
+ output: 128e3
29
+ },
30
+ provider,
31
+ temperature: null
32
+ },
33
+ {
34
+ id: "gpt-6-sol",
35
+ name: "GPT-6 Sol",
36
+ maxTokens: {
37
+ input: 922e3,
38
+ output: 128e3
39
+ },
40
+ provider,
41
+ temperature: null
42
+ },
43
+ {
44
+ id: "gpt-6-luna",
45
+ name: "GPT-6 Luna",
46
+ maxTokens: {
47
+ input: 922e3,
48
+ output: 128e3
49
+ },
50
+ provider,
51
+ temperature: null
52
+ },
3
53
  {
4
54
  id: "gpt-5.6",
5
55
  name: "GPT-5.6 Sol",
@@ -45,7 +95,8 @@ const openAIModels = (provider) => [
45
95
  input: 922e3,
46
96
  output: 128e3
47
97
  },
48
- provider
98
+ provider,
99
+ hidden: true
49
100
  },
50
101
  {
51
102
  id: "gpt-5.5-pro",
@@ -64,7 +115,8 @@ const openAIModels = (provider) => [
64
115
  input: 922e3,
65
116
  output: 128e3
66
117
  },
67
- provider
118
+ provider,
119
+ hidden: true
68
120
  },
69
121
  {
70
122
  id: "gpt-5.4-mini",
@@ -73,7 +125,8 @@ const openAIModels = (provider) => [
73
125
  input: 272e3,
74
126
  output: 128e3
75
127
  },
76
- provider
128
+ provider,
129
+ hidden: true
77
130
  },
78
131
  {
79
132
  id: "gpt-5.4-nano",
@@ -82,7 +135,8 @@ const openAIModels = (provider) => [
82
135
  input: 272e3,
83
136
  output: 128e3
84
137
  },
85
- provider
138
+ provider,
139
+ hidden: true
86
140
  },
87
141
  {
88
142
  id: "gpt-5.3-codex",
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","names":[],"sources":["../../../../../plus/ai/src/models/model.ts"],"sourcesContent":["import type { AIPrimaryProviders, AIProviders, OpenAIProviders } from '../constants.js';\n\nexport interface AIModel<Provider extends AIProviders = AIProviders, Model extends string = string> {\n\treadonly id: Model;\n\treadonly name: string;\n\treadonly maxTokens: { readonly input: number; readonly output: number | undefined };\n\treadonly provider: {\n\t\treadonly id: Provider;\n\t\treadonly name: string;\n\t};\n\n\treadonly default?: boolean;\n\treadonly hidden?: boolean;\n\n\treadonly temperature?: number | null;\n\n\treadonly consumptionRateLabel?: string;\n\n\t/** Whether the model supports native structured output (JSON schema); absent means capable\n\t * (new models default on). Populated by dynamic catalogs (GitKraken, OpenRouter) and set to\n\t * false on legacy static-registry entries; provider-wide gaps override the provider hook */\n\treadonly supportsStructuredOutputs?: boolean;\n}\n\nexport interface AIModelDescriptor<Provider extends AIProviders = AIProviders, Model extends string = string> {\n\treadonly provider: Provider;\n\treadonly model: Model;\n}\n\nexport type AIActionType =\n\t| 'explain-changes'\n\t| 'review-changes'\n\t| 'review-orient'\n\t| 'generate-commitMessage'\n\t| 'generate-stashMessage'\n\t| 'generate-changelog'\n\t| `generate-create-${'cloudPatch' | 'pullRequest'}`\n\t| 'generate-commits'\n\t| 'conflict-resolution'\n\t| 'generate-searchQuery';\n\nexport interface AIProviderDescriptor<T extends AIProviders = AIProviders> {\n\treadonly id: T;\n\treadonly name: string;\n\treadonly primary: T extends AIPrimaryProviders ? true : false;\n\treadonly requiresAccount: boolean;\n\treadonly requiresUserKey: boolean;\n\n\treadonly type?: never;\n}\n\nexport interface AIProviderDescriptorWithConfiguration<\n\tT extends AIProviders = AIProviders,\n> extends AIProviderDescriptor<T> {\n\treadonly configured: boolean;\n}\n\nexport const openAIModels = <T extends OpenAIProviders>(provider: AIProviderDescriptor<T>): AIModel<T>[] => [\n\t{\n\t\tid: 'gpt-5.6',\n\t\tname: 'GPT-5.6 Sol',\n\t\tmaxTokens: { input: 922000, output: 128000 }, // 1.05M context, but OpenAI caps input at 922k\n\t\tprovider: provider,\n\t},\n\t{\n\t\tid: 'gpt-5.6-sol',\n\t\tname: 'GPT-5.6 Sol',\n\t\tmaxTokens: { input: 922000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5.6-terra',\n\t\tname: 'GPT-5.6 Terra',\n\t\tmaxTokens: { input: 922000, output: 128000 },\n\t\tprovider: provider,\n\t},\n\t{\n\t\tid: 'gpt-5.6-luna',\n\t\tname: 'GPT-5.6 Luna',\n\t\tmaxTokens: { input: 922000, output: 128000 },\n\t\tprovider: provider,\n\t\tdefault: true,\n\t},\n\t{\n\t\tid: 'gpt-5.5',\n\t\tname: 'GPT-5.5',\n\t\tmaxTokens: { input: 922000, output: 128000 },\n\t\tprovider: provider,\n\t},\n\t{\n\t\tid: 'gpt-5.5-pro',\n\t\tname: 'GPT-5.5 Pro',\n\t\tmaxTokens: { input: 922000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5.4',\n\t\tname: 'GPT-5.4',\n\t\tmaxTokens: { input: 922000, output: 128000 },\n\t\tprovider: provider,\n\t},\n\t{\n\t\tid: 'gpt-5.4-mini',\n\t\tname: 'GPT-5.4 mini',\n\t\tmaxTokens: { input: 272000, output: 128000 },\n\t\tprovider: provider,\n\t},\n\t{\n\t\tid: 'gpt-5.4-nano',\n\t\tname: 'GPT-5.4 nano',\n\t\tmaxTokens: { input: 272000, output: 128000 },\n\t\tprovider: provider,\n\t},\n\t{\n\t\tid: 'gpt-5.3-codex',\n\t\tname: 'GPT-5.3 Codex',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5.2',\n\t\tname: 'GPT-5.2',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5.2-2025-12-11',\n\t\tname: 'GPT-5.2 (2025-12-11)',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5.1',\n\t\tname: 'GPT-5.1',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5.1-2025-11-13',\n\t\tname: 'GPT-5.1 (2025-11-13)',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5',\n\t\tname: 'GPT-5',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5-2025-08-07',\n\t\tname: 'GPT-5 (2025-08-07)',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5-mini',\n\t\tname: 'GPT-5 mini',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5-mini-2025-08-07',\n\t\tname: 'GPT-5 mini (2025-08-07)',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5-nano',\n\t\tname: 'GPT-5 nano',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5-nano-2025-08-07',\n\t\tname: 'GPT-5 nano (2025-08-07)',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5-pro',\n\t\tname: 'GPT-5 Pro',\n\t\tmaxTokens: { input: 400000, output: 272000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5-pro-2025-10-06',\n\t\tname: 'GPT-5 Pro (2025-10-06)',\n\t\tmaxTokens: { input: 400000, output: 272000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4.1',\n\t\tname: 'GPT-4.1',\n\t\tmaxTokens: { input: 1047576, output: 32768 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4.1-2025-04-14',\n\t\tname: 'GPT-4.1 (2025-04-14)',\n\t\tmaxTokens: { input: 1047576, output: 32768 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4.1-mini',\n\t\tname: 'GPT-4.1 mini',\n\t\tmaxTokens: { input: 1047576, output: 32768 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4.1-mini-2025-04-14',\n\t\tname: 'GPT-4.1 mini (2025-04-14)',\n\t\tmaxTokens: { input: 1047576, output: 32768 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4.1-nano',\n\t\tname: 'GPT-4.1 nano',\n\t\tmaxTokens: { input: 1047576, output: 32768 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4.1-nano-2025-04-14',\n\t\tname: 'GPT-4.1 nano (2025-04-14)',\n\t\tmaxTokens: { input: 1047576, output: 32768 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o4-mini',\n\t\tname: 'o4 mini',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o4-mini-2025-04-16',\n\t\tname: 'o4 mini (2025-04-16)',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o3-deep-research',\n\t\tname: 'o3 Deep Research',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o3-deep-research-2025-06-26',\n\t\tname: 'o3 Deep Research (2025-06-26)',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o3',\n\t\tname: 'o3',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o3-2025-04-16',\n\t\tname: 'o3 (2025-04-16)',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o3-pro',\n\t\tname: 'o3 Pro',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o3-mini',\n\t\tname: 'o3 mini',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o3-mini-2025-01-31',\n\t\tname: 'o3 mini (2025-01-31)',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o1',\n\t\tname: 'o1',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o1-2024-12-17',\n\t\tname: 'o1 (2024-12-17)',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o1-preview',\n\t\tname: 'o1 preview',\n\t\tmaxTokens: { input: 128000, output: 32768 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'o1-preview-2024-09-12',\n\t\tname: 'o1 preview (2024-09-12)',\n\t\tmaxTokens: { input: 128000, output: 32768 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'o1-mini',\n\t\tname: 'o1 mini',\n\t\tmaxTokens: { input: 128000, output: 65536 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'o1-mini-2024-09-12',\n\t\tname: 'o1 mini (2024-09-12)',\n\t\tmaxTokens: { input: 128000, output: 65536 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4o',\n\t\tname: 'GPT-4o',\n\t\tmaxTokens: { input: 128000, output: 16384 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4o-2024-11-20',\n\t\tname: 'GPT-4o (2024-11-20)',\n\t\tmaxTokens: { input: 128000, output: 16384 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4o-2024-08-06',\n\t\tname: 'GPT-4o (2024-08-06)',\n\t\tmaxTokens: { input: 128000, output: 16384 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4o-2024-05-13',\n\t\tname: 'GPT-4o (2024-05-13)',\n\t\tmaxTokens: { input: 128000, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\t// json_schema needs gpt-4o-2024-08-06+ (or o1+); the flagged legacy ids reject it with a 400\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'chatgpt-4o-latest',\n\t\tname: 'GPT-4o',\n\t\tmaxTokens: { input: 128000, output: 16384 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4o-mini',\n\t\tname: 'GPT-4o mini',\n\t\tmaxTokens: { input: 128000, output: 16384 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4o-mini-2024-07-18',\n\t\tname: 'GPT-4o mini (2024-07-18)',\n\t\tmaxTokens: { input: 128000, output: 16384 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4-turbo',\n\t\tname: 'GPT-4 Turbo',\n\t\tmaxTokens: { input: 128000, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4-turbo-2024-04-09',\n\t\tname: 'GPT-4 Turbo preview (2024-04-09)',\n\t\tmaxTokens: { input: 128000, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4-turbo-preview',\n\t\tname: 'GPT-4 Turbo preview',\n\t\tmaxTokens: { input: 128000, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4-0125-preview',\n\t\tname: 'GPT-4 0125 preview',\n\t\tmaxTokens: { input: 128000, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4-1106-preview',\n\t\tname: 'GPT-4 1106 preview',\n\t\tmaxTokens: { input: 128000, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4',\n\t\tname: 'GPT-4',\n\t\tmaxTokens: { input: 8192, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4-0613',\n\t\tname: 'GPT-4 0613',\n\t\tmaxTokens: { input: 8192, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4-32k',\n\t\tname: 'GPT-4 32k',\n\t\tmaxTokens: { input: 32768, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4-32k-0613',\n\t\tname: 'GPT-4 32k 0613',\n\t\tmaxTokens: { input: 32768, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-3.5-turbo',\n\t\tname: 'GPT-3.5 Turbo',\n\t\tmaxTokens: { input: 16385, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-3.5-turbo-0125',\n\t\tname: 'GPT-3.5 Turbo 0125',\n\t\tmaxTokens: { input: 16385, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-3.5-turbo-1106',\n\t\tname: 'GPT-3.5 Turbo 1106',\n\t\tmaxTokens: { input: 16385, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-3.5-turbo-16k',\n\t\tname: 'GPT-3.5 Turbo 16k',\n\t\tmaxTokens: { input: 16385, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n];\n"],"mappings":";AAyDA,MAAa,gBAA2C,aAAoD;CAC3G;EACC,IAAI;EACJ,MAAM;EACN,WAAW;GAAE,OAAO;GAAQ,QAAQ;EAAO;EACjC;CACX;CACA;EACC,IAAI;EACJ,MAAM;EACN,WAAW;GAAE,OAAO;GAAQ,QAAQ;EAAO;EACjC;EACV,QAAQ;CACT;CACA;EACC,IAAI;EACJ,MAAM;EACN,WAAW;GAAE,OAAO;GAAQ,QAAQ;EAAO;EACjC;CACX;CACA;EACC,IAAI;EACJ,MAAM;EACN,WAAW;GAAE,OAAO;GAAQ,QAAQ;EAAO;EACjC;EACV,SAAS;CACV;CACA;EACC,IAAI;EACJ,MAAM;EACN,WAAW;GAAE,OAAO;GAAQ,QAAQ;EAAO;EACjC;CACX;CACA;EACC,IAAI;EACJ,MAAM;EACN,WAAW;GAAE,OAAO;GAAQ,QAAQ;EAAO;EACjC;EACV,QAAQ;CACT;CACA;EACC,IAAI;EACJ,MAAM;EACN,WAAW;GAAE,OAAO;GAAQ,QAAQ;EAAO;EACjC;CACX;CACA;EACC,IAAI;EACJ,MAAM;EACN,WAAW;GAAE,OAAO;GAAQ,QAAQ;EAAO;EACjC;CACX;CACA;EACC,IAAI;EACJ,MAAM;EACN,WAAW;GAAE,OAAO;GAAQ,QAAQ;EAAO;EACjC;CACX;CACA;EACC,IAAI;EACJ,MAAM;EACN,WAAW;GAAE,OAAO;GAAQ,QAAQ;EAAO;EACjC;EACV,QAAQ;CACT;CACA;EACC,IAAI;EACJ,MAAM;EACN,WAAW;GAAE,OAAO;GAAQ,QAAQ;EAAO;EACjC;EACV,QAAQ;CACT;CACA;EAC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AAW;GAAE,OAAO;GAAO,QAAQ;EAAK;EAC9B;EACV,QAAQ;EACR,2BAA2B;CAC5B;CACA;EACC,IAAI;EACJ,MAAM;EACN,WAAW;GAAE,OAAO;GAAO,QAAQ;EAAK;EAC9B;EACV,QAAQ;EACR,2BAA2B;CAC5B;CACA;EACC,IAAI;EACJ,MAAM;EACN,WAAW;GAAE,OAAO;GAAO,QAAQ;EAAK;EAC9B;EACV,QAAQ;EACR,2BAA2B;CAC5B;CACA;EACC,IAAI;EACJ,MAAM;EACN,WAAW;GAAE,OAAO;GAAO,QAAQ;EAAK;EAC9B;EACV,QAAQ;EACR,2BAA2B;CAC5B;AACD"}
1
+ {"version":3,"file":"model.js","names":[],"sources":["../../../../../plus/ai/src/models/model.ts"],"sourcesContent":["import type { AIPrimaryProviders, AIProviders, OpenAIProviders } from '../constants.js';\n\nexport interface AIModel<Provider extends AIProviders = AIProviders, Model extends string = string> {\n\treadonly id: Model;\n\treadonly name: string;\n\treadonly maxTokens: { readonly input: number; readonly output: number | undefined };\n\treadonly provider: {\n\t\treadonly id: Provider;\n\t\treadonly name: string;\n\t};\n\n\treadonly default?: boolean;\n\treadonly hidden?: boolean;\n\n\treadonly temperature?: number | null;\n\n\treadonly consumptionRateLabel?: string;\n\n\t/** Whether the model supports native structured output (JSON schema); absent means capable\n\t * (new models default on). Populated by dynamic catalogs (GitKraken, OpenRouter) and set to\n\t * false on legacy static-registry entries; provider-wide gaps override the provider hook */\n\treadonly supportsStructuredOutputs?: boolean;\n}\n\nexport interface AIModelDescriptor<Provider extends AIProviders = AIProviders, Model extends string = string> {\n\treadonly provider: Provider;\n\treadonly model: Model;\n}\n\nexport type AIActionType =\n\t| 'explain-changes'\n\t| 'review-changes'\n\t| 'review-orient'\n\t| 'generate-commitMessage'\n\t| 'generate-stashMessage'\n\t| 'generate-changelog'\n\t| `generate-create-${'cloudPatch' | 'pullRequest'}`\n\t| 'generate-commits'\n\t| 'conflict-resolution'\n\t| 'generate-searchQuery';\n\nexport interface AIProviderDescriptor<T extends AIProviders = AIProviders> {\n\treadonly id: T;\n\treadonly name: string;\n\treadonly primary: T extends AIPrimaryProviders ? true : false;\n\treadonly requiresAccount: boolean;\n\treadonly requiresUserKey: boolean;\n\n\treadonly type?: never;\n}\n\nexport interface AIProviderDescriptorWithConfiguration<\n\tT extends AIProviders = AIProviders,\n> extends AIProviderDescriptor<T> {\n\treadonly configured: boolean;\n}\n\nexport const openAIModels = <T extends OpenAIProviders>(provider: AIProviderDescriptor<T>): AIModel<T>[] => [\n\t{\n\t\tid: 'gpt-6.1-sol',\n\t\tname: 'GPT-6.1 Sol',\n\t\tmaxTokens: { input: 922000, output: 128000 },\n\t\tprovider: provider,\n\t\ttemperature: null, // Sends no temperature, like GPT-5 — `getValidatedTemperature`'s `gpt-5` id check doesn't match GPT-6\n\t},\n\t{\n\t\tid: 'gpt-6.1-terra',\n\t\tname: 'GPT-6.1 Terra',\n\t\tmaxTokens: { input: 922000, output: 128000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t},\n\t{\n\t\tid: 'gpt-6-astra',\n\t\tname: 'GPT-6 Astra',\n\t\tmaxTokens: { input: 922000, output: 128000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t},\n\t{\n\t\tid: 'gpt-6-sol',\n\t\tname: 'GPT-6 Sol',\n\t\tmaxTokens: { input: 922000, output: 128000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t},\n\t{\n\t\tid: 'gpt-6-luna',\n\t\tname: 'GPT-6 Luna',\n\t\tmaxTokens: { input: 922000, output: 128000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t},\n\t{\n\t\tid: 'gpt-5.6',\n\t\tname: 'GPT-5.6 Sol',\n\t\tmaxTokens: { input: 922000, output: 128000 }, // 1.05M context, but OpenAI caps input at 922k\n\t\tprovider: provider,\n\t},\n\t{\n\t\tid: 'gpt-5.6-sol',\n\t\tname: 'GPT-5.6 Sol',\n\t\tmaxTokens: { input: 922000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5.6-terra',\n\t\tname: 'GPT-5.6 Terra',\n\t\tmaxTokens: { input: 922000, output: 128000 },\n\t\tprovider: provider,\n\t},\n\t{\n\t\tid: 'gpt-5.6-luna',\n\t\tname: 'GPT-5.6 Luna',\n\t\tmaxTokens: { input: 922000, output: 128000 },\n\t\tprovider: provider,\n\t\tdefault: true,\n\t},\n\t{\n\t\tid: 'gpt-5.5',\n\t\tname: 'GPT-5.5',\n\t\tmaxTokens: { input: 922000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5.5-pro',\n\t\tname: 'GPT-5.5 Pro',\n\t\tmaxTokens: { input: 922000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5.4',\n\t\tname: 'GPT-5.4',\n\t\tmaxTokens: { input: 922000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5.4-mini',\n\t\tname: 'GPT-5.4 mini',\n\t\tmaxTokens: { input: 272000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5.4-nano',\n\t\tname: 'GPT-5.4 nano',\n\t\tmaxTokens: { input: 272000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5.3-codex',\n\t\tname: 'GPT-5.3 Codex',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5.2',\n\t\tname: 'GPT-5.2',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5.2-2025-12-11',\n\t\tname: 'GPT-5.2 (2025-12-11)',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5.1',\n\t\tname: 'GPT-5.1',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5.1-2025-11-13',\n\t\tname: 'GPT-5.1 (2025-11-13)',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5',\n\t\tname: 'GPT-5',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5-2025-08-07',\n\t\tname: 'GPT-5 (2025-08-07)',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5-mini',\n\t\tname: 'GPT-5 mini',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5-mini-2025-08-07',\n\t\tname: 'GPT-5 mini (2025-08-07)',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5-nano',\n\t\tname: 'GPT-5 nano',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5-nano-2025-08-07',\n\t\tname: 'GPT-5 nano (2025-08-07)',\n\t\tmaxTokens: { input: 400000, output: 128000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5-pro',\n\t\tname: 'GPT-5 Pro',\n\t\tmaxTokens: { input: 400000, output: 272000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-5-pro-2025-10-06',\n\t\tname: 'GPT-5 Pro (2025-10-06)',\n\t\tmaxTokens: { input: 400000, output: 272000 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4.1',\n\t\tname: 'GPT-4.1',\n\t\tmaxTokens: { input: 1047576, output: 32768 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4.1-2025-04-14',\n\t\tname: 'GPT-4.1 (2025-04-14)',\n\t\tmaxTokens: { input: 1047576, output: 32768 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4.1-mini',\n\t\tname: 'GPT-4.1 mini',\n\t\tmaxTokens: { input: 1047576, output: 32768 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4.1-mini-2025-04-14',\n\t\tname: 'GPT-4.1 mini (2025-04-14)',\n\t\tmaxTokens: { input: 1047576, output: 32768 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4.1-nano',\n\t\tname: 'GPT-4.1 nano',\n\t\tmaxTokens: { input: 1047576, output: 32768 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4.1-nano-2025-04-14',\n\t\tname: 'GPT-4.1 nano (2025-04-14)',\n\t\tmaxTokens: { input: 1047576, output: 32768 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o4-mini',\n\t\tname: 'o4 mini',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o4-mini-2025-04-16',\n\t\tname: 'o4 mini (2025-04-16)',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o3-deep-research',\n\t\tname: 'o3 Deep Research',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o3-deep-research-2025-06-26',\n\t\tname: 'o3 Deep Research (2025-06-26)',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o3',\n\t\tname: 'o3',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o3-2025-04-16',\n\t\tname: 'o3 (2025-04-16)',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o3-pro',\n\t\tname: 'o3 Pro',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o3-mini',\n\t\tname: 'o3 mini',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o3-mini-2025-01-31',\n\t\tname: 'o3 mini (2025-01-31)',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o1',\n\t\tname: 'o1',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o1-2024-12-17',\n\t\tname: 'o1 (2024-12-17)',\n\t\tmaxTokens: { input: 200000, output: 100000 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'o1-preview',\n\t\tname: 'o1 preview',\n\t\tmaxTokens: { input: 128000, output: 32768 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'o1-preview-2024-09-12',\n\t\tname: 'o1 preview (2024-09-12)',\n\t\tmaxTokens: { input: 128000, output: 32768 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'o1-mini',\n\t\tname: 'o1 mini',\n\t\tmaxTokens: { input: 128000, output: 65536 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'o1-mini-2024-09-12',\n\t\tname: 'o1 mini (2024-09-12)',\n\t\tmaxTokens: { input: 128000, output: 65536 },\n\t\tprovider: provider,\n\t\ttemperature: null,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4o',\n\t\tname: 'GPT-4o',\n\t\tmaxTokens: { input: 128000, output: 16384 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4o-2024-11-20',\n\t\tname: 'GPT-4o (2024-11-20)',\n\t\tmaxTokens: { input: 128000, output: 16384 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4o-2024-08-06',\n\t\tname: 'GPT-4o (2024-08-06)',\n\t\tmaxTokens: { input: 128000, output: 16384 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4o-2024-05-13',\n\t\tname: 'GPT-4o (2024-05-13)',\n\t\tmaxTokens: { input: 128000, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\t// json_schema needs gpt-4o-2024-08-06+ (or o1+); the flagged legacy ids reject it with a 400\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'chatgpt-4o-latest',\n\t\tname: 'GPT-4o',\n\t\tmaxTokens: { input: 128000, output: 16384 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4o-mini',\n\t\tname: 'GPT-4o mini',\n\t\tmaxTokens: { input: 128000, output: 16384 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4o-mini-2024-07-18',\n\t\tname: 'GPT-4o mini (2024-07-18)',\n\t\tmaxTokens: { input: 128000, output: 16384 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'gpt-4-turbo',\n\t\tname: 'GPT-4 Turbo',\n\t\tmaxTokens: { input: 128000, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4-turbo-2024-04-09',\n\t\tname: 'GPT-4 Turbo preview (2024-04-09)',\n\t\tmaxTokens: { input: 128000, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4-turbo-preview',\n\t\tname: 'GPT-4 Turbo preview',\n\t\tmaxTokens: { input: 128000, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4-0125-preview',\n\t\tname: 'GPT-4 0125 preview',\n\t\tmaxTokens: { input: 128000, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4-1106-preview',\n\t\tname: 'GPT-4 1106 preview',\n\t\tmaxTokens: { input: 128000, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4',\n\t\tname: 'GPT-4',\n\t\tmaxTokens: { input: 8192, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4-0613',\n\t\tname: 'GPT-4 0613',\n\t\tmaxTokens: { input: 8192, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4-32k',\n\t\tname: 'GPT-4 32k',\n\t\tmaxTokens: { input: 32768, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-4-32k-0613',\n\t\tname: 'GPT-4 32k 0613',\n\t\tmaxTokens: { input: 32768, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-3.5-turbo',\n\t\tname: 'GPT-3.5 Turbo',\n\t\tmaxTokens: { input: 16385, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-3.5-turbo-0125',\n\t\tname: 'GPT-3.5 Turbo 0125',\n\t\tmaxTokens: { input: 16385, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-3.5-turbo-1106',\n\t\tname: 'GPT-3.5 Turbo 1106',\n\t\tmaxTokens: { input: 16385, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n\t{\n\t\tid: 'gpt-3.5-turbo-16k',\n\t\tname: 'GPT-3.5 Turbo 16k',\n\t\tmaxTokens: { input: 16385, output: 4096 },\n\t\tprovider: provider,\n\t\thidden: true,\n\t\tsupportsStructuredOutputs: false,\n\t},\n];\n"],"mappings":";AAyDA,MAAa,gBAA2C,aAAoD;CAC3G;EACC,IAAI;EACJ,MAAM;EACN,WAAW;GAAE,OAAO;GAAQ,QAAQ;EAAO;EACjC;EACV,aAAa;CACd;CACA;EACC,IAAI;EACJ,MAAM;EACN,WAAW;GAAE,OAAO;GAA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