mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 01:07:46 +00:00
Polish the PR, minor improvements
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user