Skip to content

Commit b854e2e

Browse files
committed
fix(cli): shorten the captions pointer and drop the redirect doc comments
1 parent 3a4b527 commit b854e2e

4 files changed

Lines changed: 6 additions & 8 deletions

File tree

‎packages/cli/src/cli.agentMode.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,9 @@ describe("agent-mode contract", () => {
369369
const typo = await runAsAgent(["rendr"]);
370370
expect(captions.code).toBe(2);
371371
expect(captions.stderr).toContain("Unknown command: captions");
372-
expect(captions.stderr).toContain("Run 'hyperframes transcribe', then build the caption track");
372+
expect(captions.stderr).toContain(
373+
"Run 'hyperframes transcribe', then read references/captions.md",
374+
);
373375
expect(typo.code).toBe(2);
374376
expect(typo.stderr).toContain("Did you mean 'hyperframes render'?");
375377
for (const run of [captions, typo]) {

‎packages/cli/src/cli.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,7 @@ async function unknownCommandError(requested: ResolvedCommandUsage): Promise<Cli
558558
function unknownCommandHint(word: string, path: string[], names: string[]): string | undefined {
559559
const group = ["hyperframes", ...path].join(" ");
560560
const redirect = path.length === 0 ? commandRedirect(word, names) : undefined;
561-
if (redirect?.then)
562-
return `'${word}' is not a command. Run '${group} ${redirect.command}', ${redirect.then}.`;
561+
if (redirect?.then) return `Run '${group} ${redirect.command}', ${redirect.then}.`;
563562
const match = redirect?.command ?? closestMatch(word, names);
564563
if (match) return `Did you mean '${group} ${match}'?`;
565564
const close = closestNames(word, names, 3);

‎packages/cli/src/utils/didYouMean.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ export function closestNames(input: string, candidates: Iterable<string>, limit
4545
.map(({ name }) => name);
4646
}
4747

48-
/** Words an agent or person types for a job a command does, the command that does it, and what to do after it.
49-
* The hyperframes-cli skill's "Not commands" line is built from the same rows (redirectLine). */
5048
const COMMAND_REDIRECTS: Record<string, { command: string; then?: string }> = {
5149
search: { command: "catalog" },
5250
find: { command: "catalog" },
@@ -56,7 +54,7 @@ const COMMAND_REDIRECTS: Record<string, { command: string; then?: string }> = {
5654
install: { command: "add" },
5755
captions: {
5856
command: "transcribe",
59-
then: "then build the caption track as the hyperframes skill's references/captions.md says",
57+
then: "then read references/captions.md",
6058
},
6159
};
6260

@@ -68,7 +66,6 @@ export function commandRedirect(
6866
return row !== undefined && [...candidates].includes(row.command) ? row : undefined;
6967
}
7068

71-
/** The skill's line for each redirect that has a next step: the words the CLI prints, kept in one place. */
7269
export const redirectLine = (word: string): string => {
7370
const row = COMMAND_REDIRECTS[word]!;
7471
return `\`${word}\` is not a command: run \`${row.command}\`${row.then ? `, ${row.then}` : ""}.`;

‎skills/hyperframes-cli/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ A `--json` result may carry `_meta.updateNotice`: a newer HyperFrames release is
2828
| Desktop app | `open`, `catch-up` |
2929
| Upkeep | `doctor`, `browser`, `upgrade`, `usage`, `clean`, `feedback` |
3030

31-
`captions` is not a command: run `transcribe`, then build the caption track as the hyperframes skill's references/captions.md says.
31+
`captions` is not a command: run `transcribe`, then read references/captions.md.
3232

3333
`validate`, `inspect` and `layout` are deprecated aliases of `check`; `events` is telemetry for skills' own scripts. Don't run them.
3434

0 commit comments

Comments
 (0)