Polish the PR, minor improvements

This commit is contained in:
Alexander Farber
2025-12-13 14:35:40 +01:00
parent 7a97fcd5f1
commit 4930a24d07
6 changed files with 42 additions and 28 deletions

View File

@@ -19,15 +19,10 @@ import type {
import {
SESSION_PAGE_SIZE,
filterSessions,
type SessionState,
} from '../utils/sessionPickerUtils.js';
import { useKeypress } from './useKeypress.js';
export interface SessionState {
sessions: SessionListItem[];
hasMore: boolean;
nextCursor?: number;
}
export interface UseDialogSessionPickerOptions {
sessionService: SessionService | null;
currentBranch?: string;

View File

@@ -4,6 +4,12 @@
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Session picker hook for standalone mode (fullscreen CLI picker).
* Uses useInput (ink) instead of useKeypress (KeypressContext).
* For dialog mode within the main app, use useDialogSessionPicker instead.
*/
import { useState, useEffect, useCallback, useRef } from 'react';
import { useInput } from 'ink';
import type {
@@ -14,14 +20,9 @@ import type {
import {
SESSION_PAGE_SIZE,
filterSessions,
type SessionState,
} from '../utils/sessionPickerUtils.js';
export interface SessionState {
sessions: SessionListItem[];
hasMore: boolean;
nextCursor?: number;
}
export interface UseSessionPickerOptions {
sessionService: SessionService | null;
currentBranch?: string;