draftify-cli 1.0.85 → 1.0.87
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/repl.js +5 -4
- package/dist/utils/ui.js +3 -2
- package/package.json +1 -1
package/dist/repl.js
CHANGED
|
@@ -275,7 +275,7 @@ async function startRepl(initialUsername) {
|
|
|
275
275
|
}
|
|
276
276
|
const renderWelcome = () => {
|
|
277
277
|
console.clear();
|
|
278
|
-
ui_1.ui.welcomeScreen(repoName, currentModel, username, plan);
|
|
278
|
+
ui_1.ui.welcomeScreen(repoName, currentModel, username, plan, (0, config_1.getThinkingLevel)());
|
|
279
279
|
};
|
|
280
280
|
renderWelcome();
|
|
281
281
|
let conversationHistory = [];
|
|
@@ -291,7 +291,7 @@ async function startRepl(initialUsername) {
|
|
|
291
291
|
ui_1.ui.info(`Answers automatically sent to the AI.`);
|
|
292
292
|
}
|
|
293
293
|
else {
|
|
294
|
-
const commandsList = ['/new-chat', '/chats', '/skills', '/model', '/usage', '/login', '/logout', '/help', '/exit', '/quit'];
|
|
294
|
+
const commandsList = ['/new-chat', '/chats', '/skills', '/model', '/thinking-level', '/usage', '/login', '/logout', '/help', '/exit', '/quit'];
|
|
295
295
|
ui_1.ui.divider();
|
|
296
296
|
let answer = await getInteractiveInput((0, kleur_1.dim)("> "), commandsList);
|
|
297
297
|
ui_1.ui.divider();
|
|
@@ -377,6 +377,7 @@ async function startRepl(initialUsername) {
|
|
|
377
377
|
console.log(` ${(0, kleur_1.cyan)("/chats")} - List and load previous chats`);
|
|
378
378
|
console.log(` ${(0, kleur_1.cyan)("/skills")} - Manage and configure skills`);
|
|
379
379
|
console.log(` ${(0, kleur_1.cyan)("/model")} - Switch model (e.g., /model Opus 4.8-level)`);
|
|
380
|
+
console.log(` ${(0, kleur_1.cyan)("/thinking-level")} - Set thinking level for Opus 4.8-level`);
|
|
380
381
|
console.log(` ${(0, kleur_1.cyan)("/login")} - Log in to your Draftify account`);
|
|
381
382
|
console.log(` ${(0, kleur_1.cyan)("/logout")} - Log out of your account`);
|
|
382
383
|
console.log(` ${(0, kleur_1.cyan)("/usage")} - Show your token usage and quota`);
|
|
@@ -602,7 +603,7 @@ async function startRepl(initialUsername) {
|
|
|
602
603
|
}
|
|
603
604
|
}
|
|
604
605
|
}
|
|
605
|
-
const createRegex = /<FILE_CREATE\s+path=['"]([^'"]+)['"]>([\s\S]*?)<\/
|
|
606
|
+
const createRegex = /<FILE_CREATE\s+path=['"]([^'"]+)['"]>([\s\S]*?)<\/(?:FILE|SCRIPT|STYLE|HTML)_CREATE>/gi;
|
|
606
607
|
while ((match = createRegex.exec(result)) !== null) {
|
|
607
608
|
const filePath = match[1];
|
|
608
609
|
const fullPath = path_1.default.resolve(process.cwd(), filePath);
|
|
@@ -627,7 +628,7 @@ async function startRepl(initialUsername) {
|
|
|
627
628
|
ui_1.ui.error(`Failed to create ${filePath}: ${e.message}`);
|
|
628
629
|
}
|
|
629
630
|
}
|
|
630
|
-
const modifyRegex = /<FILE_MODIFY\s+path=['"]([^'"]+)['"]>([\s\S]*?)<\/
|
|
631
|
+
const modifyRegex = /<FILE_MODIFY\s+path=['"]([^'"]+)['"]>([\s\S]*?)<\/(?:FILE|SCRIPT|STYLE|HTML)_MODIFY>/gi;
|
|
631
632
|
while ((match = modifyRegex.exec(result)) !== null) {
|
|
632
633
|
const filePath = match[1];
|
|
633
634
|
const block = match[2];
|
package/dist/utils/ui.js
CHANGED
|
@@ -106,7 +106,7 @@ exports.ui = {
|
|
|
106
106
|
const text = `Draftify Scale | Engine: ${model} | Repo: ${repoName}`;
|
|
107
107
|
console.log(`\n ${(0, kleur_1.dim)(`[${text}]`)}`);
|
|
108
108
|
},
|
|
109
|
-
welcomeScreen: (repoName, model, username, plan = "Draftify Scale") => {
|
|
109
|
+
welcomeScreen: (repoName, model, username, plan = "Draftify Scale", thinkingLevel) => {
|
|
110
110
|
resetInline();
|
|
111
111
|
// Borderless Claude Code style with strong orange logo
|
|
112
112
|
const orange = (s) => `\x1b[38;5;208m${s}\x1b[0m`;
|
|
@@ -114,9 +114,10 @@ exports.ui = {
|
|
|
114
114
|
const white = (s) => `\x1b[37m${s}\x1b[0m`;
|
|
115
115
|
console.log("");
|
|
116
116
|
const greeting = username ? `Welcome ${username} to Draftify Code!` : "Welcome to Draftify Code!";
|
|
117
|
+
const modelStr = model.includes("4.8") && thinkingLevel ? `${model} (Thinking: ${thinkingLevel})` : model;
|
|
117
118
|
console.log(` ${orange("█ █ █ █")} ${white(greeting)}`);
|
|
118
119
|
console.log(` ${orange("█████████")} ${white("Draftify Code ")}${gray("v1.0.0")}`);
|
|
119
|
-
console.log(` ${orange("█ █████ █")} ${gray(`${
|
|
120
|
+
console.log(` ${orange("█ █████ █")} ${gray(`${modelStr} [${plan}]`)}`);
|
|
120
121
|
console.log(` ${orange("█████████")} ${gray(process.cwd())}`);
|
|
121
122
|
console.log(` ${orange(" █ █ ")}`);
|
|
122
123
|
console.log("");
|