mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 17:27:54 +00:00
feat: subagent phase 2 implementation
This commit is contained in:
26
packages/cli/src/ui/hooks/useSubagentCreateDialog.ts
Normal file
26
packages/cli/src/ui/hooks/useSubagentCreateDialog.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2025 Qwen
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import { useState, useCallback } from 'react';
|
||||
|
||||
export function useSubagentCreateDialog() {
|
||||
const [isSubagentCreateDialogOpen, setIsSubagentCreateDialogOpen] =
|
||||
useState(false);
|
||||
|
||||
const openSubagentCreateDialog = useCallback(() => {
|
||||
setIsSubagentCreateDialogOpen(true);
|
||||
}, []);
|
||||
|
||||
const closeSubagentCreateDialog = useCallback(() => {
|
||||
setIsSubagentCreateDialogOpen(false);
|
||||
}, []);
|
||||
|
||||
return {
|
||||
isSubagentCreateDialogOpen,
|
||||
openSubagentCreateDialog,
|
||||
closeSubagentCreateDialog,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user