agentk8 2.2.3 → 2.2.4
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.js +1 -1
- package/dist/components/App.js +7 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
package/dist/components/App.js
CHANGED
|
@@ -42,7 +42,8 @@ export const App = ({ mode, version }) => {
|
|
|
42
42
|
}
|
|
43
43
|
// Handle approval response
|
|
44
44
|
if (awaitingApproval) {
|
|
45
|
-
|
|
45
|
+
// Enter (empty input) = approve
|
|
46
|
+
if (input.trim() === '') {
|
|
46
47
|
setAwaitingApproval(false);
|
|
47
48
|
if (pendingPlan) {
|
|
48
49
|
await executeTask(pendingPlan);
|
|
@@ -56,6 +57,9 @@ export const App = ({ mode, version }) => {
|
|
|
56
57
|
addSystemMessage('Plan cancelled. What would you like to do instead?');
|
|
57
58
|
return;
|
|
58
59
|
}
|
|
60
|
+
// Any other input cancels and starts new request
|
|
61
|
+
setAwaitingApproval(false);
|
|
62
|
+
setPendingPlan(null);
|
|
59
63
|
}
|
|
60
64
|
// Add user message
|
|
61
65
|
const userMessage = {
|
|
@@ -108,7 +112,7 @@ Format your response clearly with headers.`;
|
|
|
108
112
|
}
|
|
109
113
|
setPendingPlan(input);
|
|
110
114
|
setAwaitingApproval(true);
|
|
111
|
-
addSystemMessage('
|
|
115
|
+
addSystemMessage('Press Enter to execute, or type "n" to cancel');
|
|
112
116
|
}
|
|
113
117
|
catch (err) {
|
|
114
118
|
setError(err instanceof Error ? err.message : 'Unknown error');
|
|
@@ -255,7 +259,7 @@ Ctrl+U - Clear input line`,
|
|
|
255
259
|
return _jsx(WelcomeBox, { version: version, mode: mode }, "welcome");
|
|
256
260
|
}
|
|
257
261
|
return (_jsx(ChatMessage, { role: item.role, agentName: item.agentName, content: item.content, tokens: item.tokens }, item.id));
|
|
258
|
-
} }), isProcessing && processingStartTime && (_jsx(ThinkingIndicator, { startTime: processingStartTime })), error && (_jsx(Box, { marginY: 1, marginLeft: 1, children: _jsxs(Text, { color: "#e53e3e", children: ["\u2717 Error: ", error] }) })), _jsx(Input, { onSubmit: handleSubmit, disabled: isProcessing, placeholder: awaitingApproval ? "
|
|
262
|
+
} }), isProcessing && processingStartTime && (_jsx(ThinkingIndicator, { startTime: processingStartTime })), error && (_jsx(Box, { marginY: 1, marginLeft: 1, children: _jsxs(Text, { color: "#e53e3e", children: ["\u2717 Error: ", error] }) })), _jsx(Input, { onSubmit: handleSubmit, disabled: isProcessing, placeholder: awaitingApproval ? "Press Enter to execute, n to cancel" : 'Try "build a password validator"' }), _jsx(StatusBar, { mode: mode, tokens: totalTokens, startTime: startTime, isProcessing: isProcessing, activeAgent: activeAgent, completedAgents: completedAgents })] }));
|
|
259
263
|
};
|
|
260
264
|
function formatElapsed(start) {
|
|
261
265
|
const secs = Math.floor((Date.now() - start.getTime()) / 1000);
|