orquesta-cli 0.2.81 → 0.2.83

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.
@@ -6,9 +6,26 @@ const SOURCE_EXTENSIONS = new Set([
6
6
  '.py', '.rs', '.go', '.java', '.rb', '.vue', '.svelte',
7
7
  ]);
8
8
  const SYMBOL_RE = /(?:function|class|interface|type|enum|const|let|var|export\s+(?:default\s+)?(?:function|class|const|let|async\s+function))\s+(\w+)/g;
9
+ const MAX_FILES = 2000;
10
+ const PROJECT_MARKERS = [
11
+ '.git', 'package.json', 'tsconfig.json', 'pyproject.toml', 'requirements.txt',
12
+ 'go.mod', 'Cargo.toml', 'pom.xml', 'build.gradle', 'Gemfile', 'composer.json',
13
+ '.orquestaignore',
14
+ ];
15
+ function isProjectRoot(dir) {
16
+ return PROJECT_MARKERS.some(m => {
17
+ try {
18
+ fs.accessSync(path.join(dir, m));
19
+ return true;
20
+ }
21
+ catch {
22
+ return false;
23
+ }
24
+ });
25
+ }
9
26
  let indexCache = null;
10
27
  function scanDir(dir, entries, depth = 0) {
11
- if (depth > 6)
28
+ if (depth > 6 || entries.size >= MAX_FILES)
12
29
  return;
13
30
  let items;
14
31
  try {
@@ -18,6 +35,8 @@ function scanDir(dir, entries, depth = 0) {
18
35
  return;
19
36
  }
20
37
  for (const item of items) {
38
+ if (entries.size >= MAX_FILES)
39
+ return;
21
40
  const full = path.join(dir, item);
22
41
  const rel = path.relative(process.cwd(), full);
23
42
  if (shouldIgnore(rel))
@@ -56,7 +75,9 @@ function scanDir(dir, entries, depth = 0) {
56
75
  function getIndex() {
57
76
  if (!indexCache) {
58
77
  indexCache = new Map();
59
- scanDir(process.cwd(), indexCache);
78
+ if (isProjectRoot(process.cwd())) {
79
+ scanDir(process.cwd(), indexCache);
80
+ }
60
81
  }
61
82
  return indexCache;
62
83
  }
@@ -1,6 +1,15 @@
1
1
  import * as fs from 'fs';
2
2
  import * as path from 'path';
3
3
  import { minimatch } from 'minimatch';
4
+ const ALWAYS_IGNORE = new Set([
5
+ 'node_modules', '.git', '.svn', '.hg',
6
+ '.cache', '.npm', '.nvm', '.yarn', '.pnpm-store',
7
+ 'dist', 'build', 'out', '.next', '.nuxt', '.svelte-kit',
8
+ 'vendor', 'target', '.gradle', '.m2',
9
+ '__pycache__', '.venv', 'venv', '.tox', '.mypy_cache', '.pytest_cache',
10
+ 'coverage', '.turbo', '.parcel-cache', '.vite',
11
+ '.idea', '.vscode', '.DS_Store',
12
+ ]);
4
13
  let patterns = null;
5
14
  function loadPatterns() {
6
15
  if (patterns !== null)
@@ -33,6 +42,10 @@ export function getIgnorePatterns() {
33
42
  export function shouldIgnore(filePath) {
34
43
  const pats = loadPatterns();
35
44
  const rel = path.relative(process.cwd(), path.resolve(filePath)).replace(/\\/g, '/');
45
+ for (const segment of rel.split('/')) {
46
+ if (ALWAYS_IGNORE.has(segment))
47
+ return true;
48
+ }
36
49
  for (const pat of pats) {
37
50
  if (minimatch(rel, pat, { dot: true }) || minimatch(rel, `${pat}/**`, { dot: true })) {
38
51
  return true;
@@ -54,6 +54,18 @@ export const TodoPanel = React.memo(({ todos, currentTodoId, isProcessing = fals
54
54
  return null;
55
55
  }
56
56
  const completedCount = todos.filter(t => t.status === 'completed').length;
57
+ const MAX_VISIBLE_TODOS = 6;
58
+ let visibleTodos = todos;
59
+ let collapsedAbove = 0;
60
+ let hiddenBelow = 0;
61
+ if (todos.length > MAX_VISIBLE_TODOS) {
62
+ const firstActiveIdx = todos.findIndex(t => t.status !== 'completed');
63
+ const anchor = firstActiveIdx === -1 ? todos.length - MAX_VISIBLE_TODOS : firstActiveIdx;
64
+ const start = Math.max(0, Math.min(anchor, todos.length - MAX_VISIBLE_TODOS));
65
+ collapsedAbove = start;
66
+ visibleTodos = todos.slice(start, start + MAX_VISIBLE_TODOS);
67
+ hiddenBelow = todos.length - start - visibleTodos.length;
68
+ }
57
69
  const formatElapsedTime = (seconds) => {
58
70
  const hrs = Math.floor(seconds / 3600);
59
71
  const mins = Math.floor((seconds % 3600) / 60);
@@ -64,21 +76,33 @@ export const TodoPanel = React.memo(({ todos, currentTodoId, isProcessing = fals
64
76
  return `${mins}:${secs.toString().padStart(2, '0')}`;
65
77
  };
66
78
  return (React.createElement(Box, { flexDirection: "column", paddingX: 1 },
67
- React.createElement(Box, { flexDirection: "column" }, todos.map((todo) => {
68
- const config = STATUS_CONFIG[todo.status] || STATUS_CONFIG.pending;
69
- const isInProgress = todo.status === 'in_progress';
70
- const isCompleted = todo.status === 'completed';
71
- return (React.createElement(Box, { key: todo.id, flexDirection: "column" },
72
- React.createElement(Box, null,
73
- React.createElement(Box, { width: 2 }, isInProgress && isProcessing ? (React.createElement(Text, { color: "blueBright" },
74
- React.createElement(Spinner, { type: "dots2" }))) : (React.createElement(Text, { color: config.color }, config.icon))),
75
- React.createElement(Text, { color: isCompleted ? 'gray' : isInProgress ? 'white' : 'gray', bold: isInProgress, dimColor: isCompleted, strikethrough: isCompleted }, todo.title),
76
- isInProgress && isProcessing && (React.createElement(Text, { color: "blueBright" }, " \u2190"))),
77
- todo.error && (React.createElement(Box, { marginLeft: 2 },
78
- React.createElement(Text, { color: "red", dimColor: true },
79
- "\u26A0 ",
80
- todo.error)))));
81
- })),
79
+ React.createElement(Box, { flexDirection: "column" },
80
+ collapsedAbove > 0 && (React.createElement(Text, { color: "gray", dimColor: true },
81
+ "\u2611 ",
82
+ collapsedAbove,
83
+ " earlier task",
84
+ collapsedAbove === 1 ? '' : 's',
85
+ " completed")),
86
+ visibleTodos.map((todo) => {
87
+ const config = STATUS_CONFIG[todo.status] || STATUS_CONFIG.pending;
88
+ const isInProgress = todo.status === 'in_progress';
89
+ const isCompleted = todo.status === 'completed';
90
+ return (React.createElement(Box, { key: todo.id, flexDirection: "column" },
91
+ React.createElement(Box, null,
92
+ React.createElement(Box, { width: 2 }, isInProgress && isProcessing ? (React.createElement(Text, { color: "blueBright" },
93
+ React.createElement(Spinner, { type: "dots2" }))) : (React.createElement(Text, { color: config.color }, config.icon))),
94
+ React.createElement(Text, { color: isCompleted ? 'gray' : isInProgress ? 'white' : 'gray', bold: isInProgress, dimColor: isCompleted, strikethrough: isCompleted }, todo.title),
95
+ isInProgress && isProcessing && (React.createElement(Text, { color: "blueBright" }, " \u2190"))),
96
+ todo.error && (React.createElement(Box, { marginLeft: 2 },
97
+ React.createElement(Text, { color: "red", dimColor: true },
98
+ "\u26A0 ",
99
+ todo.error)))));
100
+ }),
101
+ hiddenBelow > 0 && (React.createElement(Text, { color: "gray", dimColor: true },
102
+ "\u2026 ",
103
+ hiddenBelow,
104
+ " more task",
105
+ hiddenBelow === 1 ? '' : 's'))),
82
106
  React.createElement(Box, { marginTop: 1, justifyContent: "space-between" },
83
107
  React.createElement(ProgressBar, { completed: completedCount, total: todos.length, width: 20 }),
84
108
  isProcessing && (React.createElement(Text, { color: "yellow" }, formatElapsedTime(elapsedTime))))));
@@ -4,6 +4,6 @@ export const StreamingOutput = ({ text }) => {
4
4
  if (!text)
5
5
  return null;
6
6
  return (React.createElement(Box, { marginTop: 1, paddingX: 1 },
7
- React.createElement(Text, { wrap: "wrap" }, text.split('\n').slice(-15).join('\n'))));
7
+ React.createElement(Text, { wrap: "wrap" }, text.split('\n').slice(-8).join('\n'))));
8
8
  };
9
9
  //# sourceMappingURL=StreamingOutput.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orquesta-cli",
3
- "version": "0.2.81",
3
+ "version": "0.2.83",
4
4
  "description": "Orquesta CLI - AI-powered coding assistant with team collaboration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",