feat(FN-3195): document llama.cpp provider setup and onboarding
Docs(FN-3195): adds llama.cpp provider setup and onboarding documentation to the main and dashboard READMEs. Fusion-Task-Id: FN-3195
This commit is contained in:
@@ -54,6 +54,11 @@ import {
|
||||
resolveDroidCliExtensionPaths,
|
||||
setCachedDroidCliResolution,
|
||||
} from "./droid-cli-extension.js";
|
||||
import {
|
||||
getCachedLlamaCppResolution,
|
||||
resolveLlamaCppExtensionPaths,
|
||||
setCachedLlamaCppResolution,
|
||||
} from "./llama-cpp-extension.js";
|
||||
import { resolveSelfExtension } from "./self-extension.js";
|
||||
import { createReadOnlyAuthFileStorage, mergeAuthStorageReads, wrapAuthStorageWithApiKeyProviders } from "./provider-auth.js";
|
||||
import { getCodexCliAuthPath, getFusionAuthPath, getLegacyAuthPaths, getModelRegistryModelsPath, getPackageManagerAgentDir } from "./auth-paths.js";
|
||||
@@ -473,6 +478,24 @@ export async function runDaemon(opts: DaemonOptions = {}) {
|
||||
}
|
||||
})();
|
||||
|
||||
const llamaCppPaths = await (async () => {
|
||||
try {
|
||||
const globalSettings = await store.getGlobalSettingsStore().getSettings();
|
||||
const result = resolveLlamaCppExtensionPaths(globalSettings);
|
||||
setCachedLlamaCppResolution(result.resolution);
|
||||
if (result.warning) {
|
||||
console.warn(`[extensions] llama-cpp: ${result.warning}`);
|
||||
}
|
||||
return result.paths;
|
||||
} catch (err) {
|
||||
console.warn(
|
||||
`[extensions] Unable to evaluate useLlamaCpp setting: ${err instanceof Error ? err.message : String(err)}`,
|
||||
);
|
||||
setCachedLlamaCppResolution(null);
|
||||
return [];
|
||||
}
|
||||
})();
|
||||
|
||||
// Always prefer Fusion's vendored `@fusion/pi-claude-cli` over any
|
||||
// external `pi-claude-cli` install. Drops shadowing externals (e.g. a
|
||||
// global `npm install -g pi-claude-cli`) so the upstream's once-and-lock
|
||||
@@ -492,7 +515,7 @@ export async function runDaemon(opts: DaemonOptions = {}) {
|
||||
);
|
||||
|
||||
const extensionsResult = await discoverAndLoadExtensions(
|
||||
[...reconciledExtensionPaths, ...droidCliPaths],
|
||||
[...reconciledExtensionPaths, ...droidCliPaths, ...llamaCppPaths],
|
||||
cwd,
|
||||
join(cwd, ".fusion", "disabled-auto-extension-discovery"),
|
||||
);
|
||||
@@ -586,6 +609,17 @@ export async function runDaemon(opts: DaemonOptions = {}) {
|
||||
}
|
||||
return { status: r.status, reason: r.reason };
|
||||
},
|
||||
getLlamaCppExtensionStatus: () => {
|
||||
const r = getCachedLlamaCppResolution();
|
||||
if (!r) return null;
|
||||
if (r.status === "ok") {
|
||||
return { status: "ok", path: r.path, packageVersion: r.packageVersion };
|
||||
}
|
||||
if (r.status === "not-installed") {
|
||||
return { status: "not-installed" };
|
||||
}
|
||||
return { status: r.status, reason: r.reason };
|
||||
},
|
||||
onUseClaudeCliToggled: (_prev, next) => {
|
||||
if (!next) return;
|
||||
void (async () => {
|
||||
|
||||
Reference in New Issue
Block a user