@heyamiko/amiko-cli 0.4.7 → 0.4.8
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/cli.js +6 -0
- package/package.json +1 -1
- package/src/cli.tsx +5 -0
package/dist/cli.js
CHANGED
|
@@ -61,6 +61,12 @@ function parseArgs(argv) {
|
|
|
61
61
|
return overrides;
|
|
62
62
|
}
|
|
63
63
|
async function main() {
|
|
64
|
+
// Ensure safe terminal dimensions for non-TTY environments (e.g. openclaw exec)
|
|
65
|
+
// Prevents Ink RangeError from negative layout calculations
|
|
66
|
+
if (!process.stdout.columns)
|
|
67
|
+
process.stdout.columns = 80;
|
|
68
|
+
if (!process.stdout.rows)
|
|
69
|
+
process.stdout.rows = 24;
|
|
64
70
|
const config = loadConfig();
|
|
65
71
|
const overrides = parseArgs(process.argv.slice(2));
|
|
66
72
|
const finalConfig = { ...config, ...overrides };
|
package/package.json
CHANGED
package/src/cli.tsx
CHANGED
|
@@ -77,6 +77,11 @@ function parseArgs(argv: string[]): ArgOverrides {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
async function main() {
|
|
80
|
+
// Ensure safe terminal dimensions for non-TTY environments (e.g. openclaw exec)
|
|
81
|
+
// Prevents Ink RangeError from negative layout calculations
|
|
82
|
+
if (!process.stdout.columns) process.stdout.columns = 80;
|
|
83
|
+
if (!process.stdout.rows) process.stdout.rows = 24;
|
|
84
|
+
|
|
80
85
|
const config = loadConfig();
|
|
81
86
|
const overrides = parseArgs(process.argv.slice(2));
|
|
82
87
|
const finalConfig = { ...config, ...overrides };
|