@@ -8,12 +8,14 @@ import {BuildGpu, LlamaLogLevel} from "../../../../bindings/types.js";
88import { getPrettyBuildGpuName } from "../../../../bindings/consts.js" ;
99import { getModuleVersion } from "../../../../utils/getModuleVersion.js" ;
1010import { withCliCommandDescriptionDocsUrl } from "../../../utils/withCliCommandDescriptionDocsUrl.js" ;
11- import { documentationPageUrls } from "../../../../config.js" ;
11+ import { builtinLlamaCppGitHubRepo , documentationPageUrls } from "../../../../config.js" ;
1212import { Llama } from "../../../../bindings/Llama.js" ;
1313import { getPlatformInfo } from "../../../../bindings/utils/getPlatformInfo.js" ;
1414import { getLinuxDistroInfo } from "../../../../bindings/utils/getLinuxDistroInfo.js" ;
1515import { isRunningUnderRosetta } from "../../../utils/isRunningUnderRosetta.js" ;
1616import { toBytes } from "../../../utils/toBytes.js" ;
17+ import { getBinariesGithubRelease } from "../../../../bindings/utils/binariesGithubRelease.js" ;
18+ import { getClonedLlamaCppRepoReleaseInfo } from "../../../../bindings/utils/cloneLlamaCppRepo.js" ;
1719
1820type InspectGpuCommand = {
1921 // no options for now
@@ -74,8 +76,33 @@ export const InspectGpuCommand: CommandModule<object, InspectGpuCommand> = {
7476 try {
7577 const moduleVersion = await getModuleVersion ( ) ;
7678
77- if ( moduleVersion != null )
79+ if ( moduleVersion != null ) {
80+ console . info ( ) ;
7881 console . info ( `${ chalk . yellow ( "node-llama-cpp:" ) } ${ moduleVersion } ` ) ;
82+ }
83+ } catch ( err ) {
84+ // do nothing
85+ }
86+
87+ try {
88+ const prebuiltBinariesRelease = await getBinariesGithubRelease ( ) ;
89+
90+ console . info ( `${ chalk . yellow ( "Prebuilt binaries:" ) } ${ prebuiltBinariesRelease } ` ) ;
91+ } catch ( err ) {
92+ // do nothing
93+ }
94+
95+ try {
96+ const clonedLlamaCppRelease = await getClonedLlamaCppRepoReleaseInfo ( ) ;
97+
98+ if ( clonedLlamaCppRelease != null )
99+ console . info (
100+ `${ chalk . yellow ( "Cloned source:" ) } ${ clonedLlamaCppRelease . tag } ` + (
101+ clonedLlamaCppRelease . llamaCppGithubRepo !== builtinLlamaCppGitHubRepo
102+ ? ` (${ clonedLlamaCppRelease . llamaCppGithubRepo } )`
103+ : ""
104+ )
105+ ) ;
79106 } catch ( err ) {
80107 // do nothing
81108 }
0 commit comments