Skip to content

Commit c87e81f

Browse files
author
prima
committed
feat: Added agent stop logic to options
1 parent 33bf8e6 commit c87e81f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

klite.embd

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25779,7 +25779,7 @@ else
2577925779
if (actualSuggestions.length > 0)
2578025780
{
2578125781
setSuggestions(actualSuggestions)
25782-
return true
25782+
return !!localsettings?.agentStopOnRequestForInput
2578325783
}
2578425784
}
2578525785
catch {
@@ -27250,6 +27250,7 @@ let checkFinalThoughtsPrompt = `Action: {"command":{"name":"thought","args":{"me
2725027250
originalDisplaySettings()
2725127251
document.getElementById("agentBehaviour").checked = localsettings.agentBehaviour;
2725227252
document.getElementById("agentHideCOT").checked = localsettings.agentHideCOT;
27253+
document.getElementById("agentStopOnRequestForInput").checked = localsettings.agentStopOnRequestForInput;
2725327254
document.getElementById("agentCOTMax").value = localsettings.agentCOTMax;
2725427255
document.getElementById("agentCOTMaxnumeric").value = localsettings.agentCOTMax;
2725527256
document.getElementById("agentCOTRepeatsMax").value = localsettings.agentCOTRepeatsMax;
@@ -27261,6 +27262,7 @@ let checkFinalThoughtsPrompt = `Action: {"command":{"name":"thought","args":{"me
2726127262
confirm_settings = () => {
2726227263
localsettings.agentBehaviour = (document.getElementById("agentBehaviour").checked ? true : false);
2726327264
localsettings.agentHideCOT = (document.getElementById("agentHideCOT").checked ? true : false);
27265+
localsettings.agentStopOnRequestForInput = (document.getElementById("agentStopOnRequestForInput").checked ? true : false);
2726427266
localsettings.agentCOTMax = document.getElementById("agentCOTMax").value;
2726527267
localsettings.agentCOTRepeatsMax = document.getElementById("agentCOTRepeatsMax").value;
2726627268
localsettings.disableSaveCompressionLocally = (document.getElementById("disableSaveCompressionLocally").checked ? true : false);
@@ -27458,6 +27460,10 @@ let checkFinalThoughtsPrompt = `Action: {"command":{"name":"thought","args":{"me
2745827460
{
2745927461
localsettings.agentHideCOT = true
2746027462
}
27463+
if (localsettings?.agentStopOnRequestForInput == undefined)
27464+
{
27465+
localsettings.agentStopOnRequestForInput = true
27466+
}
2746127467
if (localsettings?.agentCOTMax == undefined)
2746227468
{
2746327469
localsettings.agentCOTMax = 5
@@ -27569,6 +27575,9 @@ let checkFinalThoughtsPrompt = `Action: {"command":{"name":"thought","args":{"me
2756927575
settingLabelElem = createSettingElemRange("agentCOTMax", "Maximum agent actions", "Defines the maximum number of actions the agent can take without a user input", 1, 20, 1, 5)
2757027576
lastSettingContainer.append(settingLabelElem)
2757127577

27578+
settingLabelElem = createSettingElemBool("agentStopOnRequestForInput", "Stop on request for input from agent", "Stops the current agent processing if it asks for user input")
27579+
lastSettingContainer.append(settingLabelElem)
27580+
2757227581
// Hidden as this is no longer is in use for now
2757327582
settingLabelElem = createSettingElemRange("agentCOTRepeatsMax", "Maximum repeated agent actions of a type", "Defines the maximum number of actions the agent can take of the same type without a user input", 1, 20, 1, 1)
2757427583
settingLabelElem.style.display = "none"

0 commit comments

Comments
 (0)