@gentbajko/slopify 1.4.0 → 1.4.1

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.
@@ -2,7 +2,7 @@ import { checkRuntimeModel } from "../../catalog/runtime-models.js";
2
2
  import { modelFields } from "../../catalog/validate.js";
3
3
  import { readinessIsUsable } from "../../kernel/ports/model.js";
4
4
  import { usesNarrationPreparation } from "../admission/rules.js";
5
- import { cliPathStatus } from "../settings/cli-paths.js";
5
+ import { cliPathChanged } from "../settings/cli-paths.js";
6
6
  import { hasKey, listVoices } from "../settings/repo.js";
7
7
  export function choices(runs) {
8
8
  const selected = runs
@@ -70,8 +70,7 @@ export function localDraftReadiness(deps, runs, providers) {
70
70
  const fields = runs.flatMap((run) => modelFields(run.draft, deps.catalogue));
71
71
  for (const c of choices(runs)) {
72
72
  const provider = providers.find((p) => p.id === c.provider && p.family === c.family);
73
- if (provider?.cliPath !== undefined &&
74
- cliPathStatus(deps.db, provider.id).command !== provider.cliPath.command)
73
+ if (cliPathChanged(deps.db, provider))
75
74
  fields.push({
76
75
  field: `${c.field}.cliPath`,
77
76
  message: "The configured CLI command changed. Check readiness again.",
@@ -1,6 +1,6 @@
1
1
  import { checkRuntimeModel } from "../../catalog/runtime-models.js";
2
2
  import { readinessIsUsable } from "../../kernel/ports/model.js";
3
- import { cliPathStatus } from "../settings/cli-paths.js";
3
+ import { cliPathChanged } from "../settings/cli-paths.js";
4
4
  import { isLocalCliProvider } from "../settings/model.js";
5
5
  import { hasKey, listVoices } from "../settings/repo.js";
6
6
  import { requiresNewSubmission } from "./preview-retained.js";
@@ -65,8 +65,7 @@ export function localReadiness(deps, snapshot, view, providers, catalogue) {
65
65
  message: "The selected model is no longer available.",
66
66
  });
67
67
  const provider = providers.find((row) => row.id === choice.provider && row.family === choice.family);
68
- if (provider?.cliPath !== undefined &&
69
- cliPathStatus(deps.db, provider.id).command !== provider.cliPath.command)
68
+ if (cliPathChanged(deps.db, provider))
70
69
  fields.push({
71
70
  field: `${choice.family}.cliPath`,
72
71
  message: "The configured CLI command changed. Check readiness again before rebuilding.",
@@ -28,6 +28,11 @@ export function cliPathStatus(db, id) {
28
28
  export function cliBinary(db, id) {
29
29
  return cliPathStatus(db, id).command;
30
30
  }
31
+ export function cliPathChanged(db, provider) {
32
+ return (provider?.cliPath !== undefined &&
33
+ !provider.cliPath.managedOnHost &&
34
+ cliPathStatus(db, provider.id).command !== provider.cliPath.command);
35
+ }
31
36
  export async function saveCliPath(deps, id, raw) {
32
37
  if (deps.hostCliStatus)
33
38
  return {