mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-08 15:03:52 +00:00
27 lines
1.1 KiB
TypeScript
27 lines
1.1 KiB
TypeScript
// GitHub Copilot runtime plugin auto-install/repair helpers for model selections.
|
|
import { modelSelectionShouldEnsureCopilotRuntimePlugin } from "../agents/copilot-routing.js";
|
|
import { createRuntimePluginModelSelectionHelpers } from "./runtime-plugin-install.js";
|
|
|
|
export const COPILOT_RUNTIME_PLUGIN_ID = "copilot";
|
|
const COPILOT_RUNTIME_PLUGIN_LABEL = "GitHub Copilot agent runtime";
|
|
const COPILOT_RUNTIME_PLUGIN_NPM_SPEC = "@openclaw/copilot";
|
|
const COPILOT_RUNTIME_PLUGIN_DESCRIPTOR = {
|
|
pluginId: COPILOT_RUNTIME_PLUGIN_ID,
|
|
label: COPILOT_RUNTIME_PLUGIN_LABEL,
|
|
npmSpec: COPILOT_RUNTIME_PLUGIN_NPM_SPEC,
|
|
warningLabel: "GitHub Copilot",
|
|
};
|
|
|
|
const copilotRuntimePluginInstall = createRuntimePluginModelSelectionHelpers({
|
|
descriptor: COPILOT_RUNTIME_PLUGIN_DESCRIPTOR,
|
|
shouldEnsure: ({ cfg, model }) =>
|
|
modelSelectionShouldEnsureCopilotRuntimePlugin({
|
|
config: cfg,
|
|
model,
|
|
}),
|
|
});
|
|
|
|
export const ensureCopilotRuntimePluginForModelSelection = copilotRuntimePluginInstall.ensure;
|
|
export const repairCopilotRuntimePluginInstallForModelSelection =
|
|
copilotRuntimePluginInstall.repair;
|