orquesta-cli 0.2.7 → 0.2.9
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.
|
@@ -17,11 +17,15 @@ import { formatErrorMessage, buildTodoContext, findActiveTodo, getTodoStats } fr
|
|
|
17
17
|
import { runParallelGraph, shouldUseParallelOrchestrator } from './parallel-orchestrator.js';
|
|
18
18
|
import { memoryStore } from './memory-store.js';
|
|
19
19
|
import { auditLog } from './audit-log.js';
|
|
20
|
+
function buildEnvironmentContext() {
|
|
21
|
+
const cwd = process.cwd();
|
|
22
|
+
return `\n\n## Environment\n\nWorking directory (where ALL your tools execute): \`${cwd}\`\nTools (read_file, list_files, bash, edit_file, …) run on the USER'S machine in this directory.\n- Use paths RELATIVE to this directory ("package.json", "src/foo.ts", "."). They resolve against the working directory automatically.\n- Do NOT prepend the absolute working-directory path to tool arguments, and do NOT invent absolute paths from documentation — the repo is already at the working directory above.\n- Ignore any other "current directory" that may appear elsewhere in your context (e.g. a proxy's /tmp); the directory above is authoritative.\n`;
|
|
23
|
+
}
|
|
20
24
|
function buildSystemPrompt() {
|
|
21
25
|
const isGitRepo = detectGitRepo();
|
|
22
26
|
const projectContext = getProjectContext();
|
|
23
27
|
const base = isGitRepo ? `${PLAN_PROMPT}\n\n${GIT_COMMIT_RULES}` : PLAN_PROMPT;
|
|
24
|
-
return base + projectContext;
|
|
28
|
+
return base + buildEnvironmentContext() + projectContext;
|
|
25
29
|
}
|
|
26
30
|
export class PlanExecutor {
|
|
27
31
|
currentLLMClient = null;
|
|
@@ -1125,8 +1125,10 @@ export const PlanExecuteApp = ({ llmClient: initialLlmClient, modelInfo }) => {
|
|
|
1125
1125
|
}
|
|
1126
1126
|
case 'tell_to_user':
|
|
1127
1127
|
return '';
|
|
1128
|
-
case 'bash':
|
|
1129
|
-
|
|
1128
|
+
case 'bash': {
|
|
1129
|
+
const cmd = (args['command'] || '').replace(/\s+/g, ' ').trim();
|
|
1130
|
+
return cmd.length > 64 ? cmd.slice(0, 63) + '…' : cmd;
|
|
1131
|
+
}
|
|
1130
1132
|
default:
|
|
1131
1133
|
return '';
|
|
1132
1134
|
}
|
|
@@ -1145,14 +1147,14 @@ export const PlanExecuteApp = ({ llmClient: initialLlmClient, modelInfo }) => {
|
|
|
1145
1147
|
icon,
|
|
1146
1148
|
" ",
|
|
1147
1149
|
toolName),
|
|
1148
|
-
params && React.createElement(
|
|
1149
|
-
" (",
|
|
1150
|
-
params,
|
|
1151
|
-
")")),
|
|
1150
|
+
params && (React.createElement(React.Fragment, null,
|
|
1151
|
+
React.createElement(Text, { color: "gray" }, " ("),
|
|
1152
|
+
React.createElement(Text, { color: "white" }, params),
|
|
1153
|
+
React.createElement(Text, { color: "gray" }, ")")))),
|
|
1152
1154
|
truncatedReason && (React.createElement(Box, { marginLeft: 2 },
|
|
1153
1155
|
React.createElement(Text, { color: "gray" }, "\u23BF "),
|
|
1154
1156
|
React.createElement(Text, { color: "yellow" }, "\uD83D\uDCAD "),
|
|
1155
|
-
React.createElement(Text, { color: "
|
|
1157
|
+
React.createElement(Text, { color: "white", dimColor: true }, truncatedReason)))));
|
|
1156
1158
|
}
|
|
1157
1159
|
case 'tool_result':
|
|
1158
1160
|
return null;
|