skyloom 1.4.0 → 1.4.1
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/package.json +1 -1
- package/src/cli/main.ts +18 -11
package/package.json
CHANGED
package/src/cli/main.ts
CHANGED
|
@@ -377,22 +377,29 @@ function shouldAutoContinue(text: string): boolean {
|
|
|
377
377
|
async function main(): Promise<void> {
|
|
378
378
|
const args = process.argv.slice(2);
|
|
379
379
|
|
|
380
|
-
//
|
|
381
|
-
if (args.length === 0
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
let model: string | undefined;
|
|
380
|
+
// `sky` with no args = start chat directly (fastest path)
|
|
381
|
+
if (args.length === 0) {
|
|
382
|
+
await interactiveChat('fog');
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
386
385
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
386
|
+
// `sky <agent>` or `sky <agent> -m <model>` — chat with specific agent
|
|
387
|
+
const knownAgents = new Set(['fog', 'rain', 'frost', 'snow', 'dew', 'fair']);
|
|
388
|
+
if (knownAgents.has(args[0])) {
|
|
389
|
+
let model: string | undefined;
|
|
390
|
+
for (let i = 1; i < args.length; i++) {
|
|
391
|
+
if ((args[i] === '-m' || args[i] === '--model') && i + 1 < args.length) {
|
|
391
392
|
model = args[++i];
|
|
392
393
|
}
|
|
393
394
|
}
|
|
395
|
+
await interactiveChat(args[0], model);
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
394
398
|
|
|
395
|
-
|
|
399
|
+
// `sky <message>` — anything not a known subcommand → fast chat
|
|
400
|
+
const knownCommands = ['chat', 'task', 'web', 'config', 'init', 'version', 'mcp', 'help'];
|
|
401
|
+
if (!knownCommands.includes(args[0]) && !args[0].startsWith('-')) {
|
|
402
|
+
await interactiveChat('fog');
|
|
396
403
|
return;
|
|
397
404
|
}
|
|
398
405
|
|