|
|
|
|
|
|
|
|
}, [inputs, setInputs]) |
|
|
}, [inputs, setInputs]) |
|
|
|
|
|
|
|
|
const handlePromptChange = useCallback((newPrompt: PromptItem[] | PromptItem) => { |
|
|
const handlePromptChange = useCallback((newPrompt: PromptItem[] | PromptItem) => { |
|
|
const newInputs = produce(inputRef.current, (draft) => { |
|
|
|
|
|
|
|
|
const newInputs = produce(inputs, (draft) => { |
|
|
draft.prompt_template = newPrompt |
|
|
draft.prompt_template = newPrompt |
|
|
}) |
|
|
}) |
|
|
setInputs(newInputs) |
|
|
setInputs(newInputs) |
|
|
}, [setInputs]) |
|
|
|
|
|
|
|
|
}, [inputs, setInputs]) |
|
|
|
|
|
|
|
|
const handleMemoryChange = useCallback((newMemory?: Memory) => { |
|
|
const handleMemoryChange = useCallback((newMemory?: Memory) => { |
|
|
const newInputs = produce(inputs, (draft) => { |
|
|
const newInputs = produce(inputs, (draft) => { |