@contentful/experience-design-system-cli 2.37.1-dev-build-9afe163e.0 → 2.37.1-dev-build-8affe270.0
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.
package/dist/app.js
CHANGED
|
@@ -28753,9 +28753,9 @@ function statusFromChecks(name, checks, savedBinary) {
|
|
|
28753
28753
|
if (prompt) return prompt.ok ? "ready" : "not-logged-in";
|
|
28754
28754
|
return name === "claude" ? "ready" : "unknown";
|
|
28755
28755
|
}
|
|
28756
|
-
function
|
|
28757
|
-
if (status === "not-configured") return `${INSTALL_HINTS[name]}, or set
|
|
28758
|
-
if (status === "not-found") return `${INSTALL_HINTS[name]}, or
|
|
28756
|
+
function setupHint(name, status) {
|
|
28757
|
+
if (status === "not-configured") return `${INSTALL_HINTS[name]}, or set its command path in settings`;
|
|
28758
|
+
if (status === "not-found") return `${INSTALL_HINTS[name]}, or correct the command path in settings`;
|
|
28759
28759
|
if (status === "not-logged-in") return LOGIN_HINTS[name];
|
|
28760
28760
|
if (status === "unknown") return "run a full test to confirm it is logged in";
|
|
28761
28761
|
return "";
|
|
@@ -28784,16 +28784,16 @@ function panelRows(name, checks, settings) {
|
|
|
28784
28784
|
tone: settings.binary.trim() ? "bad" : "muted"
|
|
28785
28785
|
}
|
|
28786
28786
|
];
|
|
28787
|
-
const hint2 =
|
|
28788
|
-
if (hint2) rows2.push({ label: "
|
|
28787
|
+
const hint2 = setupHint(name, status);
|
|
28788
|
+
if (hint2) rows2.push({ label: "Setup", value: hint2, tone: "muted" });
|
|
28789
28789
|
return rows2;
|
|
28790
28790
|
}
|
|
28791
28791
|
const rows = [{ label: "Command", value: path5.detail, tone: "ok" }];
|
|
28792
28792
|
const version = checks.find((check) => check.step === "version");
|
|
28793
28793
|
if (version?.ok) rows.push({ label: "Version", value: version.detail, tone: "ok" });
|
|
28794
28794
|
rows.push({ label: "Model", value: modelLine(name, settings.model), tone: "muted" });
|
|
28795
|
-
const hint =
|
|
28796
|
-
if (hint) rows.push({ label: "
|
|
28795
|
+
const hint = setupHint(name, status);
|
|
28796
|
+
if (hint) rows.push({ label: "Setup", value: hint, tone: "muted" });
|
|
28797
28797
|
return rows;
|
|
28798
28798
|
}
|
|
28799
28799
|
function statusRows(_name, checks, savedBinary) {
|
|
@@ -28888,9 +28888,17 @@ var FIELDS2 = ["binary", "model"];
|
|
|
28888
28888
|
var FIELD_LABEL = { binary: "Command path", model: "Model" };
|
|
28889
28889
|
var LABEL_WIDTH = "Command path".length;
|
|
28890
28890
|
var fieldHint = (name, field) => field === "binary" ? `(empty: \`${AGENT_HINTS[name]}\` from the PATH)` : `(empty: ${defaultModelLabel(name)})`;
|
|
28891
|
-
function Section2({
|
|
28891
|
+
function Section2({
|
|
28892
|
+
title,
|
|
28893
|
+
note,
|
|
28894
|
+
interactive = false,
|
|
28895
|
+
children
|
|
28896
|
+
}) {
|
|
28892
28897
|
return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", marginTop: 1, children: [
|
|
28893
|
-
/* @__PURE__ */
|
|
28898
|
+
/* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
28899
|
+
/* @__PURE__ */ jsx56(Text47, { bold: true, color: interactive ? PALETTE.accent : PALETTE.muted, children: title }),
|
|
28900
|
+
/* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: `\xB7 ${note}` })
|
|
28901
|
+
] }),
|
|
28894
28902
|
children
|
|
28895
28903
|
] });
|
|
28896
28904
|
}
|
|
@@ -28979,43 +28987,45 @@ function AgentDetail({
|
|
|
28979
28987
|
}
|
|
28980
28988
|
});
|
|
28981
28989
|
const status = checks ? statusFromChecks(name, checks, settings.binary) : "checking";
|
|
28982
|
-
const hint =
|
|
28990
|
+
const hint = setupHint(name, status);
|
|
28983
28991
|
const pointer = (isFocused) => /* @__PURE__ */ jsx56(Text47, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " });
|
|
28984
28992
|
return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
28985
28993
|
/* @__PURE__ */ jsx56(Text47, { bold: true, children: AGENT_LABELS[name] }),
|
|
28986
28994
|
/* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: config.defaultAgent === name ? "This is the default agent." : `Runs the \`${AGENT_HINTS[name]}\` command.` }),
|
|
28987
|
-
/* @__PURE__ */ jsxs45(Section2, { title: "
|
|
28995
|
+
/* @__PURE__ */ jsxs45(Section2, { title: "CONFIGURE", note: "you can change these", interactive: true, children: [
|
|
28996
|
+
FIELDS2.map((field) => {
|
|
28997
|
+
const isFocused = focused === field;
|
|
28998
|
+
const value = settings[field];
|
|
28999
|
+
return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
29000
|
+
pointer(isFocused),
|
|
29001
|
+
/* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { bold: isFocused, color: isFocused ? PALETTE.accent : PALETTE.muted, children: FIELD_LABEL[field] }) }),
|
|
29002
|
+
isFocused && editing ? /* @__PURE__ */ jsx56(
|
|
29003
|
+
TextInput4,
|
|
29004
|
+
{
|
|
29005
|
+
value,
|
|
29006
|
+
onChange: (next) => setField(field, next),
|
|
29007
|
+
onSubmit: () => setEditing(false)
|
|
29008
|
+
}
|
|
29009
|
+
) : /* @__PURE__ */ jsx56(Text47, { bold: true, children: value }),
|
|
29010
|
+
!value && /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: fieldHint(name, field) })
|
|
29011
|
+
] }, field);
|
|
29012
|
+
}),
|
|
29013
|
+
/* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
29014
|
+
pointer(focused === "test"),
|
|
29015
|
+
/* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { bold: focused === "test", color: focused === "test" ? PALETTE.accent : PALETTE.muted, children: "Run test" }) }),
|
|
29016
|
+
/* @__PURE__ */ jsx56(Text47, { color: testing ? PALETTE.accent : PALETTE.muted, children: testing ? "running..." : "sends one small prompt (uses a few tokens)" })
|
|
29017
|
+
] })
|
|
29018
|
+
] }),
|
|
29019
|
+
/* @__PURE__ */ jsxs45(Section2, { title: "STATUS", note: "read only", children: [
|
|
28988
29020
|
statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */ jsxs45(Box44, { gap: 1, paddingLeft: 2, children: [
|
|
28989
29021
|
/* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: row.label }) }),
|
|
28990
29022
|
/* @__PURE__ */ jsx56(Text47, { color: TONE_COLOR[row.tone], children: row.value })
|
|
28991
29023
|
] }, row.label)),
|
|
28992
29024
|
hint && /* @__PURE__ */ jsx56(Box44, { paddingLeft: 2, children: /* @__PURE__ */ jsxs45(Text47, { color: PALETTE.muted, children: [
|
|
28993
|
-
"
|
|
29025
|
+
"Setup: ",
|
|
28994
29026
|
hint
|
|
28995
29027
|
] }) })
|
|
28996
29028
|
] }),
|
|
28997
|
-
/* @__PURE__ */ jsx56(Section2, { title: "SETTINGS", children: FIELDS2.map((field) => {
|
|
28998
|
-
const isFocused = focused === field;
|
|
28999
|
-
const value = settings[field];
|
|
29000
|
-
return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
29001
|
-
pointer(isFocused),
|
|
29002
|
-
/* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { bold: isFocused, color: isFocused ? PALETTE.accent : PALETTE.muted, children: FIELD_LABEL[field] }) }),
|
|
29003
|
-
isFocused && editing ? /* @__PURE__ */ jsx56(
|
|
29004
|
-
TextInput4,
|
|
29005
|
-
{
|
|
29006
|
-
value,
|
|
29007
|
-
onChange: (next) => setField(field, next),
|
|
29008
|
-
onSubmit: () => setEditing(false)
|
|
29009
|
-
}
|
|
29010
|
-
) : /* @__PURE__ */ jsx56(Text47, { bold: true, children: value }),
|
|
29011
|
-
!value && /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: fieldHint(name, field) })
|
|
29012
|
-
] }, field);
|
|
29013
|
-
}) }),
|
|
29014
|
-
/* @__PURE__ */ jsx56(Section2, { title: "ACTIONS", children: /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
29015
|
-
pointer(focused === "test"),
|
|
29016
|
-
/* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { bold: focused === "test", color: focused === "test" ? PALETTE.accent : PALETTE.muted, children: "Run test" }) }),
|
|
29017
|
-
/* @__PURE__ */ jsx56(Text47, { color: testing ? PALETTE.accent : PALETTE.muted, children: testing ? "running..." : "sends one small prompt (uses a few tokens)" })
|
|
29018
|
-
] }) }),
|
|
29019
29029
|
notice && /* @__PURE__ */ jsxs45(Fragment17, { children: [
|
|
29020
29030
|
/* @__PURE__ */ jsx56(Text47, { children: " " }),
|
|
29021
29031
|
/* @__PURE__ */ jsxs45(Text47, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
@@ -29047,7 +29057,6 @@ function AgentDetail({
|
|
|
29047
29057
|
|
|
29048
29058
|
// packages/experience-design-system-cli/src/tui/settings/agents/AgentScreens.tsx
|
|
29049
29059
|
import { Fragment as Fragment18, jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
29050
|
-
var ROWS = [{ kind: "default" }, ...AGENT_NAMES.map((name) => ({ kind: "agent", name }))];
|
|
29051
29060
|
var NAME_WIDTH = 16;
|
|
29052
29061
|
var PANEL_LABEL_WIDTH = "Command".length;
|
|
29053
29062
|
function AgentsScreen({ onDone }) {
|
|
@@ -29075,38 +29084,37 @@ function AgentsScreen({ onDone }) {
|
|
|
29075
29084
|
});
|
|
29076
29085
|
});
|
|
29077
29086
|
}, []);
|
|
29078
|
-
const
|
|
29087
|
+
const makeDefault = (name) => {
|
|
29079
29088
|
if (!config) return;
|
|
29080
|
-
|
|
29081
|
-
|
|
29089
|
+
if (name === config.defaultAgent) {
|
|
29090
|
+
setNotice({ kind: "success", text: `${AGENT_LABELS[name]} is already the default agent` });
|
|
29091
|
+
return;
|
|
29092
|
+
}
|
|
29093
|
+
const next = { ...config, defaultAgent: name };
|
|
29082
29094
|
setConfig(next);
|
|
29083
|
-
writeAgentConfig(next).then(() => setNotice({ kind: "success", text: `Default agent is now ${AGENT_LABELS[
|
|
29095
|
+
writeAgentConfig(next).then(() => setNotice({ kind: "success", text: `Default agent is now ${AGENT_LABELS[name]}` })).catch(
|
|
29084
29096
|
(err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" })
|
|
29085
29097
|
);
|
|
29086
29098
|
};
|
|
29087
29099
|
useInput12((input, key) => {
|
|
29088
29100
|
if (!config || open) return;
|
|
29089
|
-
const
|
|
29101
|
+
const focused = AGENT_NAMES[focus];
|
|
29090
29102
|
if (key.upArrow || key.downArrow || key.tab) setNotice(null);
|
|
29091
29103
|
if (key.upArrow) {
|
|
29092
|
-
setFocus((i) => (i - 1 +
|
|
29104
|
+
setFocus((i) => (i - 1 + AGENT_NAMES.length) % AGENT_NAMES.length);
|
|
29093
29105
|
return;
|
|
29094
29106
|
}
|
|
29095
29107
|
if (key.downArrow || key.tab) {
|
|
29096
|
-
setFocus((i) => (i + 1) %
|
|
29097
|
-
return;
|
|
29098
|
-
}
|
|
29099
|
-
if (row.kind === "default" && key.leftArrow) {
|
|
29100
|
-
cycleDefault(-1);
|
|
29108
|
+
setFocus((i) => (i + 1) % AGENT_NAMES.length);
|
|
29101
29109
|
return;
|
|
29102
29110
|
}
|
|
29103
|
-
if (
|
|
29104
|
-
|
|
29111
|
+
if (key.return) {
|
|
29112
|
+
makeDefault(focused);
|
|
29105
29113
|
return;
|
|
29106
29114
|
}
|
|
29107
|
-
if (key.
|
|
29108
|
-
|
|
29109
|
-
|
|
29115
|
+
if (key.rightArrow) {
|
|
29116
|
+
setNotice(null);
|
|
29117
|
+
setOpen(focused);
|
|
29110
29118
|
return;
|
|
29111
29119
|
}
|
|
29112
29120
|
if (key.escape || input === "q") {
|
|
@@ -29138,23 +29146,14 @@ function AgentsScreen({ onDone }) {
|
|
|
29138
29146
|
}
|
|
29139
29147
|
);
|
|
29140
29148
|
}
|
|
29141
|
-
const
|
|
29142
|
-
const focusedAgent = focusedRow.kind === "agent" ? focusedRow.name : null;
|
|
29149
|
+
const focusedAgent = AGENT_NAMES[focus];
|
|
29143
29150
|
return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
29144
29151
|
/* @__PURE__ */ jsx57(Text48, { bold: true, children: "Agents" }),
|
|
29145
29152
|
/* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "The coding agent the CLI runs, and what was found for each one." }),
|
|
29146
29153
|
/* @__PURE__ */ jsx57(Text48, { children: " " }),
|
|
29147
29154
|
/* @__PURE__ */ jsxs46(Box45, { gap: 1, children: [
|
|
29148
|
-
/* @__PURE__ */ jsx57(Text48, { color:
|
|
29149
|
-
/* @__PURE__ */ jsx57(
|
|
29150
|
-
Text48,
|
|
29151
|
-
{
|
|
29152
|
-
bold: focusedRow.kind === "default",
|
|
29153
|
-
color: focusedRow.kind === "default" ? PALETTE.accent : PALETTE.muted,
|
|
29154
|
-
children: "Default agent"
|
|
29155
|
-
}
|
|
29156
|
-
),
|
|
29157
|
-
/* @__PURE__ */ jsx57(Text48, { bold: true, children: `\u2039 ${AGENT_LABELS[config.defaultAgent]} \u203A` })
|
|
29155
|
+
/* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "Default agent" }),
|
|
29156
|
+
/* @__PURE__ */ jsx57(Text48, { bold: true, children: AGENT_LABELS[config.defaultAgent] })
|
|
29158
29157
|
] }),
|
|
29159
29158
|
/* @__PURE__ */ jsxs46(Box45, { marginTop: 1, gap: 1, children: [
|
|
29160
29159
|
/* @__PURE__ */ jsx57(Text48, { children: " " }),
|
|
@@ -29171,7 +29170,7 @@ function AgentsScreen({ onDone }) {
|
|
|
29171
29170
|
/* @__PURE__ */ jsx57(AgentStatusBadge, { name, checks: checks[name], binary: config.agents[name].binary })
|
|
29172
29171
|
] }, name);
|
|
29173
29172
|
}),
|
|
29174
|
-
|
|
29173
|
+
/* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", marginTop: 1, children: [
|
|
29175
29174
|
/* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: `\u2500 ${AGENT_LABELS[focusedAgent]} ${"\u2500".repeat(30)}` }),
|
|
29176
29175
|
panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs46(Box45, { gap: 1, paddingLeft: 1, children: [
|
|
29177
29176
|
/* @__PURE__ */ jsx57(Box45, { width: PANEL_LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: row.label }) }),
|
|
@@ -29190,13 +29189,10 @@ function AgentsScreen({ onDone }) {
|
|
|
29190
29189
|
/* @__PURE__ */ jsx57(
|
|
29191
29190
|
ControlHints,
|
|
29192
29191
|
{
|
|
29193
|
-
hints:
|
|
29194
|
-
{ keys: "\u2191/\u2193", label: "move" },
|
|
29195
|
-
{ keys: "\u2190/\u2192", label: "change default agent" },
|
|
29196
|
-
{ keys: "Esc/q", label: "back" }
|
|
29197
|
-
] : [
|
|
29192
|
+
hints: [
|
|
29198
29193
|
{ keys: "\u2191/\u2193", label: "move" },
|
|
29199
|
-
{ keys: "\u23CE", label: "
|
|
29194
|
+
{ keys: "\u23CE", label: "make default" },
|
|
29195
|
+
{ keys: "\u2192", label: "settings and test" },
|
|
29200
29196
|
{ keys: "Esc/q", label: "back" }
|
|
29201
29197
|
]
|
|
29202
29198
|
}
|
package/dist/index.js
CHANGED
|
@@ -33190,9 +33190,9 @@ function statusFromChecks(name, checks, savedBinary) {
|
|
|
33190
33190
|
if (prompt) return prompt.ok ? "ready" : "not-logged-in";
|
|
33191
33191
|
return name === "claude" ? "ready" : "unknown";
|
|
33192
33192
|
}
|
|
33193
|
-
function
|
|
33194
|
-
if (status === "not-configured") return `${INSTALL_HINTS[name]}, or set
|
|
33195
|
-
if (status === "not-found") return `${INSTALL_HINTS[name]}, or
|
|
33193
|
+
function setupHint(name, status) {
|
|
33194
|
+
if (status === "not-configured") return `${INSTALL_HINTS[name]}, or set its command path in settings`;
|
|
33195
|
+
if (status === "not-found") return `${INSTALL_HINTS[name]}, or correct the command path in settings`;
|
|
33196
33196
|
if (status === "not-logged-in") return LOGIN_HINTS[name];
|
|
33197
33197
|
if (status === "unknown") return "run a full test to confirm it is logged in";
|
|
33198
33198
|
return "";
|
|
@@ -33213,16 +33213,16 @@ function panelRows(name, checks, settings) {
|
|
|
33213
33213
|
tone: settings.binary.trim() ? "bad" : "muted"
|
|
33214
33214
|
}
|
|
33215
33215
|
];
|
|
33216
|
-
const hint2 =
|
|
33217
|
-
if (hint2) rows2.push({ label: "
|
|
33216
|
+
const hint2 = setupHint(name, status);
|
|
33217
|
+
if (hint2) rows2.push({ label: "Setup", value: hint2, tone: "muted" });
|
|
33218
33218
|
return rows2;
|
|
33219
33219
|
}
|
|
33220
33220
|
const rows = [{ label: "Command", value: path5.detail, tone: "ok" }];
|
|
33221
33221
|
const version = checks.find((check) => check.step === "version");
|
|
33222
33222
|
if (version?.ok) rows.push({ label: "Version", value: version.detail, tone: "ok" });
|
|
33223
33223
|
rows.push({ label: "Model", value: modelLine(name, settings.model), tone: "muted" });
|
|
33224
|
-
const hint =
|
|
33225
|
-
if (hint) rows.push({ label: "
|
|
33224
|
+
const hint = setupHint(name, status);
|
|
33225
|
+
if (hint) rows.push({ label: "Setup", value: hint, tone: "muted" });
|
|
33226
33226
|
return rows;
|
|
33227
33227
|
}
|
|
33228
33228
|
function statusRows(_name, checks, savedBinary) {
|
|
@@ -33334,9 +33334,17 @@ import { useEffect as useEffect22, useState as useState29 } from "react";
|
|
|
33334
33334
|
import { Box as Box44, Text as Text47, useInput as useInput11 } from "ink";
|
|
33335
33335
|
import TextInput4 from "ink-text-input";
|
|
33336
33336
|
import { Fragment as Fragment17, jsx as jsx56, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
33337
|
-
function Section2({
|
|
33337
|
+
function Section2({
|
|
33338
|
+
title,
|
|
33339
|
+
note,
|
|
33340
|
+
interactive = false,
|
|
33341
|
+
children
|
|
33342
|
+
}) {
|
|
33338
33343
|
return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", marginTop: 1, children: [
|
|
33339
|
-
/* @__PURE__ */
|
|
33344
|
+
/* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
33345
|
+
/* @__PURE__ */ jsx56(Text47, { bold: true, color: interactive ? PALETTE.accent : PALETTE.muted, children: title }),
|
|
33346
|
+
/* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: `\xB7 ${note}` })
|
|
33347
|
+
] }),
|
|
33340
33348
|
children
|
|
33341
33349
|
] });
|
|
33342
33350
|
}
|
|
@@ -33425,43 +33433,45 @@ function AgentDetail({
|
|
|
33425
33433
|
}
|
|
33426
33434
|
});
|
|
33427
33435
|
const status = checks ? statusFromChecks(name, checks, settings.binary) : "checking";
|
|
33428
|
-
const hint =
|
|
33436
|
+
const hint = setupHint(name, status);
|
|
33429
33437
|
const pointer = (isFocused) => /* @__PURE__ */ jsx56(Text47, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " });
|
|
33430
33438
|
return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
33431
33439
|
/* @__PURE__ */ jsx56(Text47, { bold: true, children: AGENT_LABELS[name] }),
|
|
33432
33440
|
/* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: config.defaultAgent === name ? "This is the default agent." : `Runs the \`${AGENT_HINTS[name]}\` command.` }),
|
|
33433
|
-
/* @__PURE__ */ jsxs45(Section2, { title: "
|
|
33441
|
+
/* @__PURE__ */ jsxs45(Section2, { title: "CONFIGURE", note: "you can change these", interactive: true, children: [
|
|
33442
|
+
FIELDS2.map((field) => {
|
|
33443
|
+
const isFocused = focused === field;
|
|
33444
|
+
const value = settings[field];
|
|
33445
|
+
return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
33446
|
+
pointer(isFocused),
|
|
33447
|
+
/* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { bold: isFocused, color: isFocused ? PALETTE.accent : PALETTE.muted, children: FIELD_LABEL[field] }) }),
|
|
33448
|
+
isFocused && editing ? /* @__PURE__ */ jsx56(
|
|
33449
|
+
TextInput4,
|
|
33450
|
+
{
|
|
33451
|
+
value,
|
|
33452
|
+
onChange: (next) => setField(field, next),
|
|
33453
|
+
onSubmit: () => setEditing(false)
|
|
33454
|
+
}
|
|
33455
|
+
) : /* @__PURE__ */ jsx56(Text47, { bold: true, children: value }),
|
|
33456
|
+
!value && /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: fieldHint(name, field) })
|
|
33457
|
+
] }, field);
|
|
33458
|
+
}),
|
|
33459
|
+
/* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
33460
|
+
pointer(focused === "test"),
|
|
33461
|
+
/* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { bold: focused === "test", color: focused === "test" ? PALETTE.accent : PALETTE.muted, children: "Run test" }) }),
|
|
33462
|
+
/* @__PURE__ */ jsx56(Text47, { color: testing ? PALETTE.accent : PALETTE.muted, children: testing ? "running..." : "sends one small prompt (uses a few tokens)" })
|
|
33463
|
+
] })
|
|
33464
|
+
] }),
|
|
33465
|
+
/* @__PURE__ */ jsxs45(Section2, { title: "STATUS", note: "read only", children: [
|
|
33434
33466
|
statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */ jsxs45(Box44, { gap: 1, paddingLeft: 2, children: [
|
|
33435
33467
|
/* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: row.label }) }),
|
|
33436
33468
|
/* @__PURE__ */ jsx56(Text47, { color: TONE_COLOR[row.tone], children: row.value })
|
|
33437
33469
|
] }, row.label)),
|
|
33438
33470
|
hint && /* @__PURE__ */ jsx56(Box44, { paddingLeft: 2, children: /* @__PURE__ */ jsxs45(Text47, { color: PALETTE.muted, children: [
|
|
33439
|
-
"
|
|
33471
|
+
"Setup: ",
|
|
33440
33472
|
hint
|
|
33441
33473
|
] }) })
|
|
33442
33474
|
] }),
|
|
33443
|
-
/* @__PURE__ */ jsx56(Section2, { title: "SETTINGS", children: FIELDS2.map((field) => {
|
|
33444
|
-
const isFocused = focused === field;
|
|
33445
|
-
const value = settings[field];
|
|
33446
|
-
return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
33447
|
-
pointer(isFocused),
|
|
33448
|
-
/* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { bold: isFocused, color: isFocused ? PALETTE.accent : PALETTE.muted, children: FIELD_LABEL[field] }) }),
|
|
33449
|
-
isFocused && editing ? /* @__PURE__ */ jsx56(
|
|
33450
|
-
TextInput4,
|
|
33451
|
-
{
|
|
33452
|
-
value,
|
|
33453
|
-
onChange: (next) => setField(field, next),
|
|
33454
|
-
onSubmit: () => setEditing(false)
|
|
33455
|
-
}
|
|
33456
|
-
) : /* @__PURE__ */ jsx56(Text47, { bold: true, children: value }),
|
|
33457
|
-
!value && /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: fieldHint(name, field) })
|
|
33458
|
-
] }, field);
|
|
33459
|
-
}) }),
|
|
33460
|
-
/* @__PURE__ */ jsx56(Section2, { title: "ACTIONS", children: /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
33461
|
-
pointer(focused === "test"),
|
|
33462
|
-
/* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { bold: focused === "test", color: focused === "test" ? PALETTE.accent : PALETTE.muted, children: "Run test" }) }),
|
|
33463
|
-
/* @__PURE__ */ jsx56(Text47, { color: testing ? PALETTE.accent : PALETTE.muted, children: testing ? "running..." : "sends one small prompt (uses a few tokens)" })
|
|
33464
|
-
] }) }),
|
|
33465
33475
|
notice && /* @__PURE__ */ jsxs45(Fragment17, { children: [
|
|
33466
33476
|
/* @__PURE__ */ jsx56(Text47, { children: " " }),
|
|
33467
33477
|
/* @__PURE__ */ jsxs45(Text47, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
@@ -33537,38 +33547,37 @@ function AgentsScreen({ onDone }) {
|
|
|
33537
33547
|
});
|
|
33538
33548
|
});
|
|
33539
33549
|
}, []);
|
|
33540
|
-
const
|
|
33550
|
+
const makeDefault = (name) => {
|
|
33541
33551
|
if (!config) return;
|
|
33542
|
-
|
|
33543
|
-
|
|
33552
|
+
if (name === config.defaultAgent) {
|
|
33553
|
+
setNotice({ kind: "success", text: `${AGENT_LABELS[name]} is already the default agent` });
|
|
33554
|
+
return;
|
|
33555
|
+
}
|
|
33556
|
+
const next = { ...config, defaultAgent: name };
|
|
33544
33557
|
setConfig(next);
|
|
33545
|
-
writeAgentConfig(next).then(() => setNotice({ kind: "success", text: `Default agent is now ${AGENT_LABELS[
|
|
33558
|
+
writeAgentConfig(next).then(() => setNotice({ kind: "success", text: `Default agent is now ${AGENT_LABELS[name]}` })).catch(
|
|
33546
33559
|
(err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" })
|
|
33547
33560
|
);
|
|
33548
33561
|
};
|
|
33549
33562
|
useInput12((input, key) => {
|
|
33550
33563
|
if (!config || open) return;
|
|
33551
|
-
const
|
|
33564
|
+
const focused = AGENT_NAMES[focus];
|
|
33552
33565
|
if (key.upArrow || key.downArrow || key.tab) setNotice(null);
|
|
33553
33566
|
if (key.upArrow) {
|
|
33554
|
-
setFocus((i) => (i - 1 +
|
|
33567
|
+
setFocus((i) => (i - 1 + AGENT_NAMES.length) % AGENT_NAMES.length);
|
|
33555
33568
|
return;
|
|
33556
33569
|
}
|
|
33557
33570
|
if (key.downArrow || key.tab) {
|
|
33558
|
-
setFocus((i) => (i + 1) %
|
|
33571
|
+
setFocus((i) => (i + 1) % AGENT_NAMES.length);
|
|
33559
33572
|
return;
|
|
33560
33573
|
}
|
|
33561
|
-
if (
|
|
33562
|
-
|
|
33563
|
-
return;
|
|
33564
|
-
}
|
|
33565
|
-
if (row.kind === "default" && key.rightArrow) {
|
|
33566
|
-
cycleDefault(1);
|
|
33574
|
+
if (key.return) {
|
|
33575
|
+
makeDefault(focused);
|
|
33567
33576
|
return;
|
|
33568
33577
|
}
|
|
33569
|
-
if (key.
|
|
33570
|
-
|
|
33571
|
-
|
|
33578
|
+
if (key.rightArrow) {
|
|
33579
|
+
setNotice(null);
|
|
33580
|
+
setOpen(focused);
|
|
33572
33581
|
return;
|
|
33573
33582
|
}
|
|
33574
33583
|
if (key.escape || input === "q") {
|
|
@@ -33600,23 +33609,14 @@ function AgentsScreen({ onDone }) {
|
|
|
33600
33609
|
}
|
|
33601
33610
|
);
|
|
33602
33611
|
}
|
|
33603
|
-
const
|
|
33604
|
-
const focusedAgent = focusedRow.kind === "agent" ? focusedRow.name : null;
|
|
33612
|
+
const focusedAgent = AGENT_NAMES[focus];
|
|
33605
33613
|
return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
33606
33614
|
/* @__PURE__ */ jsx57(Text48, { bold: true, children: "Agents" }),
|
|
33607
33615
|
/* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "The coding agent the CLI runs, and what was found for each one." }),
|
|
33608
33616
|
/* @__PURE__ */ jsx57(Text48, { children: " " }),
|
|
33609
33617
|
/* @__PURE__ */ jsxs46(Box45, { gap: 1, children: [
|
|
33610
|
-
/* @__PURE__ */ jsx57(Text48, { color:
|
|
33611
|
-
/* @__PURE__ */ jsx57(
|
|
33612
|
-
Text48,
|
|
33613
|
-
{
|
|
33614
|
-
bold: focusedRow.kind === "default",
|
|
33615
|
-
color: focusedRow.kind === "default" ? PALETTE.accent : PALETTE.muted,
|
|
33616
|
-
children: "Default agent"
|
|
33617
|
-
}
|
|
33618
|
-
),
|
|
33619
|
-
/* @__PURE__ */ jsx57(Text48, { bold: true, children: `\u2039 ${AGENT_LABELS[config.defaultAgent]} \u203A` })
|
|
33618
|
+
/* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "Default agent" }),
|
|
33619
|
+
/* @__PURE__ */ jsx57(Text48, { bold: true, children: AGENT_LABELS[config.defaultAgent] })
|
|
33620
33620
|
] }),
|
|
33621
33621
|
/* @__PURE__ */ jsxs46(Box45, { marginTop: 1, gap: 1, children: [
|
|
33622
33622
|
/* @__PURE__ */ jsx57(Text48, { children: " " }),
|
|
@@ -33633,7 +33633,7 @@ function AgentsScreen({ onDone }) {
|
|
|
33633
33633
|
/* @__PURE__ */ jsx57(AgentStatusBadge, { name, checks: checks[name], binary: config.agents[name].binary })
|
|
33634
33634
|
] }, name);
|
|
33635
33635
|
}),
|
|
33636
|
-
|
|
33636
|
+
/* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", marginTop: 1, children: [
|
|
33637
33637
|
/* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: `\u2500 ${AGENT_LABELS[focusedAgent]} ${"\u2500".repeat(30)}` }),
|
|
33638
33638
|
panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs46(Box45, { gap: 1, paddingLeft: 1, children: [
|
|
33639
33639
|
/* @__PURE__ */ jsx57(Box45, { width: PANEL_LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: row.label }) }),
|
|
@@ -33652,20 +33652,17 @@ function AgentsScreen({ onDone }) {
|
|
|
33652
33652
|
/* @__PURE__ */ jsx57(
|
|
33653
33653
|
ControlHints,
|
|
33654
33654
|
{
|
|
33655
|
-
hints:
|
|
33656
|
-
{ keys: "\u2191/\u2193", label: "move" },
|
|
33657
|
-
{ keys: "\u2190/\u2192", label: "change default agent" },
|
|
33658
|
-
{ keys: "Esc/q", label: "back" }
|
|
33659
|
-
] : [
|
|
33655
|
+
hints: [
|
|
33660
33656
|
{ keys: "\u2191/\u2193", label: "move" },
|
|
33661
|
-
{ keys: "\u23CE", label: "
|
|
33657
|
+
{ keys: "\u23CE", label: "make default" },
|
|
33658
|
+
{ keys: "\u2192", label: "settings and test" },
|
|
33662
33659
|
{ keys: "Esc/q", label: "back" }
|
|
33663
33660
|
]
|
|
33664
33661
|
}
|
|
33665
33662
|
)
|
|
33666
33663
|
] });
|
|
33667
33664
|
}
|
|
33668
|
-
var
|
|
33665
|
+
var NAME_WIDTH, PANEL_LABEL_WIDTH;
|
|
33669
33666
|
var init_AgentScreens = __esm({
|
|
33670
33667
|
"packages/experience-design-system-cli/src/tui/settings/agents/AgentScreens.tsx"() {
|
|
33671
33668
|
"use strict";
|
|
@@ -33677,7 +33674,6 @@ var init_AgentScreens = __esm({
|
|
|
33677
33674
|
init_agent_status();
|
|
33678
33675
|
init_AgentDetail();
|
|
33679
33676
|
init_AgentStatusBadge();
|
|
33680
|
-
ROWS = [{ kind: "default" }, ...AGENT_NAMES.map((name) => ({ kind: "agent", name }))];
|
|
33681
33677
|
NAME_WIDTH = 16;
|
|
33682
33678
|
PANEL_LABEL_WIDTH = "Command".length;
|
|
33683
33679
|
}
|
package/dist/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* Settings > Configuration > Agents. The list holds only what is needed to pick
|
|
3
|
+
* Settings > Configuration > Agents. The list holds only what is needed to pick an agent: the name, a star on the default,
|
|
4
4
|
* and a one-word status. Below it, a panel shows the full detail for the focused agent and follows the cursor, so nothing
|
|
5
|
-
* has to be opened to read it.
|
|
6
|
-
*
|
|
5
|
+
* has to be opened to read it. The "Default agent" line at the top is read-only: ↑/↓ move through the agents, Enter makes
|
|
6
|
+
* the focused one the default (saved at once), and → opens its own screen, where its path and model are edited and the
|
|
7
|
+
* test is run.
|
|
7
8
|
*/
|
|
8
9
|
export declare function AgentsScreen({ onDone }: {
|
|
9
10
|
onDone: () => void;
|
|
@@ -27,8 +27,12 @@ export declare function inspectAgent(name: AgentName, binary: string): Promise<A
|
|
|
27
27
|
export declare function testAgent(name: AgentName, binary: string, model: string): Promise<AgentCheck[]>;
|
|
28
28
|
/** Collapses a list of checks into the status shown on the row. */
|
|
29
29
|
export declare function statusFromChecks(name: AgentName, checks: readonly AgentCheck[], savedBinary: string): AgentStatus;
|
|
30
|
-
/**
|
|
31
|
-
|
|
30
|
+
/**
|
|
31
|
+
* What to tell a user whose agent is not ready: the install command, or the login command. Empty when nothing is needed.
|
|
32
|
+
* Shown on the list's panel and on the agent's own screen, so it cannot say where the command path is ("below"): it
|
|
33
|
+
* names the settings instead, which is the same place from both.
|
|
34
|
+
*/
|
|
35
|
+
export declare function setupHint(name: AgentName, status: AgentStatus): string;
|
|
32
36
|
export type StatusRow = {
|
|
33
37
|
label: string;
|
|
34
38
|
value: string;
|
package/legacy/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.37.1-dev-build-
|
|
3
|
+
"version": "2.37.1-dev-build-8affe270.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"ts-morph": "^27.0.2",
|
|
46
46
|
"typescript": "^5.9.3",
|
|
47
47
|
"zod": "^4.6.5",
|
|
48
|
-
"@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-
|
|
49
|
-
"@contentful/experience-design-system-types": "2.37.1-dev-build-
|
|
48
|
+
"@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-8affe270.0",
|
|
49
|
+
"@contentful/experience-design-system-types": "2.37.1-dev-build-8affe270.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@tsconfig/node24": "^24.0.4",
|