@taj-special/dravix-code 1.1.11 → 1.1.13
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/dist/cli/repl.js
CHANGED
|
@@ -2128,11 +2128,13 @@ async function showDesignModeLoader(skills) {
|
|
|
2128
2128
|
export async function startRepl(cwd) {
|
|
2129
2129
|
const alwaysAllowed = new Set();
|
|
2130
2130
|
const token = getToken() ?? '';
|
|
2131
|
-
let SYSTEM_PROMPT = '';
|
|
2131
|
+
let SYSTEM_PROMPT = 'You are Dravix Code — an elite AI coding assistant. The server is temporarily unreachable. Use your best judgment to help the user.';
|
|
2132
2132
|
if (token) {
|
|
2133
2133
|
const { prompt, webDesignerSkill } = await fetchSystemPrompt(token);
|
|
2134
|
-
|
|
2135
|
-
|
|
2134
|
+
if (prompt) {
|
|
2135
|
+
SYSTEM_PROMPT = prompt;
|
|
2136
|
+
_serverWebDesignerSkill = webDesignerSkill;
|
|
2137
|
+
}
|
|
2136
2138
|
}
|
|
2137
2139
|
// activeCwd can change when /resume loads a conversation from a different directory
|
|
2138
2140
|
let activeCwd = cwd;
|
package/dist/services/context.js
CHANGED
|
@@ -119,8 +119,12 @@ export function buildContext(root) {
|
|
|
119
119
|
const files = getProjectFiles(root);
|
|
120
120
|
const git = getGitStatus(root);
|
|
121
121
|
const projectName = path.basename(root);
|
|
122
|
+
const shell = process.platform === 'win32' ? 'Windows — PowerShell'
|
|
123
|
+
: process.platform === 'darwin' ? 'macOS — bash/zsh'
|
|
124
|
+
: 'Linux — bash';
|
|
122
125
|
return `Project: ${projectName}
|
|
123
126
|
Working dir: ${root}
|
|
127
|
+
OS: ${shell}
|
|
124
128
|
Git status:
|
|
125
129
|
${git || '(clean)'}
|
|
126
130
|
Files:
|
|
@@ -405,10 +405,15 @@ export async function executeSingleOp(op, cwd, onStage) {
|
|
|
405
405
|
const safeCmd = /(?:^|\s)npx\s+(?!--yes\b)/i.test(op.command)
|
|
406
406
|
? op.command.replace(/(?<=(?:^|\s))npx(\s+)/i, 'npx --yes$1')
|
|
407
407
|
: op.command;
|
|
408
|
-
|
|
409
|
-
|
|
408
|
+
const isWindows = process.platform === 'win32';
|
|
409
|
+
// On PowerShell 5.1, 'curl' is an alias for Invoke-WebRequest — use curl.exe for real HTTP
|
|
410
|
+
const finalCmd = isWindows
|
|
411
|
+
? safeCmd.replace(/\bcurl\b(?!\.\w)/g, 'curl.exe')
|
|
412
|
+
: safeCmd;
|
|
410
413
|
const out = await new Promise((res, rej) => {
|
|
411
|
-
const child =
|
|
414
|
+
const child = isWindows
|
|
415
|
+
? spawn('powershell.exe', ['-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Bypass', '-Command', finalCmd], { cwd: runCwd, windowsHide: true })
|
|
416
|
+
: spawn('bash', ['-c', finalCmd], { cwd: runCwd });
|
|
412
417
|
child.stdout?.setEncoding('utf-8');
|
|
413
418
|
child.stderr?.setEncoding('utf-8');
|
|
414
419
|
let stdout = '';
|