Skip to content

Commit b384fab

Browse files
committed
ensure warning always appears.
1 parent 06aba75 commit b384fab

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# mycoder
22

3+
## 0.0.12
4+
5+
### Patch Changes
6+
7+
- ensure warning always appears
8+
39
## 0.0.11
410

511
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mycoder",
33
"description": "A command line tool using agent that can do arbitrary tasks, including coding tasks",
4-
"version": "0.0.11",
4+
"version": "0.0.12",
55
"type": "module",
66
"bin": "./bin/cli.js",
77
"main": "./dist/index.js",

src/commands/$default.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@ export const builder = (yargs) => {
2525

2626
export const handler = async (argv: ArgumentsCamelCase<Options>) => {
2727
const logger = new Logger({ name: "Default", color: "white" });
28+
const require = createRequire(import.meta.url);
29+
const packageInfo = require("../../package.json");
2830

31+
logger.info(`MyCoder v${packageInfo.version} - AI-powered coding assistant`);
32+
logger.warn(
33+
"WARNING: This tool can do anything on your command line that you ask it to.",
34+
"It can delete files, install software, and even send data to remote servers.",
35+
"It is a powerful tool that should be used with caution.",
36+
"By using this tool, you agree that the authors and contributors are not responsible for any damage that may occur as a result of using this tool."
37+
);
2938
try {
3039
// Early API key check
3140
if (!process.env.ANTHROPIC_API_KEY) {
@@ -53,18 +62,6 @@ export const handler = async (argv: ArgumentsCamelCase<Options>) => {
5362
});
5463

5564
try {
56-
const require = createRequire(import.meta.url);
57-
const packageInfo = require("../../package.json");
58-
59-
logger.info(
60-
`MyCoder v${packageInfo.version} - AI-powered coding assistant`
61-
);
62-
logger.warn(
63-
"WARNING: This tool can do anything on your command line that you ask it to.",
64-
"It can delete files, install software, and even send data to remote servers.",
65-
"It is a powerful tool that should be used with caution.",
66-
"By using this tool, you agree that the authors and contributors are not responsible for any damage that may occur as a result of using this tool."
67-
);
6865
logger.info(
6966
"Type your request below or 'help' for usage information. Use Ctrl+C to exit."
7067
);

0 commit comments

Comments
 (0)