@tenux/cli 0.0.19 → 0.0.20
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.
|
@@ -241,15 +241,16 @@ async function handleClaudeQuery(command, supabase) {
|
|
|
241
241
|
if (!existsSync2(config.projectsDir)) {
|
|
242
242
|
mkdirSync2(config.projectsDir, { recursive: true });
|
|
243
243
|
}
|
|
244
|
-
let
|
|
244
|
+
let focusPrefix = "";
|
|
245
245
|
if (project_path) {
|
|
246
246
|
const projectDir = resolve(config.projectsDir, project_path);
|
|
247
|
-
const relPath = `./projects/${project_path}`;
|
|
248
247
|
if (existsSync2(projectDir)) {
|
|
249
|
-
|
|
248
|
+
focusPrefix = `>> focused: ./projects/${project_path}
|
|
249
|
+
`;
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
|
-
const
|
|
252
|
+
const baseSystemPrompt = `You are working inside a Tenux workspace at ${cwd}. All projects live under ./projects/. User messages may start with ">> focused: ./projects/<name>" \u2014 this indicates which project the user is currently viewing. Treat it as context for which project changes likely apply to, unless the user explicitly says otherwise. Never echo the ">>" line back to the user.`;
|
|
253
|
+
const fullSystemPrompt = [baseSystemPrompt, system_prompt].filter(Boolean).join("\n\n");
|
|
253
254
|
const args = [
|
|
254
255
|
"--print",
|
|
255
256
|
// non-interactive
|
|
@@ -272,7 +273,7 @@ async function handleClaudeQuery(command, supabase) {
|
|
|
272
273
|
shell: isWindows,
|
|
273
274
|
stdio: ["pipe", "pipe", "pipe"]
|
|
274
275
|
});
|
|
275
|
-
proc.stdin.write(prompt);
|
|
276
|
+
proc.stdin.write(focusPrefix + prompt);
|
|
276
277
|
proc.stdin.end();
|
|
277
278
|
let seq = 0;
|
|
278
279
|
let capturedSessionId = null;
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED