tycono 0.3.25-beta.1 → 0.3.26-beta.0

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tycono",
3
- "version": "0.3.25-beta.1",
3
+ "version": "0.3.26-beta.0",
4
4
  "description": "Build an AI company. Watch them work.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/tui/app.tsx CHANGED
@@ -235,6 +235,10 @@ export const App: React.FC = () => {
235
235
  // User input lines — lifted from CommandMode to survive Panel mode switches
236
236
  const [userInputs, setUserInputs] = useState<StreamLine[]>([]);
237
237
 
238
+ // Committed line counter — lifted to survive CommandMode unmount/remount (Panel switch)
239
+ // Without this, remount resets committedRef to 0 → <Static> re-renders all items → duplication
240
+ const committedRef = useRef(0);
241
+
238
242
  // Preset selection state (for /new without args)
239
243
  const [pendingPresetSelect, setPendingPresetSelect] = useState<PresetSummary[] | null>(null);
240
244
  const selectedPresetRef = useRef<string | null>(null);
@@ -770,6 +774,7 @@ export const App: React.FC = () => {
770
774
  eventLines={eventLines}
771
775
  systemMessages={systemMessages}
772
776
  userInputs={userInputs}
777
+ committedRef={committedRef}
773
778
  onUserInput={(line) => setUserInputs(prev => [...prev.slice(-10), line])}
774
779
  onSubmit={handleCommandSubmit}
775
780
  onQuickAction={(action) => {
@@ -28,6 +28,7 @@ interface CommandModeProps {
28
28
  eventLines: StreamLine[];
29
29
  systemMessages: StreamLine[];
30
30
  userInputs: StreamLine[];
31
+ committedRef: React.MutableRefObject<number>;
31
32
  onUserInput: (line: StreamLine) => void;
32
33
  onSubmit: (input: string) => void;
33
34
  onQuickAction?: (action: string) => void;
@@ -295,6 +296,7 @@ export const CommandMode: React.FC<CommandModeProps> = ({
295
296
  eventLines,
296
297
  systemMessages,
297
298
  userInputs,
299
+ committedRef,
298
300
  onUserInput,
299
301
  onSubmit,
300
302
  onQuickAction,
@@ -302,7 +304,6 @@ export const CommandMode: React.FC<CommandModeProps> = ({
302
304
  focusedWaveId,
303
305
  }) => {
304
306
  const [input, setInput] = useState('');
305
- const committedRef = useRef(0);
306
307
  const [quickBarActive, setQuickBarActive] = useState(false);
307
308
  const [quickBarIndex, setQuickBarIndex] = useState(0);
308
309
  const [acIndex, setAcIndex] = useState(0);