tycono 0.1.98 → 0.1.99
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/package.json
CHANGED
package/src/tui/app.tsx
CHANGED
|
@@ -343,7 +343,7 @@ export const App: React.FC = () => {
|
|
|
343
343
|
|
|
344
344
|
// Handle command submission from CommandMode
|
|
345
345
|
const handleCommandSubmit = useCallback(async (input: string) => {
|
|
346
|
-
|
|
346
|
+
// User input is already shown by CommandMode (immediate commit to Static)
|
|
347
347
|
|
|
348
348
|
const result = await execute(input);
|
|
349
349
|
|
|
@@ -281,6 +281,8 @@ export const CommandMode: React.FC<CommandModeProps> = ({
|
|
|
281
281
|
}) => {
|
|
282
282
|
const [input, setInput] = useState('');
|
|
283
283
|
const committedRef = useRef(0);
|
|
284
|
+
// Immediately committed user inputs (shown in Static before systemMessages arrive)
|
|
285
|
+
const [userInputs, setUserInputs] = useState<StreamLine[]>([]);
|
|
284
286
|
|
|
285
287
|
// Convert events to stream lines
|
|
286
288
|
const eventLines: StreamLine[] = [];
|
|
@@ -289,8 +291,8 @@ export const CommandMode: React.FC<CommandModeProps> = ({
|
|
|
289
291
|
if (line) eventLines.push(line);
|
|
290
292
|
}
|
|
291
293
|
|
|
292
|
-
// Merge system messages
|
|
293
|
-
const allLines = [...systemMessages, ...eventLines].slice(-100);
|
|
294
|
+
// Merge user inputs + system messages + event lines (cap total)
|
|
295
|
+
const allLines = [...userInputs, ...systemMessages, ...eventLines].slice(-100);
|
|
294
296
|
|
|
295
297
|
// Split into committed (scrollback) and live (re-rendered)
|
|
296
298
|
const newCommitted = allLines.slice(committedRef.current);
|
|
@@ -307,6 +309,12 @@ export const CommandMode: React.FC<CommandModeProps> = ({
|
|
|
307
309
|
const handleSubmit = useCallback((value: string) => {
|
|
308
310
|
const trimmed = value.trim();
|
|
309
311
|
if (trimmed) {
|
|
312
|
+
// Show user input immediately in scrollback (before AI responds)
|
|
313
|
+
setUserInputs(prev => [...prev.slice(-10), {
|
|
314
|
+
id: ++lineCounter,
|
|
315
|
+
text: `> ${trimmed}`,
|
|
316
|
+
color: 'yellow',
|
|
317
|
+
}]);
|
|
310
318
|
onSubmit(trimmed);
|
|
311
319
|
}
|
|
312
320
|
setInput('');
|