@lasso-ai/cli 2.1.5 → 2.1.6
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/overlay.js +54 -8
- package/package.json +1 -1
package/dist/overlay.js
CHANGED
|
@@ -19600,6 +19600,48 @@
|
|
|
19600
19600
|
var activeStartTime = 0;
|
|
19601
19601
|
var activeConversationId = null;
|
|
19602
19602
|
var conversationList = [];
|
|
19603
|
+
function isConversationalPrompt(prompt) {
|
|
19604
|
+
const p = prompt.trim().toLowerCase().replace(/[!?.,;:]+$/, "");
|
|
19605
|
+
const greetings = [
|
|
19606
|
+
"hi",
|
|
19607
|
+
"hello",
|
|
19608
|
+
"hey",
|
|
19609
|
+
"heya",
|
|
19610
|
+
"howdy",
|
|
19611
|
+
"sup",
|
|
19612
|
+
"yo",
|
|
19613
|
+
"good morning",
|
|
19614
|
+
"good afternoon",
|
|
19615
|
+
"good evening",
|
|
19616
|
+
"thanks",
|
|
19617
|
+
"thank you",
|
|
19618
|
+
"thx",
|
|
19619
|
+
"ty",
|
|
19620
|
+
"cool",
|
|
19621
|
+
"awesome",
|
|
19622
|
+
"great",
|
|
19623
|
+
"nice",
|
|
19624
|
+
"who are you",
|
|
19625
|
+
"what are you",
|
|
19626
|
+
"what can you do",
|
|
19627
|
+
"help",
|
|
19628
|
+
"help me",
|
|
19629
|
+
"what is lasso",
|
|
19630
|
+
"how do you work",
|
|
19631
|
+
"how does this work"
|
|
19632
|
+
];
|
|
19633
|
+
if (greetings.includes(p)) return true;
|
|
19634
|
+
if (/^(hi|hello|hey|howdy|yo)\b/i.test(p) && p.split(/\s+/).length <= 4) {
|
|
19635
|
+
const buildKeywords = /(build|create|add|make|fix|update|modify|change|refactor|implement|delete|remove|style|install|wire|code)/i;
|
|
19636
|
+
if (!buildKeywords.test(p)) return true;
|
|
19637
|
+
}
|
|
19638
|
+
const questionOnly = /^(what is|what's|how do i|why does|can you explain|tell me about)\b/i.test(p);
|
|
19639
|
+
const actionVerbs = /(build|create|add|make|fix|update|modify|change|refactor|implement|write code|code this|delete|remove|generate)/i;
|
|
19640
|
+
if (questionOnly && !actionVerbs.test(p)) {
|
|
19641
|
+
return true;
|
|
19642
|
+
}
|
|
19643
|
+
return false;
|
|
19644
|
+
}
|
|
19603
19645
|
function isRetryIntent(prompt) {
|
|
19604
19646
|
const p = prompt.trim().toLowerCase().replace(/[!?.]+$/, "");
|
|
19605
19647
|
return /^(try\s+again|retry|re-?try|do\s+it\s+again|run\s+again|attempt\s+again|go\s+again|one\s+more\s+time|again)$/.test(p);
|
|
@@ -20373,7 +20415,8 @@
|
|
|
20373
20415
|
const taskId2 = `oneshot-${Date.now()}`;
|
|
20374
20416
|
activeTaskId = taskId2;
|
|
20375
20417
|
activeStartTime = Date.now();
|
|
20376
|
-
const
|
|
20418
|
+
const isChat = isConversationalPrompt(prompt);
|
|
20419
|
+
const initialStepTitle = isChat ? "Preparing response\u2026" : "Preparing task\u2026";
|
|
20377
20420
|
commandMessages.push({
|
|
20378
20421
|
id: taskId2,
|
|
20379
20422
|
role: "assistant",
|
|
@@ -20473,14 +20516,17 @@
|
|
|
20473
20516
|
expanded: true
|
|
20474
20517
|
};
|
|
20475
20518
|
}
|
|
20476
|
-
|
|
20477
|
-
|
|
20519
|
+
const stepTitle = (message.message || "").trim();
|
|
20520
|
+
if (stepTitle && stepTitle !== "Thinking\u2026" && stepTitle !== "Thinking") {
|
|
20521
|
+
for (const step of targetMsg.thinking.steps) {
|
|
20522
|
+
if (step.status === "running") step.status = "completed";
|
|
20523
|
+
}
|
|
20524
|
+
targetMsg.thinking.steps.push({
|
|
20525
|
+
title: stepTitle,
|
|
20526
|
+
detail: message.detail,
|
|
20527
|
+
status: "running"
|
|
20528
|
+
});
|
|
20478
20529
|
}
|
|
20479
|
-
targetMsg.thinking.steps.push({
|
|
20480
|
-
title: message.message,
|
|
20481
|
-
detail: message.detail,
|
|
20482
|
-
status: "running"
|
|
20483
|
-
});
|
|
20484
20530
|
renderMessages();
|
|
20485
20531
|
scrollToBottom();
|
|
20486
20532
|
} else if (message.status === "review" || message.status === "complete") {
|
package/package.json
CHANGED