agentk8 2.3.4 → 2.3.5
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 +6 -2
- package/dist/components/App.js +20 -42
- package/dist/components/StatusBar.d.ts +1 -1
- package/dist/components/StatusBar.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -27,10 +27,14 @@ const cli = meow(`
|
|
|
27
27
|
/exit Exit AGENT-K
|
|
28
28
|
|
|
29
29
|
Keyboard
|
|
30
|
-
Esc Cancel
|
|
30
|
+
Esc Cancel operation (when processing)
|
|
31
31
|
Esc Esc Exit (double-press when idle)
|
|
32
32
|
Ctrl+U Clear input line
|
|
33
|
-
|
|
33
|
+
|
|
34
|
+
Modes (/normal, /plan, /auto)
|
|
35
|
+
normal Execute, confirm edits (default)
|
|
36
|
+
plan Plan first, then execute
|
|
37
|
+
auto No confirmations
|
|
34
38
|
`, {
|
|
35
39
|
importMeta: import.meta,
|
|
36
40
|
flags: {
|
package/dist/components/App.js
CHANGED
|
@@ -25,7 +25,7 @@ export const App = ({ mode, version }) => {
|
|
|
25
25
|
const [totalTokens, setTotalTokens] = useState(0);
|
|
26
26
|
const [startTime] = useState(new Date());
|
|
27
27
|
const [error, setError] = useState(null);
|
|
28
|
-
const [executionMode, setExecutionMode] = useState('
|
|
28
|
+
const [executionMode, setExecutionMode] = useState('normal');
|
|
29
29
|
const [activeAgent, setActiveAgent] = useState(undefined);
|
|
30
30
|
const [completedAgents, setCompletedAgents] = useState([]);
|
|
31
31
|
const [confirmationState, setConfirmationState] = useState(null);
|
|
@@ -136,6 +136,7 @@ export const App = ({ mode, version }) => {
|
|
|
136
136
|
await generatePlan(input);
|
|
137
137
|
}
|
|
138
138
|
else {
|
|
139
|
+
// normal or auto mode - executeTask handles autoAccept
|
|
139
140
|
await executeTask(input);
|
|
140
141
|
}
|
|
141
142
|
};
|
|
@@ -372,35 +373,36 @@ Format your response clearly with headers.`;
|
|
|
372
373
|
setActiveAgent(undefined);
|
|
373
374
|
setCompletedAgents([]);
|
|
374
375
|
break;
|
|
376
|
+
case 'normal':
|
|
377
|
+
setExecutionMode('normal');
|
|
378
|
+
setAutoAccept(false);
|
|
379
|
+
addSystemMessage('Normal mode. I will execute and ask for confirmation on edits.');
|
|
380
|
+
break;
|
|
375
381
|
case 'plan':
|
|
376
382
|
setExecutionMode('plan');
|
|
377
|
-
|
|
383
|
+
setAutoAccept(false);
|
|
384
|
+
addSystemMessage('Plan mode. I will create a plan for approval before executing.');
|
|
378
385
|
break;
|
|
379
386
|
case 'auto':
|
|
380
387
|
setConfirmationState({
|
|
381
|
-
message: '⚠️
|
|
388
|
+
message: '⚠️ Enable Auto Mode? This executes everything without any confirmations.',
|
|
382
389
|
options: [
|
|
383
|
-
{ label: 'Yes, enable auto
|
|
384
|
-
{ label: 'No,
|
|
390
|
+
{ label: 'Yes, enable auto', value: 'yes' },
|
|
391
|
+
{ label: 'No, keep current mode', value: 'no' },
|
|
385
392
|
],
|
|
386
393
|
onSelect: (value) => {
|
|
387
394
|
setConfirmationState(null);
|
|
388
395
|
if (value === 'yes') {
|
|
389
396
|
setExecutionMode('auto');
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
else {
|
|
393
|
-
addSystemMessage('Kept in plan mode.');
|
|
397
|
+
setAutoAccept(true);
|
|
398
|
+
addSystemMessage('Auto mode. No confirmations, executing everything directly.');
|
|
394
399
|
}
|
|
395
400
|
},
|
|
396
|
-
onCancel: () =>
|
|
397
|
-
setConfirmationState(null);
|
|
398
|
-
addSystemMessage('Kept in plan mode.');
|
|
399
|
-
},
|
|
401
|
+
onCancel: () => setConfirmationState(null),
|
|
400
402
|
});
|
|
401
403
|
break;
|
|
402
404
|
case 'mode':
|
|
403
|
-
addSystemMessage(`Current
|
|
405
|
+
addSystemMessage(`Current mode: ${executionMode}\nUse /normal, /plan, or /auto to switch.`);
|
|
404
406
|
break;
|
|
405
407
|
case 'agents':
|
|
406
408
|
if (!activeAgent && completedAgents.length === 0) {
|
|
@@ -457,9 +459,10 @@ Format your response clearly with headers.`;
|
|
|
457
459
|
/help - Show this help
|
|
458
460
|
/clear - Clear chat history
|
|
459
461
|
/status - Show session status
|
|
460
|
-
/
|
|
461
|
-
/
|
|
462
|
-
/
|
|
462
|
+
/normal - Normal mode (execute, confirm edits)
|
|
463
|
+
/plan - Plan mode (plan first, then execute)
|
|
464
|
+
/auto - Auto mode (no confirmations)
|
|
465
|
+
/mode - Show current mode
|
|
463
466
|
/agents - Show active agents
|
|
464
467
|
/council - Toggle council mode (multi-LLM consensus)
|
|
465
468
|
/solo - Enable solo council (multi-Claude personas)
|
|
@@ -469,7 +472,6 @@ Format your response clearly with headers.`;
|
|
|
469
472
|
Keyboard shortcuts:
|
|
470
473
|
↑/↓ - Browse command history
|
|
471
474
|
Tab - Autocomplete commands
|
|
472
|
-
Shift+Tab - Toggle auto-edit mode
|
|
473
475
|
Esc - Cancel operation (when processing)
|
|
474
476
|
Esc Esc - Exit (when idle)
|
|
475
477
|
Ctrl+U - Clear input line`,
|
|
@@ -537,30 +539,6 @@ Ctrl+U - Clear input line`,
|
|
|
537
539
|
}
|
|
538
540
|
}
|
|
539
541
|
}
|
|
540
|
-
// Shift+Tab to toggle auto-accept
|
|
541
|
-
if (key.shift && key.tab) {
|
|
542
|
-
if (autoAccept) {
|
|
543
|
-
// Disable silently
|
|
544
|
-
setAutoAccept(false);
|
|
545
|
-
}
|
|
546
|
-
else {
|
|
547
|
-
// Show confirmation prompt
|
|
548
|
-
setConfirmationState({
|
|
549
|
-
message: 'Enable auto-accept for code edits?',
|
|
550
|
-
options: [
|
|
551
|
-
{ label: 'Yes, enable auto-accept', value: 'yes' },
|
|
552
|
-
{ label: 'No, keep asking', value: 'no' },
|
|
553
|
-
],
|
|
554
|
-
onSelect: (value) => {
|
|
555
|
-
setConfirmationState(null);
|
|
556
|
-
if (value === 'yes') {
|
|
557
|
-
setAutoAccept(true);
|
|
558
|
-
}
|
|
559
|
-
},
|
|
560
|
-
onCancel: () => setConfirmationState(null),
|
|
561
|
-
});
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
542
|
});
|
|
565
543
|
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Static, { items: messages, children: (item) => {
|
|
566
544
|
if ('isWelcome' in item && item.isWelcome) {
|
|
@@ -3,7 +3,7 @@ import { AgentName } from './AgentPanel.js';
|
|
|
3
3
|
type CouncilMode = 'solo' | 'council' | 'off';
|
|
4
4
|
interface StatusBarProps {
|
|
5
5
|
mode: 'dev' | 'ml';
|
|
6
|
-
executionMode: 'plan' | 'auto';
|
|
6
|
+
executionMode: 'normal' | 'plan' | 'auto';
|
|
7
7
|
tokens: number;
|
|
8
8
|
startTime: Date;
|
|
9
9
|
isProcessing?: boolean;
|
|
@@ -106,6 +106,6 @@ export const StatusBar = ({ mode, executionMode, tokens, startTime, isProcessing
|
|
|
106
106
|
const leftBracket = isActive ? pulseBrackets[pulseFrame] : '[';
|
|
107
107
|
const rightBracket = isActive ? pulseBrackets[(pulseFrame + 3) % pulseBrackets.length] === '<' ? '>' : pulseBrackets[(pulseFrame + 3) % pulseBrackets.length] === '{' ? '}' : pulseBrackets[(pulseFrame + 3) % pulseBrackets.length] === '(' ? ')' : ']' : ']';
|
|
108
108
|
return (_jsxs(React.Fragment, { children: [_jsx(Text, { color: getAgentColor(agent), children: leftBracket }), _jsx(Text, { color: getAgentColor(agent), children: agentIcons[agent] }), _jsx(Text, { color: getAgentColor(agent), children: rightBracket }), i < modeAgents.length - 1 && _jsx(Text, { color: theme.dim, children: " " })] }, agent));
|
|
109
|
-
})), _jsx(Text, { color: theme.border, children: " \u2502 " }), _jsx(Text, { color: theme.dim, children: "? help" }), councilMode !== 'off' && (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.border, children: " \u2502 " }), _jsx(Text, { color: theme.highlight, children: councilMode === 'council' ? 'COUNCIL' : 'SOLO' })] })), executionMode
|
|
109
|
+
})), _jsx(Text, { color: theme.border, children: " \u2502 " }), _jsx(Text, { color: theme.dim, children: "? help" }), councilMode !== 'off' && (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.border, children: " \u2502 " }), _jsx(Text, { color: theme.highlight, children: councilMode === 'council' ? 'COUNCIL' : 'SOLO' })] })), executionMode !== 'normal' && (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.border, children: " \u2502 " }), _jsx(Text, { color: executionMode === 'auto' ? theme.active : theme.accent, children: executionMode.toUpperCase() })] })), isProcessing && (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.border, children: " \u2502 " }), _jsx(Text, { color: theme.highlight, children: icons.spinner[spinnerFrame] })] })), elapsed && (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.border, children: " \u2502 " }), _jsx(Text, { color: theme.dim, children: elapsed })] }))] }), _jsxs(Box, { children: [showExitHint && (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.dim, children: "Press Esc again to exit" }), _jsx(Text, { color: theme.border, children: " \u2502 " })] })), _jsxs(Text, { color: theme.accent, children: ["\u2191 ", formatTokens(tokens)] }), _jsx(Text, { color: theme.dim, children: " tokens " })] })] }));
|
|
110
110
|
};
|
|
111
111
|
export default StatusBar;
|