mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-02 13:40:46 +00:00
Refactor /resume command to use dialog instead of standalone Ink app
This commit is contained in:
parent
2de50ae436
commit
12877ac849
9 changed files with 471 additions and 75 deletions
25
packages/cli/src/ui/hooks/useResumeCommand.ts
Normal file
25
packages/cli/src/ui/hooks/useResumeCommand.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2025 Qwen Code
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import { useState, useCallback } from 'react';
|
||||
|
||||
export function useResumeCommand() {
|
||||
const [isResumeDialogOpen, setIsResumeDialogOpen] = useState(false);
|
||||
|
||||
const openResumeDialog = useCallback(() => {
|
||||
setIsResumeDialogOpen(true);
|
||||
}, []);
|
||||
|
||||
const closeResumeDialog = useCallback(() => {
|
||||
setIsResumeDialogOpen(false);
|
||||
}, []);
|
||||
|
||||
return {
|
||||
isResumeDialogOpen,
|
||||
openResumeDialog,
|
||||
closeResumeDialog,
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue