feat(FN-3581): honor runtime model precedence for assigned agents
This merge delivers five major feature clusters: a fully rebuilt dependency graph plugin with draggable nodes, position persistence, modular architecture, highlighting and selection states, toolbar navigation, and keyboard controls; a new roadmap plugin with domain store, ordering logic, and compreh Fusion-Task-Id: FN-3581
This commit is contained in:
@@ -46,6 +46,32 @@ vi.mock("../agent-session-helpers.js", async () => {
|
||||
const hint = runtimeConfig?.runtimeHint;
|
||||
return typeof hint === "string" && hint.trim().length > 0 ? hint.trim() : undefined;
|
||||
},
|
||||
resolveExecutorSessionModel: (
|
||||
taskModelProvider: string | undefined,
|
||||
taskModelId: string | undefined,
|
||||
settings: Record<string, unknown> | undefined,
|
||||
assignedAgentRuntimeConfig?: Record<string, unknown>,
|
||||
) => {
|
||||
const model = typeof assignedAgentRuntimeConfig?.model === "string" ? assignedAgentRuntimeConfig.model : "";
|
||||
const slash = model.indexOf("/");
|
||||
if (slash > 0 && slash < model.length - 1) {
|
||||
return { provider: model.slice(0, slash), modelId: model.slice(slash + 1) };
|
||||
}
|
||||
if (taskModelProvider && taskModelId) return { provider: taskModelProvider, modelId: taskModelId };
|
||||
if (typeof settings?.executionProvider === "string" && typeof settings?.executionModelId === "string") {
|
||||
return { provider: settings.executionProvider as string, modelId: settings.executionModelId as string };
|
||||
}
|
||||
if (typeof settings?.executionGlobalProvider === "string" && typeof settings?.executionGlobalModelId === "string") {
|
||||
return { provider: settings.executionGlobalProvider as string, modelId: settings.executionGlobalModelId as string };
|
||||
}
|
||||
if (typeof settings?.defaultProviderOverride === "string" && typeof settings?.defaultModelIdOverride === "string") {
|
||||
return { provider: settings.defaultProviderOverride as string, modelId: settings.defaultModelIdOverride as string };
|
||||
}
|
||||
if (typeof settings?.defaultProvider === "string" && typeof settings?.defaultModelId === "string") {
|
||||
return { provider: settings.defaultProvider as string, modelId: settings.defaultModelId as string };
|
||||
}
|
||||
return { provider: undefined, modelId: undefined };
|
||||
},
|
||||
};
|
||||
});
|
||||
vi.mock("node:child_process", () => {
|
||||
|
||||
Reference in New Issue
Block a user