@taj-special/dravix-code 1.1.7 → 1.1.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.
- package/dist/cli/repl.js +8 -10
- package/package.json +1 -1
package/dist/cli/repl.js
CHANGED
|
@@ -15,13 +15,6 @@ const BASE_PROMPT = ``;
|
|
|
15
15
|
// Critical behavioral rules — always injected into system prompt for every session
|
|
16
16
|
const BEHAVIORAL_RULES = `
|
|
17
17
|
|
|
18
|
-
## LANGUAGE RULE — HIGHEST PRIORITY, NO EXCEPTIONS:
|
|
19
|
-
Identify the language of the user's message. Reply 100% in that same language — every single word of your response.
|
|
20
|
-
- User wrote Tajik (contains: нест, кун, илова, файл, тағир...) → respond ONLY in Tajik
|
|
21
|
-
- User wrote Russian (contains: удали, добавь, измени, файл...) → respond ONLY in Russian
|
|
22
|
-
- User wrote English → respond ONLY in English
|
|
23
|
-
This rule overrides everything. Even when editing files, your commentary is in the user's language.
|
|
24
|
-
|
|
25
18
|
## EXECUTE IMMEDIATELY — never ask what to do, never explain before acting.
|
|
26
19
|
|
|
27
20
|
## FILE OPERATIONS — use these exact tag formats:
|
|
@@ -55,7 +48,8 @@ full file content here
|
|
|
55
48
|
### RUN a command:
|
|
56
49
|
<run_command>command here</run_command>
|
|
57
50
|
|
|
58
|
-
### ACTIVATE Web Designer mode
|
|
51
|
+
### ACTIVATE Web Designer mode — MANDATORY before building any website, UI, or HTML file:
|
|
52
|
+
BEFORE writing any HTML/CSS/JS, you MUST output this tag first:
|
|
59
53
|
<design_mode>
|
|
60
54
|
Modern responsive layout
|
|
61
55
|
Clean typography and spacing
|
|
@@ -63,7 +57,7 @@ Professional color palette
|
|
|
63
57
|
Smooth animations and transitions
|
|
64
58
|
Mobile-first design
|
|
65
59
|
</design_mode>
|
|
66
|
-
List
|
|
60
|
+
List design features relevant to the project inside the tag. Only after this tag, proceed to build with <write_file>.
|
|
67
61
|
|
|
68
62
|
## RULES:
|
|
69
63
|
- File content labeled [File: name — FULL] is already provided — use it, do NOT read again.
|
|
@@ -2811,7 +2805,9 @@ export async function startRepl(cwd) {
|
|
|
2811
2805
|
}
|
|
2812
2806
|
const normalized = normalizeResponse(fullResponse);
|
|
2813
2807
|
lastAIResponse = normalized;
|
|
2814
|
-
|
|
2808
|
+
if (normalized.trim()) {
|
|
2809
|
+
history.push({ role: 'assistant', content: normalized });
|
|
2810
|
+
}
|
|
2815
2811
|
if (conversationTitle === null) {
|
|
2816
2812
|
const _msgs = history.slice(1).filter(m => m.role === 'user' || m.role === 'assistant');
|
|
2817
2813
|
const _u = _msgs.find(m => m.role === 'user');
|
|
@@ -2847,6 +2843,7 @@ export async function startRepl(cwd) {
|
|
|
2847
2843
|
if (inlineFileOpErrors.length > 0) {
|
|
2848
2844
|
history.push({ role: 'system', content: inlineFileOpErrors.join('\n\n') + '\n\nFix the above errors and retry the failed operations.' });
|
|
2849
2845
|
readFileContinue = true;
|
|
2846
|
+
useProModel = true;
|
|
2850
2847
|
}
|
|
2851
2848
|
const allOps = parseOps(normalized);
|
|
2852
2849
|
// ── Detect incomplete plan: AI described steps but didn't output tags ──
|
|
@@ -3169,6 +3166,7 @@ export async function startRepl(cwd) {
|
|
|
3169
3166
|
if (fileOpErrors.length > 0) {
|
|
3170
3167
|
history.push({ role: 'system', content: fileOpErrors.join('\n\n') + '\n\nFix the above errors and retry the failed operations.' });
|
|
3171
3168
|
readFileContinue = true;
|
|
3169
|
+
useProModel = true;
|
|
3172
3170
|
}
|
|
3173
3171
|
if (declinedCmds.length > 0) {
|
|
3174
3172
|
const content = declinedCmds.map(cmd => `[User declined to run — ${cmd}]: User pressed No. Do not retry or ask about this command.`).join('\n\n');
|