@ywldan/kiro 0.2.6 → 0.2.7
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/README.md +5 -3
- package/dist/ui/App.js +44 -2
- package/dist/ui/StatusBar.js +20 -12
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -268,7 +268,7 @@ Exit codes: `0` success, `1` model/tool/session error, `2` usage error (includin
|
|
|
268
268
|
| Key | Action |
|
|
269
269
|
| --- | --- |
|
|
270
270
|
| `Enter` | Send the prompt, or run the highlighted `/` command |
|
|
271
|
-
| `Ctrl+C` |
|
|
271
|
+
| `Ctrl+C` | Press twice to exit; while a turn runs, the first press cancels it |
|
|
272
272
|
| `PgUp` / `PgDn` | Scroll the history (the wheel works too, unless you pass `--no-mouse`) |
|
|
273
273
|
| `Ctrl+O` | Expand or collapse the full output of the most recent tool call |
|
|
274
274
|
| `↑` / `↓` | Move through the `/` command menu; with an empty input, recall prompt history |
|
|
@@ -280,10 +280,12 @@ Exit codes: `0` success, `1` model/tool/session error, `2` usage error (includin
|
|
|
280
280
|
| `Ctrl+W` | Delete the previous word |
|
|
281
281
|
| Left / Right / Home / End | Move the cursor |
|
|
282
282
|
|
|
283
|
-
The status bar shows the active profile and model, the working directory, the context meter (`ctx 42k/128k`), the number of queued messages, and the current state (`ready`, `thinking…`, `replying…`, `running <tool>…`, `approval needed`, `cancelling
|
|
283
|
+
The status bar shows the active profile and model, the working directory, the context meter (`ctx 42k/128k`), the number of queued messages, and the current state (`ready`, `thinking…`, `replying…`, `running <tool>…`, `approval needed`, `cancelling…`, `Ctrl+C again to quit`) with a spinner and the elapsed seconds for the current turn (`replying… · 12s`). A long profile name is shortened in the middle, so the model and directory stay readable. On a wide terminal the context meter moves into the Usage card described below, leaving more room for the profile and path.
|
|
284
284
|
|
|
285
285
|
The input stays enabled while the agent works: type the next prompt and press Enter to queue it, and it runs as soon as the current turn ends. Queued prompts appear in the transcript right away, the status bar shows `N queued`, and Ctrl+C clears the queue together with the running turn. Slash commands typed while busy are queued the same way.
|
|
286
286
|
|
|
287
|
+
Pressing Ctrl+C while idle does not exit immediately: the status bar shows `Ctrl+C again to quit` for two seconds, and a second press within that window leaves. This makes an accidental Ctrl+C harmless. `/exit` still quits right away, and a running turn is cancelled by the first press.
|
|
288
|
+
|
|
287
289
|
Prompt history is stored per working directory in `~/.kiro/history/` (mode `0600`, up to 200 entries). With an empty input, `↑` recalls the most recent prompt, `↓` walks forward again, and editing the recalled text leaves history mode. Registered API-key values are redacted before a prompt is written. Set `KIRO_HISTORY_DIR` to store the files elsewhere.
|
|
288
290
|
|
|
289
291
|
Reasoning models stream their thinking traces live as a dim `thinking…` block. Once the visible answer starts, the trace collapses to a single `reasoning (done, not saved)` line: traces are display-only and are never written to sessions or `/export`. While the model is producing text the status bar switches from `thinking…` to `replying…`; tool execution shows `running <tool>…`.
|
|
@@ -298,7 +300,7 @@ Typing `/` opens a command palette. It is drawn over the bottom of the transcrip
|
|
|
298
300
|
|
|
299
301
|
`/model` opens its picker as a centered overlay: the transcript, Usage card, and input row keep their places, and the input stays visible but disabled while the picker has focus. The list uses the frame's full height and reports hidden entries (`↑ 5 more · 6-15 of 30 · ↓ 15 more`) so long model lists are never silently cut off. On terminals narrower than 60 columns or shorter than 18 rows it falls back to the inline panel, which temporarily gives up transcript rows.
|
|
300
302
|
|
|
301
|
-
On a real TTY, `kiro` switches to the terminal's alternate screen: you get a clean page instead of the TUI drawing underneath the command you just ran. When Kiro exits — `/exit`, `Ctrl+C
|
|
303
|
+
On a real TTY, `kiro` switches to the terminal's alternate screen: you get a clean page instead of the TUI drawing underneath the command you just ran. When Kiro exits — `/exit`, `Ctrl+C` twice, or an error — the terminal restores the previous shell contents and prompt. Redirected output (pipes, CI logs) is left untouched. Pass `--no-alt-screen` to stay on the normal screen instead.
|
|
302
304
|
|
|
303
305
|
Mouse reporting is **on by default**, so the wheel scrolls the transcript. The cost is that the terminal hands clicks to Kiro instead of starting a text selection: to copy text, hold Shift while dragging (or your terminal's equivalent), or run `/mouse` — or start with `--no-mouse` — to get plain click-drag selection back, scrolling with `PgUp`/`PgDn` instead. `/mouse` toggles it at any time.
|
|
304
306
|
|
package/dist/ui/App.js
CHANGED
|
@@ -30,6 +30,8 @@ import { UsageCard, USAGE_CARD_GAP, USAGE_CARD_WIDTH, shouldShowUsageCard, } fro
|
|
|
30
30
|
import { addUsage, EMPTY_USAGE } from '../usage.js';
|
|
31
31
|
import { undoLastCheckpoint } from '../tools/checkpoint.js';
|
|
32
32
|
import { MAX_EXPANDED_TOOL_CHARS, MAX_REASONING_CHARS, } from './types.js';
|
|
33
|
+
/** Idle Ctrl+C must be pressed again within this window to exit. */
|
|
34
|
+
const QUIT_CONFIRM_MS = 2_000;
|
|
33
35
|
function useTerminalSize() {
|
|
34
36
|
const { stdout } = useStdout();
|
|
35
37
|
const read = useCallback(() => ({
|
|
@@ -80,6 +82,7 @@ export function App({ config, baseConfig, overrides, configPath, configCreated,
|
|
|
80
82
|
const [cancelling, setCancelling] = useState(false);
|
|
81
83
|
const [pendingApproval, setPendingApproval] = useState(null);
|
|
82
84
|
const [pickerOpen, setPickerOpen] = useState(false);
|
|
85
|
+
const [quitArmed, setQuitArmed] = useState(false);
|
|
83
86
|
const [palette, setPalette] = useState(null);
|
|
84
87
|
const [usageCardEnabled, setUsageCardEnabled] = useState(true);
|
|
85
88
|
const [mouseOn, setMouseOn] = useState(mouseEnabled);
|
|
@@ -118,6 +121,8 @@ export function App({ config, baseConfig, overrides, configPath, configCreated,
|
|
|
118
121
|
const busyRef = useRef(false);
|
|
119
122
|
const abortRef = useRef(null);
|
|
120
123
|
const cancelRequestedRef = useRef(false);
|
|
124
|
+
const quitArmedRef = useRef(false);
|
|
125
|
+
const quitTimerRef = useRef(null);
|
|
121
126
|
const [approvalPolicy] = useState(() => new ApprovalPolicy(yolo));
|
|
122
127
|
const [autoAllowed, setAutoAllowed] = useState([]);
|
|
123
128
|
const pendingApprovalRef = useRef(null);
|
|
@@ -357,6 +362,35 @@ export function App({ config, baseConfig, overrides, configPath, configCreated,
|
|
|
357
362
|
exit();
|
|
358
363
|
})();
|
|
359
364
|
}, [exit, persistSession]);
|
|
365
|
+
const disarmQuit = useCallback(() => {
|
|
366
|
+
if (quitTimerRef.current !== null) {
|
|
367
|
+
clearTimeout(quitTimerRef.current);
|
|
368
|
+
quitTimerRef.current = null;
|
|
369
|
+
}
|
|
370
|
+
quitArmedRef.current = false;
|
|
371
|
+
setQuitArmed(false);
|
|
372
|
+
}, []);
|
|
373
|
+
const armQuit = useCallback(() => {
|
|
374
|
+
if (quitTimerRef.current !== null)
|
|
375
|
+
clearTimeout(quitTimerRef.current);
|
|
376
|
+
quitArmedRef.current = true;
|
|
377
|
+
setQuitArmed(true);
|
|
378
|
+
quitTimerRef.current = setTimeout(() => {
|
|
379
|
+
quitTimerRef.current = null;
|
|
380
|
+
quitArmedRef.current = false;
|
|
381
|
+
setQuitArmed(false);
|
|
382
|
+
}, QUIT_CONFIRM_MS);
|
|
383
|
+
}, []);
|
|
384
|
+
useEffect(() => {
|
|
385
|
+
return () => {
|
|
386
|
+
if (quitTimerRef.current !== null)
|
|
387
|
+
clearTimeout(quitTimerRef.current);
|
|
388
|
+
};
|
|
389
|
+
}, []);
|
|
390
|
+
useEffect(() => {
|
|
391
|
+
if (busy)
|
|
392
|
+
disarmQuit();
|
|
393
|
+
}, [busy, disarmQuit]);
|
|
360
394
|
const flushText = useCallback(() => {
|
|
361
395
|
if (flushTimerRef.current) {
|
|
362
396
|
clearTimeout(flushTimerRef.current);
|
|
@@ -1202,14 +1236,17 @@ export function App({ config, baseConfig, overrides, configPath, configCreated,
|
|
|
1202
1236
|
if (!(key.ctrl && input === 'c'))
|
|
1203
1237
|
return;
|
|
1204
1238
|
if (pickerOpen) {
|
|
1239
|
+
disarmQuit();
|
|
1205
1240
|
setPickerOpen(false);
|
|
1206
1241
|
return;
|
|
1207
1242
|
}
|
|
1208
1243
|
if (wizardActiveRef.current) {
|
|
1244
|
+
disarmQuit();
|
|
1209
1245
|
cancelWizard();
|
|
1210
1246
|
return;
|
|
1211
1247
|
}
|
|
1212
1248
|
if (pendingApprovalRef.current) {
|
|
1249
|
+
disarmQuit();
|
|
1213
1250
|
cancelRequestedRef.current = true;
|
|
1214
1251
|
setCancelling(true);
|
|
1215
1252
|
resolveApproval('deny');
|
|
@@ -1226,7 +1263,12 @@ export function App({ config, baseConfig, overrides, configPath, configCreated,
|
|
|
1226
1263
|
abortRef.current?.abort();
|
|
1227
1264
|
return;
|
|
1228
1265
|
}
|
|
1229
|
-
|
|
1266
|
+
if (quitArmedRef.current) {
|
|
1267
|
+
disarmQuit();
|
|
1268
|
+
quit();
|
|
1269
|
+
return;
|
|
1270
|
+
}
|
|
1271
|
+
armQuit();
|
|
1230
1272
|
});
|
|
1231
1273
|
const activity = pendingApproval
|
|
1232
1274
|
? 'approval'
|
|
@@ -1256,6 +1298,6 @@ export function App({ config, baseConfig, overrides, configPath, configCreated,
|
|
|
1256
1298
|
? 'Kiro is working… type ahead, or Ctrl+C to cancel'
|
|
1257
1299
|
: wizardActive
|
|
1258
1300
|
? 'Working… Esc to cancel'
|
|
1259
|
-
: 'Ask Kiro to build or change something…', slashMenu: !wizardActive && !wizardPrompt, onSubmit: handleSubmit, onCancel: wizardActive ? cancelWizard : undefined }, wizardPrompt?.id ?? 0)), _jsx(StatusBar, { width: width, profile: profileName, model: activeProfile?.model ?? 'unknown', cwd: cwd, activity: activity, toolName: activeTool ?? undefined, busySince: busySince ?? undefined, queued: queuedCount > 0 ? queuedCount : undefined, yolo: yolo, autoAllowed: autoAllowed, contextTokens: showUsageCard ? undefined : contextTokens, contextWindow: showUsageCard ? undefined : contextWindow }), pickerOpen && pickerPopup ? (_jsx(Box, { position: "absolute", marginTop: pickerPopup.top, marginLeft: pickerPopup.left, children: _jsx(ModelPicker, { config: runtimeConfig, activeProfile: profileName, width: pickerPopup.width, height: pickerPopup.height, onSelect: (name, model) => void selectModel(name, model), onRefresh: refreshProfileModels, onCancel: () => setPickerOpen(false) }) })) : null] }));
|
|
1301
|
+
: 'Ask Kiro to build or change something…', slashMenu: !wizardActive && !wizardPrompt, onSubmit: handleSubmit, onCancel: wizardActive ? cancelWizard : undefined }, wizardPrompt?.id ?? 0)), _jsx(StatusBar, { width: width, profile: profileName, model: activeProfile?.model ?? 'unknown', cwd: cwd, activity: activity, toolName: activeTool ?? undefined, busySince: busySince ?? undefined, queued: queuedCount > 0 ? queuedCount : undefined, yolo: yolo, autoAllowed: autoAllowed, quitHint: quitArmed, contextTokens: showUsageCard ? undefined : contextTokens, contextWindow: showUsageCard ? undefined : contextWindow }), pickerOpen && pickerPopup ? (_jsx(Box, { position: "absolute", marginTop: pickerPopup.top, marginLeft: pickerPopup.left, children: _jsx(ModelPicker, { config: runtimeConfig, activeProfile: profileName, width: pickerPopup.width, height: pickerPopup.height, onSelect: (name, model) => void selectModel(name, model), onRefresh: refreshProfileModels, onCancel: () => setPickerOpen(false) }) })) : null] }));
|
|
1260
1302
|
}
|
|
1261
1303
|
//# sourceMappingURL=App.js.map
|
package/dist/ui/StatusBar.js
CHANGED
|
@@ -14,7 +14,7 @@ function prettyCwd(cwd) {
|
|
|
14
14
|
}
|
|
15
15
|
return cwd;
|
|
16
16
|
}
|
|
17
|
-
export function StatusBar({ width, profile, model, cwd, activity, toolName, busySince, queued, yolo = false, autoAllowed = [], contextTokens, contextWindow, }) {
|
|
17
|
+
export function StatusBar({ width, profile, model, cwd, activity, toolName, busySince, queued, yolo = false, autoAllowed = [], quitHint = false, contextTokens, contextWindow, }) {
|
|
18
18
|
const busy = activity !== null;
|
|
19
19
|
const [frame, setFrame] = useState(0);
|
|
20
20
|
useEffect(() => {
|
|
@@ -23,18 +23,26 @@ export function StatusBar({ width, profile, model, cwd, activity, toolName, busy
|
|
|
23
23
|
const interval = setInterval(() => setFrame((current) => (current + 1) % SPINNER.length), 100);
|
|
24
24
|
return () => clearInterval(interval);
|
|
25
25
|
}, [busy]);
|
|
26
|
-
const stateText =
|
|
27
|
-
? '
|
|
26
|
+
const stateText = quitHint
|
|
27
|
+
? 'Ctrl+C again to quit'
|
|
28
|
+
: activity === 'approval'
|
|
29
|
+
? 'approval needed'
|
|
30
|
+
: activity === 'cancelling'
|
|
31
|
+
? 'cancelling…'
|
|
32
|
+
: activity === 'running'
|
|
33
|
+
? `running ${toolName ?? 'tool'}…`
|
|
34
|
+
: activity === 'replying'
|
|
35
|
+
? 'replying…'
|
|
36
|
+
: activity === 'thinking'
|
|
37
|
+
? 'thinking…'
|
|
38
|
+
: 'ready';
|
|
39
|
+
const stateColor = quitHint
|
|
40
|
+
? 'red'
|
|
28
41
|
: activity === 'cancelling'
|
|
29
|
-
? '
|
|
30
|
-
: activity ===
|
|
31
|
-
?
|
|
32
|
-
:
|
|
33
|
-
? 'replying…'
|
|
34
|
-
: activity === 'thinking'
|
|
35
|
-
? 'thinking…'
|
|
36
|
-
: 'ready';
|
|
37
|
-
const stateColor = activity === 'cancelling' ? 'red' : activity === null ? 'green' : 'yellow';
|
|
42
|
+
? 'red'
|
|
43
|
+
: activity === null
|
|
44
|
+
? 'green'
|
|
45
|
+
: 'yellow';
|
|
38
46
|
const spinner = busy ? `${SPINNER[frame] ?? '⠋'} ` : '';
|
|
39
47
|
const elapsedMs = busy && busySince !== undefined ? Math.max(0, Date.now() - busySince) : 0;
|
|
40
48
|
// Whole seconds keep the re-rendering spinner from making the timer flicker.
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.2.
|
|
1
|
+
export const VERSION = '0.2.7';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|