mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 01:07:46 +00:00
27 lines
594 B
TypeScript
27 lines
594 B
TypeScript
/**
|
|
* @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,
|
|
};
|
|
}
|