Skip to content

Commit 6f16daf

Browse files
authored
Merge pull request #264 from PaulJPhilp/ep-cli/polish-fixes
fix(ep-cli): pre-release polish — tabs, dead code, error messages
2 parents 031a106 + 376557f commit 6f16daf

9 files changed

Lines changed: 412 additions & 481 deletions

File tree

packages/ep-cli/src/commands/install-commands.ts

Lines changed: 3 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
* Install Commands
33
*/
44

5-
import { Args, Command, Options, Prompt } from "@effect/cli";
5+
import { Command, Options, Prompt } from "@effect/cli";
66
import { FileSystem } from "@effect/platform";
77
import { Console, Effect, Option } from "effect";
88
import path from "node:path";
99
import { Display } from "../services/display/index.js";
1010
import { Install, InstalledRule } from "../services/install/index.js";
1111
import { colorize } from "../utils.js";
12-
import { DisabledFeatureError, UnsupportedToolError } from "../errors.js";
12+
import { UnsupportedToolError } from "../errors.js";
1313

1414
/**
1515
* install:add - Add rules to AI tool configuration
1616
*/
1717
export const installAddCommand = Command.make("add", {
1818
options: {
1919
tool: Options.text("tool").pipe(
20-
Options.withDescription("The AI tool to add rules for (cursor, agents, etc.)")
20+
Options.withDescription("The AI tool to install rules for (cursor, agents, vscode, windsurf)")
2121
),
2222
skillLevel: Options.optional(
2323
Options.text("skill-level").pipe(
@@ -146,56 +146,6 @@ export const installAddCommand = Command.make("add", {
146146
)
147147
);
148148

149-
/**
150-
* install:remove - Remove installed rules
151-
*/
152-
export const installRemoveCommand = Command.make("remove", {
153-
args: {
154-
ruleId: Args.optional(Args.text({ name: "rule-id" }))
155-
}
156-
}).pipe(
157-
Command.withDescription("Temporarily disabled until server-backed tool config installation is implemented."),
158-
Command.withHandler(({ args }) =>
159-
Effect.gen(function* () {
160-
yield* Display.showError(
161-
"The install remove workflow is disabled for launch because tool-file injection is not implemented yet."
162-
);
163-
yield* Display.showInfo(
164-
"Re-enable 'install remove' after server-backed injection and uninstall support is implemented."
165-
);
166-
return yield* Effect.fail(new DisabledFeatureError({
167-
feature: "install remove",
168-
reason: "Tool-file injection is not implemented yet",
169-
}));
170-
})
171-
)
172-
);
173-
174-
/**
175-
* install:diff - Compare installed rule with latest
176-
*/
177-
export const installDiffCommand = Command.make("diff", {
178-
args: {
179-
ruleId: Args.text({ name: "rule-id" })
180-
}
181-
}).pipe(
182-
Command.withDescription("Temporarily disabled until server-backed tool config installation is implemented."),
183-
Command.withHandler(({ args }) =>
184-
Effect.gen(function* () {
185-
yield* Display.showError(
186-
"The install diff workflow is disabled for launch because tool-file injection is not implemented yet."
187-
);
188-
yield* Display.showInfo(
189-
"Re-enable 'install diff' after server-backed source of truth and file-level diffing are implemented."
190-
);
191-
return yield* Effect.fail(new DisabledFeatureError({
192-
feature: "install diff",
193-
reason: "Server-backed source of truth and file-level diffing are not implemented yet",
194-
}));
195-
})
196-
)
197-
);
198-
199149
/**
200150
* Display installed rules or message if none exist
201151
*/

packages/ep-cli/src/services/display/helpers.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,31 @@ import { Logger } from "../logger/index.js";
1111
* Icons for different display levels
1212
*/
1313
export const ICONS = {
14-
success: "✓",
15-
error: "✖",
16-
info: "ℹ",
17-
warning: "⚠",
18-
highlight: "📌",
14+
success: "✓",
15+
error: "✖",
16+
info: "ℹ",
17+
warning: "⚠",
18+
highlight: "📌",
1919
} as const;
2020

2121
/**
2222
* Get logger config from Logger service
2323
*/
2424
export const getLoggerConfig = (): Effect.Effect<LoggerConfig, never, Logger> =>
25-
Effect.gen(function* () {
26-
const logger = yield* Logger;
27-
const config = yield* logger.getConfig();
28-
return config;
29-
});
25+
Effect.gen(function* () {
26+
const logger = yield* Logger;
27+
const config = yield* logger.getConfig();
28+
return config;
29+
});
3030

3131
/**
3232
* Apply color if enabled in config (respects Logger config)
3333
*/
3434
export const colorizeWithConfig = (
35-
text: string,
36-
color: keyof typeof colors,
37-
config: LoggerConfig
35+
text: string,
36+
color: keyof typeof colors,
37+
config: LoggerConfig
3838
): string => {
39-
if (!config.useColors) return text;
40-
return `${colors[color]}${text}${colors.RESET}`;
39+
if (!config.useColors) return text;
40+
return `${colors[color]}${text}${colors.RESET}`;
4141
};

0 commit comments

Comments
 (0)