@zhongqian97-code/ecode 0.5.10 → 0.5.11

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.
Files changed (2) hide show
  1. package/dist/index.js +25 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2493,10 +2493,27 @@ async function cmdLoop(args, deps) {
2493
2493
  const spaceIdx = trimmed.indexOf(" ");
2494
2494
  if (spaceIdx !== -1) {
2495
2495
  const firstToken = trimmed.slice(0, spaceIdx);
2496
- const parsed = parseInterval(firstToken);
2497
- if (parsed !== null) {
2498
- intervalMs = parsed.intervalMs;
2499
- prompt = trimmed.slice(spaceIdx + 1).trim();
2496
+ const rest = trimmed.slice(spaceIdx + 1);
2497
+ const parsed1 = parseInterval(firstToken);
2498
+ if (parsed1 !== null) {
2499
+ intervalMs = parsed1.intervalMs;
2500
+ prompt = rest.trim();
2501
+ } else {
2502
+ const secondSpaceIdx = rest.indexOf(" ");
2503
+ if (secondSpaceIdx !== -1) {
2504
+ const twoToken = `${firstToken} ${rest.slice(0, secondSpaceIdx)}`;
2505
+ const parsed2 = parseInterval(twoToken);
2506
+ if (parsed2 !== null) {
2507
+ intervalMs = parsed2.intervalMs;
2508
+ prompt = rest.slice(secondSpaceIdx + 1).trim();
2509
+ }
2510
+ } else {
2511
+ const parsed2 = parseInterval(`${firstToken} ${rest}`);
2512
+ if (parsed2 !== null) {
2513
+ intervalMs = parsed2.intervalMs;
2514
+ prompt = "";
2515
+ }
2516
+ }
2500
2517
  }
2501
2518
  } else {
2502
2519
  const parsed = parseInterval(trimmed);
@@ -3616,7 +3633,10 @@ function resolveBuiltinSkillsDir() {
3616
3633
  for (let i = 0; i < 4; i++) {
3617
3634
  const candidate = path9.join(dir, "skills");
3618
3635
  if (fs11.existsSync(candidate) && fs11.statSync(candidate).isDirectory()) {
3619
- return candidate;
3636
+ const hasSkillContent = fs11.readdirSync(candidate).some(
3637
+ (entry) => fs11.existsSync(path9.join(candidate, entry, "SKILL.md"))
3638
+ );
3639
+ if (hasSkillContent) return candidate;
3620
3640
  }
3621
3641
  const parent = path9.dirname(dir);
3622
3642
  if (parent === dir) break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhongqian97-code/ecode",
3
- "version": "0.5.10",
3
+ "version": "0.5.11",
4
4
  "description": "A minimal Claude Code clone with REPL interface and bash tool calling",
5
5
  "type": "module",
6
6
  "author": "zhongqian97-code",